added snippets section

This commit is contained in:
Silas Bartha 2025-02-17 01:33:05 -05:00
parent 9741d35848
commit 4589b93a58
5 changed files with 64 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,6 @@
+++
title = "snippets"
sort_by = "date"
template = "snippets.html"
page_template = "snippet-page.html"
+++

View File

@ -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
```

View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<a href="{{ get_url(path='@/snippets/_index.md') }}"> <- back to snippets</a>
<h1 class="title">
{{ page.title }}
</h1>
{{ page.content | safe }}
{% endblock content %}

14
templates/snippets.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block content %}
<a href="{{ get_url(path='@/_index.md') }}"> <- back to landing</a>
<h1 class="title">
{{ section.title }}
</h1>
{% for page in section.pages %}
<hr/>
<h2><a href="{{ page.permalink | safe }}">{{ page.title }}</a> ({{page.date}})</h2>
{{ page.content | safe }}
{% endfor %}
{% endblock content %}