_header.scss 2.99 KB
Newer Older
alain's avatar
alain committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

.menu-container {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: 20px;
  background: #fff;
  color: #000;
  padding: 20px;
  z-index: 1;
  -webkit-user-select: none;
  user-select: none;
  box-sizing: border-box;
  font-weight: 500;
}

alain's avatar
alain committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#site-titles {
  #site-title {
    font-family: waax;
    font-weight: 400;
    font-size: 44px;
    margin: 10px 0;
    white-space: nowrap;
  }
  #site-subtitle {
    font-size: 20px;
    max-width: 11em;
    font-weight: 400;
    margin: 0;
  }
alain's avatar
alain committed
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
}

.menu-container a {
  text-decoration: none;
  color: #000;
  transition: color 0.1s ease;
  text-transform: lowercase;

  &:hover {
    color: #2FB6BC;
  }
}

.menu-container input {
  display: block;
  width: 30px;
  height: 30px;
  right: 10px;
  top: 10px;
  margin: 0;
  position: absolute;
  cursor: pointer;
  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */
  -webkit-touch-callout: none;
}

alain's avatar
alain committed
58
59

.menu-container .hamburger-bar {
alain's avatar
alain committed
60
61
62
63
64
65
66
67
68
69
70
71
  display: block;
  width: 14px;
  height: 2px;
  margin-bottom: 2px;
  position: relative;
  background: #000;
  border-radius: 2px;
  z-index: 1;
  transform-origin: 3px 0px;
  transition: all 0.1s ease;
}

alain's avatar
alain committed
72
73
.menu-container .hamburger-bar:first-child { transform-origin: 0% 0%; }
.menu-container .hamburger-bar:nth-child(3) { transform-origin: 0% 100%; }
alain's avatar
alain committed
74

alain's avatar
alain committed
75
.menu-container input:checked ~ .hamburger-bar {
alain's avatar
alain committed
76
77
78
79
  opacity: 1;
  transform: rotate(45deg) translate(3px,-1px);
}

alain's avatar
alain committed
80
.menu-container input:checked ~ .hamburger-bar:nth-child(4) {
alain's avatar
alain committed
81
82
83
84
  opacity: 0;
  transform: rotate(0deg) scale(0.1, 0.1);
}

alain's avatar
alain committed
85
.menu-container input:checked ~ .hamburger-bar:nth-child(3) {
alain's avatar
alain committed
86
87
88
89
90
91
92
93
94
95
96
  transform: rotate(-45deg) translate(-1px, 6px);
}

.menu {
  list-style: none;
  margin: 0;
}

.menu li {
  margin-bottom: 0;
  padding: 10px 0;
alain's avatar
alain committed
97
98
99
100
101
102
103
104
105
106

  .menu-item-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
  }

  .menu-item-subtitle {
    font-size: 16px;
  }
alain's avatar
alain committed
107
108
}

alain's avatar
alain committed
109

alain's avatar
alain committed
110
111
112
113
114
115
@media only screen and (max-width: 1000px) { 
  .menu-container {
    flex-direction: column;
    align-items: flex-end;
  }
  
alain's avatar
alain committed
116
  #site-titles {
alain's avatar
alain committed
117
    position: absolute;
alain's avatar
alain committed
118
119
    left: 20px;
    top: 20px;
alain's avatar
alain committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
  }

  .menu {
    position: absolute;
    box-sizing: border-box;
    width: 300px;
    right: -300px;
    top: 0;
    margin: -20px;
    padding: 75px 50px 50px;
    background: #eee;
    -webkit-font-smoothing: antialiased;
    /* to stop flickering of text in safari */
    transform-origin: 0% 0%;
    transform: translateX(0%);
    transition: transform 0.1s cubic-bezier(0.77,0.2,0.05,1.0);
  }

  .menu-container input:checked ~ .menu {
    transform: translateX(-100%);
  }
}

alain's avatar
alain committed
143

alain's avatar
alain committed
144
145
146
147
148
149
150
151
152
153
154
155
156
@media only screen and (min-width: 1001px) { 
  .menu-container {
    width: 100%;
  }

  .menu-container a {
    color: #000;
  }

  .menu-container input {
    display: none;
  }

alain's avatar
alain committed
157
  .menu-container .hamburger-bar {
alain's avatar
alain committed
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
    display: none;
  }

  .menu {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .menu ul {
    display: flex;
    padding: 0;
  }

  .menu li {
    padding: 0 20px;
  }
}