Skip to content

Commit

Permalink
Switch to SASS
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostKiwi committed Dec 6, 2024
1 parent 758eb9c commit 1e716d2
Show file tree
Hide file tree
Showing 9 changed files with 1,030 additions and 624 deletions.
10 changes: 10 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as sass from "sass";
import { DateTime } from "luxon";
import Image from "@11ty/eleventy-img";
import pluginRss from "@11ty/eleventy-plugin-rss";
Expand Down Expand Up @@ -71,6 +72,15 @@ export default function (eleventyConfig) {
return tocHtml;
});

eleventyConfig.addShortcode("inlineSass", function (scssFilePath) {
return sass.compile(scssFilePath,
{
loadPaths: ["node_modules"],
silenceDeprecations: ["color-functions", "global-builtin", "import"],
style: "compressed",
}).css;
});

/* Reload on CSS changes, since 11ty doesn't see them */
eleventyConfig.addWatchTarget("style");
eleventyConfig.addWatchTarget("assets");
Expand Down
10 changes: 3 additions & 7 deletions _includes/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@
{% set keywords = "techblog, programming, graphics, webdev, japan" %}
{% endif %}
<meta name="keywords" content="{{ keywords }}">

<style>
{% include 'node_modules/sakura.css/css/normalize.css' %}
{% include 'node_modules/sakura.css/css/sakura-vader.css' %}
{% include 'node_modules/prism-themes/themes/prism-gruvbox-dark.min.css' %}
{% include 'style/base.css' %}
{% include 'style/card.css' %}
{% inlineSass 'style/base.scss' %}
</style>

<!-- Twitter Tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@FrostKiwiOne" />
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: layout.html
---
<blockquote class="profile_wrapper">
<div class="img_wrapper">
<img class="profile" src="/assets/profile.jpg">
<img src="/assets/profile.jpg">
</div>
<div class="text_wrapper">
<p>
Expand Down
Loading

0 comments on commit 1e716d2

Please sign in to comment.