aboutsummaryrefslogtreecommitdiff
path: root/assets/_sass/_layout.scss
blob: 0c2a1b79a749df077a5c2c6ccd0b801d1795a122 (plain)
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
.site-header {
  display: grid;
  @include justify-content();
  padding: 0 20px;
  text-align: center;

  .site-header-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--main-color);
    padding: 10px 25px 20px 25px;
    border-radius: 0 0 5px 5px;
    text-decoration: none;

    @include transition(background .2s ease);

    &:before { position: absolute; top: 0; left: -150%; content: ""; width: 50%; height: 100%;
      background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .3) 100%);
      background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .3) 100%);
      @include skew(-45deg, 0);
    }
    &:hover {
      background: var(--main-color-hover);
      &:before {
        animation: headerShine .35s;
      }
    }
    .site-logo { display: block; margin: 0 0 10px;
      img {
        display: block;
      }
    }
    .site-subtitle {
      display: block;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 11px;
      line-height: 14px;
      color: var(--grey-fc);
    }
    .site-title {
      display: block;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 26px;
      line-height: 28px;
      color: var(--grey-fc);
    }
  }
}

.site-navigation {
  @include flexbox();
  @include justify-content();
  @include align-items();
  @include flex-flow(row wrap);
  gap: 10px 40px;
  max-width: 800px;
  margin: 30px auto 0;
  padding: 0 20px;
  text-align: center;

  a, span {
    position: relative;
    text-decoration: none;
    color: var(--grey-555);
    padding: 0 0 2px;
    @include transition(color .2s ease);
    cursor: pointer;

    &:before {
      position: absolute;
      opacity: 0;
      left: 0;
      bottom: 0;
      width: 0%;
      border-bottom: 2px solid var(--grey-222);

      @include transition(width .18s ease, opacity .18s ease); content: "";
    }

    &:hover, &.active { color: var(--grey-222);
      &:before {
        width: 100%; opacity: 1;
      }
    }
  }
}

@media screen and (max-width: 800px) {
  .site-header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 9;
    background: var(--body-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);

    .site-header-wrapper {
      @include flexbox();
      @include align-items();
      @include justify-content();
      @include flex-flow(row wrap);
      gap: 0 15px;
      border-radius: 0;
      padding: 20px;
      background: transparent;

      &:hover {
        background: transparent;
      }
      .site-logo,
      .site-subtitle {
        display: none;
      }
      .site-title {
        font-size: 32px;
        line-height: 36px;
        color: var(--main-color);
      }
    }
  }

  .site-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    @include justify-content(flex-start);
    @include flex-flow(column nowrap);
    gap: 20px 0;
    @include translate(0, -100%);
    @include transition(transform .25s ease-in-out);
    padding: 100px 20px 0;
    background: rgba(255, 255, 255, .9);
    z-index: 10;

    a, span {
      color: var(--grey-222);
      font-size: 30px;
      line-height: 40px;
    }
  }
}

.wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 35px;
  border-bottom: 1px solid var(--grey-eee);

  &.long {
    max-width: 800px;
  }
}

.site-footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  font-size: 14px;
  line-height: 22px;
  color: var(--grey-ccc);
  text-align: center;
}