-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (103 loc) · 2.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Alpine Todo</title>
<meta name="title" content="Alpine Todo" />
<meta
name="description"
content="A simple todo app buit with alpine js and persist todos to localstorage"
/>
<link rel="stylesheet" href="style.css" />
<script defer src="script/persist.min.js"></script>
<script defer src="script/alpine.min.js"></script>
<!-- For all browsers -->
<link
rel="icon"
type="image/png"
sizes="32x32"
href="assets/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="assets/favicon-16x16.png"
/>
<!-- For Google and Android -->
<link
rel="icon"
type="image/png"
sizes="48x48"
href="assets/favicon-48x48.png"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="assets/favicon-192x192.png"
/>
<!-- For iPad -->
<link
rel="apple-touch-icon"
type="image/png"
sizes="167x167"
href="assets/favicon-167x167.png"
/>
<!-- For iPhone -->
<link
rel="apple-touch-icon"
type="image/png"
sizes="180x180"
href="assets/favicon-180x180.png"
/>
<meta property="og:title" content="Alpine Todo" />
<meta
property="og:description"
content="A simple todo app buit with alpine js and persist todos to localstorage"
/>
<meta
property="og:url"
content="https://hrishiksh.github.io/alpine-todo/"
/>
<meta
property="og:image"
content="https://hrishiksh.github.io/alpine-todo/assets/alpine-og.webp"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:image"
content="https://hrishiksh.github.io/alpine-todo/assets/alpine-og.webp"
/>
<meta name="twitter:title" content="Alpine Todo" />
<meta
name="twitter:description"
content="A simple todo app buit with alpine js and persist todos to localstorage"
/>
</head>
<body>
<main>
<h1>Alpine Todo</h1>
<section class="todo-box" x-data="{todo: $persist([])}">
<ul>
<template x-for="(t,index) in todo">
<li class="todo-item">
<span class="todo-delete" @click="todo.splice(index,1)"
><img src="assets/trash.svg" alt="trash icon" /></span
><span x-text="t"></span>
</li>
</template>
</ul>
<div class="input">
<input type="text" x-ref="textinput" placeholder="What to do next?" />
<button
@click="todo.push($refs.textinput.value);$refs.textinput.value=''"
>
Add
</button>
</div>
</section>
</main>
</body>
</html>