-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.scss
296 lines (288 loc) · 7.67 KB
/
style.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
$brand-one: #85dbda;
$brand-two: #f53;
$brand-light: #fff;
$brand-dark-lighten: #19233b;
$brand-dark: #0c162d;
$brand-grey: #637192;
$base-margin: 15px;
$alloy-container: 1110px;
//------------------------------------------------------//
// The real Bootstrap way to load in media queries.
// And here is an example
// @include media-breakpoint-up(md) {
// // YOUR MQ CODE
// }
//------------------------------------------------------//
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
) !default; // Breakpoint viewport sizes and media queries.
//
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
//
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
//
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
// Name of the next breakpoint, or null for the last breakpoint.
//
// >> breakpoint-next(sm)
// md
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// md
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
// md
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
$n: index($breakpoint-names, $name);
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
//
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// 576px
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
$min: map-get($breakpoints, $name);
@return if($min != 0, $min, null);
}
// Maximum breakpoint width. Null for the largest (last) breakpoint.
// The maximum value is calculated as the minimum of the next one less 0.1.
//
// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// 767px
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
$next: breakpoint-next($name, $breakpoints);
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
}
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
// Useful for making responsive utilities.
//
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// "" (Returns a blank string)
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// "-sm"
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
}
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
// Makes the @content apply to the given breakpoint and wider.
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($name, $breakpoints);
@if $min {
@media (min-width: $min) {
@content;
}
} @else {
@content;
}
}
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
// Makes the @content apply to the given breakpoint and narrower.
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
$max: breakpoint-max($name, $breakpoints);
@if $max {
@media (max-width: $max) {
@content;
}
} @else {
@content;
}
}
// Media that spans multiple breakpoint widths.
// Makes the @content apply between the min and max breakpoints
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($lower, $breakpoints);
$max: breakpoint-max($upper, $breakpoints);
@if $min != null and $max != null {
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if $max == null {
@include media-breakpoint-up($lower) {
@content;
}
} @else if $min == null {
@include media-breakpoint-down($upper) {
@content;
}
}
}
// Media between the breakpoint's minimum and maximum widths.
// No minimum for the smallest breakpoint, and no maximum for the largest one.
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($name, $breakpoints);
$max: breakpoint-max($name, $breakpoints);
@if $min != null and $max != null {
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if $max == null {
@include media-breakpoint-up($name) {
@content;
}
} @else if $min == null {
@include media-breakpoint-down($name) {
@content;
}
}
}
//------------------------------------------------------//
// END The real Bootstrap way to load in media queries.
//------------------------------------------------------//
//------------------------------------------------------//
// Reset
//------------------------------------------------------//
* {
box-sizing: border-box;
}
body {
// overflow: hidden;
background-color: $brand-dark-lighten;
}
a {
color: $brand-light;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: $base-margin;
}
// END Reset -------------------------------------//
main {
margin: 10px;
padding-top: $base-margin * 3;
color: $brand-light;
min-height: 100vh;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.intro {
margin-bottom: $base-margin * 3;
}
.alloy-container {
width: $alloy-container;
max-width: 100%;
margin: 0 auto;
}
.item-list {
display: flex;
justify-content: space-between;
flex-flow: row wrap;
.item {
width: 100%;
@include media-breakpoint-up(lg) {
width: 48%;
}
margin-bottom: $base-margin * 3;
background-color: $brand-light;
color: $brand-dark;
border-radius: 5px;
overflow: hidden;
text-decoration: none;
transition: transform;
transition-duration: 300ms;
transition-timing-function: ease;
&:hover {
transform: scale(1.02);
}
.alloy-image {
width: 100%;
height: 250px;
background-color: $brand-grey;
img {
object-fit: cover;
width: 100%;
height: 100%;
}
}
.content {
padding: $base-margin * 2;
}
&[data-disabled="true"] {
pointer-events: none;
opacity: 0.8;
.btn {
background-color: $brand-grey;
}
&:hover {
transform: scale(1);
}
}
}
}
.btn {
display: inline-block;
margin-top: $base-margin;
background-color: $brand-two;
color: $brand-light;
padding: 5px 10px;
}
//------------------------------------------------------//
// Sidebar
//------------------------------------------------------//
aside {
order: 1;
color: $brand-light;
width: 100%;
background-color: $brand-dark;
> .inner {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
overflow-y: auto;
}
}
#intro {
@include media-breakpoint-up(lg) {
order: 2;
}
background-color: $brand-grey;
> .inner {
width: $alloy-container;
max-width: 100%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: $base-margin * 2;
@include media-breakpoint-down(md) {
flex-direction: column;
}
}
}
#logo {
display: flex;
justify-content: center;
align-items: center;
color: #fff;
text-decoration: none;
img {
margin-right: 10px;
width: 70px;
}
span {
display: block;
font-size: 12px;
&:last-of-type {
font-weight: 700;
font-size: 20px;
}
}
}
#version {
opacity: 0.3;
text-align: center;
font-size: 14px;
text-transform: uppercase;
margin-top: $base-margin;
}
// END Sidebar -------------------------------------//