-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathside-menu-template-bk-good.html
executable file
·203 lines (184 loc) · 4.94 KB
/
side-menu-template-bk-good.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family:Tahoma, Geneva, sans-serif;
/* font-family:Arial,Helvetica, sans-serif; */
}
p,ul{
line-height: 1.5em;
}
#myBtn {
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
bottom: 10px; /* Place the button at the bottom of the page */
right: 10px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
border: none; /* Remove borders */
outline: none; /* Remove outline */
background-color:rgba(255, 0, 0, 0.7); /* Set a background color */
color: white; /* Text color */
cursor: pointer; /* Add a mouse pointer on hover */
padding: 15px; /* Some padding */
border-radius: 10px; /* Rounded corners */
font-size: 18px; /* Increase font size */
}
#myBtn:hover {
background-color: #555; /* Add a dark-grey background on hover */
}
#submenu {
font-size: 1em;
color: black; /* light green #e6ffcc; */
}
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color:#0099ff; /* green #4CAF50; */
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 1em;
color: #ffffff;
display: block;
transition: 0.3s;
}
.sidenav a:hover {
color: #f1f1f1;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 40px;
margin-top:0;
}
#main {
transition: margin-left .5s;
padding: 14px;
}
/* Create two equal columns that floats next to each other */
.column1 {
float: left;
width: 55%;
}
.column2 {
float: left;
width: 45%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
@media screen and (min-width: 850px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
#main{ margin-left:250px;}
#ham{ display: none;}
#close{ display: none;}
#title{font-size:2.2em}
}
@media screen and (max-width: 850px) {
#main{margin-left:0}
.column1{width:100%}
.column2{width:100%}
#title{font-size:1.5em}
}
@media screen and (min-width: 1200px) {
#main{padding-left:50px;padding-right:50px;}
}
</style>
</head>
<body>
<!-- ##### NAVIGATION ##### -->
<div id="mySidenav" class="sidenav">
<a id="close" ahref="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="#">INTRO</a>
<a href="#">THEORY</a>
<a id="submenu" href="#">- Qi(energy)</a>
<a id="submenu" href="#">- 5 Elements</a>
<a id="submenu" href="#">- 8 Directions</a>
<a id="submenu" href="#">- Horoscope</a>
<a href="#">PRACTICE</a>
<a id="submenu" href="#">- Siting/Landscape</a>
<a id="submenu" href="#">- interior</a>
<a id="submenu" href="#">- Spaces/Portents</a>
<a id="submenu" href="#">- Putting it together</a>
<a href="#">Thoughts</a>
<a id="submenu" href="#">- Advanced</a>
<a id="submenu" href="#">- Personal Practice</a>
<a id="submenu" href="#">- Reading List</a>
<a href="#">@contact</a>
</div>
<!-- ###### /NAVIGATION ###### -->
<div id="main">
<!-- ###### TOP BUTTON ###### -->
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<span id="ham" style="font-size:1em;cursor:pointer" onclick="openNav()">☰</span><span id="title";><b>Feng Shui </b>& Geomancy</span>
<!-- ###### TOP BUTTON ###### -->
<div class="row">
<div class="column1">
<p>
</p>
</div>
<div class="column2">
<p style="text-align:center" >
<img alt="Planet Earth" src="imgs/world.jpg"/>
</p>
</div>
</div>
<!-- ##### SCRIPTS ##### -->
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft= "0";
}
</script>
<script>
function myFunction(x) {
if (x.matches) { // If media query matches
document.getElementById("mySidenav").style.width = "0";
} else {
document.getElementById("mySidenav").style.width = "250px";
}
}
var x = window.matchMedia("(max-width: 850px)")
myFunction(x) // Call listener function at run time
x.addListener(myFunction) // Attach listener function on state changes
</script>
<script>
//Get the button
var mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>