-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
288 lines (228 loc) · 7.42 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
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
<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
<head>
<meta charset='UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<meta name='author' content='Jan Prazak' />
<meta name='description' content='https://github.com/Amarok24' />
<title>MultiTab-Gallery DEMO</title>
<link rel='preconnect' href='https://fonts.googleapis.com' />
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin='crossorigin' />
<link
href='https://fonts.googleapis.com/css2?family=Gemunu+Libre:wght@400;700&display=swap'
rel='stylesheet' />
<style>
html {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
text-size-adjust: none;
/* Text Size adjust OFF on mobile devices (when changing screen orientation) */
}
body {
margin: 0;
background: #ebebeb;
font-family: 'Gemunu Libre', sans-serif;
font-size: 18px;
line-height: 1.4;
}
h1 {
margin: 0;
text-align: center;
}
hr {
border: 0;
border-bottom: 5px solid grey;
}
ul {
list-style-type: square;
}
footer {
margin: 3em 0 0 0;
padding: 1em;
background-color: lightskyblue;
}
#gh {
position: fixed;
z-index: 100;
right: 0;
top: 0;
background-color: rgba(214, 230, 238, 0.85);
color: #1c3055;
padding: 10px 10px 30px 40px;
border-radius: 0 0 0 100%;
text-align: right;
}
#gh a {
display: inline;
color: inherit;
text-decoration: none;
}
.container {
max-width: 780px;
margin: 0 auto;
padding: 20px;
border: thin solid #bababa;
box-shadow: 3px 3px 5px #bababa;
background-color: #fdfdfd;
color: #404040;
}
.myNav {
margin-bottom: 1em;
}
.myNav>* {
display: inline-block;
margin: 3px;
padding: 5px 20px;
border: 1px solid darkslategrey;
box-shadow: 1px 1px 3px grey;
background-color: ghostwhite;
text-decoration: none;
cursor: pointer;
}
.myWrapper {
box-shadow: 0 0 5px lightsteelblue;
}
.myTabContent h4 {
margin: 0 0 1em;
}
.mt-selected {
/* Use this class to define styling of selected navigation button. */
background-color: cornflowerblue;
}
.mySecondNav>* {
box-shadow: none;
border-color: lightblue;
border-radius: 50%;
}
.mySecondNav .mt-selected {
border-bottom: 4px solid midnightblue;
color: white;
}
.bg {
color: white;
padding: 2em 1em;
}
.bg--bg1 {
background-color: steelblue;
}
.bg--bg2 {
background-color: teal;
}
</style>
<script type='module' src='dist/mtg.js'>
</script>
<!--
<script src='dist/bundle.min.js' defer='defer'>
/* Use this if you need the minified and bundled code (no modules). */
</script>
-->
</head>
<body>
<div class='container'>
<h1>MultiTab-Gallery DEMO</h1>
<hr />
<ul>
<li>A simple library written in TypeScript and CSS (uses CSS 3 features for
animation).</li>
<li>Minimalistic, tiny filesize (only 3kb bundled & minified).</li>
<li>Zero dependencies.</li>
<li>Easy to integrate (but you will have to use your coding skills to make
adjustments).</li>
<li>Fully responsive.</li>
<li>Free and open source.</li>
</ul>
<hr />
<h3>Navigation works with any elements, here with <a></h3>
<nav class='myNav'>
<!-- Optionally add class 'mt-selected' to 1st nav item to apply styling -->
<a href='#' class='mt-selected'>A 1</a>
<a href='#'>A 2</a>
<a href='#'>A 3</a>
<a href='#'>A 4</a>
<a href='#'>A 5</a>
</nav>
<section class='myTabContent'>
<!-- All content items have to be wrapped by one parent element -->
<article>
A1 content. There can be basically anything inside, also images.<br />
<img src='assets/amiga500.png' alt='Amiga 500' width='167' height='82' />
</article>
<article>
A2 content.<br />
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Animi, doloribus harum
consectetur quaerat quam accusamus nisi libero similique pariatur, in atque eaque
sunt voluptas vitae illum, quisquam laborum cumque ut est provident rem. Ratione
voluptatem consequatur fugiat perspiciatis neque aliquid id vel exercitationem
quas distinctio incidunt eum ducimus deleniti officia architecto aperiam error aut
veritatis culpa, unde quia tenetur! Illum!
</article>
<article>
A3 content.<br />
Lorem ipsum dolor sit amet consectetur, adipisicing elit. In eius exercitationem
nostrum voluptatibus, non sit.
</article>
<article>
A4 content<br />
Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto similique
perferendis suscipit deserunt, nulla praesentium magni ab est cumque ipsa?
</article>
<article>
A5 content<br />
<img src='assets/schneider-cpc.png' alt='Schneider CPC6128' width='200'
height='136' />
</article>
</section>
<hr />
<h3>Navigation with <button> elements</h3>
<nav class='myNav mySecondNav'>
<button class='mt-selected'>B 1</button>
<button>B 2</button>
<button>B 3</button>
</nav>
<section class='myTabContent'>
<div class='bg bg--bg1'>
<h4>B1 content</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ullam inventore quam
nulla odit hic voluptatibus!</p>
</div>
<div class='bg bg--bg2'>
<h4>B2 content</h4>
<p>Adipisicing elit lorem ipsum dolor sit amet consectetur, adipisicing elit.
Mollitia, quisquam.
</p>
</div>
<div>
<h4>B3 content</h4>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Corrupti facere
magnam explicabo ex deleniti voluptas odit dicta, dolor nostrum accusantium et
nisi rerum aut suscipit numquam recusandae consequatur sed veniam quia dolores.
Autem quas recusandae dignissimos tenetur alias dolorum consequatur.</p>
</div>
</section>
<hr />
<h3>You can also simply create a slideshow with images</h3>
<nav class='myNav mySecondNav'>
<button class='mt-selected'>Image 1</button>
<button>Image 2</button>
<button>Image 3</button>
</nav>
<section class='myTabContent'>
<img src="assets/gallery1.webp" alt="" width="1280" height="450" />
<img src="assets/gallery2.webp" alt="" width="1280" height="450" />
<img src="assets/gallery3.webp" alt="" width="1280" height="450" />
<!-- Free images from Pixabay
https://pixabay.com/photos/horses-horseback-riding-galloping-5871847/
https://pixabay.com/photos/sea-surfer-sunset-silhouette-beach-6568951/
https://pixabay.com/photos/animal-flowers-dog-outdoors-canine-6637774/
-->
</section>
<hr />
<footer>
By default the height of all content wrappers gets automatically adjusted to the highest member, even if the layout changes (can be turned off).<br /> Try to resize the viewport (or change display orientation if you are viewing this page on a mobile device).
</footer>
</div>
<span id='gh'>
<a href='https://github.com/Amarok24/multitab-gallery' target='_blank'>GitHub
project</a>
</span>
</body>
</html>