Преглед на файлове

Start tidying up CSS into nice SASS files

master
Chris Smith преди 4 години
родител
ревизия
971ae0d335
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9

+ 12
- 2
site/assets/style.sass Целия файл

@@ -1,4 +1,14 @@
1
+@import style/fonts
2
+@import style/reset
3
+@import style/colours
4
+@import style/headings
5
+@import style/text
6
+
7
+@import style/modules/code
8
+@import style/modules/figures
9
+@import style/modules/header
10
+@import style/modules/updates
11
+
1 12
 @import style/font-awesome
2 13
 @import style/font-awesome.min
3
-@import style/monokai
4
-@import style/legacy
14
+@import style/legacy

+ 11
- 0
site/assets/style/_colours.sass Целия файл

@@ -0,0 +1,11 @@
1
+// Site-wide colour definitions
2
+
3
+$dark-gray: #565656
4
+$light-gray: #787878
5
+$cyan: #49bf9d
6
+
7
+$light-green: #eeffee
8
+$green: #669966
9
+
10
+$update-border: $green
11
+$update-background: $light-green

+ 32
- 0
site/assets/style/_fonts.sass Целия файл

@@ -0,0 +1,32 @@
1
+// Defines font families
2
+
3
+$font-dir: '/res/fonts/'
4
+
5
+// Provides src properties for woff2 and woff font files.
6
+@mixin woff-font-src($file-name)
7
+  $font: $font-dir + $file-name
8
+  src: url($font + '.woff2') format('woff2'), url($font + '.woff') format('woff')
9
+
10
+// Provides src properties for all types of font with some hacks to support IE.
11
+@mixin full-font-src($file-name, $svg-name)
12
+  $font: $font-dir + $file-name
13
+  src: url($font + '.eot')
14
+  src: url($font + '.eot?#iefix') format('embedded-opentype'), url($font + '.woff2') format('woff2'), url($font + '.woff') format('woff'), url($font + '.ttf') format('truetype'), url($font + '.svg#' + $svg-name) format('svg')
15
+
16
+@font-face
17
+  font-family: 'Aileron Regular'
18
+  font-weight: normal
19
+  font-style: normal
20
+  @include woff-font-src('aileron-regular-webfont')
21
+
22
+@font-face
23
+  font-family: 'League Spartan'
24
+  font-weight: bold
25
+  font-style: normal
26
+  @include full-font-src('leaguespartan-bold', 'league_spartanbold')
27
+
28
+@font-face
29
+  font-family: 'FontAwesome'
30
+  font-weight: normal
31
+  font-style: normal
32
+  @include full-font-src('fontawesome-chameth-1', 'fontawesome-chameth')

+ 33
- 0
site/assets/style/_headings.sass Целия файл

@@ -0,0 +1,33 @@
1
+// Header elements (h1..h6)
2
+
3
+h1, h2, h3, h4, h5, h6
4
+  color: $dark-gray
5
+  font-weight: 800
6
+  font-family: "League Spartan", sans-serif
7
+  line-height: 1.5em
8
+  margin: 0 0 1em 0
9
+
10
+  a
11
+    transition: color 0.2s ease-in-out
12
+    color: inherit
13
+
14
+    &:hover
15
+      color: $cyan
16
+
17
+h1
18
+  font-size: 2em
19
+
20
+h2
21
+  font-size: 1.5em
22
+
23
+h3
24
+  font-size: 1.1em
25
+
26
+h4
27
+  font-size: 0.9em
28
+
29
+h5
30
+  font-size: 0.7em
31
+
32
+h6
33
+  font-size: 0.7em

+ 36
- 0
site/assets/style/_reset.sass Целия файл

@@ -0,0 +1,36 @@
1
+// Resets styles to known defaults to work around weird user agents.
2
+// Based on http://meyerweb.com/eric/tools/css/reset/
3
+
4
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
5
+  margin: 0
6
+  padding: 0
7
+  border: 0
8
+  font-size: 100%
9
+  font: inherit
10
+  vertical-align: baseline
11
+
12
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
13
+  display: block
14
+
15
+body
16
+  line-height: 1
17
+
18
+ol, ul
19
+  list-style: none
20
+
21
+blockquote, q
22
+  quotes: none
23
+
24
+blockquote:before, blockquote:after, q:before, q:after
25
+  content: ''
26
+  content: none
27
+
28
+table
29
+  border-collapse: collapse
30
+  border-spacing: 0
31
+
32
+// Consistent box models
33
+*, *:before, *:after
34
+  -moz-box-sizing: border-box
35
+  -webkit-box-sizing: border-box
36
+  box-sizing: border-box

+ 29
- 0
site/assets/style/_text.sass Целия файл

@@ -0,0 +1,29 @@
1
+// Properties relating to text
2
+
3
+body
4
+  color: $dark-gray
5
+  font-family: "Aileron Regular", Helvetica, sans-serif
6
+  font-size: 16pt
7
+  font-weight: 400
8
+  line-height: 1.75em
9
+
10
+a
11
+  color: $cyan
12
+  text-decoration-skip-ink: auto
13
+
14
+strong, b
15
+  color: $light-gray
16
+  font-weight: 400
17
+
18
+em, i
19
+  font-style: italic
20
+
21
+sub
22
+  font-size: 0.8em
23
+  position: relative
24
+  top: 0.5em
25
+
26
+sup
27
+  font-size: 0.8em
28
+  position: relative
29
+  top: -0.5em

+ 1
- 13
site/assets/style/font-awesome.css Целия файл

@@ -1,15 +1,3 @@
1
-@font-face {
2
-  font-family: 'FontAwesome';
3
-  src: url('/res/fonts/fontawesome-chameth-1.eot');
4
-  src: url('/res/fonts/fontawesome-chameth-1.eot#iefix') format('embedded-opentype'),
5
-       url('/res/fonts/fontawesome-chameth-1.woff2') format('woff2'),
6
-       url('/res/fonts/fontawesome-chameth-1.woff') format('woff'),
7
-       url('/res/fonts/fontawesome-chameth-1.ttf') format('truetype'),
8
-       url('/res/fonts/fontawesome-chameth-1.svg#fontawesome-chameth') format('svg');
9
-  font-weight: normal;
10
-  font-style: normal;
11
-}
12
-
13 1
 .fa-key:before { content: '\e800' !important; }
14 2
 .fa-twitter:before { content: '\f099' !important; }
15
-.fa-github:before { content: '\f09b' !important; }
3
+.fa-github:before { content: '\f09b' !important; }

+ 52
- 2805
site/assets/style/legacy.css
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 217
- 0
site/assets/style/modules/_code.sass Целия файл

@@ -0,0 +1,217 @@
1
+// Syntax highlighted code blocks
2
+
3
+.highlight
4
+  border-radius: 0.35em
5
+
6
+  pre
7
+    -webkit-overflow-scrolling: touch
8
+    font-family: "Courier New", monospace
9
+    font-size: 0.9em
10
+    margin: 0 0 2em 0
11
+
12
+    code
13
+      display: block
14
+      line-height: 1.75em
15
+      padding: 1em 1.5em
16
+      overflow-x: auto
17
+      background: transparent
18
+      border-radius: 0.35em
19
+      border: 0
20
+      font-family: "Courier New", monospace
21
+      font-size: 0.9em
22
+      margin: 0 0.25em
23
+
24
+  // Monokai style from https://xyproto.github.io/splash/docs/monokai.html
25
+  color: #f8f8f2
26
+  background-color: #272822
27
+
28
+  .err
29
+    color: #960050
30
+    background-color: #1e0010
31
+
32
+  .lntd
33
+    vertical-align: top
34
+    padding: 0
35
+    margin: 0
36
+    border: 0
37
+
38
+  .lntable
39
+    border-spacing: 0
40
+    padding: 0
41
+    margin: 0
42
+    border: 0
43
+    width: auto
44
+    overflow: auto
45
+    display: block
46
+
47
+  .hl
48
+    display: block
49
+    width: 100%
50
+    background-color: #3c3d38
51
+
52
+  .lnt
53
+    margin-right: 0.4em
54
+    padding: 0 0.4em 0 0.4em
55
+    color: #7f7f7f
56
+
57
+  .ln
58
+    margin-right: 0.4em
59
+    padding: 0 0.4em 0 0.4em
60
+    color: #7f7f7f
61
+
62
+  .k
63
+    color: #66d9ef
64
+
65
+  .kc
66
+    color: #66d9ef
67
+
68
+  .kd
69
+    color: #66d9ef
70
+
71
+  .kn
72
+    color: #f92672
73
+
74
+  .kp
75
+    color: #66d9ef
76
+
77
+  .kr
78
+    color: #66d9ef
79
+
80
+  .kt
81
+    color: #66d9ef
82
+
83
+  .na
84
+    color: #a6e22e
85
+
86
+  .nc
87
+    color: #a6e22e
88
+
89
+  .no
90
+    color: #66d9ef
91
+
92
+  .nd
93
+    color: #a6e22e
94
+
95
+  .ne
96
+    color: #a6e22e
97
+
98
+  .nf
99
+    color: #a6e22e
100
+
101
+  .nx
102
+    color: #a6e22e
103
+
104
+  .nt
105
+    color: #f92672
106
+
107
+  .l
108
+    color: #ae81ff
109
+
110
+  .ld
111
+    color: #e6db74
112
+
113
+  .s
114
+    color: #e6db74
115
+
116
+  .sa
117
+    color: #e6db74
118
+
119
+  .sb
120
+    color: #e6db74
121
+
122
+  .sc
123
+    color: #e6db74
124
+
125
+  .dl
126
+    color: #e6db74
127
+
128
+  .sd
129
+    color: #e6db74
130
+
131
+  .s2
132
+    color: #e6db74
133
+
134
+  .se
135
+    color: #ae81ff
136
+
137
+  .sh
138
+    color: #e6db74
139
+
140
+  .si
141
+    color: #e6db74
142
+
143
+  .sx
144
+    color: #e6db74
145
+
146
+  .sr
147
+    color: #e6db74
148
+
149
+  .s1
150
+    color: #e6db74
151
+
152
+  .ss
153
+    color: #e6db74
154
+
155
+  .m
156
+    color: #ae81ff
157
+
158
+  .mb
159
+    color: #ae81ff
160
+
161
+  .mf
162
+    color: #ae81ff
163
+
164
+  .mh
165
+    color: #ae81ff
166
+
167
+  .mi
168
+    color: #ae81ff
169
+
170
+  .il
171
+    color: #ae81ff
172
+
173
+  .mo
174
+    color: #ae81ff
175
+
176
+  .o
177
+    color: #f92672
178
+
179
+  .ow
180
+    color: #f92672
181
+
182
+  .c
183
+    color: #75715e
184
+
185
+  .ch
186
+    color: #75715e
187
+
188
+  .cm
189
+    color: #75715e
190
+
191
+  .c1
192
+    color: #75715e
193
+
194
+  .cs
195
+    color: #75715e
196
+
197
+  .cp
198
+    color: #75715e
199
+
200
+  .cpf
201
+    color: #75715e
202
+
203
+  .gd
204
+    color: #f92672
205
+
206
+  .ge
207
+    font-style: italic
208
+
209
+  .gi
210
+    color: #a6e22e
211
+
212
+  .gs
213
+    font-weight: bold
214
+
215
+  .gu
216
+    color: #75715e
217
+

+ 31
- 0
site/assets/style/modules/_figures.sass Целия файл

@@ -0,0 +1,31 @@
1
+// Figures displayed in articles
2
+
3
+figure
4
+  border: 2px solid rgba(200, 200, 200, 0.7)
5
+  border-radius: 0.35em
6
+  margin: 0 1em 1em 1em
7
+  display: inline-block
8
+  position: relative
9
+  overflow: hidden
10
+  top: 0.25em
11
+
12
+  img
13
+    display: block
14
+    width: 100%
15
+
16
+  figcaption
17
+    display: block
18
+    background-color: rgba(200, 200, 200, 0.7)
19
+    text-align: center
20
+    font-style: italic
21
+    font-size: small
22
+
23
+  &.left
24
+    float: left
25
+    margin-right: 1.5em
26
+    max-width: 40%
27
+
28
+  &.right
29
+    float: right
30
+    margin-left: 1.5em
31
+    max-width: 40%

+ 83
- 0
site/assets/style/modules/_header.sass Целия файл

@@ -0,0 +1,83 @@
1
+// The site-wide header, with title, recent posts, and identity links
2
+
3
+#header
4
+  display: flex
5
+  flex-direction: column
6
+  align-items: flex-end
7
+  justify-content: space-between
8
+
9
+  background-color: #1f1815
10
+  background-attachment: scroll, fixed
11
+  background-image: url("/res/images/overlay.png"), url("/res/images/background.jpg")
12
+  background-position: top left, top left
13
+  background-repeat: repeat, no-repeat
14
+  background-size: auto, auto 100%
15
+
16
+  color: rgba(255, 255, 255, 0.4)
17
+
18
+  width: 20%
19
+  height: 100%
20
+  left: 0
21
+  top: 0
22
+
23
+  position: fixed
24
+  padding: 8em 2em 8em 1em
25
+  text-align: right
26
+
27
+  & > *
28
+    flex-shrink: 0
29
+    width: 100%
30
+
31
+  & > .inner
32
+    flex-grow: 1
33
+    margin: 0 0 2em 0
34
+
35
+  section
36
+    padding: 20px 0
37
+
38
+  a
39
+    text-decoration: none
40
+
41
+  h1
42
+    font-size: 1.35em
43
+    line-height: 1.75em
44
+    margin: 0
45
+    text-transform: uppercase
46
+    color: #3c3c3c
47
+
48
+
49
+// Recent posts list
50
+
51
+#posts ul
52
+  list-style-type: none
53
+
54
+  li
55
+    margin: 20px 0
56
+    font-size: 0.9em
57
+    line-height: 1.3em
58
+
59
+    &.recent a
60
+      background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 30%)
61
+      display: inline-block
62
+      width: 100%
63
+      padding: 0 0.7em 0 2em
64
+
65
+
66
+// Identity links
67
+
68
+#identities
69
+  position: absolute
70
+  bottom: 20px
71
+  left: 20px
72
+  text-align: left
73
+
74
+  ul
75
+    margin-bottom: 0
76
+
77
+  li
78
+    font-size: 0.8em
79
+    line-height: 1.4em
80
+    margin: 0.4em 0
81
+
82
+    &#pgp
83
+      font-family: monospace

+ 14
- 0
site/assets/style/modules/_updates.sass Целия файл

@@ -0,0 +1,14 @@
1
+// Blocks used to describe updates to posts
2
+
3
+aside.update
4
+  display: block
5
+  border-left: solid 10px $update-border
6
+  background-color: $update-background
7
+  padding: 1em
8
+  margin: 0 0 2em 0
9
+
10
+  h5
11
+    margin-bottom: 0.2em
12
+
13
+  ins
14
+    text-decoration: none

+ 0
- 210
site/assets/style/monokai.css Целия файл

@@ -1,210 +0,0 @@
1
-.highlight table td { padding: 5px; }
2
-.highlight table pre { margin: 0; }
3
-.highlight .c, .highlight .cd {
4
-  color: #75715e;
5
-  font-style: italic;
6
-}
7
-.highlight .cm {
8
-  color: #75715e;
9
-  font-style: italic;
10
-}
11
-.highlight .c1 {
12
-  color: #75715e;
13
-  font-style: italic;
14
-}
15
-.highlight .cp {
16
-  color: #75715e;
17
-  font-weight: bold;
18
-}
19
-.highlight .cs {
20
-  color: #75715e;
21
-  font-weight: bold;
22
-  font-style: italic;
23
-}
24
-.highlight .err {
25
-  color: #960050;
26
-  background-color: #1e0010;
27
-}
28
-.highlight .gi {
29
-  color: #ffffff;
30
-  background-color: #324932;
31
-}
32
-.highlight .gd {
33
-  color: #ffffff;
34
-  background-color: #493131;
35
-}
36
-.highlight .ge {
37
-  color: #000000;
38
-  font-style: italic;
39
-}
40
-.highlight .gr {
41
-  color: #aa0000;
42
-}
43
-.highlight .gt {
44
-  color: #aa0000;
45
-}
46
-.highlight .gh {
47
-  color: #999999;
48
-}
49
-.highlight .go {
50
-  color: #888888;
51
-}
52
-.highlight .gp {
53
-  color: #555555;
54
-}
55
-.highlight .gs {
56
-  font-weight: bold;
57
-}
58
-.highlight .gu {
59
-  color: #aaaaaa;
60
-}
61
-.highlight .k, .highlight .kv {
62
-  color: #66d9ef;
63
-  font-weight: bold;
64
-}
65
-.highlight .kc {
66
-  color: #66d9ef;
67
-  font-weight: bold;
68
-}
69
-.highlight .kd {
70
-  color: #66d9ef;
71
-  font-weight: bold;
72
-}
73
-.highlight .kp {
74
-  color: #66d9ef;
75
-  font-weight: bold;
76
-}
77
-.highlight .kr {
78
-  color: #66d9ef;
79
-  font-weight: bold;
80
-}
81
-.highlight .kt {
82
-  color: #66d9ef;
83
-  font-weight: bold;
84
-}
85
-.highlight .kn {
86
-  color: #f92672;
87
-  font-weight: bold;
88
-}
89
-.highlight .ow {
90
-  color: #f92672;
91
-  font-weight: bold;
92
-}
93
-.highlight .o {
94
-  color: #f92672;
95
-  font-weight: bold;
96
-}
97
-.highlight .mf {
98
-  color: #ae81ff;
99
-}
100
-.highlight .mh {
101
-  color: #ae81ff;
102
-}
103
-.highlight .il {
104
-  color: #ae81ff;
105
-}
106
-.highlight .mi {
107
-  color: #ae81ff;
108
-}
109
-.highlight .mo {
110
-  color: #ae81ff;
111
-}
112
-.highlight .m, .highlight .mb, .highlight .mx {
113
-  color: #ae81ff;
114
-}
115
-.highlight .se {
116
-  color: #ae81ff;
117
-}
118
-.highlight .sb {
119
-  color: #e6db74;
120
-}
121
-.highlight .sc {
122
-  color: #e6db74;
123
-}
124
-.highlight .sd {
125
-  color: #e6db74;
126
-}
127
-.highlight .s2 {
128
-  color: #e6db74;
129
-}
130
-.highlight .sh {
131
-  color: #e6db74;
132
-}
133
-.highlight .si {
134
-  color: #e6db74;
135
-}
136
-.highlight .sx {
137
-  color: #e6db74;
138
-}
139
-.highlight .sr {
140
-  color: #e6db74;
141
-}
142
-.highlight .s1 {
143
-  color: #e6db74;
144
-}
145
-.highlight .ss {
146
-  color: #e6db74;
147
-}
148
-.highlight .s {
149
-  color: #e6db74;
150
-}
151
-.highlight .na {
152
-  color: #a6e22e;
153
-}
154
-.highlight .nc {
155
-  color: #a6e22e;
156
-  font-weight: bold;
157
-}
158
-.highlight .nd {
159
-  color: #a6e22e;
160
-  font-weight: bold;
161
-}
162
-.highlight .ne {
163
-  color: #a6e22e;
164
-  font-weight: bold;
165
-}
166
-.highlight .nf {
167
-  color: #a6e22e;
168
-  font-weight: bold;
169
-}
170
-.highlight .no {
171
-  color: #66d9ef;
172
-}
173
-.highlight .bp {
174
-  color: #f8f8f2;
175
-}
176
-.highlight .nb {
177
-  color: #f8f8f2;
178
-}
179
-.highlight .ni {
180
-  color: #f8f8f2;
181
-}
182
-.highlight .nn {
183
-  color: #f8f8f2;
184
-}
185
-.highlight .vc {
186
-  color: #f8f8f2;
187
-}
188
-.highlight .vg {
189
-  color: #f8f8f2;
190
-}
191
-.highlight .vi {
192
-  color: #f8f8f2;
193
-}
194
-.highlight .nv {
195
-  color: #f8f8f2;
196
-}
197
-.highlight .w {
198
-  color: #f8f8f2;
199
-}
200
-.highlight .nl {
201
-  color: #f8f8f2;
202
-  font-weight: bold;
203
-}
204
-.highlight .nt {
205
-  color: #f92672;
206
-}
207
-.highlight {
208
-  color: #f8f8f2;
209
-  background-color: #49483e;
210
-}

Loading…
Отказ
Запис