diff options
| author | soaos <soaos@soaos.dev> | 2026-04-03 17:20:59 -0400 |
|---|---|---|
| committer | soaos <soaos@soaos.dev> | 2026-04-03 17:20:59 -0400 |
| commit | f28c56ddd35ab468527eda2b116f300732938205 (patch) | |
| tree | 35afd7cfd032650202fbca9eddac66c0939314f1 /templates/shortcodes | |
Initial Commit (Fresh Start)
Diffstat (limited to 'templates/shortcodes')
| -rw-r--r-- | templates/shortcodes/age.html | 1 | ||||
| -rw-r--r-- | templates/shortcodes/album_list.html | 16 | ||||
| -rw-r--r-- | templates/shortcodes/soaosed.html | 3 | ||||
| -rw-r--r-- | templates/shortcodes/subtree.html | 12 | ||||
| -rw-r--r-- | templates/shortcodes/title_bar.html | 8 | ||||
| -rw-r--r-- | templates/shortcodes/tree_view.html | 5 | ||||
| -rw-r--r-- | templates/shortcodes/treelink.html | 8 | ||||
| -rw-r--r-- | templates/shortcodes/window.html | 3 | ||||
| -rw-r--r-- | templates/shortcodes/window_body.html | 1 |
9 files changed, 57 insertions, 0 deletions
diff --git a/templates/shortcodes/age.html b/templates/shortcodes/age.html new file mode 100644 index 0000000..8af71ec --- /dev/null +++ b/templates/shortcodes/age.html @@ -0,0 +1 @@ +{{ now() | date(format='%Y') | int - 2002 }}
\ No newline at end of file diff --git a/templates/shortcodes/album_list.html b/templates/shortcodes/album_list.html new file mode 100644 index 0000000..74439ca --- /dev/null +++ b/templates/shortcodes/album_list.html @@ -0,0 +1,16 @@ +{% import "macros.html" as macros %} +{% set data = load_data(path="data/albums.json") %} + +{{ macros::treeview(height="32rem") }} +{% for genre, albums in data.albums | group_by(attribute="genre") %} + +{{ macros::subtree(name=genre, open=false) }} +{% for album in albums %} + {{ macros::treelink(text=album.artist ~ " - <i>" ~ album.name ~ `</i><br> + <img class="album-thumb" src="https://coverartarchive.org/release-group/` ~ album.release_group ~ `/front"/>`, + url="https://musicbrainz.org/release-group/" ~ album.release_group, blank=true) }} +{% endfor %} +{{ macros::endsubtree() }} + +{% endfor %} +{{ macros::endtreeview() }} diff --git a/templates/shortcodes/soaosed.html b/templates/shortcodes/soaosed.html new file mode 100644 index 0000000..c5ae639 --- /dev/null +++ b/templates/shortcodes/soaosed.html @@ -0,0 +1,3 @@ +<span class="flip" data-title="{{ body }}" + ><span class="hidden-selectable">{{ body }}</span></span +>
\ No newline at end of file diff --git a/templates/shortcodes/subtree.html b/templates/shortcodes/subtree.html new file mode 100644 index 0000000..09f29ce --- /dev/null +++ b/templates/shortcodes/subtree.html @@ -0,0 +1,12 @@ +<li> + <details {% if open %}open{% endif %}> + <summary> + {% if url %}<a href="{{ url }}" {% if blank %}target="_blank"{% endif %}>{% else %}<b>{% endif %} + {{ name | safe }} + {% if url %}</a>{% else %}</b>{% endif %} + </summary> + <ul> + {{ body | markdown | safe }} + </ul> + </details> +</li>
\ No newline at end of file diff --git a/templates/shortcodes/title_bar.html b/templates/shortcodes/title_bar.html new file mode 100644 index 0000000..facc6fb --- /dev/null +++ b/templates/shortcodes/title_bar.html @@ -0,0 +1,8 @@ +<div class="title-bar"> + <div class="title-bar-text">{{ body | safe }}</div> + <div class="title-bar-controls"> + {% if close %} + <a href="{{ close }}"><button aria-label="Close"></button></a> + {% endif %} + </div> +</div> diff --git a/templates/shortcodes/tree_view.html b/templates/shortcodes/tree_view.html new file mode 100644 index 0000000..e8de782 --- /dev/null +++ b/templates/shortcodes/tree_view.html @@ -0,0 +1,5 @@ +<div class="sunken-panel"> + <ul class="tree-view" {% if height %} style="height: {{height}}; overflow-y: scroll" {% endif %} > + {{ body | markdown | safe }} + </ul> +</div> diff --git a/templates/shortcodes/treelink.html b/templates/shortcodes/treelink.html new file mode 100644 index 0000000..ff80fdc --- /dev/null +++ b/templates/shortcodes/treelink.html @@ -0,0 +1,8 @@ +<li> + <a href="{{ url }}" {% if blank %} target="_blank" {% endif %} {% if rel %} rel="{{ rel }}" {% endif %}>{{ text }}</a> + {% if wip %} + <span {% if wip_tooltip %}data-tooltip="{{ wip_tooltip }}" {% endif %}> + <span class="under-construction unselectable">⚠</span> + </span> + {% endif %} +</li>
\ No newline at end of file diff --git a/templates/shortcodes/window.html b/templates/shortcodes/window.html new file mode 100644 index 0000000..8abddbe --- /dev/null +++ b/templates/shortcodes/window.html @@ -0,0 +1,3 @@ +<div class="window"> +{{ body | safe }} +</div> diff --git a/templates/shortcodes/window_body.html b/templates/shortcodes/window_body.html new file mode 100644 index 0000000..f7c84a7 --- /dev/null +++ b/templates/shortcodes/window_body.html @@ -0,0 +1 @@ +<div class="window-body">{{ body | markdown | safe }}</div> |