Browse Source

Improve user font options

biotorrents 4 years ago
parent
commit
3759a5940d

+ 10
- 6
classes/env.class.php View File

@@ -139,10 +139,14 @@ class ENV
139 139
             error('$ENV->fromJson() expects a string.');
140 140
         }
141 141
 
142
-        # Decode to array and construct RAO
143
-        return $RAO = new RecursiveArrayObject(
144
-            json_decode($str, true)
145
-        );
142
+        $json = json_decode($str, true);
143
+        
144
+        if (json_last_error() === JSON_ERROR_NONE) {
145
+            # Decode to array and construct RAO
146
+            return new RecursiveArrayObject($json);
147
+        } else {
148
+            error('Unable to parse JSON in $ENV->fromJson().');
149
+        }
146 150
     }
147 151
 
148 152
 
@@ -159,7 +163,7 @@ class ENV
159 163
             $obj = (array) $obj;
160 164
         }
161 165
 
162
-        return $RAO = new RecursiveArrayObject(
166
+        return new RecursiveArrayObject(
163 167
             array_unique($this->toArray($obj))
164 168
         );
165 169
     }
@@ -227,7 +231,7 @@ class ENV
227 231
 
228 232
         # Map the sanitized function name
229 233
         # to a mapped array conversion
230
-        return $RAO = new RecursiveArrayObject(
234
+        return new RecursiveArrayObject(
231 235
             array_map(
232 236
                 $fn,
233 237
                 array_map(

+ 1
- 1
classes/security.class.php View File

@@ -21,7 +21,7 @@ class Security
21 21
     {
22 22
         foreach ($IDs as $ID) {
23 23
             if (!ID || !is_int($ID) || $ID < 1) {
24
-                error(400);
24
+                error("Expected an integer > 1, got $ID in Security::checkInt.");
25 25
             }
26 26
         }
27 27
 

+ 1
- 1
design/publicheader.php View File

@@ -52,7 +52,7 @@ foreach ($Styles as $Style) {
52 52
 # Fonts
53 53
 echo View::pushAsset(
54 54
 # Only Noto Sans available on public pages
55
-"$ENV->STATIC_SERVER/styles/assets/fonts/noto/woff2/NotoSans-SemiCondensed.woff2",
55
+"$ENV->STATIC_SERVER/styles/assets/fonts/noto/NotoSans-SemiCondensed.woff2",
56 56
     'font'
57 57
 );
58 58
 

+ 6
- 6
gazelle.sql View File

@@ -1858,12 +1858,12 @@ INSERT INTO `permissions` (`ID`, `Level`, `Name`, `Values`, `DisplayStaff`) VALU
1858 1858
 
1859 1859
 
1860 1860
 INSERT INTO `stylesheets` (`ID`, `Name`, `Description`, `Default`, `Additions`, `Color`) VALUES
1861
-  (1, 'matcha', 'BioTorrents.de Stylesheet', '0', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue', '#000000'),
1862
-  (2, 'bookish', 'Template Stylesheet', '1', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue', '#000000'),
1863
-  (3, 'oppai', 'Oppaitime Stylesheet', '0', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue', '#fbc2e5'),
1864
-  (4, 'beluga', 'Beluga Stylesheet', '0', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue;checkbox=pink;checkbox=haze', '#23252a'),
1865
-  (5, 'genaviv', 'Genaviv Stylesheet', '0', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue;checkbox=fixed_header', '#0a0a0a'),
1866
-  (6, 'postmod', 'What.cd Stylesheet', '0', 'radio=noto_sans;radio=noto_serif;radio=opendyslexic;radio=comic_neue', '#000000');
1861
+  (1, 'matcha', 'BioTorrents.de Stylesheet', '0', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue', '#000000'),
1862
+  (2, 'bookish', 'Template Stylesheet', '1', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue', '#000000'),
1863
+  (3, 'oppai', 'Oppaitime Stylesheet', '0', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue', '#fbc2e5'),
1864
+  (4, 'beluga', 'Beluga Stylesheet', '0', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue;checkbox=pink;checkbox=haze', '#23252a'),
1865
+  (5, 'genaviv', 'Genaviv Stylesheet', '0', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue;checkbox=fixed_header', '#0a0a0a'),
1866
+  (6, 'postmod', 'What.cd Stylesheet', '0', 'select=noto_sans;select=luxi_sans;select=cmodern_sans;select=noto_serif;select=luxi_serif;select=cmodern_serif;select=opendyslexic;select=comic_neue;', '#000000');
1867 1867
 
1868 1868
 
1869 1869
 INSERT INTO `wiki_articles` (`ID`, `Revision`, `Title`, `Body`, `MinClassRead`, `MinClassEdit`, `Date`, `Author`) VALUES

+ 54
- 54
sections/user/edit.php View File

@@ -2,11 +2,8 @@
2 2
 #declare(strict_types = 1);
3 3
 
4 4
 require_once SERVER_ROOT.'/classes/twofa.class.php';
5
-$UserID = $_REQUEST['userid'];
6
-
7
-if (!is_number($UserID)) {
8
-    error(404);
9
-}
5
+$UserID = (int) $_REQUEST['userid'];
6
+Security::checkInt($UserID);
10 7
 
11 8
 $DB->query("
12 9
   SELECT
@@ -223,6 +220,7 @@ $ProfileRewards = Donations::get_profile_rewards($UserID);
223 220
         <!-- Stylesheet additions -->
224 221
         <tr id="style_additions_tr"
225 222
           class="<?=($Stylesheets[$LoggedUser['StyleID']]['Additions'][0] ?? false)?'':'hidden'?>">
223
+
226 224
           <td class="label">
227 225
             <strong>Stylesheet additions</strong>
228 226
           </td>
@@ -230,64 +228,66 @@ $ProfileRewards = Donations::get_profile_rewards($UserID);
230 228
           <td>
231 229
             <?php
232 230
           foreach ($Stylesheets as $Style) {
233
-              $StyleAdditions = explode(';', $Style['Additions']);
234 231
 
235
-              # Main ul
236
-              echo '<ul class="nobullet style_addition'; # open quote
232
+              # Main section
233
+              echo '<section class="style_additions'; # open quote
237 234
               echo ($Style['ID'] === $Stylesheets[$LoggedUser['StyleID']]['ID'])
238
-                ? '"'
239
-                : ' hidden"';
240
-              echo ' id="style_addition_' . $Style['Name'] . '">';
235
+                ? '"' # close quote
236
+                : ' hidden"'; # hide
237
+              echo ' id="style_additions_' . $Style['Name'] . '">';
241 238
  
242
-              $Checked = (in_array('default_font', $SiteOptions['StyleAdditions'] ?? [])
243
-              ? 'checked'
244
-              : '');
245
-
246
-              echo <<<HTML
247
-              <li>
248
-                <input type="radio" name="style_additions[]" value="default_font"
249
-                  id="default_font" $Checked />
250
-                <label for="default_font">default_font</label>
251
-              </li>
252
-HTML;
253
-
254 239
               # For each style addition
240
+              $StyleAdditions = explode(';', $Style['Additions']);
241
+              $Select = ['default_font'];
242
+              $Checkbox = [];
243
+
255 244
               foreach ($StyleAdditions as $i => $Addition) {
256
-                  # Radio options, e.g., fonts
257
-                  if (preg_match('/radio/', $Addition)) {
258
-                      $Addition = explode('=', $Addition)[1];
259
-                      $Checked = (in_array($Addition, $SiteOptions['StyleAdditions'] ?? [])
260
-                          ? 'checked'
261
-                          : '');
262
-
263
-                      echo <<<HTML
264
-                      <li>
265
-                        <input type="radio" name="style_additions[]" value="$Addition"
266
-                          id="addition_$Addition" $Checked />
267
-                        <label for="addition_$Addition">$Addition</label>
268
-                      </li>
269
-HTML;
270
-                  }
245
+                  $Types = explode('=', $Addition);
246
+             
247
+                  switch ($Types[0]) {
248
+                  case 'select':
249
+                      array_push($Select, $Types[1]);
250
+                      break;
271 251
 
272
-                  # Checkbox options, e.g., pink and haze
273
-                  if (preg_match('/checkbox/', $Addition)) {
274
-                      $Addition = explode('=', $Addition)[1];
275
-                      $Checked = (in_array($Addition, $SiteOptions['StyleAdditions'] ?? [])
276
-                          ? 'checked'
277
-                          : '');
278
-
279
-                      echo <<<HTML
280
-                      <li>
281
-                        <input type="checkbox" name="style_additions[]" value="$Addition"
282
-                          id="addition_$Addition" $Checked />
283
-                        <label for="addition_$Addition">$Addition</label>
284
-                      </li>
285
-HTML;
252
+                  case 'checkbox':
253
+                      array_push($Checkbox, $Types[1]);
254
+                      break;
255
+
256
+                  default:
257
+                      break;
258
+
259
+                  }
260
+              } # foreach $Addition
261
+
262
+              # Fix to prevent multiple font entries
263
+              if ($Style['ID'] === $Stylesheets[$LoggedUser['StyleID']]['ID']) {
264
+                  # Select options, e.g., fonts
265
+                  echo "<select class='style_additions' name='style_additions[]'>";
266
+  
267
+                  foreach ($Select as $Option) {
268
+                      $Selected = (in_array($Option, $SiteOptions['StyleAdditions'])
269
+                        ? 'selected'
270
+                        : '');
271
+                      echo "<option value='$Option' id='addition_$Option' $Selected>$Option</option>";
286 272
                   }
273
+                  echo '</select>';
287 274
               }
288 275
 
289
-              echo '</ul>';
290
-          } ?>
276
+              # Checkbox options, e.g., pink and haze
277
+              foreach ($Checkbox as $Option) {
278
+                  $Checked = (in_array($Option, $SiteOptions['StyleAdditions'])
279
+                  ? 'checked'
280
+                  : '');
281
+
282
+                  echo <<<HTML
283
+                  <input type="checkbox" name="style_additions[]" value="$Option"
284
+                    id="addition_$Option" $Checked />
285
+                  <label for="addition_$Option">$Option</label>
286
+HTML;
287
+              }
288
+              echo '</section>';
289
+          } # foreach $Style
290
+          ?>
291 291
           </td>
292 292
         </tr>
293 293
 

+ 10
- 5
sections/user/take_edit.php View File

@@ -1,12 +1,13 @@
1 1
 <?php
2 2
 #declare(strict_types=1);
3 3
 
4
-authorize();
5
-$UserID = $_REQUEST['userid'];
4
+/**
5
+ * START CHECKS
6
+ */
6 7
 
7
-if (!is_number($UserID)) {
8
-    error(404);
9
-}
8
+authorize();
9
+$UserID = (int) $_REQUEST['userid'];
10
+Security::checkInt($UserID);
10 11
 
11 12
 // For this entire page, we should generally be using $UserID not $LoggedUser['ID'] and $U[] not $LoggedUser[]
12 13
 $U = Users::user_info($UserID);
@@ -51,6 +52,10 @@ if (!apcu_exists('DBKEY')) {
51 52
     error("Cannot edit profile until database fully decrypted");
52 53
 }
53 54
 
55
+/**
56
+ * END CHECKS
57
+ */
58
+
54 59
 // Begin building $Paranoia
55 60
 // Reduce the user's input paranoia until it becomes consistent
56 61
 if (isset($_POST['p_uniquegroups_l'])) {

+ 213
- 23
static/styles/assets/scss/fonts.scss View File

@@ -34,17 +34,17 @@ $NotoSansItalic: "NotoSans-SemiCondensedItalic";
34 34
 
35 35
 @font-face {
36 36
     font-family: "NotoSans-SemiCondensed";
37
-    src: url($font-path + "noto/woff2/NotoSans-SemiCondensed.woff2");
37
+    src: url($font-path + "noto/NotoSans-SemiCondensed.woff2");
38 38
 }
39 39
 
40 40
 @font-face {
41 41
     font-family: "NotoSans-SemiCondensedBold";
42
-    src: url($font-path + "noto/woff2/NotoSans-SemiCondensedBold.woff2");
42
+    src: url($font-path + "noto/NotoSans-SemiCondensedBold.woff2");
43 43
 }
44 44
 
45 45
 @font-face {
46 46
     font-family: "NotoSans-SemiCondensedItalic";
47
-    src: url($font-path + "noto/woff2/NotoSans-SemiCondensedItalic.woff2");
47
+    src: url($font-path + "noto/NotoSans-SemiCondensedItalic.woff2");
48 48
 }
49 49
 
50 50
 /**
@@ -56,18 +56,18 @@ $NotoSerifBold: "NotoSerif-SemiCondensedBold";
56 56
 $NotoSerifItalic: "NotoSerif-SemiCondensedItalic";
57 57
 
58 58
 @font-face {
59
-    font-family: "NotoSerif-SemiCondensedBold";
60
-    src: url($font-path + "noto/woff2/NotoSerif-SemiCondensedBold.woff2");
59
+    font-family: "NotoSerif-SemiCondensed";
60
+    src: url($font-path + "noto/NotoSerif-SemiCondensed.woff2");
61 61
 }
62 62
 
63 63
 @font-face {
64
-    font-family: "NotoSerif-SemiCondensed";
65
-    src: url($font-path + "noto/woff2/NotoSerif-SemiCondensed.woff2");
64
+    font-family: "NotoSerif-SemiCondensedBold";
65
+    src: url($font-path + "noto/NotoSerif-SemiCondensedBold.woff2");
66 66
 }
67 67
 
68 68
 @font-face {
69 69
     font-family: "NotoSerif-SemiCondensedItalic";
70
-    src: url($font-path + "noto/woff2/NotoSerif-SemiCondensedItalic.woff2");
70
+    src: url($font-path + "noto/NotoSerif-SemiCondensedItalic.woff2");
71 71
 }
72 72
 
73 73
 /**
@@ -75,16 +75,154 @@ $NotoSerifItalic: "NotoSerif-SemiCondensedItalic";
75 75
  */
76 76
 
77 77
 $NotoMono: "NotoSansMono-SemiCondensed";
78
-$NotoMonoBold: "NotoSansMono-SemiCondensed";
78
+$NotoMonoBold: "NotoSansMono-SemiCondensedBold";
79 79
 
80 80
 @font-face {
81 81
     font-family: "NotoSansMono-SemiCondensed";
82
-    src: url($font-path + "noto/woff2/NotoSansMono-SemiCondensed.woff2");
82
+    src: url($font-path + "noto/NotoSansMono-SemiCondensed.woff2");
83 83
 }
84 84
 
85 85
 @font-face {
86 86
     font-family: "NotoSansMono-SemiCondensedBold";
87
-    src: url($font-path + "noto/woff2/NotoSansMono-SemiCondensedBold.woff2");
87
+    src: url($font-path + "noto/NotoSansMono-SemiCondensedBold.woff2");
88
+}
89
+
90
+/**
91
+ * Luxi Sans
92
+ */
93
+
94
+$LuxiSans: "LuxiSans";
95
+$LuxiSansBold: "LuxiSans-Bold";
96
+$LuxiSansItalic: "LuxiSans-Italic";
97
+
98
+@font-face {
99
+    font-family: "LuxiSans";
100
+    src: url($font-path + "luxi/LuxiSans.woff2");
101
+}
102
+
103
+@font-face {
104
+    font-family: "LuxiSans-Bold";
105
+    src: url($font-path + "luxi/LuxiSans-Bold.woff2");
106
+}
107
+
108
+@font-face {
109
+    font-family: "LuxiSans-Italic";
110
+    src: url($font-path + "luxi/LuxiSans-Italic.woff2");
111
+}
112
+
113
+/**
114
+ * Luxi Serif
115
+ */
116
+
117
+$LuxiSerif: "LuxiSerif";
118
+$LuxiSerifBold: "LuxiSerif-Bold";
119
+$LuxiSerifItalic: "LuxiSerif-Italic";
120
+
121
+@font-face {
122
+    font-family: "LuxiSerif";
123
+    src: url($font-path + "luxi/LuxiSerif.woff2");
124
+}
125
+
126
+@font-face {
127
+    font-family: "LuxiSerif-Bold";
128
+    src: url($font-path + "luxi/LuxiSerif-Bold.woff2");
129
+}
130
+
131
+@font-face {
132
+    font-family: "LuxiSerif-Italic";
133
+    src: url($font-path + "luxi/LuxiSerif-Italic.woff2");
134
+}
135
+
136
+/**
137
+ * Luxi Mono
138
+ */
139
+
140
+$LuxiMono: "LuxiMono";
141
+$LuxiMonoBold: "LuxiMono-Bold";
142
+$LuxiMonoItalic: "LuxiMono-Italic";
143
+
144
+@font-face {
145
+    font-family: "LuxiMono";
146
+    src: url($font-path + "luxi/LuxiMono.woff2");
147
+}
148
+
149
+@font-face {
150
+    font-family: "LuxiMono-Bold";
151
+    src: url($font-path + "luxi/LuxiMono-Bold.woff2");
152
+}
153
+
154
+@font-face {
155
+    font-family: "LuxiMono-Italic";
156
+    src: url($font-path + "luxi/LuxiMono-Italic.woff2");
157
+}
158
+
159
+/**
160
+ * Computer Modern Sans
161
+ */
162
+
163
+$CModernSans: "CMUSansSerif";
164
+$CModernSansBold: "CMUSansSerif-Bold";
165
+$CModernSansItalic: "CMUSansSerif-Oblique";
166
+
167
+@font-face {
168
+    font-family: "CMUSansSerif";
169
+    src: url($font-path + "cmodern/CMUSansSerif.woff2");
170
+}
171
+
172
+@font-face {
173
+    font-family: "CMUSansSerif-Bold";
174
+    src: url($font-path + "cmodern/CMUSansSerif-Bold.woff2");
175
+}
176
+
177
+@font-face {
178
+    font-family: "CMUSansSerif-Oblique";
179
+    src: url($font-path + "cmodern/CMUSansSerif-Oblique.woff2");
180
+}
181
+
182
+/**
183
+ * Computer Modern Serif
184
+ */
185
+
186
+$CModernSerif: "CMUSerif-Roman";
187
+$CModernSerifBold: "CMUSerif-Bold";
188
+$CModernSerifItalic: "CMUSerif-Italic";
189
+
190
+@font-face {
191
+    font-family: "CMUSerif-Roman";
192
+    src: url($font-path + "cmodern/CMUSerif-Roman.woff2");
193
+}
194
+
195
+@font-face {
196
+    font-family: "CMUSerif-Bold";
197
+    src: url($font-path + "cmodern/CMUSerif-Bold.woff2");
198
+}
199
+
200
+@font-face {
201
+    font-family: "CMUSerif-Italic";
202
+    src: url($font-path + "cmodern/CMUSerif-Italic.woff2");
203
+}
204
+
205
+/**
206
+ * Computer Modern Mono
207
+ */
208
+
209
+$CModernMono: "CMUTypewriter-Regular";
210
+$CModernMonoBold: "CMUTypewriter-Bold";
211
+$CModernMonoItalic: "CMUTypewriter-Italic";
212
+
213
+@font-face {
214
+    font-family: "CMUTypewriter-Regular";
215
+    src: url($font-path + "cmodern/CMUTypewriter-Regular.woff2");
216
+}
217
+
218
+@font-face {
219
+    font-family: "CMUTypewriter-Bold";
220
+    src: url($font-path + "cmodern/CMUTypewriter-Bold.woff2");
221
+}
222
+
223
+@font-face {
224
+    font-family: "CMUTypewriter-Italic";
225
+    src: url($font-path + "cmodern/CMUTypewriter-Italic.woff2");
88 226
 }
89 227
 
90 228
 /**
@@ -120,24 +258,24 @@ $OpenDyslexicItalic: "OpenDyslexic-Italic";
120 258
 
121 259
 @font-face {
122 260
     font-family: "OpenDyslexic-Regular";
123
-    src: url($font-path + "dyslex/OpenDyslexic-Regular.woff");
261
+    src: url($font-path + "dyslex/OpenDyslexic-Regular.woff2");
124 262
 }
125 263
 
126 264
 @font-face {
127 265
     font-family: "OpenDyslexic-Bold";
128
-    src: url($font-path + "dyslex/OpenDyslexic-Bold.woff");
266
+    src: url($font-path + "dyslex/OpenDyslexic-Bold.woff2");
129 267
 }
130 268
 
131 269
 @font-face {
132 270
     font-family: "OpenDyslexic-Italic";
133
-    src: url($font-path + "dyslex/OpenDyslexic-Italic.woff");
271
+    src: url($font-path + "dyslex/OpenDyslexic-Italic.woff2");
134 272
 }
135 273
 
136 274
 /*
137 275
  * Theme Options
138 276
  */
139 277
 
140
-@mixin font-styles($b, $i) {
278
+@mixin font-styles($b, $i, $m, $mb, $mi: null) {
141 279
     b,
142 280
     strong {
143 281
         font-family: $b;
@@ -150,26 +288,78 @@ $OpenDyslexicItalic: "OpenDyslexic-Italic";
150 288
         font-family: $i;
151 289
         font-style: normal;
152 290
     }
291
+
292
+    code,
293
+    pre,
294
+    tt {
295
+        font-family: $m;
296
+        margin-bottom: 1rem;
297
+        word-wrap: break-word;
298
+        /* word-wrap: pre; */
299
+
300
+        b,
301
+        strong {
302
+            font-family: $mb;
303
+            font-weight: normal;
304
+        }
305
+
306
+        i,
307
+        em {
308
+            /* Noto Mono workaround: no italics */
309
+            @if ($mi) {
310
+                font-family: $mi;
311
+                font-style: normal;
312
+            }
313
+        }
314
+    }
153 315
 }
154 316
 
317
+/* Noto Sans */
155 318
 body.style_noto_sans {
156 319
     font-family: $NotoSans, sans-serif;
157
-    @include font-styles($NotoSansBold, $NotoSansItalic);
320
+    @include font-styles($NotoSansBold, $NotoSansItalic, $NotoMono, $NotoMonoBold);
158 321
 }
159 322
 
323
+/* Noto Serif */
160 324
 body.style_noto_serif {
161 325
     font-family: $NotoSerif, serif;
162
-    @include font-styles($NotoSerifBold, $NotoSerifItalic);
326
+    @include font-styles($NotoSerifBold, $NotoSerifItalic, $NotoMono, $NotoMonoBold);
327
+}
328
+
329
+/* Luxi Sans */
330
+body.style_luxi_sans {
331
+    font-family: $LuxiSans, sans-serif;
332
+    @include font-styles($LuxiSansBold, $LuxiSansItalic, $LuxiMono, $LuxiMonoBold, $LuxiMonoItalic);
333
+}
334
+
335
+/* Luxi Serif */
336
+body.style_luxi_serif {
337
+    font-family: $LuxiSerif, serif;
338
+    @include font-styles($LuxiSerifBold, $LuxiSerifItalic, $LuxiMono, $LuxiMonoBold, $LuxiMonoItalic);
339
+}
340
+
341
+/* Computer Modern Sans */
342
+body.style_cmodern_sans {
343
+    font-family: $CModernSans, sans-serif;
344
+    @include font-styles($CModernSansBold, $CModernSansItalic, $CModernMono, $CModernMonoBold, $CModernMonoItalic);
345
+}
346
+
347
+/* Computer Modern Serif */
348
+body.style_cmodern_serif {
349
+    font-family: $CModernSerif, serif;
350
+    @include font-styles($CModernSerifBold, $CModernSerifItalic, $CModernMono, $CModernMonoBold, $CModernMonoItalic);
163 351
 }
164 352
 
353
+/* OpenDyslexic */
165 354
 body.style_opendyslexic {
166 355
     font-family: $OpenDyslexic, sans-serif;
167
-    @include font-styles($OpenDyslexicBold, $OpenDyslexicItalic);
356
+    @include font-styles($OpenDyslexicBold, $OpenDyslexicItalic, $NotoMono, $NotoMonoBold);
168 357
 }
169 358
 
359
+/* Comic Neue */
170 360
 body.style_comic_neue {
171 361
     font-family: $ComicNeue, sans-serif;
172
-    @include font-styles($ComicNeueBold, $ComicNeueItalic);
362
+    @include font-styles($ComicNeueBold, $ComicNeueItalic, $NotoMono, $NotoMonoBold);
173 363
 }
174 364
 
175 365
 /**
@@ -181,7 +371,7 @@ body.style_comic_neue {
181 371
     font-family: "Open Sans";
182 372
     font-style: normal;
183 373
     font-weight: 400;
184
-    src: url($font-path + "misc/woff2/OpenSans-Regular.woff2");
374
+    src: url($font-path + "misc/OpenSans-Regular.woff2");
185 375
 }
186 376
 
187 377
 /* latin */
@@ -189,7 +379,7 @@ body.style_comic_neue {
189 379
     font-family: "Open Sans";
190 380
     font-style: normal;
191 381
     font-weight: 600;
192
-    src: url($font-path + "misc/woff2/OpenSans-SemiBold.woff2");
382
+    src: url($font-path + "misc/OpenSans-SemiBold.woff2");
193 383
 }
194 384
 
195 385
 /**
@@ -201,7 +391,7 @@ body.style_comic_neue {
201 391
     font-family: "Source Sans Pro";
202 392
     font-style: normal;
203 393
     font-weight: 400;
204
-    src: url($font-path + "misc/woff2/SourceSansPro-Regular.woff2");
394
+    src: url($font-path + "misc/SourceSansPro-Regular.woff2");
205 395
     unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
206 396
 }
207 397
 
@@ -210,7 +400,7 @@ body.style_comic_neue {
210 400
     font-family: "Source Sans Pro";
211 401
     font-style: normal;
212 402
     font-weight: 400;
213
-    src: url($font-path + "misc/woff2/SourceSansPro-Regular.woff2");
403
+    src: url($font-path + "misc/SourceSansPro-Regular.woff2");
214 404
     unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215,
215 405
         U+E0FF, U+EFFD, U+F000;
216 406
 }

+ 7
- 0
static/styles/global/scss/layout.scss View File

@@ -26,6 +26,13 @@
26 26
     width: 50%;
27 27
 }
28 28
 
29
+/**
30
+ * Section elements
31
+ */
32
+.style_addition input {
33
+    margin-left: 0.5rem;
34
+}
35
+
29 36
 /**
30 37
  * Aside elements
31 38
  */

Loading…
Cancel
Save