-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhabits.html
99 lines (93 loc) · 2.35 KB
/
habits.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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Навици</title>
<script src="https://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="https://bootswatch.com/4/slate/bootstrap.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/4/slate/bootstrap.min.css">
<link rel="stylesheet" href="https://bootswatch.com/_assets/css/custom.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4/js/bootstrap.min.js"></script>
<script src="https://cdn.firebase.com/js/client/2.2.3/firebase.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<style>
body {
padding-top: 70px;
padding-bottom: 20px;
}
hidden{
display: none;
}
.card{
margin-bottom: 5%;
}
.container-fluid{
width: 75%;
}
.orange{ color: orange}
.orangered{ color: orangered}
.green{ color: green}
.blue{ color: skyblue}
.purple{ color: mediumpurple}
.red{ color: red}
.lawngreen{ color: lawngreen}
.gray{ color: gray}
.yellow{ color: yellow}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row" id="sortable">
<div id="app"></div>
</div>
</div>
<script>
// JSON data
const jsonData = [
{
"name": "Здраве",
"number": 42,
"color": "fa-heartbeat"
},
{
"name": "Финанси",
"number": 18,
"color": "fa-heartbeat"
},
{
"name": "Знания",
"number": 7,
"color": "fa-heartbeat"
}
];
// Vue app
new Vue({
el: '#app',
mounted: function () {
$("#sortable").sortable();
$("#sortable").disableSelection();
},
data: {
items: jsonData
},
template: `
<div>
<div v-for="(item, index) in items" :key="index" class="col-md-3">
<div class="card text-center">
<h5 class="card-header ">
<i class="fas {{ item.color }} green"></i> {{ item.name }}
</h5>
<div class="card-body">
<p class="card-text">{{ item.number }}</p>
</div>
</div>
<hr>
</div>
</div>
`
});
</script>
</body>
</html>