Browse Source

Fixes to remove Victor Mono as a font since it uses ligatures that students will never be able to type.

master
Zed A. Shaw 6 months ago
parent
commit
d4c1c2e205
11 changed files with 30 additions and 15 deletions
  1. BIN
     
  2. +1
    -1
      lib/buildrules.js
  3. +12
    -4
      lib/docs.js
  4. BIN
     
  5. +1
    -0
      sass/_codes.scss
  6. +9
    -2
      sass/_typography.scss
  7. +1
    -0
      sass/_variables.scss
  8. +0
    -1
      src/components/Hero.svelte
  9. +4
    -5
      src/components/Landing.svelte
  10. +1
    -1
      static/css/prism.css
  11. +1
    -1
      static/css/spectre.min.css

BIN
View File


+ 1
- 1
lib/buildrules.js View File

@@ -29,7 +29,7 @@ class Ork {
assert(this.code_path, "You are using ork but no code path set.");
let cmd = `node "${file}" ${args}`;
let result = child_process.execSync(cmd, {cwd: this.code_path});
return `\`\`\`javascript\n${result.toString().trim()}\n\`\`\``
return `\`\`\`shell\n$ ${cmd}\n${result.toString().trim()}\n\`\`\``
}
}



+ 12
- 4
lib/docs.js View File

@@ -1,18 +1,25 @@
const { Remarkable } = require('remarkable');
const { linkify } = require('remarkable/linkify');
const Prism = require('prismjs');
const loadLanguages = require('prismjs/components/');
const urlSlug = require('url-slug');
const { log } = require('./logging');
const fs = require('fs');


const highlight = (str, lang) => {
// TODO: Prism mentions if you try to include languages here then all of them get included
// TODO: Prism recommends loading languages in the rollup stage
// TODO: so irritating
if(lang in Prism.languages) {
return Prism.highlight(str, Prism.languages[lang], lang);
} else {
console.log(`!!!!!!!!!!!!!!! Language ${lang} not found in Prism.`);
return '';
loadLanguages([lang]);

if(lang in Prism.languages) {
return Prism.highlight(str, Prism.languages[lang], lang);
} else {
console.log(`!!!!!!!!!!!!!!! Language ${lang} not found in Prism.`);
return '';
}
}
}

@@ -37,6 +44,7 @@ const render = (raw_md, base_url, cb=null_cb) => {
let [metadata, body] = split(raw_md);

const renderer = new Remarkable('full', {
html: true,
highlight
}).use(linkify).use(rem => {
rem.renderer.rules.heading_open = (tokens, idx) => {


BIN
View File


+ 1
- 0
sass/_codes.scss View File

@@ -27,5 +27,6 @@ pre {
overflow-x: auto;
padding: 1rem;
width: 100%;
font-family: $mono-font-family !important;
}
}

+ 9
- 2
sass/_typography.scss View File

@@ -1,3 +1,10 @@
@font-face {
font-family: 'Tandy1K';
font-style: normal;
font-weight: 400;
src: url(/fonts/Tandy1K.woff) format('woff');
}

// Typography
// Headings
h1,
@@ -9,7 +16,7 @@ h6 {
font-weight: 700;
margin-bottom: .5em;
margin-top: 0;
font-family: "Arial Black";
font-family: $header-font-family;

a {
text-decoration: none !important;
@@ -23,7 +30,7 @@ h6 {
.h5,
.h6 {
font-weight: 700;
font-family: "Arial Black";
font-family: $header-font-family;

a {
text-decoration: none !important;


+ 1
- 0
sass/_variables.scss View File

@@ -56,6 +56,7 @@ $header-font-family: "Arial Black", !default;
$mono-font-family: “Roboto”, “Droid Sans”, “Helvetica Neue”, sans-serif, !default;
$fallback-font-family: "Helvetica Neue", sans-serif !default;
$body-font-family: $base-font-family, $fallback-font-family !default;
$fun-font-family: "Tandy1K" !default;

// Unit sizes
$unit-o: .1rem !default;


+ 0
- 1
src/components/Hero.svelte View File

@@ -22,7 +22,6 @@
color: #7b263a;
}
</style>

</svelte:head>

<style lang="scss">


+ 4
- 5
src/components/Landing.svelte View File

@@ -60,11 +60,11 @@

#what-you-get h1 {
margin-top: 0.5em;
font-family: 'Victor Mono';
color: darken($primary-color, 10%);
font-size: 5em;
font-size: 4em;
margin: 0px;
text-shadow: 4px 4px $yellow;
font-family: $fun-font-family;
}

#what-it-costs {
@@ -78,18 +78,17 @@
}

#what-it-costs h1 {
font-family: 'Victor Mono';
color: darken($green, 50%);
font-size: 5em;
font-size: 4em;
margin: 0px;
text-shadow: 4px 4px $yellow;
font-family: $fun-font-family;
}

#what-you-get-content {
margin-top: 1em;
margin-bottom: 0.5em;
font-size: 1.5em;
font-family: 'Victor Mono';
line-height: 1.5;
}



+ 1
- 1
static/css/prism.css View File

@@ -11,7 +11,7 @@ pre[class*="language-"] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: "Victor Mono", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;


+ 1
- 1
static/css/spectre.min.css
File diff suppressed because it is too large
View File


Loading…
Cancel
Save