Skip to content

Commit

Permalink
change font
Browse files Browse the repository at this point in the history
  • Loading branch information
phineas-pta committed Sep 11, 2023
1 parent eec94a0 commit 2384321
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ src/
│ ├─ book-1/
│ │ ├─ chapter-1.html
│ │ ├─ chapter-2.html
│ ...
│ ├─ book-2/
│ │ ├─ chapter-1.html
│ │ ├─ chapter-2.html
Expand All @@ -55,12 +56,10 @@ using 11ty:
docker ?? no option to change host

additional setup:

- Favicon: https://www.iconarchive.com/download/i75808/martz90/circle/books.ico
- AR PL (Arphic Public Licensed) UKaiHK font: https://github.com/SilentByte/fonts-arphic-ukai/blob/master/fonts-arphic-ukai/ukai.ttc, under the [Arphic public license](assets/fonts/ARPHICPL.txt)
- Grenze Gotisch font: https://github.com/Omnibus-Type/Grenze-Gotisch/blob/master/fonts/ttf/GrenzeGotisch-ExtraBold.ttf, under the [SIL OFL v1.1](assets/fonts/OFL.txt)

convert `.ttf``.woff2` using https://github.com/google/woff2
- Favicon: https://www.iconarchive.com/download/i75808/martz90/circle/books.ico
- AR PL (Arphic Public Licensed) UKaiHK font: https://github.com/SilentByte/fonts-arphic-ukai/blob/master/fonts-arphic-ukai/ukai.ttc, under the [Arphic public license](assets/fonts/ARPHICPL.txt)
- Grenze Gotisch font: https://github.com/Omnibus-Type/Grenze-Gotisch, under the [SIL OFL v1.1](assets/fonts/OFL.txt)
- Font Awesome v6 solid: https://github.com/FortAwesome/Font-Awesome/tree/6.4.2/webfonts, under the [SIL OFL v1.1](assets/fonts/OFL.txt)

UKaiHK font: originally `.ttc` → use FontForge to extract `.ttf` № 2 (HK)

Expand Down
8 changes: 4 additions & 4 deletions _includes/lay-chap.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
{% set prev_next = eleventyNavigation.key | findNextPrev(navPages) %}
<nav class="pagination is-large" role="navigation" aria-label="pagination">
{% if prev_next.prev_url -%}
<a class="MUC-LUC pagination-previous button is-link" href="{{ prev_next.prev_url | url }}">&#9198;</a><!-- ⏮ without modifier -->
<a class="MUC-LUC FA-ICON pagination-previous button is-link" href="{{ prev_next.prev_url | url }}">&#9198;</a><!-- ⏮ without modifier -->
{%- else -%}
<a class="pagination-previous is-disabled">&#128683;</a><!-- 🚫 -->
<a class="FA-ICON pagination-previous is-disabled">&#128683;</a><!-- 🚫 -->
{%- endif %}
{% if prev_next.next_url -%}
<a class="MUC-LUC pagination-next button is-link" href="{{ prev_next.next_url | url }}">&#9197;</a><!-- ⏭ without modifier -->
<a class="MUC-LUC FA-ICON pagination-next button is-link" href="{{ prev_next.next_url | url }}">&#9197;</a><!-- ⏭ without modifier -->
{%- else -%}
<a class="pagination-next is-disabled">&#128683;</a><!-- 🚫 -->
<a class="FA-ICON pagination-next is-disabled">&#128683;</a><!-- 🚫 -->
{%- endif %}
</nav>

Expand Down
4 changes: 2 additions & 2 deletions _includes/navbar.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<div class="navbar-brand" style="flex-grow: 1; justify-content: center;">
{# center navbar ref: https://github.com/jgthms/bulma/issues/1604#issuecomment-422407761 #}
<div class="navbar-item">
<a id="home-button" rel="prev" role="button" class="button is-link" href="{{ '/' | url }}">&#127968;</a><!-- 🏠 -->
<a id="home-button" rel="prev" role="button" class="FA-ICON button is-link" href="{{ '/' | url }}">&#127968;</a><!-- 🏠 -->
</div>
<div class="navbar-item">
<label class="checkbox button is-link" title="dark mode toggle"><input type="checkbox" id="themeSwitch" />&#8987;</label><!---->
<label class="FA-ICON checkbox button is-link" title="dark mode toggle"><input type="checkbox" id="themeSwitch" />&#8987;</label><!---->
</div>
{# hamburger menu only appears on touch devices, must be last child, and dont add class button #}
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
Expand Down
2 changes: 1 addition & 1 deletion _includes/wait-sign.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h5 style="text-align: center;">&#128679;<!-- 🚧 -->in construction...&#127959;&#65039;<!-- 🏗 with modifier --></h5>
<h5 style="text-align: center;" class="FA-ICON">&#128679;<!-- 🚧 --> not yet … &#127959;&#65039;<!-- 🏗 with modifier --></h5>
Binary file modified assets/fonts/GrenzeGotisch-ExtraBold.woff2
Binary file not shown.
Binary file added assets/fonts/fa-solid-900.ttf
Binary file not shown.
Binary file added assets/fonts/fa-solid-900.woff2
Binary file not shown.
13 changes: 9 additions & 4 deletions assets/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ a.MY-REF
word-break: break-all
word-wrap: break-word

&::before
content: "\1F517" // 🔗
font-size: 70%

// https://github.com/Omnibus-Type/Grenze-Gotisch/blob/master/fonts/webfonts/GrenzeGotisch-ExtraBold.woff2
// https://github.com/Omnibus-Type/Grenze-Gotisch/blob/master/fonts/ttf/GrenzeGotisch-ExtraBold.ttf
@font-face
font-family: "SinoViet-font"
Expand All @@ -26,13 +23,21 @@ a.MY-REF
font-family: "ChineseFont"
src: url("fonts/UKaiHK-02.woff2") format("woff2"), url("fonts/UKaiHK-02.ttf") format("truetype")

// https://github.com/FortAwesome/Font-Awesome/tree/6.4.2/webfonts
@font-face
font-family: "FoAw-icon"
src: url("fonts/fa-solid-900.woff2") format("woff2"), url("fonts/fa-solid-900.ttf") format("truetype")

// instead of bulma class `has-text-centered` (dont use `is-centered`)
header
text-align: center

.multi-lang > :lang(vi)
color: #3A8098

.FA-ICON
font-family: "FoAw-icon"

/* **************************** ruby annotations **************************** */

// see how it was improved https://codereview.stackexchange.com/q/260732/242219
Expand Down

0 comments on commit 2384321

Please sign in to comment.