-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfavorites.html
112 lines (96 loc) · 4.11 KB
/
favorites.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
106
107
108
109
110
111
112
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="css/fontawesome-all.min.css" rel="stylesheet">
<link href="css/style-was-geht.css" rel="stylesheet">
<title>Deine Likes - Münster was geht</title>
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/manifest.json">
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<style type="text/css">
#likesTable .btn {
margin-right: 3px
}
#likesTable .btn {
width: 30px;
overflow: hidden
}
</style>
</head>
<body>
<header>
<div class="row">
<div class="col text-left">
<a class="top-col-icon" href="start.html"><i class="fa fa-fw fa-arrow-left"></i></a>
</div>
</div>
</header>
<div id="content">
<h1>Deine Likes:</h1>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Aktion</th>
</tr>
</thead>
<tbody id="likesTable">
</tbody>
</table>
</div>
<script>
var likes = JSON.parse(localStorage.getItem("likes"));
console.log("likes", likes);
var $table = $("#likesTable");
var itemNr = 0;
likes.forEach(function (item) {
$table.append('<tr><th scope="row">' + (++itemNr) + '</th><td class="eventName">' + item + '</td>'
+ '<td><a class="btn btn-sm btn-danger text-white float-left"><i class="fa fa-times"></i></<a>'
+ '<a class="btn btn-sm btn-success text-white"><i class="fa fa-check"></i></a></td></tr>');
});
$('#likesTable tr').click(function () {
var likedName = $(this).find(".eventName").html()
console.log('likedName', likedName);
$(this).fadeOut();
likes = likes.filter(e => e !== likedName);
console.log("likes", likes);
localStorage.setItem("likes", JSON.stringify(likes));
})
</script>
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//tomo.input23.de/tracker.js', 'fathom');
fathom('set', 'siteId', 'LGUEF');
fathom('trackPageview');
</script>
<!-- / Fathom -->
</body>
</html>