From 2d53d00d20c1e3eaf788ef5b43d6d1b4fc405243 Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Tue, 3 Dec 2024 21:26:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?import=20qualified=20M=20=E2=86=92=20import?= =?UTF-8?q?=20M=20qualified?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog-meta/lib/NiceDate.hs | 6 +++--- blog-meta/lib/SlugTags.hs | 5 ++--- blog-meta/lib/YAML.hs | 12 ++++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/blog-meta/lib/NiceDate.hs b/blog-meta/lib/NiceDate.hs index 50ee795..a90305e 100644 --- a/blog-meta/lib/NiceDate.hs +++ b/blog-meta/lib/NiceDate.hs @@ -1,10 +1,10 @@ module NiceDate (niceDate) where -import Text.Pandoc.Definition -import qualified Data.Map.Strict as Map -import Misc import Control.Monad.Writer +import Data.Map.Strict qualified as Map import Data.Monoid +import Misc +import Text.Pandoc.Definition niceDate :: Meta -> Meta niceDate (Meta m) = diff --git a/blog-meta/lib/SlugTags.hs b/blog-meta/lib/SlugTags.hs index a614d1f..599f4ba 100644 --- a/blog-meta/lib/SlugTags.hs +++ b/blog-meta/lib/SlugTags.hs @@ -1,10 +1,9 @@ module SlugTags (slugTags) where -import Text.Pandoc.Definition -import qualified Data.Map.Strict as Map --- import Text.Pandoc.JSON +import Data.Map.Strict qualified as Map import Data.Text (Text) import Misc +import Text.Pandoc.Definition slugTags :: Meta -> Meta slugTags (Meta m) = Meta $ Map.adjust addSlugs "tags" m diff --git a/blog-meta/lib/YAML.hs b/blog-meta/lib/YAML.hs index 4a68d43..19200c3 100644 --- a/blog-meta/lib/YAML.hs +++ b/blog-meta/lib/YAML.hs @@ -1,15 +1,15 @@ {-# OPTIONS_GHC -Wno-orphans #-} module YAML (module YAML, module Data.YAML, untagged) where +import Data.ByteString (ByteString) +import Data.ByteString.Char8 qualified as BS8 +import Data.ByteString.Lazy qualified as LazyBS +import Data.Text (Text) +import Data.Text qualified as Text import Data.YAML import Data.YAML.Event (untagged) -import Data.Text (Text) -import qualified Data.Text as Text import Misc -import Data.ByteString (ByteString) -import qualified Data.ByteString.Char8 as BS8 -import qualified Data.ByteString.Lazy as LazyBS -import qualified System.IO as IO +import System.IO qualified as IO str' :: String -> Node () From 8f8150eaac0f6810e55589e4c8f2c7e29851d5f1 Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Thu, 5 Dec 2024 06:41:29 +0100 Subject: [PATCH 2/2] new style + some posts --- .gitignore | 1 + Makefile | 24 +- blog-meta/all-tags.hs | 6 +- blog-meta/post-lists.hs | 2 +- cabal.project | 4 +- posts/new-new-theme.md | 14 + posts/new-theme.md | 18 + posts/quorientation.md | 15 +- posts/rainbow-quox.md | 17 +- script/hue.ts | 6 + style/colours.scss | 43 +++ style/counters.css | 57 +--- style/fonts.scss | 51 +++ style/meta.scss | 34 ++ style/niss.png | Bin 33040 -> 0 bytes style/page.css | 708 ---------------------------------------- style/page.scss | 617 ++++++++++++++++++++++++++++++++++ style/paper.png | Bin 85055 -> 0 bytes templates/foot.html | 4 +- templates/head.html | 5 + tsconfig.json | 9 + 21 files changed, 847 insertions(+), 788 deletions(-) create mode 100644 posts/new-new-theme.md create mode 100644 posts/new-theme.md create mode 100644 script/hue.ts create mode 100644 style/colours.scss create mode 100644 style/fonts.scss create mode 100644 style/meta.scss delete mode 100644 style/niss.png delete mode 100644 style/page.css create mode 100644 style/page.scss delete mode 100644 style/paper.png create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 4f19501..4cf7aec 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ _build _tmp .directory *~ +.sass-cache diff --git a/Makefile b/Makefile index 05d26f8..21957d6 100644 --- a/Makefile +++ b/Makefile @@ -19,16 +19,17 @@ OUTPUTPOSTS = \ $(BUILDDIR)/index.html $(BUILDDIR)/rss.xml STYLE != find style -type f -OUTPUTSTYLE = $(patsubst %,$(BUILDDIR)/%,$(STYLE)) +OUTPUTSTYLE = $(patsubst %.scss,%.css,$(patsubst %,$(BUILDDIR)/%,$(STYLE))) -OUTPUT = $(OUTPUTPOSTS) $(OUTPUTSTYLE) +SCRIPT != find script -type f +OUTPUTSCRIPT = $(patsubst %.ts,%.js,$(patsubst %,$(BUILDDIR)/%,$(SCRIPT))) + +OUTPUT = $(OUTPUTPOSTS) $(OUTPUTSTYLE) $(OUTPUTSCRIPT) ALL_TAGS = $(TMPDIR)/all-tags POST_LISTS = $(TMPDIR)/post-lists COMBO_FILTER = $(TMPDIR)/combo-filter -EXECS = \ - $(LAANTAS_SCRIPT) \ - $(ALL_TAGS) $(POST_LISTS) $(COMBO_FILTER) +EXECS = $(ALL_TAGS) $(POST_LISTS) $(COMBO_FILTER) CABAL_FLAGS ?= -O @@ -58,8 +59,17 @@ $(BUILDDIR)/%.html: $(TMPDIR)/%.md $(POSTDEPS) ; $(call pandoc-simple,meta.htm $(BUILDDIR)/rss.xml: $(TMPDIR)/index.md $(POSTDEPS) $(call pandoc,rss.xml,--metadata-file rss.yaml --write html) -.PHONY: langfilter laantas-script -langfilter laantas-script: %: ; cabal build $@ +$(BUILDDIR)/%.css: %.scss + @echo "[sass]" $@ + mkdir -p $(dir $@) + sass --no-source-map -I style $< $@ + +$(BUILDDIR)/%.js: %.ts + @echo "[tsc]" $@ + mkdir -p $(dir $@) + tsc --strict --noUncheckedIndexedAccess --noEmitOnError \ + --lib dom,es2021 --target es2015 \ + --outDir $(dir $@) $^ # $(1): template file # $(2): extra flags diff --git a/blog-meta/all-tags.hs b/blog-meta/all-tags.hs index 9bbc6ec..e2e7c02 100644 --- a/blog-meta/all-tags.hs +++ b/blog-meta/all-tags.hs @@ -61,8 +61,8 @@ getTags file = do makeYAML :: [Set Text] -> LazyBS.ByteString makeYAML tags = "---\n" <> yaml <> "\n...\n" where yaml = YAML.encode1 $ YAML.obj - [("title" ##= YAML.str "all tags"), - ("all-tags" ##= collate tags)] + ["title" ##= YAML.str "all tags", "meta" ##= True, + "all-tags" ##= collate tags] -- | generates a makefile to include that generates the index and individual -- tag pages. example: @@ -112,7 +112,7 @@ data Tag = instance YAML.ToYAML Tag where toYAML (Tag {name, slug, count}) = YAML.obj $ - [("name" ##= name), ("slug" ##= slug), ("count" ##= count)] + ["name" ##= name, "slug" ##= slug, "count" ##= count] -- | counts occurrences of each tag, and checks they all have distinct slugs collate :: [Set Text] -> [Tag] diff --git a/blog-meta/post-lists.hs b/blog-meta/post-lists.hs index cbdbe9a..01d61f9 100644 --- a/blog-meta/post-lists.hs +++ b/blog-meta/post-lists.hs @@ -64,7 +64,7 @@ makeTagInfo infos title basename outdir = do makeContent :: Text -> [PostInfo] -> LazyBS.ByteString makeContent title is' = "---\n" <> YAML.encode1 val <> "...\n" where is = sortBy (flip $ comparing date) is' - val = YAML.obj [("title" ##= title), ("posts" ##= is)] + val = YAML.obj ["title" ##= title, "posts" ##= is, "meta" ##= True] allTags :: Foldable t => t PostInfo -> Set Text allTags = foldMap (Set.fromList . tags) diff --git a/cabal.project b/cabal.project index 485c837..15865bd 100644 --- a/cabal.project +++ b/cabal.project @@ -4,13 +4,13 @@ packages: source-repository-package type: git location: https://git.rhiannon.website/rhi/lang.git - tag: ed54ec4c5af5b2b8ea25f0274e11c2f8c87714c3 + tag: c4a430facbeaa55a9de8edd69145243475c94087 subdir: langfilter source-repository-package type: git location: https://git.rhiannon.website/rhi/lang.git - tag: ed54ec4c5af5b2b8ea25f0274e11c2f8c87714c3 + tag: c4a430facbeaa55a9de8edd69145243475c94087 subdir: laantas-script source-repository-package diff --git a/posts/new-new-theme.md b/posts/new-new-theme.md new file mode 100644 index 0000000..8ef62b9 --- /dev/null +++ b/posts/new-new-theme.md @@ -0,0 +1,14 @@ +--- +title: new new theme +date: 2024-12-05 +summary: for real this time. probably +tags: [december adventure] +... + +yeah i redid it. + +it's more _on brand_ now, i think. and the actual css is nice and organised now. i am grudgingly using [sass] now because i really want those mixins. and functions. + +so yeah! honestly i don't think there is much to talk about with something like this. you can see the results. + +bye diff --git a/posts/new-theme.md b/posts/new-theme.md new file mode 100644 index 0000000..f003eb5 --- /dev/null +++ b/posts/new-theme.md @@ -0,0 +1,18 @@ +--- +title: new theme +date: 2024-12-04 +tags: [december adventure] +summary: wow! +... + +hi today's `@december adventure@` was… + +:::banner +redesigning this page +::: + +maybe you noticed when you opened it. i know it's pretty subtle. + +:::aside +**note to readers from the future**: it was not subtle. +::: diff --git a/posts/quorientation.md b/posts/quorientation.md index d40f526..9c06c34 100644 --- a/posts/quorientation.md +++ b/posts/quorientation.md @@ -29,6 +29,8 @@ so. one sentence at a time. # one +you know! the thing! from the game! + :::glosses - suatł pattalal šilbari gulaigúšḿ fulla - [ˌsuətɫ̩ ˈpatːɐləlʲ ˈʃilʲbɐɾɪ ɡɔˈlaɪɣɔːʃm̩ fʊɫːɑ] @@ -37,18 +39,13 @@ so. one sentence at a time. - use your warps to skip some floors ::: -you know! the thing! from the game! - -
-
well. from the fan translation
- -
+![well. from the fan translation](quorientation/skip-some-floors.png){.floating .right .pixel} - out of context, `{!patta}` means door. i suppose a portal would be a magic door, an `{!ustaitł patta}`. but in the context of someone making one right in front of you, it is clear what kind of door we're talking about. - :::{.aside .no-line} + :::aside the word `{!ustail}` also means "songs". did you know there's an old english word for magic, `{ġealdor}`, that comes from the proto-germanic `{galdr}`, meaning both "song" and "incantation"? i thought it was cute. @@ -88,7 +85,7 @@ babylon no longer exists, so it doesn't need protecting. go have fun mean something like "is possible/necessary". "{flowers grow here} is possible". - :::{.aside .no-line} + :::aside the similarity of `{!fulla}` and `{!bulla}` is just a weird accident, in case you're wondering. i made the words at different times. no etymology puzzle here, sorry @@ -112,7 +109,7 @@ babylon no longer exists, so it doesn't need protecting. go have fun # abbreviation list -:::{.twocol .abbr-list} +:::{.abbr-list} DEF : [definite](https://lang.niss.website/laantas/nouns.html#definiteness) ["the"]{.note} diff --git a/posts/rainbow-quox.md b/posts/rainbow-quox.md index e71b0bc..17c51f3 100644 --- a/posts/rainbow-quox.md +++ b/posts/rainbow-quox.md @@ -6,17 +6,18 @@ summary: q.t. colour scheme generator header-includes: |