-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
142 lines (124 loc) · 3.65 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Social Media Dashboard</title>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="sass/css/main.css"/>
</head>
<body>
<header class="header">
<div class="container">
<div class="row">
<div id="title" class="col-10">
<h2>
<strong> Social Media Dashboard </strong>
</h2>
<p>Total Followers: 23,004</p>
</div>
<div id="toggler" class="col-2">
<span id="label">
<span id="light-dark">Dark</span> Mode
</span>
<input type="checkbox" id="switch" name="theme" />
<label for="switch">Toggle</label>
</div>
</div>
</div>
</header>
<div class="fixed-cards container p-2">
<div class="card-deck text-center">
<div class="card">
<div class="card-body">
<h5 class="card-subtitle mb-3"> @nathanf </h5>
<h1 class="card-title"> 1987 </h1>
<p class="card-text"> Followers </p>
</div>
<div class="card-footer">
12 Today
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-subtitle mb-2"> @nathanf </h5>
<h1 class="card-title"> 1044 </h1>
<p class="card-text"> Followers </p>
</div>
<div class="card-footer">
99 Today
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-subtitle mb-2"> @realnathanf </h5>
<h1 class="card-title"> 11k </h1>
<p class="card-text"> Followers </p>
</div>
<div class="card-footer">
1099 Today
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-subtitle mb-2"> Nathan F. </h5>
<h1 class="card-title"> 8239 </h1>
<p class="card-text"> Subscribers </p>
</div>
<div class="card-footer">
144 Today
</div>
</div>
</div>
</div>
Overview - Today
Page Views
87
3%
Likes
52
2%
Likes
5462
2257%
Profile Views
52k
1375%
Retweets
117
303%
Likes
507
553%
Likes
107
19%
Total Views
1407
12%
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript">
var checkbox = document.querySelector('input[name=theme]');
let trans = () => {
document.documentElement.classList.add('transition');
window.setTimeout(() => {
document.documentElement.classList.remove('transition');
}, 1000);
}
checkbox.addEventListener('change', function() {
if(this.checked) {
trans();
document.documentElement.setAttribute('data-theme', 'dark');
document.getElementById('light-dark').innerHTML="Light";
} else {
trans();
document.documentElement.setAttribute('data-theme', 'light');
document.getElementById('light-dark').innerHTML="Dark";
}
});
</script>
</body>
</html>