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 1 year ago
parent
commit
d4c1c2e205
  1. BIN
      docs/designs/VictorMonoAll.zip
  2. 2
      lib/buildrules.js
  3. 16
      lib/docs.js
  4. BIN
      public/fonts/Tandy1K.woff
  5. 1
      sass/_codes.scss
  6. 11
      sass/_typography.scss
  7. 1
      sass/_variables.scss
  8. 1
      src/components/Hero.svelte
  9. 9
      src/components/Landing.svelte
  10. 2
      static/css/prism.css
  11. 2
      static/css/spectre.min.css

BIN
docs/designs/VictorMonoAll.zip

Binary file not shown.

2
lib/buildrules.js

@ -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\`\`\``
}
}

16
lib/docs.js

@ -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
public/fonts/Tandy1K.woff

Binary file not shown.

1
sass/_codes.scss

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

11
sass/_typography.scss

@ -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
sass/_variables.scss

@ -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;

1
src/components/Hero.svelte

@ -22,7 +22,6 @@
color: #7b263a;
}
</style>
</svelte:head>
<style lang="scss">

9
src/components/Landing.svelte

@ -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;
}

2
static/css/prism.css

@ -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;

2
static/css/spectre.min.css

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save