-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
130 lines (118 loc) · 3.6 KB
/
template.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="shortcut icon" href="./favicon.ico" />
<style>
body{
font-family: Georgia, 'Times New Roman', Times, serif;
}
article{
margin-top: 5em;
}
.side-nav{
color: black;
border-radius: 50%;
text-decoration: none;
border: none;
width: 3em;
height: 3em;
padding: 10px;
background-color: white;
transition: 0.5s;
margin-bottom: 10px;
}
.side-nav-div{
margin-top: 7em;
text-align: center;
}
.side-nav:hover{
color: white;
background-color: black;
}
html {
font-size: 1.3rem;
}
blockquote {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 4em;
line-height: 0.1em;
margin-right: 0.25em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}
@media (max-width:1000px) {
.row{
flex-direction: column;
}
.col-1{
width: 100%;
margin-top: 10px;
float: left;
}
.col-11{
margin-top: 4px !important;
width: 100%;
}
}
</style>
</head>
<body class='container'>
<div class='row'>
<div class='col-1 side-nav-div'>
<button onclick="window.location.replace('https://example.com')" class='side-nav'><span class="fa fa-home"></span></button>
<button onclick="increaseFontSize()" class='side-nav'>A+</button>
<button onclick="decreaseFontSize()" class='side-nav'>A-</button>
</div>
<article class='col-11 mt-5'>
</article>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js"></script>
<script>
function increaseFontSize(){
let html = document.getElementsByTagName('html')[0];
let currentFont = window.getComputedStyle(html, null).getPropertyValue("font-size");
if(currentFont == '35px'){
return false;
}
html.style.fontSize = parseInt(currentFont) + parseInt(3) + "px";
}
function decreaseFontSize(){
let html = document.getElementsByTagName('html')[0];
let currentFont = window.getComputedStyle(html, null).getPropertyValue("font-size");
if(currentFont == '14px'){
return false;
}
html.style.fontSize = parseInt(currentFont) - parseInt(3) + "px";
}
function addDarkmodeWidget() {
const options = {
time: '0.5s', // default: '0.3s'
mixColor: '#fff', // default: '#fff'
backgroundColor: '#fff', // default: '#fff'
buttonColorDark: '#100f2c', // default: '#100f2c'
buttonColorLight: '#fff', // default: '#fff'
saveInCookies: false, // default: true,
label: '🌙', // default: ''
autoMatchOsTheme: true // default: true
}
const darkmode = new Darkmode(options);
darkmode.showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
</body>
</html>