diff --git a/AGENTS.md b/AGENTS.md index d2de097..2ee8e4a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,9 @@ Josselin Perrus's personal site: an Astro 7 static site served by Cloudflare Wor ## Layout -- `src/`: pages, layouts and components. +- `src/`: pages, layouts and components. Pages are built in the `Frame` component, which holds the header and the footer; the portfolio view of `/documents/` has its own. +- `src/styles/`: `tokens.css` holds the colours and fonts as custom properties, `global.css` the base styles, and `legacy.css` the content styles of the pages not yet rebuilt in the redesign. +- `src/fonts/`: the self-hosted fonts, DejaVu Sans Mono and Newsreader, subset by `scripts/subset-fonts.py`, with their licences. The site loads no outside fonts. - `src/content/writing/`: git submodule of [meaningfool-writing](https://github.com/meaningfool/meaningfool-writing), which holds every article, activity log and image. Read its `AGENTS.md` before editing content. - `src/content.config.ts`: the content collection, built from `articles/*.md` and `daily-logs/*.md` in the submodule. - `docs/document-sharing.md`: how the encrypted portfolio links on `/documents/` work and how to create them. diff --git a/public/_headers b/public/_headers index 34b42da..74f643e 100644 --- a/public/_headers +++ b/public/_headers @@ -1,15 +1,16 @@ # Cloudflare Workers reads this file; it isn't served there. # Every response from the site. The Content-Security-Policy only reports for now: -# it lists what pages load (Google Fonts, YouTube embeds, outside images and -# Cloudflare's analytics beacon, which reports to /cdn-cgi/rum on this domain). +# it lists what pages load (YouTube embeds, outside images and Cloudflare's +# analytics beacon, which reports to /cdn-cgi/rum on this domain). Fonts are +# self-hosted. # Inline styles stay allowed because code highlighting uses style attributes. /* Strict-Transport-Security: max-age=31536000 X-Content-Type-Options: nosniff Referrer-Policy: strict-origin-when-cross-origin Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=() - Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; media-src 'self'; frame-src https://www.youtube.com https://www.youtube-nocookie.com; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none' + Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data: https:; media-src 'self'; frame-src https://www.youtube.com https://www.youtube-nocookie.com; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none' # Fingerprinted build files: their names change whenever their content does. /_astro/* diff --git a/public/fonts/space-mono-400.woff2 b/public/fonts/space-mono-400.woff2 deleted file mode 100644 index 5037077..0000000 --- a/public/fonts/space-mono-400.woff2 +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Error 404 (Not Found)!!1 - - -

404. That’s an error. -

The requested URL /s/spacemono/v13/i7dPIFZifjKcF5UAWdDRUEZ2RFq7AwU.woff2 was not found on this server. That’s all we know. diff --git a/public/fonts/space-mono-500.woff2 b/public/fonts/space-mono-500.woff2 deleted file mode 100644 index f3cc684..0000000 --- a/public/fonts/space-mono-500.woff2 +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Error 404 (Not Found)!!1 - - -

404. That’s an error. -

The requested URL /s/spacemono/v13/i7dMIFZifjKcF5UAWdDRaPpZUFqaAwXGVl0.woff2 was not found on this server. That’s all we know. diff --git a/scripts/subset-fonts.py b/scripts/subset-fonts.py new file mode 100644 index 0000000..1ef1ca0 --- /dev/null +++ b/scripts/subset-fonts.py @@ -0,0 +1,105 @@ +"""Make the site's self-hosted fonts in src/fonts/ from the original font files. + +- DejaVu Sans Mono 2.37, Book: the text of everything but articles and About. +- Newsreader 1.003, regular and italic: the text of articles and About. Its weight is fixed at 400 and its optical size + axis (6 to 72) is kept, as Google Fonts serves it to the prototype. + +Each font keeps only the characters in its RANGES, which the @font-face rules in src/styles/tokens.css repeat as their +unicode-range, so anything else falls back to the next font in the stack. DejaVu Sans Mono leaves out the symbols that +are also emoji, such as the star or the check mark, so they show as emoji. The fonts keep their whole name table, with +the copyright and licence. The licences are next to the fonts: LICENSE-DejaVu.txt and OFL-Newsreader.txt. + +Run from the repository root, with fontTools and brotli installed (pip install fonttools brotli): + + python3 scripts/subset-fonts.py + +It downloads the originals, checks their SHA-256, and overwrites the .woff2 files in src/fonts/. The same originals +give the same files. +""" +import hashlib +import io +import os +import tarfile +import urllib.request + +from fontTools import subset +from fontTools.ttLib import TTFont +from fontTools.varLib import instancer + +OUT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src", "fonts") + +# Latin, as Google Fonts subsets it: ASCII, Latin-1, the French and other Western European extras, punctuation, euro. +LATIN = "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD" +# The mono font also draws arrows (← → ↗) and box drawing (├── └──) for code and labels. +RANGES = { + "mono": LATIN + ", U+2190-21FF, U+2500-257F", + "serif": LATIN, +} + +FONTS = [ + { + "out": "dejavu-sans-mono.woff2", + "url": "https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-fonts-ttf-2.37.tar.bz2", + "member": "dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf", + "sha256": "b4a6c3e4faab8773f4ff761d56451646409f29abedd68f05d38c2df667d3c582", + "ranges": RANGES["mono"], + }, + { + "out": "newsreader.woff2", + "url": "https://raw.githubusercontent.com/google/fonts/main/ofl/newsreader/Newsreader%5Bopsz,wght%5D.ttf", + "sha256": "8a08d13f8a6c0d51be379a60af84f945f65369a67e509ee3c3bdcc421254d7c1", + "ranges": RANGES["serif"], + "pin": {"wght": 400}, + }, + { + "out": "newsreader-italic.woff2", + "url": "https://raw.githubusercontent.com/google/fonts/main/ofl/newsreader/Newsreader-Italic%5Bopsz,wght%5D.ttf", + "sha256": "796668611f80b64d5adf182fde3b6f29ed83b4e7cbec7b96937e84ac01364792", + "ranges": RANGES["serif"], + "pin": {"wght": 400}, + }, +] + + +def unicodes(ranges): + """The code points of a CSS unicode-range list.""" + points = [] + for part in ranges.split(","): + lo, _, hi = part.strip()[2:].partition("-") + points.extend(range(int(lo, 16), int(hi or lo, 16) + 1)) + return points + + +def original(spec): + data = urllib.request.urlopen(spec["url"]).read() + if "member" in spec: + data = tarfile.open(fileobj=io.BytesIO(data)).extractfile(spec["member"]).read() + digest = hashlib.sha256(data).hexdigest() + if digest != spec["sha256"]: + raise SystemExit(f"{spec['out']}: the original's SHA-256 is {digest}, expected {spec['sha256']}") + return TTFont(io.BytesIO(data)) + + +def main(): + for spec in FONTS: + font = original(spec) + if "pin" in spec: + font = instancer.instantiateVariableFont(font, spec["pin"]) + options = subset.Options() + options.flavor = "woff2" + options.name_IDs = ["*"] + options.name_languages = ["*"] + options.layout_features = ["*"] + options.notdef_outline = True + subsetter = subset.Subsetter(options) + subsetter.populate(unicodes=unicodes(spec["ranges"])) + subsetter.subset(font) + path = os.path.join(OUT, spec["out"]) + font.flavor = "woff2" + font.recalcTimestamp = False # keep the original's date, so the same originals give the same files + font.save(path) + print(spec["out"], os.path.getsize(path) // 1024, "KB") + + +if __name__ == "__main__": + main() diff --git a/src/components/ArticlesList.astro b/src/components/ArticlesList.astro index 3d12bdc..dae2449 100644 --- a/src/components/ArticlesList.astro +++ b/src/components/ArticlesList.astro @@ -40,7 +40,6 @@ const { articles } = Astro.props; } .articles-list .post-title:hover { - color: var(--accent-hover); text-decoration: underline; } diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..d98f260 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,53 @@ +--- +// The site footer: the wordmark, then About and the profiles elsewhere. On phones the links go under the wordmark. +import Wordmark from './Wordmark.astro'; + +const links = [ + { href: '/about/', label: 'About' }, + { href: 'https://www.linkedin.com/in/josselinperrus/', label: 'LinkedIn' }, + { href: 'https://github.com/meaningfool', label: 'GitHub' }, + { href: 'https://x.com/nonils', label: 'X' }, +]; +--- + +

+ + diff --git a/src/components/Frame.astro b/src/components/Frame.astro new file mode 100644 index 0000000..eb0fc9e --- /dev/null +++ b/src/components/Frame.astro @@ -0,0 +1,22 @@ +--- +// The frame the site's pages are built in: up to 1240px wide with 24px side padding (more where a phone's notch needs +// it), the header at the top and the footer at the bottom. It sits above the page background. +import Header from './Header.astro'; +import Footer from './Footer.astro'; +--- + +
+
+ +
+ + diff --git a/src/components/Header.astro b/src/components/Header.astro index cef6695..030b46b 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,57 +1,53 @@ -
-
- - -
+--- +// The site header: the wordmark on the left, the navigation on the right. The current page's link is in ink, +// underlined in the accent colour. The navigation stays visible on phones. +import Wordmark from './Wordmark.astro'; + +const links = [ + { href: '/', label: 'Home' }, + { href: '/about/', label: 'About' }, +]; +const here = Astro.url.pathname.replace(/\/?$/, '/'); +--- + +
+ +
-
\ No newline at end of file + diff --git a/src/components/NotFound.astro b/src/components/NotFound.astro index 7c226b9..786ce7f 100644 --- a/src/components/NotFound.astro +++ b/src/components/NotFound.astro @@ -1,5 +1,55 @@ -
-

404 - Page Not Found

-

The page you're looking for doesn't exist.

-

← Back to homepage

+--- +// The 404 message, inside the page frame, on /404.html and in the not-found view of /documents/, which must look the +// same. Its styles don't rely on the base styles, which /documents/ doesn't load. +interface Props { + id?: string; +} + +const { id } = Astro.props; +--- + +
+

404 - Page Not Found

+

The page you're looking for doesn't exist.

+

← Back to homepage

+ + diff --git a/src/components/Wordmark.astro b/src/components/Wordmark.astro new file mode 100644 index 0000000..161b39f --- /dev/null +++ b/src/components/Wordmark.astro @@ -0,0 +1,29 @@ +--- +// The wordmark, "meaningfool." with the full stop in the accent colour, linking to the home: 22px in the header, +// 16px (small) in the footer. +interface Props { + small?: boolean; +} + +const { small = false } = Astro.props; +--- + +meaningfool + + diff --git a/src/fonts/LICENSE-DejaVu.txt b/src/fonts/LICENSE-DejaVu.txt new file mode 100644 index 0000000..df52c17 --- /dev/null +++ b/src/fonts/LICENSE-DejaVu.txt @@ -0,0 +1,187 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. +Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +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 BITSTREAM OR THE GNOME +FOUNDATION 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. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +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 +TAVMJONG BAH 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. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. + +TeX Gyre DJV Math +----------------- +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. + +Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski +(on behalf of TeX users groups) are in public domain. + +Letters imported from Euler Fraktur from AMSfonts are (c) American +Mathematical Society (see below). +Bitstream Vera Fonts Copyright +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera +is a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license (“Fonts”) and associated +documentation +files (the “Font Software”), to reproduce and distribute the Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, +and/or sell copies of the Font Software, and to permit persons to whom +the Font Software is furnished to do so, subject to the following +conditions: + +The above copyright and trademark notices and this permission notice +shall be +included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional +glyphs or characters may be added to the Fonts, only if the fonts are +renamed +to names not containing either the words “Bitstream” or the word “Vera”. + +This License becomes null and void to the extent applicable to Fonts or +Font Software +that has been modified and is distributed under the “Bitstream Vera” +names. + +The Font Software may be sold as part of a larger software package but +no copy +of one or more of the Font Software typefaces may be sold by itself. + +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 BITSTREAM OR THE GNOME +FOUNDATION +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. +Except as contained in this notice, the names of GNOME, the GNOME +Foundation, +and Bitstream Inc., shall not be used in advertising or otherwise to promote +the sale, use or other dealings in this Font Software without prior written +authorization from the GNOME Foundation or Bitstream Inc., respectively. +For further information, contact: fonts at gnome dot org. + +AMSFonts (v. 2.2) copyright + +The PostScript Type 1 implementation of the AMSFonts produced by and +previously distributed by Blue Sky Research and Y&Y, Inc. are now freely +available for general use. This has been accomplished through the +cooperation +of a consortium of scientific publishers with Blue Sky Research and Y&Y. +Members of this consortium include: + +Elsevier Science IBM Corporation Society for Industrial and Applied +Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS) + +In order to assure the authenticity of these fonts, copyright will be +held by +the American Mathematical Society. This is not meant to restrict in any way +the legitimate use of the fonts, such as (but not limited to) electronic +distribution of documents containing these fonts, inclusion of these fonts +into other public domain or commercial font collections or computer +applications, use of the outline data to create derivative fonts and/or +faces, etc. However, the AMS does require that the AMS copyright notice be +removed from any derivative versions of the fonts which have been altered in +any way. In addition, to ensure the fidelity of TeX documents using Computer +Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces, +has requested that any alterations which yield different font metrics be +given a different name. + +$Id$ diff --git a/src/fonts/OFL-Newsreader.txt b/src/fonts/OFL-Newsreader.txt new file mode 100644 index 0000000..d2d4f40 --- /dev/null +++ b/src/fonts/OFL-Newsreader.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader) + +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. \ No newline at end of file diff --git a/src/fonts/dejavu-sans-mono.woff2 b/src/fonts/dejavu-sans-mono.woff2 new file mode 100644 index 0000000..512e14d Binary files /dev/null and b/src/fonts/dejavu-sans-mono.woff2 differ diff --git a/src/fonts/newsreader-italic.woff2 b/src/fonts/newsreader-italic.woff2 new file mode 100644 index 0000000..5133d32 Binary files /dev/null and b/src/fonts/newsreader-italic.woff2 differ diff --git a/src/fonts/newsreader.woff2 b/src/fonts/newsreader.woff2 new file mode 100644 index 0000000..f7b0d0a Binary files /dev/null and b/src/fonts/newsreader.woff2 differ diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index def2b06..21f7a94 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,4 +1,9 @@ --- +import '../styles/global.css'; +import '../styles/legacy.css'; +import Frame from '../components/Frame.astro'; +import monoFont from '../fonts/dejavu-sans-mono.woff2?url'; + // Accept props for meta tags const { title = 'meaningfool', @@ -16,7 +21,7 @@ const canonical = canonicalURL.toString(); - + {title} @@ -42,325 +47,13 @@ const canonical = canonicalURL.toString(); - - - + + - - + + + - - diff --git a/src/pages/404.astro b/src/pages/404.astro index 5fa680f..6e3d663 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -1,14 +1,24 @@ --- +import '../styles/global.css'; +import Frame from '../components/Frame.astro'; import NotFound from '../components/NotFound.astro'; +import monoFont from '../fonts/dejavu-sans-mono.woff2?url'; --- + + 404 - Page Not Found | meaningfool + + - + + + + diff --git a/src/pages/about.astro b/src/pages/about.astro index 97f3641..87c6966 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,5 +1,4 @@ --- -import Header from '../components/Header.astro'; import Layout from '../layouts/Layout.astro'; import JsonLd from '../components/JsonLd.astro'; @@ -20,8 +19,7 @@ const personSchema = { -
-
+

About me

🏁 Customer success is the goal. (Productized) software may be solution. And it may not. Whatever works

@@ -38,3 +36,9 @@ const personSchema = {
+ diff --git a/src/pages/articles/[slug].astro b/src/pages/articles/[slug].astro index 3016c50..be96275 100644 --- a/src/pages/articles/[slug].astro +++ b/src/pages/articles/[slug].astro @@ -2,7 +2,6 @@ import type { GetStaticPaths } from 'astro'; import { getCollection, render, type CollectionEntry } from 'astro:content'; import Layout from '../../layouts/Layout.astro'; -import Header from '../../components/Header.astro'; import JsonLd from '../../components/JsonLd.astro'; export const getStaticPaths: GetStaticPaths = async () => { @@ -44,8 +43,7 @@ const articleSchema = { type="article" > -
-
+

{article.data.title}

@@ -90,26 +88,25 @@ const articleSchema = { font-size: 1rem; margin-top: 0; display: block; - font-family: 'Poppins', sans-serif; } .article-content { padding: 1rem 0 4rem 0; - font-family: 'Poppins', sans-serif; + font-family: var(--serif); } - /* Explicitly force Poppins on children to override global body font */ + /* Explicitly set the serif on children, so no other style gives them the mono */ .article-content :global(p), .article-content :global(ul), .article-content :global(ol), .article-content :global(li), .article-content :global(blockquote) { - font-family: 'Poppins', sans-serif; + font-family: var(--serif); } .article-content :global(strong), .article-content :global(b) { - font-weight: 500; + font-weight: 600; /* Newsreader comes in one weight, so the browser draws the bold */ } .article-content :global(h1) { diff --git a/src/pages/documents.astro b/src/pages/documents.astro index 5e62ef0..beaa3ed 100644 --- a/src/pages/documents.astro +++ b/src/pages/documents.astro @@ -1,4 +1,6 @@ --- +import '../styles/tokens.css'; +import Frame from '../components/Frame.astro'; import NotFound from '../components/NotFound.astro'; --- @@ -24,7 +26,7 @@ import NotFound from '../components/NotFound.astro'; -
+