From 4589b93a5861cb165abc29c903229cf48fcabda9 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Mon, 17 Feb 2025 01:33:05 -0500 Subject: added snippets section --- content/_index.md | 1 + content/snippets/_index.md | 6 ++++++ content/snippets/everforest_header.md | 34 ++++++++++++++++++++++++++++++++++ templates/snippet-page.html | 9 +++++++++ templates/snippets.html | 14 ++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 content/snippets/_index.md create mode 100644 content/snippets/everforest_header.md create mode 100644 templates/snippet-page.html create mode 100644 templates/snippets.html diff --git a/content/_index.md b/content/_index.md index 67b937a..77d8044 100644 --- a/content/_index.md +++ b/content/_index.md @@ -7,6 +7,7 @@ title = "hello" - [projects](@/projects/_index.md) - [blog](@/blog/_index.md) +- [snippets](@/snippets/_index.md) - [some stuff i like](@/stuff_i_like/_index.md) - [git](https://git.soaos.dev) - [forum](https://forum.soaos.dev) diff --git a/content/snippets/_index.md b/content/snippets/_index.md new file mode 100644 index 0000000..36321c9 --- /dev/null +++ b/content/snippets/_index.md @@ -0,0 +1,6 @@ ++++ +title = "snippets" +sort_by = "date" +template = "snippets.html" +page_template = "snippet-page.html" ++++ diff --git a/content/snippets/everforest_header.md b/content/snippets/everforest_header.md new file mode 100644 index 0000000..88ea56b --- /dev/null +++ b/content/snippets/everforest_header.md @@ -0,0 +1,34 @@ ++++ +title = "everforest.h" +date = 2024-08-13 ++++ + +```c +#ifndef EVERFOREST_H +#define EVERFOREST_H + +#define EVERFOREST_FG 0xD3C6AAFF +#define EVERFOREST_BG0 0x2D353CFF +#define EVERFOREST_BG1 0x343F44FF +#define EVERFOREST_BG2 0x3D484DFF +#define EVERFOREST_BG3 0x475258FF +#define EVERFOREST_BG4 0x4F585EFF +#define EVERFOREST_BG5 0x56635FFF + +#define EVERFOREST_BG_DIM 0x232A2EFF +#define EVERFOREST_BG_RED 0x543A48FF +#define EVERFOREST_BG_VISUAL 0x514045FF +#define EVERFOREST_BG_YELLOW 0x4D4C43FF +#define EVERFOREST_BG_GREEN 0x425047FF +#define EVERFOREST_BG_BLUE 0x3A515DFF + +#define EVERFOREST_RED 0xE76E80FF +#define EVERFOREST_ORANGE 0xE69875FF +#define EVERFOREST_YELLOW 0xDBBC7FFF +#define EVERFOREST_GREEN 0xA7C080FF +#define EVERFOREST_BLUE 0x7FBBB3FF +#define EVERFOREST_AQUA 0x83C092FF +#define EVERFOREST_PURPLE 0xD699B6FF + +#endif +``` diff --git a/templates/snippet-page.html b/templates/snippet-page.html new file mode 100644 index 0000000..f8b5687 --- /dev/null +++ b/templates/snippet-page.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} + <- back to snippets +

+ {{ page.title }} +

+{{ page.content | safe }} +{% endblock content %} diff --git a/templates/snippets.html b/templates/snippets.html new file mode 100644 index 0000000..2f7137f --- /dev/null +++ b/templates/snippets.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block content %} + <- back to landing +

+ {{ section.title }} +

+ +{% for page in section.pages %} +
+

{{ page.title }} ({{page.date}})

+{{ page.content | safe }} +{% endfor %} +{% endblock content %} -- cgit v1.2.3