diff options
author | Francesco <tomaselli.fr@gmail.com> | 2024-04-28 23:27:46 +0200 |
---|---|---|
committer | Francesco <tomaselli.fr@gmail.com> | 2024-04-29 00:05:22 +0200 |
commit | f7131b852c48742226934105df68229f3a1408a8 (patch) | |
tree | f5d20a186c7b3a82def08d83de90eaf43ec79dc4 | |
parent | 572c118f10c4d360ff11cf612db087c1926e17eb (diff) |
Fixed overflow on Katex for mobile, woff2 for Literata
-rw-r--r-- | README.md | 28 | ||||
-rw-r--r-- | assets/css/fonts.css | 8 | ||||
-rw-r--r-- | assets/css/main.css | 4 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 4 | ||||
-rw-r--r-- | static/fonts/Literata/Literata-Light.woff | bin | 114960 -> 0 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-Light.woff2 | bin | 0 -> 81764 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-LightItalic.woff | bin | 115604 -> 0 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-LightItalic.woff2 | bin | 0 -> 82144 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-SemiBold.woff | bin | 117168 -> 0 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-SemiBold.woff2 | bin | 0 -> 83900 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-SemiBoldItalic.woff | bin | 118092 -> 0 bytes | |||
-rw-r--r-- | static/fonts/Literata/Literata-SemiBoldItalic.woff2 | bin | 0 -> 85020 bytes |
14 files changed, 38 insertions, 14 deletions
@@ -24,11 +24,13 @@ Typo is a theme backed by simplicity, as you can see in the screenshots below. T - [2.2 Appearance preferences](#22-appearance-preferences) - [2.3 Dark and light mode images](#23-dark-and-light-mode-images) - [2.4 Fonts](#24-fonts) + - [2.5 Miscellaneous](#25-miscellaneous) - [3 Configuration example](#3-configuration-example) - [3.1 post.md](#31-postmd) - [3.2 hugo.toml](#32-hugotoml) - [4 References](#4-references) - [5 Contributing](#5-contributing) +- [6 Future Works](#6-future-works) --- @@ -53,6 +55,15 @@ You can add auto-numbering to the pages by setting the following parameter in th autonumber: true ``` +Note that autonumbering starts from h2 tags, hence you need +to start sections with ## headings. + +``` +## First -> 1 First +### Second -> 1.1 Second +#### Third -> 1.1.1 Third +``` + ### 2.2 Appearance preferences In your `hugo.toml` file you can specify the preferred theme: @@ -80,6 +91,12 @@ dark mode. The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and [Monaspace Argon](https://github.com/githubnext/monaspace). +### 2.5 Miscellaneous + +Various miscellaneous features: +- Latex blocks overflows on mobile to prevent having strange alignments; +- Code blocks are displayed with ligatures. + ## 3 Configuration example ### 3.1 post.md @@ -89,7 +106,7 @@ The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and title: "Search Engine in Rust" date: "2024-02-01" summary: "A search engine overview and Rust implementation." -toc: true +toc: true readTime: true autonumber: true math: true @@ -173,4 +190,11 @@ The SVGs for social icons are taken from [Hugo PaperMod](https://github.com/adit ## 5 Contributing -Feel free to write proposals or stuff you'd like to see. If you feel like contributing, PRs are welcome!
\ No newline at end of file +Feel free to write proposals or stuff you'd like to see. If you feel like contributing, PRs are welcome! + +## 6 Future Works + +- [ ] Bring SEO and [performance metrics](https://pagespeed.web.dev/) to 100% both on mobile and desktop; +- [ ] Add additional options on posts list view; +- [ ] Add color palettes; +- [ ] Add a proper Tags page;
\ No newline at end of file diff --git a/assets/css/fonts.css b/assets/css/fonts.css index ece20ea..8eb35db 100644 --- a/assets/css/fonts.css +++ b/assets/css/fonts.css @@ -1,27 +1,27 @@ @font-face { font-family: 'Literata'; - src: url('/fonts/Literata/Literata-Light.woff') format('woff'); + src: url('/fonts/Literata/Literata-Light.woff2') format('woff2'); font-weight: light; font-style: normal; } @font-face { font-family: 'Literata'; - src: url('/fonts/Literata/Literata-LightItalic.woff') format('woff'); + src: url('/fonts/Literata/Literata-LightItalic.woff2') format('woff2'); font-weight: light; font-style: italic; } @font-face { font-family: 'Literata'; - src: url('/fonts/Literata/Literata-SemiBold.woff') format('woff'); + src: url('/fonts/Literata/Literata-SemiBold.woff2') format('woff2'); font-weight: bold; font-style: normal; } @font-face { font-family: 'Literata'; - src: url('/fonts/Literata/Literata-SemiBoldItalic.woff') format('woff'); + src: url('/fonts/Literata/Literata-SemiBoldItalic.woff2') format('woff2'); font-weight: bold; font-style: italic; } diff --git a/assets/css/main.css b/assets/css/main.css index 1a356d5..3c6ac9a 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -89,14 +89,14 @@ code { } -.MathJax { +.katex-display { overflow-x: auto; overflow-y: hidden; -ms-overflow-style: none; scrollbar-width: none; } -.MathJax::-webkit-scrollbar { +.katex-display::-webkit-scrollbar { display: none; } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e5ac09e..a116c36 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -25,7 +25,7 @@ </div> <footer> - {{ partialCached "footer.html" . }} + {{ partial "footer.html" . }} </footer> </body> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 84057aa..9f307e1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,4 +2,8 @@ <a href="https://gohugo.io/">Hugo</a> and <a href="https://github.com/tomfran/typo">tomfran/typo</a> -</p>
\ No newline at end of file +</p> + +{{ if .Param "math" }} +{{ partialCached "math.html" . }} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 962ebf4..fef47c4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,10 +4,6 @@ {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} -{{ if .Param "math" }} -{{ partialCached "math.html" . }} -{{ end }} - {{ if hugo.IsProduction }} {{ template "_internal/google_analytics.html" . }} {{ end }}
\ No newline at end of file diff --git a/static/fonts/Literata/Literata-Light.woff b/static/fonts/Literata/Literata-Light.woff Binary files differdeleted file mode 100644 index bfc63d9..0000000 --- a/static/fonts/Literata/Literata-Light.woff +++ /dev/null diff --git a/static/fonts/Literata/Literata-Light.woff2 b/static/fonts/Literata/Literata-Light.woff2 Binary files differnew file mode 100644 index 0000000..2fabae2 --- /dev/null +++ b/static/fonts/Literata/Literata-Light.woff2 diff --git a/static/fonts/Literata/Literata-LightItalic.woff b/static/fonts/Literata/Literata-LightItalic.woff Binary files differdeleted file mode 100644 index 0699d5a..0000000 --- a/static/fonts/Literata/Literata-LightItalic.woff +++ /dev/null diff --git a/static/fonts/Literata/Literata-LightItalic.woff2 b/static/fonts/Literata/Literata-LightItalic.woff2 Binary files differnew file mode 100644 index 0000000..0d9dc4f --- /dev/null +++ b/static/fonts/Literata/Literata-LightItalic.woff2 diff --git a/static/fonts/Literata/Literata-SemiBold.woff b/static/fonts/Literata/Literata-SemiBold.woff Binary files differdeleted file mode 100644 index 0fa567d..0000000 --- a/static/fonts/Literata/Literata-SemiBold.woff +++ /dev/null diff --git a/static/fonts/Literata/Literata-SemiBold.woff2 b/static/fonts/Literata/Literata-SemiBold.woff2 Binary files differnew file mode 100644 index 0000000..664f85d --- /dev/null +++ b/static/fonts/Literata/Literata-SemiBold.woff2 diff --git a/static/fonts/Literata/Literata-SemiBoldItalic.woff b/static/fonts/Literata/Literata-SemiBoldItalic.woff Binary files differdeleted file mode 100644 index a596fde..0000000 --- a/static/fonts/Literata/Literata-SemiBoldItalic.woff +++ /dev/null diff --git a/static/fonts/Literata/Literata-SemiBoldItalic.woff2 b/static/fonts/Literata/Literata-SemiBoldItalic.woff2 Binary files differnew file mode 100644 index 0000000..cdca49d --- /dev/null +++ b/static/fonts/Literata/Literata-SemiBoldItalic.woff2 |