-
Notifications
You must be signed in to change notification settings - Fork 13
/
jquery.secretnav.scss
248 lines (188 loc) · 4.41 KB
/
jquery.secretnav.scss
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
@import "bourbon/bourbon";
html, body, .sn-outer-wrapper {
@include size(100% 100%);
}
.sn-outer-wrapper {
position: relative;
}
.sn-content-wrapper {
// reset transforms (Chrome bug)
@include transform(translateZ(0) translateX(0) rotateY(0deg));
height: 100%;
min-height: 100%;
outline: 1px solid rgba(0, 0, 0, 0);
position: relative;
z-index: 10;
}
.sn-content-wrapper::after {
@include size(100% 0px);
// the transition delay of the height needs to be synced with the container transition time
@include transition(opacity 0.4s, height 0s 0.4s);
background: rgba(0, 0, 0, 0.1);
content: "";
left: 0;
opacity: 0;
position: absolute;
top: 0;
}
.sn-content {
position: relative;
}
.sn-outer-wrapper.modalview {
@include perspective(1500px);
position: fixed;
}
.modalview .sn-content-wrapper {
@include backface-visibility(hidden);
@include size(100% 100%);
overflow: hidden;
position: absolute;
}
.modalview .sn-content {
// Solves a rendering bug in Chrome on Windows
@include transform(translateZ(-1px));
}
.animate .sn-content-wrapper::after {
@include transition(opacity 0.3s);
height: 101%;
opacity: 1;
}
.sn-nav-wrapper .sn-nav {
height: auto;
font-size: 2em;
position: absolute;
&.left {
left: 20%;
}
&.top {
top: 25%;
}
&.vertical {
@include transform(translateY(-50%));
@include transform-style(preserve-3d);
text-align: left;
top: 50%;
a {
display: block;
margin: 0 0 40px 0;
}
}
&.horizontal {
@include transform(translateX(-50%));
left: 50%;
text-align: center;
width: 100%;
a {
display: inline-block;
margin: 0 40px 0 0;
}
}
}
.sn-nav-wrapper .sn-nav a {
@include transition(
transform 400ms cubic-bezier(0.165, 0.84, 0.44, 1),
opacity 300ms ease-in 300ms
);
color: #FFFFFF;
white-space: nowrap;
text-decoration: none;
&:hover {
color: #DDDDDD;
}
}
.sn-nav-wrapper {
@include linear-gradient(to bottom, #3493d8 0%, #241271 100%, $fallback: #3493d8);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 20px;
width: auto;
height: auto;
}
// Effects: move left
.sn-moveleft .sn-content-wrapper {
@include transition(all 400ms cubic-bezier(0.175, 0.885, 0.335, 1.05));
@include transition(transform 0.4s);
@include transform-origin(50% 50%);
}
.sn-moveleft.animate .sn-content-wrapper {
@include transform(translate3d(40%, 0, 0) scale3d(0.85, 0.85, 1));
box-shadow: 0px 0px 60px 0px rgba(0, 0, 0, 0.18);
}
.no-csstransforms3d .sn-moveleft.animate .container {
left: 75%;
}
.sn-moveleft .sn-nav a {
@include transform(translateX(-150px));
@include transition(transform 0.4s, opacity 0.4s);
opacity: 0;
}
.sn-moveleft.animate .sn-nav a {
@include transform(translateX(0));
opacity: 1;
}
.sn-moveleft.animate .sn-nav a:nth-child(1) {
@include transition-delay(0.02s);
}
.sn-moveleft.animate .sn-nav a:nth-child(2) {
@include transition-delay(0.04s);
}
.sn-moveleft.animate .sn-nav a:nth-child(3) {
@include transition-delay(0.08s);
}
.sn-moveleft.animate .sn-nav a:nth-child(4) {
@include transition-delay(0.12s);
}
.sn-moveleft.animate .sn-nav a:nth-child(5) {
@include transition-delay(0.16s);
}
.sn-moveleft.animate .sn-nav a:nth-child(6) {
@include transition-delay(0.2s);
}
.sn-moveleft.animate .sn-nav a:nth-child(7) {
@include transition-delay(0.24s);
}
// Effects: move down
.sn-movedown .sn-content-wrapper {
@include transition(transform 0.4s);
@include transform-origin(50% 50%);
}
.sn-movedown.animate .sn-content-wrapper {
@include transform(translateY(50%) translateZ(-600px));
box-shadow: 0px 0px 60px 0px rgba(0, 0, 0, 0.18);
}
.no-csstransforms3d .sn-movedown.animate .container {
top: 75%;
}
.sn-movedown .sn-nav a {
@include transform(translateY(-20px));
@include transition(transform 0.4s, opacity 0.4s);
opacity: 0;
}
.sn-movedown.animate .sn-nav a {
@include transform(translateY(0));
opacity: 1;
}
.sn-movedown.animate .sn-nav a:nth-child(1) {
@include transition-delay(0.02s);
}
.sn-movedown.animate .sn-nav a:nth-child(2) {
@include transition-delay(0.04s);
}
.sn-movedown.animate .sn-nav a:nth-child(3) {
@include transition-delay(0.08s);
}
.sn-movedown.animate .sn-nav a:nth-child(4) {
@include transition-delay(0.12s);
}
.sn-movedown.animate .sn-nav a:nth-child(5) {
@include transition-delay(0.16s);
}
.sn-movedown.animate .sn-nav a:nth-child(6) {
@include transition-delay(0.2s);
}
.sn-movedown.animate .sn-nav a:nth-child(7) {
@include transition-delay(0.24s);
}