uninline stylesheets

This commit is contained in:
Nathan McCarty 2025-02-06 18:45:15 -05:00
parent b1ec578902
commit 550c4613e7
2 changed files with 13 additions and 4 deletions

View file

@ -35,10 +35,13 @@ method generate-head($title, BlogMeta:D $meta, $description?) {
:href<https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap>; :href<https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap>;
link :rel<stylesheet>, link :rel<stylesheet>,
:href<https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css>; :href<https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css>;
# Inline our style sheets # Link our style sheets
style %?RESOURCES<colors.css>.slurp; link :rel<stylesheet>,
style %?RESOURCES<main.css>.slurp; :href</resources/colors.css>;
style %?RESOURCES<code.css>.slurp; link :rel<stylesheet>,
:href</resources/main.css>;
link :rel<stylesheet>,
:href</resources/code.css>;
]; ];
} }

View file

@ -103,6 +103,12 @@ class PostDB {
my $atom-path = $out-dir.add('atom.xml'); my $atom-path = $out-dir.add('atom.xml');
my $atom = posts-to-atom self; my $atom = posts-to-atom self;
$atom-path.spurt: format-xml(~$atom); $atom-path.spurt: format-xml(~$atom);
# Create the resources folder and copy over our style sheets
my $res-dir = $out-dir.add('resources/');
mkdir $res-dir unless $res-dir.e;
$res-dir.add('colors.css').spurt: %?RESOURCES<colors.css>.slurp;
$res-dir.add('main.css').spurt: %?RESOURCES<main.css>.slurp;
$res-dir.add('code.css').spurt: %?RESOURCES<code.css>.slurp;
} }
#| Get a list of posts sorted by date #| Get a list of posts sorted by date