-
Notifications
You must be signed in to change notification settings - Fork 0
/
homepage.scss
126 lines (108 loc) · 2.47 KB
/
homepage.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
$size : 50px;
$items : 5;
$transition : .5s;
$bounce : cubic-bezier(.3,1.4,.5,.9);
$color-inner : gold;
$color-outer : tomato;
$background: mix($color-inner, $color-outer);
$black : shade($color-outer, 80%);
$start-scale : .5;
$start-rot : 190deg; /*set the rotation of the wriiten content in the nav bar*/
@import url('https://fonts.googleapis.com/css?family=Alegreya+Sans:800,900');
html, body { height: 100%; }
body {
background: beige;
font-family: Alegreya Sans, sans-serif;
}
nav {
display: inline;
position: fixed;
width: $size * $items * 2;
height: $size * $items * 2;
user-select: none;
transform: translate3d($size*.5,-$size*.5,0);
transition: transform $transition $bounce;
&.open {
transform: translate3d(0,0,0);
}
&.top-right {
top: -$size * ($items - 2.2);
right: -$size * ($items - 2.2);
}
}
.disc {
position: absolute;
display: inline-block;
text-align: center;
cursor: pointer;
font: $size*.5 Alegreya Sans, sans-serif;
line-height: $size * .8;
padding-top: $size * .2;
border-radius: $size * $items;
transform: scale3d($start-scale, $start-scale, $start-scale) rotate3d(0,0,1,$start-rot);
pointer-events: none;
opacity: 0;
cursor: pointer;
transition: transform $transition $bounce, opacity $transition;
div {
transform: rotate(180deg);
}
.open & {
pointer-events: auto;
opacity: 1;
}
}
@for $i from 1 through $items {
.l#{$i} {
$i : $i - 1;
$-i : $items - $i;
$pct : $i/$items * 100%;
$color : mix($color-inner, $color-outer, $pct);
top: $i * $size;
left: $i * $size;
right: $i * $size;
bottom: $i * $size;
background: $color;
transition-delay: $i * $transition/$items;
.open & {
transition-delay: $i * $transition/$items;
transform: scale3d(1,1,1) rotate3d(0,0,1,$start-rot);
opacity: 1;
&:hover {
background: shade($color, 90%);
color: $color;
transition-delay: 0s;
}
&:active {
background: shade($color, 50%);
color: $color;
}
&.toggle {
transform: scale3d(.9,.9,.9) rotate3d(0,0,1,$start-rot - 180deg);
}
}
}
}
.toggle {
line-height: $size*2;
padding: 0;
width: $size*2;
background: $color-inner;
opacity: 1;
transform: none;
pointer-events: auto;
transition-delay: 0s;
.open & {
transform: rotate3d(0,0,1,0deg);
}
&:hover {
background: shade($color-inner, 90%);
text-decoration: underline;
}
&:active {
background: shade($color-inner, 50%);
color: rgba($color-inner, .5);
transform: scale(.9);
transition-duration: 0s;
}
}