]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - app.scss
Update demo link.
[github/bastienwirtz/homer.git] / app.scss
CommitLineData
09763dbf
BW
1$primary-color: #3367d6;
2$secondary-color: #4285f4;
3
5323df4a
BW
4
5// /!\ Keep background colors sync with `theme-color` meta info
6$theme-light: (
7 background: #f5f5f5,
8 card-background: #ffffff,
9 text: #363636,
10 text-title: #303030,
11 text-subtitle: #424242,
ab3366ba 12 card-shadow: rgba(0, 0, 0, 0.1),
13 a-hover: #363636
5323df4a
BW
14);
15$theme-dark: (
16 background: #131313,
17 card-background: #2b2b2b,
18 text: #eaeaea,
19 text-title: #fafafa,
20 text-subtitle: #f5f5f5,
ab3366ba 21 card-shadow: rgba(0, 0, 0, 0.4),
22 a-hover: #ffdd57
5323df4a
BW
23);
24
ab76270c
BW
25/* raleway-regular - latin */
26@font-face {
27 font-family: 'Raleway';
28 font-style: normal;
29 font-weight: 400;
30 font-display: swap;
31 src: local('Raleway'), local('Raleway-Regular'),
32 url('./webfonts/raleway/raleway-v14-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
33 url('./webfonts/raleway/raleway-v14-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
34}
35
36/* lato-regular - latin */
37@font-face {
38 font-family: 'Lato';
39 font-style: normal;
40 font-weight: 400;
41 font-display: swap;
42 src: local('Lato Regular'), local('Lato-Regular'),
43 url('./webfonts/lato/lato-v16-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
44 url('./webfonts/lato/lato-v16-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
45}
5323df4a
BW
46
47@mixin theme($theme) {
48 background-color: map-get($theme, "background");
49 color: map-get($theme, "text");
ab3366ba 50 a {
51 &:hover {
52 color: map-get($theme, "a-hover");
53 }
54 }
55
5323df4a
BW
56 .title {
57 color: map-get($theme, "text-title");
58 }
59 .subtitle {
60 color: map-get($theme, "text-subtitle");
61 }
62
63 .card {
64 background-color: map-get($theme, "card-background");
65 box-shadow: 0 2px 15px 0 map-get($theme, "card-shadow");
66 &:hover {
67 background-color: map-get($theme, "card-background");
68 }
69 }
70
0503e778
BW
71 .message {
72 background-color: map-get($theme, "card-background");
73 .message-body {
74 color: map-get($theme, "text");
75 }
76 }
77
5323df4a
BW
78 .footer {
79 background-color: map-get($theme, "card-background");
80 box-shadow: 0 2px 15px 0 map-get($theme, "card-shadow");
81 }
82}
83
84html {
85 height: 100%;
86}
e41196e7 87
09763dbf
BW
88body {
89 font-family: 'Raleway', sans-serif;
5323df4a
BW
90 height: 100%;
91
92 #app {
93 min-height: 100%;
94 transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
95
96 // Default theme
97 @include theme($theme-light);
98
99 // System pref theme
100 @media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
101 @include theme($theme-light);
102 }
103 @media (prefers-color-scheme: dark) {
104 @include theme($theme-dark);
105 }
106
107 // User override theme
108 &.is-light {
109 @include theme($theme-light);
110 }
111 &.is-dark {
112 @include theme($theme-dark);
113 }
114 }
09763dbf
BW
115
116 h1, h2, h3, h4, h5, h6 {
117 font-family: 'Lato', sans-serif;
118 }
119
120 h1 {
121 font-size: 2rem;
122 }
123
124 h2 {
125 font-size: 1.7rem;
4877ec98 126 margin-top: 2rem;
09763dbf
BW
127 margin-bottom: 1rem;
128
e41196e7 129 .fas, .fab, .far {
09763dbf 130 margin-right: 10px;
09763dbf
BW
131 }
132
133 span {
134 font-weight: bold;
135 color: $secondary-color;
136 }
137 }
138
139 [v-cloak] {
140 display: none
141 }
142
143 #bighead {
144 color: #ffffff;
145
146 .dashboard-title {
147 padding: 6px 0 0 80px;
148 }
149
150 .first-line {
151 height: 100px;
152 vertical-align: center;
153 background-color: $primary-color;
154
155 h1 {
156 margin-top: -12px;
157 font-size: 2rem;
158 }
159
160 .headline {
161 margin-top: 5px;
162 font-size: 0.9rem;
163 }
164
165 .container {
166 height: 80px;
167 padding: 10px 0;
168 }
169
e41196e7 170 .logo {
09763dbf 171 float: left;
e41196e7
BW
172 i {
173 vertical-align: top;
174 padding: 8px 15px;
175 font-size: 50px
176 }
177
178 img {
179 padding: 10px;
180 max-height: 70px;
181 max-width: 70px;
182 }
09763dbf
BW
183 }
184 }
7cc525b2 185 .navbar, .navbar-menu {
09763dbf
BW
186 background-color: $secondary-color;
187
188 a {
e41196e7 189 color: #ffffff;
56c69e0d 190 &:hover, &:focus {
ab3366ba 191 color: #ffffff;
09763dbf
BW
192 background-color: lighten( $secondary-color, 5% );
193 }
194 }
195 }
7cc525b2
T
196 .navbar-end {
197 text-align: right;
198 }
09763dbf
BW
199 }
200
201 #main-section {
5323df4a 202 margin-bottom: 2rem;
09763dbf
BW
203 padding: 0;
204
205 h2 {
206 border-bottom: 1px dashed #ccc;
207 padding-bottom: 10px;
208 }
209
210 .title {
211 font-size: 1.1em;
212 }
213
214 .subtitle {
215 font-size: .9em;
e41196e7
BW
216 white-space: nowrap;
217 overflow: hidden;
218 text-overflow: ellipsis;
09763dbf
BW
219 }
220
9baec9ae 221 .container {
09763dbf
BW
222 padding: 1.2rem .75rem;
223 }
224
225 .message {
226 margin-top: 45px;
227 box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1);
228
229 .message-header {
230 font-weight: bold;
231 }
232
233 .message-body {
234 border: none;
235 }
236 }
237 }
238
239 .media-content {
240 overflow: inherit;
241 }
242
243 .tag {
244 color: $secondary-color;
245 background-color: $secondary-color;
246 position: absolute;
247 top: 1rem;
9baec9ae 248 right: -0.2rem;
09763dbf
BW
249 width: 3px;
250 overflow: hidden;
251 transition: all 0.2s ease-out;
252 padding: 0;
a2fdb8a9 253
254 .tag-text {
255 display: none;
256 }
09763dbf
BW
257 }
258
259 .card {
260 border-radius: 5px;
261 border: none;
262 box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1);
4877ec98
BW
263 transition: cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
264
265 a {
266 outline: none;
267 }
09763dbf
BW
268 }
269
270 .card:hover {
09763dbf
BW
271 transform: translate(0, -3px);
272
273 .tag {
274 width: auto;
275 color: #ffffff;
276 padding: 0 0.75em;
a2fdb8a9 277
278 .tag-text {
279 display: block;
280 }
09763dbf
BW
281 }
282 }
283
284 .card-content {
e41196e7
BW
285 height: 85px;
286 padding: 1.3rem;
09763dbf
BW
287 }
288
4877ec98
BW
289 .layout-vertical {
290 .card {
291 border-radius: 0;
292 }
293
294 .column div:first-of-type .card {
295 border-radius: 5px 5px 0 0;
296 }
297
298 .column div:last-child .card {
299 border-radius: 0 0 5px 5px;
300 }
301 }
302
09763dbf
BW
303 .footer {
304 position: fixed;
305 left: 0;
306 right: 0;
307 bottom: 0;
4877ec98 308 padding: 0.5rem;
09763dbf 309 text-align: left;
4877ec98
BW
310 color: #676767;
311 font-size: 0.85rem;
5323df4a 312 transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
09763dbf
BW
313 }
314
51956c3a
BW
315 .no-footer {
316 #main-section {
317 margin-bottom: 0;
318 }
319
320 .footer {
321 display: none;
322 }
323 }
324
09763dbf
BW
325 .search-bar {
326 position: relative;
4877ec98 327 display: inline-block;
09763dbf
BW
328 #search {
329 border: none;
330 background-color: lighten( $secondary-color, 6% );
331 border-radius: 5px;
332 padding: 2px 12px 2px 30px;
7cc525b2 333 margin: 0 0 0 12px;
09763dbf
BW
334 transition: all 100ms linear;
335 color: #ffffff;
336 height: 30px;
337 width: 100px;
338
339
340 &:focus {
341 color: #000000;
342 width: 250px;
343 background-color: #ffffff;
344 }
345 }
346
347 .search-label::before {
a0e2769a 348 font-family: 'Font Awesome 5 Free';
09763dbf 349 position: absolute;
7cc525b2
T
350 top: 4px;
351 left: 16px;
09763dbf 352 content: "\f002";
a0e2769a 353 font-weight: 900;
09763dbf
BW
354 width: 20px;
355 height: 20px;
7cc525b2 356 color: #ffffff;
09763dbf
BW
357 }
358
359 &:focus-within .search-label::before {
360 color: #4a4a4a;
361 }
362 }
363
4877ec98
BW
364 .icon-button {
365 display: inline-block;
7cc525b2 366 padding: 0 12px;
4877ec98
BW
367 }
368
9baec9ae
BW
369 .offline-message {
370 text-align: center;
371 margin: 35px 0;
372
373 i {
374 font-size: 2rem;
375 }
376
377 i.fa-redo-alt {
378 font-size: 1.3rem;
379 line-height: 1rem;
380 vertical-align: middle;
381 cursor: pointer;
382 color: #3273dc;
383 }
384 }
385
09763dbf 386}