Skip to content

Commit efe1606

Browse files
committed
Website: Layout improvements
1 parent f1db090 commit efe1606

1 file changed

Lines changed: 31 additions & 55 deletions

File tree

index.html

Lines changed: 31 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,100 +3,83 @@
33
<head>
44
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
55
<meta http-equiv="content-type" content="text/html;charset=utf-8">
6-
76
<meta name="keywords" content="JavaScript,carousel,mobile,touch,slide">
8-
97
<meta name="description" content="JavaScript touch carousel with zero dependencies">
10-
118
<title>ItemSlide.js - JavaScript touch carousel</title>
12-
139
<style>
1410
body {
1511
font-family: calibri, sans-serif;
1612
text-align: center;
1713
margin: 0;
14+
height: 98vh;
1815
background-color: #8601AF;
1916
}
2017

21-
header {
22-
width: 100vw;
23-
height: 15vh;
18+
#header {
19+
width: 100%;
20+
padding-top: 5px;
21+
padding-bottom: 5px;
2422
background-color: #FEFE33;
2523
text-align: center;
2624
}
2725

2826
#headertext {
2927
text-decoration: none;
3028
color: #8601AF;
31-
3229
font-size: 6.5vh;
3330
font-weight: 400;
3431
}
3532

3633
#about {
37-
height: 48.5vh;
38-
width: 90vw;
39-
34+
width: 90%;
4035
margin-left: auto;
4136
margin-right: auto;
42-
4337
font-size: 5vh;
44-
color: #FFF;
38+
color: white;
4539
}
4640

4741
#about a {
4842
font-size: 3.5vh;
4943
color: white;
5044
}
5145

52-
footer {
46+
#footer {
5347
position: fixed;
5448
font-size: 2.5vh;
5549
bottom: 0%;
56-
padding: 0.5vh;
50+
padding: 0.5%;
5751
background-color: #8601AF;
5852
font-weight: 200;
59-
color: #FFF;
53+
color: white;
6054
right: 0;
6155
left: 0;
6256
}
6357

64-
footer .hrefs {
58+
#footer .hrefs {
6559
color: #FFF;
6660
font-weight: 400;
6761
text-decoration: none;
6862
}
6963

70-
</style>
71-
72-
<style>
7364
#scrolling {
74-
position:fixed;
75-
top:42%;
76-
7765
background: #8601AF;
7866
height: 58%;
7967
width: 100%;
80-
8168
overflow: hidden;
8269
}
8370

84-
ul {
71+
#scrolling ul {
8572
user-select: none;
86-
8773
margin: 0;
8874
padding: 0;
89-
position: absolute;
90-
margin-top:4vh;
91-
height:80%;
92-
75+
margin-top: 3%;
76+
height: 80%;
9377
list-style-type: none;
94-
9578
transform-style: preserve-3d;
9679
}
9780

98-
li {
99-
font-size: 8vmin;
81+
#scrolling ul li {
82+
font-size: 30vh;
10083
float: left;
10184
width: 55vw;
10285
max-width: 750px;
@@ -106,51 +89,45 @@
10689
text-align: center;
10790
border-radius: 30px;
10891
cursor: pointer;
109-
background: #FFF;
92+
background: white;
11093
transform: scale(0.95);
11194
}
11295

113-
.itemslide-active {
96+
#scrolling ul .itemslide-active {
11497
transform: scale(1);
11598
}
11699
</style>
117-
118100
<script src="itemslide.js"></script>
119-
120101
<script>
121102
var itemslide;
122-
123-
window.addEventListener("load", () => {
124-
103+
window.addEventListener("load", function () {
125104
var element = document.querySelector("#scrolling ul");
126-
127105
itemslide = new Itemslide(element, {
128106
swipeOut: true
129107
});
130108
});
131109

132-
window.addEventListener("resize", () => {
110+
window.addEventListener("resize", function () {
133111
itemslide.reload();
134112
});
135113
</script>
136114
</head>
137115
<body>
138-
<header>
139-
<br>
116+
<div id="header">
140117
<a id="headertext" href="index.html">
141118
ItemSlide.js
142119
</a>
143-
</header>
144-
145-
<section id="about">
120+
</div>
121+
<div id="about">
122+
<br>
123+
JavaScript Carousel Library
124+
<br>
146125
<br>
147-
JavaScript Carousel Library<br><br>
148126
<a id="github" href="https://github.com/nir9/itemslide">
149127
Source on Github
150128
</a>
151-
</section>
152-
153-
<section id="scrolling">
129+
</div>
130+
<div id="scrolling">
154131
<ul>
155132
<li>
156133
1
@@ -165,10 +142,9 @@
165142
4
166143
</li>
167144
</ul>
168-
</section>
169-
170-
<footer>
145+
</div>
146+
<div id="footer">
171147
Created by <a class="hrefs" href="https://github.com/nir9">Nir Lichtman</a>
172-
</footer>
148+
</div>
173149
</body>
174150
</html>

0 commit comments

Comments
 (0)