-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
290 lines (268 loc) · 12 KB
/
Copy pathindex.html
File metadata and controls
290 lines (268 loc) · 12 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<html>
<head>
<title>G test</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="Keywords" content="index">
<meta name="Description" content="it is just an index directory">
<link rel="stylesheet" type="text/css" href=".css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="./css/w3.css"/>
<script src="./js/w3.js"></script>
<style>
a{
text-decoration:none;
}
</style>
</head>
<body>
<div class="w3-container w3-padding-large w3-blue">
<!-- Logo component-->
<div class="w3-left w3-rightbar w3-border-white" style="width:60px;">
<div class="w3-display-container w3-indigo" style="width:40px;height:40px">
<div class="w3-display-topleft w3-green" style="width:40px;height:40px;transform:rotate(30deg);transform-origin:center center;">
</div>
<span class="w3-display-middle w3-text-white w3-xlarge"><b>G</b></span>
</div>
</div>
<!-- Heading for website-->
<div class="w3-left w3-margin-left" style="max-width:60%;">
<span class="w3-xlarge w3-hide-small w3-padding-small">Always wanting to tell a tale</span>
<span class="w3-large w3-border-bottom w3-hide-medium w3-hide-large w3-padding-small w3-mobile"><b>Always wanting to tell a tale</b></span>
<span class="w3-tiny w3-mobile w3-right w3-padding-small">23-11-2022</span>
</div>
<!-- Search button-->
<div class="w3-right w3-white w3-hide-small">
<input class="w3-padding w3-border-0" style="width:100px;" type="text" placeholder="Search" />
<span class="w3-white w3-tag w3-bar-item"><span class=" w3-xlarge">☌</span></span>
</div>
</div>
<!-- Search button for small devices-->
<div class="w3-right w3-white w3-hide-medium w3-hide-large w3-padding">
<input class="w3-padding w3-border-0 w3-border-bottom w3-border-black" type="text" placeholder="Search" />
<span class="w3-white w3-tag w3-bar-item"><span class=" w3-xlarge">☌</span></span>
</div>
<div class="w3-">
<!-- This is code for sidebar opening button-->
<span class="w3-tag w3-top w3-hide-small w3-hide-medium w3-hover-green w3-animate-right w3-large" style="position:static;" onclick="w3.removeClass('#sidebar','w3-hide');">☰</span>
<!-- This is code for sidebar-->
<div id="sidebar" class="w3-sidebar w3-hide w3-animate-left w3-bar-block w3-aqua" style="width:40%;top:0">
<span class="w3-bar-item w3-black w3-text-white w3-center"><b>Contents</b><span class="w3-right w3-border w3-tag w3-hover-red w3-hover-text-black" onclick="w3.addClass('#sidebar','w3-hide');">☓</span></span>
<div w3-repeat="bar" onclick="w3.toggleClass('#sidebar div:hover .dropdown','w3-hide');">
<div class="w3-bar-item w3-clear w3-hover-opacity w3-right-align w3-border-bottom w3-border-black">{{bar_item}}<span class="w3-left w3-border-right w3-border-black">☟</span></div>
<ul class="dropdown w3-right w3-hide">
<li class={{c1_}}>{{c1}}</li>
<li class={{c2_}}>{{c2}}</li>
<li class={{c3_}}>{{c3}}</li>
<li class={{c4_}}>{{c4}}</li>
<li class={{c5_}}>{{c5}}</li>
<li class={{c6_}}>{{c6}}</li>
<li class={{c7_}}>{{c7}}</li>
<li class={{c8_}}>{{c8}}</li>
<li class={{c9_}}>{{c9}}</li>
<li class={{c10_}}>{{c10}}</li>
</ul>
</div>
</div>
<!-- This is code for mainbody-->
<div class="w3-row w3-content">
<!-- This is code for content writing-->
<div id="main_section" class="w3-container w3-padding-16 w3-blue-grey w3-col l9 m8 w3-mobile">
<!-- This is code for sidebar opening button-->
<span class="w3-margin w3-hide-large w3-tag w3-hover-green w3-animate-right w3-large" style="position:static;" onclick="w3.removeClass('#sidebar','w3-hide');">☰</span>
<!-- code for cards-->
<div class="w3-container w3-padding w3-white">
<div w3-repeat="contents" class="w3-border-0">
<h1 class={{h_hide}}>{{Intro}}</h1>
<p class={{p_hide}}>{{p_content}}</p>
<div class={{img_hide}}>
<img class="w3-padding w3-margin-top" src={{img_src}} style="width:100%;"/>
</div>
</div>
</div>
</div>
<!-- This is code for content for publicity-->
<div id="ads_section" class="w3-container w3-padding-16 w3-col l3 m4 w3-mobile">
<div class="w3-blue-grey w3-panel w3-center">
<p class="w3-xlarge"><b>You might also like</b></p>
</div>
<!-- card type 0-->
<div w3-repeat="ads">
<a class={{card_0_hide}} href={{href_0}}>
<div class={{card_0_hide}}>
<div class="w3-hover-shadow w3-border w3-display-container w3-padding w3-margin-bottom">
<div class={{img_hide}}>
<img class="w3-opacity" src={{img_src}} style="width:100%;"/>
</div>
<div class="w3-display-middle">
<h3 class={{h_hide}}><strong>{{Intro}}</strong></h3>
<p class={{p_hide}}>{{p_content}}</p>
</div>
</div>
</div>
</a>
<!-- card type 1-->
<a class={{card_1_hide}} href={{href_1}}>
<div class={{card_1_hide}}>
<div class="w3-hover-shadow w3-border w3-padding w3-margin-bottom">
<h3 class={{h_hide}}><strong>{{Intro}}</strong></h3>
<p class={{p_hide}}>{{p_content}}</p>
</div>
</div>
</a>
<!-- card type 2-->
<a class={{card_2_hide}} href={{href_2}}>
<div class={{card_2_hide}}>
<div class="w3-card-2 w3-hover-shadow w3-padding w3-margin-bottom">
<img class={{img_hide}} src={{img_src}} style="width:100%;"/>
<h3 class={{h_hide}}><strong>{{Intro}}</strong></h3>
<p class={{p_hide}}>{{p_content}}</p>
</div>
</div>
</a>
<!-- card type 3-->
<a class={{card_3_hide}} href={{href_3}}>
<div class={{card_3_hide}}>
<div class="w3-card-4 w3-container w3-padding w3-margin-bottom">
<img class={{img_hide}} src={{img_src}} style="width:100%;"/>
<h3 class={{h_hide}}><strong>{{Intro}}</strong></h3>
<p class={{p_hide}}>{{p_content}}</p>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="w3-conatiner w3-black w3-padding-24 w3-xxlarge w3-blue w3-center">
Go to <span class="w3-button w3-hover-white w3-border">Home</span>
</div>
<script>
const sidebar_items = {
"bar":[
{"bar_item":"The lost wood",'c1':'Hello','c2':'Fello'},
{"bar_item":"The lost hunt",'c1':'Hello-man','c2':'Fello-man'},
{"bar_item":"The lost flex",'c2':'Fello'},
{"bar_item":"The wood"}
]
}
sidebar_items.bar.forEach(p=>{
let items = Object.entries(p);
for(let i=0 ; i<items.length; i++){
for(let j=0 ; j<10 ; j++){
let p1 = j+1;
let p2 = "c"+p1;
let p3 = p2+"_";
if(p[p2]==undefined){
p[p2] = "";
}
p[p3] = p[p2]!=undefined && p[p2].length==0?"w3-hide":"";
}
}
});
w3.displayObject("sidebar",sidebar_items);
const content_items = {
"contents":[
{"Intro":"Introduction",
"p_content":`I can assure you that i am indeed real
<table class="w3-table w3-border w3-mobile">
<tr class="w3-border-bottom">
<td><strong>Title 1</strong></td>
<td><strong>Title 2</strong></td>
<td><strong>Title 3</strong></td>
</tr>
<tr>
<td>Hello 1</td>
<td>Hello 2</td>
<td>Hello 3</td>
</tr>
<tr>
<td>Hello 1</td>
<td>Hello 2</td>
<td>Hello 3</td>
</tr>
</table>`},
{"img_src":"https://source.unsplash.com/random/1600x900",
"p_content":`
<details class="w3-grey w3-padding">
<summary>Tap to find more</summary>
<p>This detail is highly confucious.</p>
</details>
`}
]
}
content_items.contents.forEach(p=>{
let items = Object.entries(p);
for(let i=0 ; i<items.length ; i++){
if(p["h_hide"] == undefined){
p["h_hide"] = "";
}
if(p["p_hide"] == undefined){
p["p_hide"] = "";
}
if(p["img_hide"] == undefined){
p["img_hide"] = "";
}
if(p["Intro"] == undefined || p["Intro"].length==0){
p["Intro"] = "";
p["h_hide"] = "w3-hide";
}
if(p["p_content"] == undefined || p["p_content"].length==0){
p["p_content"] = "";
p["p_hide"] = "w3-hide";
}
if(p["img_src"] == undefined || p["img_src"].length==0){
p["img_src"] = "";
p["img_hide"] = "w3-hide";
}
}
});
w3.displayObject("main_section",content_items);
const ads_items = {
"ads":[
{"card_1_hide":"","Intro":"Title/Ads","p_content":"<a class='w3-red'>This</a> is sth u should not miss","img_src":"https://thumbs.dreamstime.com/b/wooden-bridge-links-small-islands-around-lagoon-okinawa-japan-okinawa-popular-tourist-travel-destination-good-244824964.jpg","href_1":"https://www.google.com"},
{"card_2_hide":"","Intro":"Title/Ads","p_content":"This is sth u should not miss","img_src":"https://thumbs.dreamstime.com/b/wooden-bridge-links-small-islands-around-lagoon-okinawa-japan-okinawa-popular-tourist-travel-destination-good-244824964.jpg"},
{"card_3_hide":"","Intro":"Title/Ads","p_content":"This is sth u should not miss","img_src":"https://thumbs.dreamstime.com/b/wooden-bridge-links-small-islands-around-lagoon-okinawa-japan-okinawa-popular-tourist-travel-destination-good-244824964.jpg"}
]
};
ads_items.ads.forEach(p=>{
let items = Object.entries(p);
for(let i=0 ; i<items.length ; i++){
if(p["card_0_hide"] == undefined){
p["card_0_hide"] = "w3-hide";
}else if(p["href_0"] == undefined){
p["href_0"] = "#";
}
if(p["card_1_hide"] == undefined){
p["card_1_hide"] = "w3-hide";
}else if(p["href_1"] == undefined){
p["href_1"] = "#";
}
if(p["card_2_hide"] == undefined){
p["card_2_hide"] = "w3-hide";
}else if(p["href_2"] == undefined){
p["href_2"] = "#";
}
if(p["card_3_hide"] == undefined){
p["card_3_hide"] = "w3-hide";
}else if(p["href_3"] == undefined){
p["href_3"] = "#";
}
if(p["Intro"] == undefined || p["Intro"].length==0){
p["Intro"] = "";
p["h_hide"] = "w3-hide";
}
if(p["p_content"] == undefined || p["p_content"].length==0){
p["p_content"] = "";
p["p_hide"] = "w3-hide";
}
if(p["img_src"] == undefined || p["img_src"].length==0){
p["img_src"] = "";
p["img_hide"] = "w3-hide";
}
}
});
w3.displayObject("ads_section",ads_items);
</script>
</body>
</html>