diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index bf43742..c90ae7b 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -1,52 +1,52 @@ -# Sample workflow for building and deploying a mdBook site to GitHub Pages +# Build and deploy the mdBook site to GitHub Pages. # -# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html +# Repo settings: Settings → Pages → Build and deployment → GitHub Actions # name: Deploy mdBook site to Pages on: - # Runs on pushes targeting the default branch push: branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: - # Build job build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install mdBook & dependencies + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup-init.sh + sh /tmp/rustup-init.sh -y + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + + - name: Install mdBook & mdbook-callouts run: | - curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh - rustup update - cargo install mdbook - cargo install mdbook-callouts + cargo install mdbook --locked --version 0.5.3 + cargo install mdbook-callouts --locked --version 0.3.0 + - name: Setup Pages id: pages uses: actions/configure-pages@v5 + - name: Build with mdBook run: mdbook build + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ./book - # Deployment job deploy: environment: name: github-pages diff --git a/.gitignore b/.gitignore index 7585238..e9c0728 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -book +book \ No newline at end of file diff --git a/README.md b/README.md index 5e66416..3faa310 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,103 @@ -# 2025-CompClub-Spring-Handbook +# Workshop Handbook Template -Use callouts like so: https://crates.io/crates/mdbook-callouts +Template for workshop handbooks using [mdBook](https://rust-lang.github.io/mdBook/) + [mdbook-callouts](https://crates.io/crates/mdbook-callouts). -You will need to have rust and run `cargo install mdbook`and `cargo install mdbook-callouts` -if you don't have the packages already. +Maintained by **CompClub** as a starting point for workshop handbooks. Fork it, replace the placeholder chapters, and deploy to GitHub Pages. -To build, open the book and have it auto-update on save, do ``mdbook serve --open``. +## What's included -Alternatively, you can also use ``mdbook build --open``. +- **Starter chapters** — introduction plus example pages under `src/examples/` +- **Workshop page templates** — guided workshop, CTF challenge, and quick-reference pages under `src/templates/` +- **Callout examples** — `src/examples/callouts.md` (INFO, TIP, WARNING, etc.) +- **Answer widget demo** — `src/examples/answer-widget.md` (interactive check-your-answer pattern) +- **Neutral default theme** — built-in `coal` theme with minimal `theme/custom.css` +- **Deploy workflow** — `.github/workflows/mdbook.yml` builds and publishes on push to `main` -**Make sure you are NOT merging directly into master!!** -make a branch with ur name and topic in it and do a pull request :) \ No newline at end of file +## Prerequisites + +Install [Rust](https://rustup.rs/), then: + +```bash +cargo install mdbook mdbook-callouts +``` + +Pin versions for reproducible builds (optional): + +```bash +cargo install mdbook --locked --version 0.5.3 +cargo install mdbook-callouts --locked --version 0.3.0 +``` + +> **Note:** `mdbook-callouts` 0.3.x requires mdBook 0.5.x. + +## Local development + +Preview with live reload: + +```bash +mdbook serve --open +``` + +Build static output to `book/`: + +```bash +mdbook build +``` + +## First-time fork setup checklist + +- [ ] Rename the repo (if forking for a specific workshop) +- [ ] Update `book.toml` → `title`, `author`, `description` +- [ ] Update `book.toml` → `site-url` to `//` +- [ ] Update `book.toml` → `git-repository-url` +- [ ] Replace placeholder content in `src/` +- [ ] Enable GitHub Pages → Settings → Pages → Build and deployment → **GitHub Actions** +- [ ] Push to `main` and verify the deploy workflow completes + +## Customization (optional) + +None of this is required — pick what fits your workshop. + +### Adding chapters + +1. Create a `.md` file under `src/`. +2. Link it in `src/SUMMARY.md`. +3. Run `mdbook serve --open` to preview. + +For a faster start, copy a page from `src/templates/`, rename it, and replace the bracketed placeholder content. + +### Changing theme + +Set `default-theme` in `book.toml` to any built-in mdBook theme: `coal`, `navy`, `light`, `rust`, or `ayu`. + +For light tweaks, edit `theme/custom.css`. For full custom branding, see the archived pirate example at [`theme/examples/pirate/README.md`](theme/examples/pirate/README.md). + +### Callouts + +See [`src/examples/callouts.md`](src/examples/callouts.md). Syntax: + +```markdown +> [!TIP] Optional title +> Body text. +``` + +### Answer widgets + +See [`src/examples/answer-widget.md`](src/examples/answer-widget.md) for the copy-paste HTML + inline script pattern. + +## Deployment + +Pushing to `main` triggers [`.github/workflows/mdbook.yml`](.github/workflows/mdbook.yml), which installs Rust, builds the book, and deploys to GitHub Pages. + +Ensure Pages is set to **GitHub Actions** (not “Deploy from a branch”) in the repo settings. + +## Canonical template note + +This repository (`Workshop-handbook-template`) uses: + +```toml +site-url = "/Workshop-handbook-template/" +git-repository-url = "https://github.com/davidjosesao/Workshop-handbook-template" +``` + +Forks **must** update `site-url` and `git-repository-url` in `book.toml` to match their own repo name, or navigation and asset links will break on GitHub Pages. diff --git a/SPEC.md b/SPEC.md new file mode 100644 index 0000000..0cf879c --- /dev/null +++ b/SPEC.md @@ -0,0 +1,434 @@ +# Workshop Handbook Template — Implementation Spec + +## Goal + +Turn the forked **2025 CompClub Spring Handbook** into a generic **`workshop-handbook-template`** repo that new workshops can copy or fork. Strip event-specific content, ship a **ready-to-use starter template**, and document how teams can customize further based on their preferences. + +## Stakeholder sign-off + +## Locked decisions + +| Area | Decision | +|------|----------| +| **Starter template** | **Include a full starter template** — not an empty repo. Ship placeholder chapters, example pages, and docs so authors can fork and start writing immediately. | +| **Theme** | **Neutral built-in mdBook theme by default** (`coal`). No custom/pirate styling active out of the box. Teams change `default-theme` or add custom CSS **based on preference** — not required. | +| **Answer widgets** | **Keep one documented example page** (`src/examples/answer-widget.md`) with shared CSS in active `theme/custom.css`. | +| **`site-url`** | **Placeholder** (`/YOUR-REPO-NAME/`) in template + README checklist. Canonical repo uses real value (`/Workshop-handbook-template/`). CI auto-set = follow-up ticket. | + +--- + +## Scope + +### In scope (this ticket) + +- Generic `book.toml` metadata and Pages config +- mdbook-callouts preprocessor config +- **Starter template content** in `src/` (intro + example chapters — see §3) +- Neutral default theme with minimal `custom.css` (callouts + answer widgets only) +- Optional custom theme example archived under `theme/examples/` (preference-based, not default) +- Rewrite README with setup, deploy, and customization docs +- Fix and verify GitHub Actions Pages deploy workflow +- Remove all CompClub / 2025 Spring / SecSoc references + +### Out of scope (follow-up tickets) + +- CI step to auto-set `site-url` from `github.repository` +- mdBook preprocessor/plugin for answer widgets (replace inline JS) +- Contributing guidelines, issue templates, org-wide naming policy +- Prescribing a specific brand/theme for all workshops + +--- + +## What "include a template" means + +The repo must ship **working starter content**, not just config files. A workshop lead should be able to: + +1. Fork the repo +2. Run `mdbook serve --open` +3. See a complete (if minimal) handbook with navigation, callout examples, and an answer-widget demo +4. Replace placeholder text and add their own chapters + +### Starter template contents + +| Item | Purpose | +|------|---------| +| `src/main.md` | Welcome page + quick-start instructions | +| `src/SUMMARY.md` | Navigation skeleton teams extend | +| `src/examples/callouts.md` | Live callout reference | +| `src/examples/answer-widget.md` | Interactive exercise pattern | +| `book.toml` | Pre-configured with placeholders teams replace | +| `theme/custom.css` | Minimal shared styles (callouts + widgets) | +| `README.md` | Fork setup checklist + customization guide | +| `.github/workflows/mdbook.yml` | Deploy pipeline ready to go | + +Teams delete or replace example pages as they write real workshop content. The template is a starting point, not the final product. + +--- + +## Target repo structure + +``` +workshop-handbook-template/ +├── .github/workflows/mdbook.yml +├── .gitignore +├── README.md +├── SPEC.md +├── book.toml +├── src/ +│ ├── SUMMARY.md +│ ├── main.md +│ └── examples/ +│ ├── callouts.md +│ └── answer-widget.md +└── theme/ + ├── custom.css # active: callouts + answer widgets only + └── examples/ + └── pirate/ # optional — enable based on preference + ├── README.md + ├── custom.css + ├── variables.css + └── index.hbs +``` + +**Remove entirely:** + +- `src/ciphers/` +- `src/2_breaking_game_saves/` +- `src/3_day_3_web_attacks/` +- `src/images/` (empty or workshop-specific) +- `src/topic` + +**Remove from active `theme/`** (relocate to `theme/examples/pirate/` or delete): + +- `theme/index.hbs` +- `theme/book.js` +- `theme/css/` +- `theme/fonts/` +- `theme/highlight.css` +- `theme/highlight.js` +- `theme/favicon.png` (optional: keep one neutral favicon or drop) + +--- + +## 1. `book.toml` + +```toml +[book] +title = "Workshop Handbook" +author = "Your Organization" +language = "en" +description = "A template for workshop handbooks built with mdBook." + +[build] +build-dir = "book" + +[output.html] +default-theme = "coal" +site-url = "/YOUR-REPO-NAME/" +git-repository-url = "https://github.com/YOUR-ORG/YOUR-REPO-NAME" +additional-css = ["theme/custom.css"] + +[preprocessor.callouts] +``` + +**Canonical repo override** (document in README, apply in `davidjosesao/Workshop-handbook-template`): + +```toml +site-url = "/Workshop-handbook-template/" +git-repository-url = "https://github.com/davidjosesao/Workshop-handbook-template" +``` + +**Notes:** + +- `default-theme = "coal"` — neutral built-in theme. Do not ship a custom theme as default. +- `[preprocessor.callouts]` with no extra keys is sufficient for mdbook-callouts v0.3.x. +- `git-repository-url` powers the repo icon in the menu bar. + +--- + +## 2. Theme + +### Principle + +**Default = neutral. Customization = optional preference.** + +The template must look clean and professional out of the box using mdBook's built-in themes. No workshop is required to adopt custom branding. + +### 2a. Active default: built-in theme + `theme/custom.css` + +- Use stock mdBook templates (no active `theme/index.hbs` override). +- `default-theme = "coal"` in `book.toml`. +- Active `theme/custom.css` contains **only** shared utility styles: + +**Include:** + +- mdbook-callouts CSS variables on `:root` +- `.answer-box`, `.answer-input`, `.answer-button`, `.correct`, `.incorrect` (neutral colors) + +**Exclude:** + +- Google Fonts imports +- All `.scifi` / pirate rules +- `ship-background.png` references +- Any opinionated branding + +**Example structure:** + +```css +/* Callouts — work across built-in themes */ +:root { + --mdbook-callouts-background: …; + --mdbook-callouts-border: …; +} + +/* Interactive answer widgets */ +.answer-box { … } +``` + +### 2b. Customization options (document in README — preference-based) + +Teams choose what fits their workshop. None of this is required. + +| Preference | How | +|------------|-----| +| Different built-in theme | Change `default-theme` in `book.toml` to `light`, `rust`, `navy`, or `ayu` | +| Light style tweaks | Edit `theme/custom.css` | +| Full custom branding | See `theme/examples/pirate/README.md` for an archived example from the original handbook | + +### 2c. Archived optional example: `theme/examples/pirate/` + +The original CompClub pirate theme is **not the default**. Archive it as a reference for teams who want heavy customization. + +| File | Source | Purpose | +|------|--------|---------| +| `custom.css` | Current `theme/custom.css` | Full pirate look | +| `variables.css` | Current `theme/css/variables.css` (`.scifi` block) | Theme tokens | +| `index.hbs` | Current `theme/index.hbs` | Custom theme menu entry | +| `README.md` | New | Opt-in instructions | + +**`theme/examples/pirate/README.md` should explain:** + +1. This is an **optional example**, not the template default. +2. How to copy files and enable the custom theme if desired. +3. Set `default-theme = "scifi"` when using this example's CSS. +4. `ship-background.png` is not bundled — add your own or remove background rules. +5. Built-in themes (`coal`, `navy`, etc.) are the recommended starting point for most workshops. + +### 2d. Drop active full theme override + +With only `theme/custom.css` referenced, mdBook uses **built-in** templates from the `mdbook` binary. + +**Do not** leave a partial `theme/index.hbs` in the active path. + +--- + +## 3. Content (`src/`) + +### 3a. Delete workshop chapters + +Remove all CompClub curriculum (~30 files). No CompClub slide links, cipher puzzles, or "DAY 1 / DAY 3" structure in the template. + +### 3b. `src/SUMMARY.md` + +```markdown +# Summary + +- [Introduction](main.md) +- [Examples](examples/callouts.md) + - [Answer widgets](examples/answer-widget.md) +``` + +### 3c. `src/main.md` + +Starter template landing page covering: + +- What this repo is and that it's a **template to fork and customize** +- Quick start: `cargo install mdbook mdbook-callouts`, `mdbook serve --open` +- How to add a chapter (create `.md`, link in `SUMMARY.md`) +- Pointer to `examples/` for callouts and answer widgets +- How to change theme (built-in options in `book.toml`) +- **First deploy checklist** (see README) +- One sample callout + +### 3d. `src/examples/callouts.md` + +Live reference for supported callout types: + +- `INFO`, `NOTE`, `TIP`, `WARNING`, `ERROR`, `QUOTE`, `SUCCESS` (or whatever mdbook-callouts supports) +- Link to https://crates.io/crates/mdbook-callouts + +### 3e. `src/examples/answer-widget.md` + +Single minimal interactive example: + +- One question + one answer box +- Inline ` diff --git a/src/ciphers/5_vigenere_ciphers.md b/src/ciphers/5_vigenere_ciphers.md deleted file mode 100644 index bb2ea8d..0000000 --- a/src/ciphers/5_vigenere_ciphers.md +++ /dev/null @@ -1,24 +0,0 @@ -# 🧩 Vigenere Ciphers 🧩 - -A Vigenere Cipher is like a substitution cipher, except that we use a different rotation for every letter. - -Usually these are based off a phrase or word. - -## Try encrypting/decrypting - -Vigenere Cipher encryption/decryption - -> [!TIP] Breaking Vigenere ciphers tips -> - It's really hard! -> - We won't be covering much breaking of them, but feel free to try the following if you have time. -> - Try using techniques from substitution ciphers, with the knowledge that the keys are four letters long. - - -## Examples - -Attempt if you dare! - -1. G xuzc fa vm fa rmybrjgn lmdwhfabh yzp wyhq usz! Fwge ytqemvc ue hsbqg jazv ra majai icotcgcgtq. -2. O pir ibcrz gw xka! Wrk ges zuzik swyx sqzk fqb yrdit rqkng vmtr bit. - - diff --git a/src/ciphers/6_base_64.md b/src/ciphers/6_base_64.md deleted file mode 100644 index 85fb5ee..0000000 --- a/src/ciphers/6_base_64.md +++ /dev/null @@ -1,35 +0,0 @@ -# 🤖 Base 64 🤖 - -Base 64 is an encoding scheme for text and binary data. -We write out our input as binary data, group it into groups of six bits, and then use a Base 64 alphabet to write it down. - -If you're curious, here's the whole alphabet! -``` -ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ -``` - -If the input does not cleanly fit into 6 bit groups, we add `=` at the end for padding. - -## Why? - -Allows us to encode arbitrary binary data as printable text! Very useful for e.g. sending it over the web. - -## Example - -``` -I <3 Compclub! -``` -is -``` -01001001 00100000 00111100 00110011 00100000 01000011 01101111 01101101 01110000 01100011 01101100 01110101 01100010 00100001 -``` -in Binary. - -Group into groups of six: -``` -010010 010010 000000 111100 001100 110010 000001 000011 011011 110110 110101 110000 011000 110110 110001 110101 011000 100010 0001 -``` -Convert to Base 64 Alphabet: -``` -SSA8MyBDb21wY2x1YiE= -``` diff --git a/src/ciphers/caesar_cipher.md b/src/ciphers/caesar_cipher.md deleted file mode 100644 index 1652b20..0000000 --- a/src/ciphers/caesar_cipher.md +++ /dev/null @@ -1,75 +0,0 @@ -# 🔒 CAESAR CIPHER 🔒 -The Caesar cipher is a substitution cipher where each letter in the plaintext is shifted by a fixed number of places down the alphabet. - -## How It Works -- Choose a shift value (e.g., 3). -- Replace each letter with the letter that is `shift` positions down the alphabet. -- Wrap around to the beginning of the alphabet if necessary. -- USE YOUR CIPHER WHEEL! - -## Decrypting Caesar Ciphers -> [!SUCCESS] Task -> Decrypt the following ciphers. Note that **punctuation matters** when inputting your answers. Upper and lower case does not matter. -> -> The following all use a Caesar cipher with different shift values. - -### Cipher 1 -Y qcapcr kcqqyec uyq upgrrcl ml rfc uyjjq md rfc aytcpl, uygrgle dmp qmkcmlc ajctcp clmsef rm qmjtc gr. - - -
- - -
- -
- -### Cipher 2 -Oek adem jxqj vuubydw oek wuj mxud oekhu ijqdtydw yd q xywx fbqsu... ikttud khwu je zkcf?... Y tedj xqlu yj. - Sqfjqyd Zqsa Ifqhhem. - - -
- - -
- -
- -### Cipher 3 -Liztqvo, pwtl ug pivl. Vwbpqvo jmiba i Rmb bew pwtqlig, ivl zqopb vwe gwc kiv aidm nqnbg xwcvla xmz xmzawv. Bpiba bew pcvlzml xwcvla wnn nwz i niuqtg wn nwcz. - - -
- - -
- -
- - \ No newline at end of file diff --git a/src/ciphers/ciphers.md b/src/ciphers/ciphers.md deleted file mode 100644 index 14e0c97..0000000 --- a/src/ciphers/ciphers.md +++ /dev/null @@ -1,5 +0,0 @@ -# 🐸 CIPHERS 🐸 - -> [!INFO] Encryption & Decryption -> Welcome to the world of encrypting and decrypting ciphers! -> Slides can be found with this link diff --git a/src/ciphers/rot13.md b/src/ciphers/rot13.md deleted file mode 100644 index d1ccbab..0000000 --- a/src/ciphers/rot13.md +++ /dev/null @@ -1,63 +0,0 @@ -# 🔑 ROT13 CIPHER 🔑 -The ROT13 cipher is a substitution cipher where each letter is replaced by the letter 13 places down the alphabet. It is a special case of the Caesar cipher with a shift of 13. - -## How It Works -- Replace each letter with the letter 13 positions down the alphabet. -- Wrap around to the beginning of the alphabet if necessary. -- Applying ROT13 twice returns the original text. -- USE YOUR CIPHER WHEEL! - -## Decrypting ROT13 Ciphers -> [!SUCCESS] Task -> Decrypt the following ciphers. Note that **punctuation matters** when inputting your answers. Upper and lower case does not matter. -> -> The following all use the ROT13 cipher. - -### Cipher 1 -Qvq lbh xabj... Cvenpl jnf na rkgerzryl pbzcrgvgvir ohfvarff. Cvengrf jbhyq bsgra wbva sbeprf jvgu bar nabgure, sbezvat nyyvnaprf naq syrrgf, va beqre gb vapernfr gurve punaprf bs fhpprff naq znkvzvfr gurve cebsvgf. - - -
- - -
- -
- -### Cipher 2 -Va gur pnaqyryvg unyyf bs Ubtjnegf, frpergf geniry snfgre guna bjyf, naq rirel juvfcre pneevrf gur jrvtug bs zntvp naq zvfpuvrs. - - -
- - -
- -
- - \ No newline at end of file diff --git a/src/ciphers/rsa.md b/src/ciphers/rsa.md deleted file mode 100644 index 34a2620..0000000 --- a/src/ciphers/rsa.md +++ /dev/null @@ -1,95 +0,0 @@ -# ASYMMETRIC ENCRYPTION & RSA - -## What Makes It *Asymmetric*? - -- In **symmetric encryption**, the **same key** is used to both encrypt and decrypt. - - For instance, in the Ceaser Ciphers covered earlier, we use the same key to encrypt (shift forwards) and decrypt (shift backwards). -- In **asymmetric encryption**, there are **two different keys**: - - **Public key**: used to lock (encrypt) the message 🔓 - - **Private key**: used to unlock (decrypt) the message 🔑 - -We call it *asymmetric* since the keys are not the same for encrypting and decrypting. - -This means you can safely share your public key with the world, -while keeping your private key secret. - - -## Why Do We Need RSA? -- Symmetric ciphers (like Substitution or Caesar) need both people to share the same secret key. -- But how do we share that key securely over the internet? -- This is a big problem for symmetric encryption schemes. -- RSA solves this by letting you publish your public key so anyone can encrypt messages to you. -- Only your secret private key can decrypt it. - ---- - -## How Does RSA Work? (Simplified) -1. Pick two prime numbers (For this example we will use 5 and 11) -2. Multiply them together (n = 5 × 11 = 55). -3. Choose a **public exponent** (we will choose e = 3). -4. Work out a **private exponent** (this is quite difficult to do but in this case, d = 27 will work). -5. We will chose 9, as our message. -6. To encrypt: Raise message to the public exponent, then mod by 55. c = (9^3 mod 55) = 14 -7. To decrypt: Raise ciphertext to the private exponent, mod by 55. m = (14^27 mod 55) = 9 which was our message! - ---- - -## Practice Task - -### Task 1: Encryption -Bob’s RSA public key, n = 55 and public exponent, e = 3. -Alice wants to send him the message, m = 4. -What is the ciphertext? (encrypted message) - -**Try to solve before opening the answer!** - -
- Show Answer - - **Step 1:** formula - `ciphertext = message^e mod n` - - **Step 2:** plug in numbers - `ciphertext = 4^3 mod 55` - - **Step 3:** calculate the power - `4^3 = 64` - - **Step 4:** calculate 64 mod 55 - `64 mod 55 = 9` - - **Ciphertext = 9** - -
- ---- - -### Task 2: Decryption -Bob’s private key, d = 27 and public exponent, n = 55. -He receives ciphertext, c = 9. -What is the hidden message, m? -Hint (use this calculator for large values: https://www.wolframalpha.com) - -**Try to solve before opening the answer!** - -
- Show Answer - - **Step 1:** formula - `message = ciphertext^d mod n` - - **Step 2:** plug in numbers - `message = 9^27 mod 55` - - **Step 3:** calculate the power (we will need a powerful online calculator like wolfram alpha: - https://www.wolframalpha.com/input?i=9%5E27) - `9^27 = 58149737003040059690390169` - - **Step 4:** calculate 58149737003040059690390169 mod 55 (we will also use wolframalpha: - https://www.wolframalpha.com/input?i=58149737003040059690390169+mod+55) - - `58149737003040059690390169 mod 55 = 4` - - **Decrypted message = 4** - -
diff --git a/src/examples/answer-widget.md b/src/examples/answer-widget.md new file mode 100644 index 0000000..5a59f2b --- /dev/null +++ b/src/examples/answer-widget.md @@ -0,0 +1,55 @@ +# Answer widgets + +Use an answer widget when you want readers to type a response and check it inline — useful for short exercises or puzzles. + +> [!NOTE] Copy-paste pattern +> This is a simple HTML + inline script pattern for now. A shared preprocessor or plugin may replace per-page scripts in a future update. + +## Example + + + +**Question:** Which organisation maintains this handbook template? + +
+ + +
+ +
+ + + +## How to add your own + +1. **Choose the correct answer** and encode it as Base64 (e.g. in a terminal: `echo -n 'your answer' | base64`). +2. **Copy the HTML** from the example above into your `.md` file. +3. **Use unique ids** for each widget on the page (`answerinput1`, `result1`, etc.) so multiple boxes do not clash. +4. **Include the ` + {{/if}} + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+ {{#if search_enabled}} +

Press S or / to search in the book

+ {{/if}} +

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+ + +
+
+ + + +
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + +
+ + diff --git a/theme/examples/pirate/variables.css b/theme/examples/pirate/variables.css new file mode 100644 index 0000000..0a51fdb --- /dev/null +++ b/theme/examples/pirate/variables.css @@ -0,0 +1,82 @@ +/* Pirate theme tokens — copy into theme/css/variables.css when enabling the scifi theme */ + +.scifi { + --fg: hsl(262, 96%, 95%); + + --sidebar-bg: linear-gradient(180deg, hsl(262, 36%, 11%), hsl(247, 32%, 23%)); + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #505274; + --sidebar-active: hsl(60, 54%, 52%); + --sidebar-spacer: #2d334f; + + --scrollbar: var(--sidebar-fg); + + --icons: #d47070; + --icons-hover: #e83c3c; + + --links: #ddd417; + + --inline-code-color: hsl(91, 54%, 52%); + + --theme-popup-bg: #161923; + --theme-popup-border: #737480; + --theme-hover: #282e40; + + --quote-bg: hsl(226, 15%, 17%); + --quote-border: hsl(226, 15%, 22%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(226, 23%, 16%); + --table-header-bg: hsl(226, 23%, 31%); + --table-alternate-bg: hsl(226, 23%, 14%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #aeaec6; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #5f5f71; + --searchresults-border-color: #5c5c68; + --searchresults-li-bg: #242430; + --search-mark-bg: #1b56f8; + + --color-scheme: dark; + + --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) + brightness(86%) contrast(87%); + --copy-button-filter-hover: invert(46%) sepia(20%) saturate(1537%) + hue-rotate(156deg) brightness(85%) contrast(90%); + + --footnote-highlight: #4079ae; + + --overlay-bg: rgba(33, 40, 48, 0.4); +} + +.scifi { + --color-red-rgb: 251, 70, 76; + --color-red: #fb464c; + --color-orange-rgb: 233, 151, 63; + --color-orange: #e9973f; + --color-yellow-rgb: 224, 222, 113; + --color-yellow: #e0de71; + --color-green-rgb: 68, 207, 110; + --color-green: #44cf6e; + --color-cyan-rgb: 83, 223, 221; + --color-cyan: #53dfdd; + --color-blue-rgb: 2, 122, 255; + --color-blue: #027aff; + --color-purple-rgb: 168, 130, 255; + --color-purple: #a882ff; + --color-pink-rgb: 250, 153, 205; + --color-pink: #fa99cd; +} + +html.scifi, body.scifi { + background-image: url("ship-background.png"); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + background-attachment: fixed; + background-color: #3b2e2a; + background-blend-mode: multiply; +} diff --git a/theme/fonts/CascadiaCode-Italic-VariableFont_wght.ttf b/theme/fonts/CascadiaCode-Italic-VariableFont_wght.ttf deleted file mode 100644 index 8e92032..0000000 Binary files a/theme/fonts/CascadiaCode-Italic-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/CascadiaCode-VariableFont_wght.ttf b/theme/fonts/CascadiaCode-VariableFont_wght.ttf deleted file mode 100644 index 58bea6b..0000000 Binary files a/theme/fonts/CascadiaCode-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/Nunito-Italic-VariableFont_wght.ttf b/theme/fonts/Nunito-Italic-VariableFont_wght.ttf deleted file mode 100644 index 048cda2..0000000 Binary files a/theme/fonts/Nunito-Italic-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/Nunito-VariableFont_wght.ttf b/theme/fonts/Nunito-VariableFont_wght.ttf deleted file mode 100644 index 4ef6491..0000000 Binary files a/theme/fonts/Nunito-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/OPEN-SANS-LICENSE.txt b/theme/fonts/OPEN-SANS-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/theme/fonts/OPEN-SANS-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt b/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt new file mode 100644 index 0000000..366206f --- /dev/null +++ b/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/theme/fonts/SourceCodePro-Italic-VariableFont_wght.ttf b/theme/fonts/SourceCodePro-Italic-VariableFont_wght.ttf deleted file mode 100644 index d754a85..0000000 Binary files a/theme/fonts/SourceCodePro-Italic-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/SourceCodePro-VariableFont_wght.ttf b/theme/fonts/SourceCodePro-VariableFont_wght.ttf deleted file mode 100644 index cf59205..0000000 Binary files a/theme/fonts/SourceCodePro-VariableFont_wght.ttf and /dev/null differ diff --git a/theme/fonts/fonts.css b/theme/fonts/fonts.css index 7261d77..a6b12b3 100644 --- a/theme/fonts/fonts.css +++ b/theme/fonts/fonts.css @@ -1,59 +1,100 @@ -/* - Nunito -*/ +/* Open Sans is licensed under the Apache License, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 */ +/* Source Code Pro is under the Open Font License. See https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL */ +/* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Nunito"; + font-family: 'Open Sans'; font-style: normal; - src: url('{{ resource "fonts/Nunito-VariableFont_wght.ttf" }}') - format("truetype-variations"); - font-weight: 1 999; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), + url('{{ resource "fonts/open-sans-v17-all-charsets-300.woff2" }}') format('woff2'); } +/* open-sans-300italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Nunito"; + font-family: 'Open Sans'; font-style: italic; - src: url('{{ resource "fonts/Nunito-Italic-VariableFont_wght.ttf" }}') - format("truetype-variations"); - font-weight: 1 999; + font-weight: 300; + src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'), + url('{{ resource "fonts/open-sans-v17-all-charsets-300italic.woff2" }}') format('woff2'); } -/* - Cascadia Code -*/ - +/* open-sans-regular - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Cascadia Code"; + font-family: 'Open Sans'; font-style: normal; - font-weight: 1 999; - src: url('{{ resource "fonts/CascadiaCode-VariableFont_wght.ttf" }}') - format("truetype-variations"); + font-weight: 400; + src: local('Open Sans Regular'), local('OpenSans-Regular'), + url('{{ resource "fonts/open-sans-v17-all-charsets-regular.woff2" }}') format('woff2'); } +/* open-sans-italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Cascadia Code"; + font-family: 'Open Sans'; font-style: italic; font-weight: 400; - src: url('{{ resource "fonts/CascadiaCode-Italic-VariableFont_wght.ttf" }}') - format("ttf"); + src: local('Open Sans Italic'), local('OpenSans-Italic'), + url('{{ resource "fonts/open-sans-v17-all-charsets-italic.woff2" }}') format('woff2'); } -/* - Source Code Pro -*/ +/* open-sans-600 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), + url('{{ resource "fonts/open-sans-v17-all-charsets-600.woff2" }}') format('woff2'); +} +/* open-sans-600italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Source Code Pro"; + font-family: 'Open Sans'; + font-style: italic; + font-weight: 600; + src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'), + url('{{ resource "fonts/open-sans-v17-all-charsets-600italic.woff2" }}') format('woff2'); +} + +/* open-sans-700 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; font-style: normal; - font-weight: 1 999; - src: url('{{ resource "fonts/SourceCodePro-VariableFont_wght.ttf" }}') - format("truetype-variations"); + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), + url('{{ resource "fonts/open-sans-v17-all-charsets-700.woff2" }}') format('woff2'); } +/* open-sans-700italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Source Code Pro"; + font-family: 'Open Sans'; font-style: italic; - font-weight: 400; - src: url('{{ resource "fonts/SourceCodePro-Italic-VariableFont_wght.ttf" }}') - format("ttf"); + font-weight: 700; + src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), + url('{{ resource "fonts/open-sans-v17-all-charsets-700italic.woff2" }}') format('woff2'); +} + +/* open-sans-800 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 800; + src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'), + url('{{ resource "fonts/open-sans-v17-all-charsets-800.woff2" }}') format('woff2'); +} + +/* open-sans-800italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 800; + src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'), + url('{{ resource "fonts/open-sans-v17-all-charsets-800italic.woff2" }}') format('woff2'); +} + +/* source-code-pro-500 - latin_vietnamese_latin-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 500; + src: url('{{ resource "fonts/source-code-pro-v11-all-charsets-500.woff2" }}') format('woff2'); } diff --git a/theme/fonts/open-sans-v17-all-charsets-300.woff2 b/theme/fonts/open-sans-v17-all-charsets-300.woff2 new file mode 100644 index 0000000..9f51be3 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-300.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 new file mode 100644 index 0000000..2f54544 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-600.woff2 b/theme/fonts/open-sans-v17-all-charsets-600.woff2 new file mode 100644 index 0000000..f503d55 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-600.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 new file mode 100644 index 0000000..c99aabe Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-700.woff2 b/theme/fonts/open-sans-v17-all-charsets-700.woff2 new file mode 100644 index 0000000..421a1ab Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-700.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 new file mode 100644 index 0000000..12ce3d2 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-800.woff2 b/theme/fonts/open-sans-v17-all-charsets-800.woff2 new file mode 100644 index 0000000..c94a223 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-800.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 new file mode 100644 index 0000000..eed7d3c Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-italic.woff2 new file mode 100644 index 0000000..398b68a Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-italic.woff2 differ diff --git a/theme/fonts/open-sans-v17-all-charsets-regular.woff2 b/theme/fonts/open-sans-v17-all-charsets-regular.woff2 new file mode 100644 index 0000000..8383e94 Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-regular.woff2 differ diff --git a/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 b/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 new file mode 100644 index 0000000..7222456 Binary files /dev/null and b/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 differ diff --git a/theme/index.hbs b/theme/index.hbs index 2514573..377b10b 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -20,7 +20,7 @@ {{#if favicon_svg}} - + {{/if}} {{#if favicon_png}} @@ -33,15 +33,12 @@ {{/if}} - - {{#if copy_fonts}} - {{/if}} - - - + + + {{#each additional_css}} @@ -58,6 +55,9 @@ const path_to_root = "{{ path_to_root }}"; const default_light_theme = "{{ default_theme }}"; const default_dark_theme = "{{ preferred_dark_theme }}"; + {{#if search_js}} + window.path_to_searchindex_js = "{{ resource "searchindex.js" }}"; + {{/if}} @@ -76,7 +76,7 @@ -
+
- + -