This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.html
144 lines (99 loc) · 2.78 KB
/
layout.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
<!DOCTYPE html>
<html lang="pt-br" class="roboto">
<meta charset="UTF-8">
<title>La Dorni - Layout</title>
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<script src="dist/js/villa.min.js"></script>
<link rel="stylesheet" href="dist/css/villa.min.css"/>
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="dist/css/material-colors.css"/>
<link rel="stylesheet" type="text/css" href="dist/css/villa-cross.min.css"/>
<script src="dist/js/html5shiv.js"></script>
<script src="dist/js/html5shiv-printshiv.js"></script>
<script src="dist/js/classList.min.js"></script>
<![endif]-->
<style>
body {
overflow: hidden;
}
main {
overflow: hidden;
height: 100vh;
width: 100vw;
}
section {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-justify-content: center;
justify-content: center;
-webkit-align-items: center;
align-items: center;
position: absolute;
height: 100%;
width: 100%;
-webkit-transition: transform .6s ease;
-moz-transition: transform .6s ease;
-ms-transition: transform .6s ease;
-o-transition: transform .6s ease;
transition: transform .6s ease;
}
h1 {
font-weight: 100;
font-size: 4.5em;
}
@media (min-width: 48em) {
h1 {
font-weight: 100;
font-size: 6em;
}
}
</style>
<main>
<section id="main" class="grey-900 font-white">
<h1>Home</h1>
</section>
<section id="vinicola" class="deep-purple-900 font-white">
<h1>Vinícola</h1>
</section>
<section id="vinhos" class="grey-200">
<h1>Vinhos</h1>
</section>
</main>
<script>
var main, vinicola, vinhos;
main = document.getElementById('main');
vinicola = document.getElementById('vinicola');
vinhos = document.getElementById('vinhos');
main.style.transform = 'translate(0)';
vinicola.style.transform = 'translate(100%)';
vinhos.style.transform = 'translate(200%)';
var lastIsVinhos = false;
main.addEventListener('click', function() {
main.style.transform = 'translate(-100%)';
vinicola.style.transform = 'translate(0)';
vinhos.style.transform = 'translate(100%)';
});
vinicola.addEventListener('click', function() {
if (!lastIsVinhos) {
main.style.transform = 'translate(-200%)';
vinicola.style.transform = 'translate(-100%)';
vinhos.style.transform = 'translate(0)';
lastIsVinhos = true;
} else {
main.style.transform = 'translate(0)';
vinicola.style.transform = 'translate(100%)';
vinhos.style.transform = 'translate(200%)';
lastIsVinhos = false;
}
});
vinhos.addEventListener('click', function() {
main.style.transform = 'translate(-100%)';
vinicola.style.transform = 'translate(0)';
vinhos.style.transform = 'translate(100%)';
});
</script>
</html>