index : livejrnl-rs-templates.git

ascending towards madness

author berrysweet <berrysweet@noreply.codeberg.org> 2023-07-11 20:26:14.0 +00:00:00
committer berrysweet <berrysweet@noreply.codeberg.org> 2023-07-11 20:26:14.0 +00:00:00
commit
078b9b9fb3946923ed9d795f09c79839abd99df3 [patch]
tree
d22092a29f30933e0bf18746688bcf54d6416064
parent
993c1592b9096b453f37d82ef2ca911f1b937359
download
078b9b9fb3946923ed9d795f09c79839abd99df3.tar.gz

feat: add vintage-looking one-page blog template



Diff

 vintage-blog-onepage/content/copyright.md                    |  3 +-
 vintage-blog-onepage/content/description.md                  |  3 +-
 vintage-blog-onepage/index.html.template                     | 33 +++++++++++++-
 vintage-blog-onepage/partials/entry.html.template            | 12 +++++-
 vintage-blog-onepage/partials/feeds/entry_list.html.template | 10 ++++-
 vintage-blog-onepage/partials/header.html.template           | 13 +++++-
 6 files changed, 74 insertions(+)

diff --git a/vintage-blog-onepage/content/copyright.md b/vintage-blog-onepage/content/copyright.md
new file mode 100644
index 0000000..99bafb1
--- /dev/null
+++ b/vintage-blog-onepage/content/copyright.md
@@ -0,0 +1,3 @@
Copyright &copy; 2023 [berrysweet]https://codeberg.org/berrysweet

Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.
\ No newline at end of file
diff --git a/vintage-blog-onepage/content/description.md b/vintage-blog-onepage/content/description.md
new file mode 100644
index 0000000..62b6425
--- /dev/null
+++ b/vintage-blog-onepage/content/description.md
@@ -0,0 +1,3 @@
Put a description of what your website is all about here. It doesn't have to be long. Something to grab your readers.

I like turtles.
\ No newline at end of file
diff --git a/vintage-blog-onepage/index.html.template b/vintage-blog-onepage/index.html.template
new file mode 100644
index 0000000..5907924
--- /dev/null
+++ b/vintage-blog-onepage/index.html.template
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="{{ config.site_language }}">
<head>
	<title>{{ config.site_name }}</title>
</head>
<body>
	<main>
		{% include 'partials/header.html.template' %}

		<section>
			<section>
				<hr />
				<p> There are <strong>{{ journal.entries|length }}</strong> entries to read.</p>
				<p><strong>ctrl+f to search by tag: </strong>
					<em>{{ journal.tags|extract_tags(", ", "none") }}</em>
				</p>
				<hr />
			</section>
			{% include 'partials/feeds/entry_list.html.template' %}
		</section>
		
		<section>
			<hr />
			<p><strong><em>You've reached the end.</em></strong></p>
			<p><a href="#top">Click to go back to the top</a>.</p>
			<hr />
		</section>
		<footer id="copyright">
			{{ include_file(config.template, "content/copyright.md")|markdown }}
		</footer>
	</main>
</body>
</html>
\ No newline at end of file
diff --git a/vintage-blog-onepage/partials/entry.html.template b/vintage-blog-onepage/partials/entry.html.template
new file mode 100644
index 0000000..2de4b73
--- /dev/null
+++ b/vintage-blog-onepage/partials/entry.html.template
@@ -0,0 +1,12 @@
{% set entry_index = journal.entries|length - feed_index %}
<article id="entry-{{ entry_index }}">
	<header>
		<h2>{{ entry.title }}</h2>
		<p>
			[ <em>{{ entry.date }}</em> | <em>{{ entry.time }}</em> | <em><a href="#entry-{{ entry_index }}">#{{ entry_index }}</a></em> | 
			<em>tags: {{ entry.tags|extract_tags(", ", "none") }}</em> ]
		</p>
	</header>
	{{ entry.body|markdown|emoji }}
	<p></p>
</article>
\ No newline at end of file
diff --git a/vintage-blog-onepage/partials/feeds/entry_list.html.template b/vintage-blog-onepage/partials/feeds/entry_list.html.template
new file mode 100644
index 0000000..b442205
--- /dev/null
+++ b/vintage-blog-onepage/partials/feeds/entry_list.html.template
@@ -0,0 +1,10 @@
<section>
	{% set feed_index = 0 %}
	{% for entry in journal.entries|reverse %}
	{% include "partials/entry.html.template" %}
	{% set feed_index = feed_index + 1 %}
	{% if feed_index < journal.entries|length %}
	<hr />
	{% endif %}
	{% endfor %}
</section>
\ No newline at end of file
diff --git a/vintage-blog-onepage/partials/header.html.template b/vintage-blog-onepage/partials/header.html.template
new file mode 100644
index 0000000..8356e73
--- /dev/null
+++ b/vintage-blog-onepage/partials/header.html.template
@@ -0,0 +1,13 @@
<header id="top">
	<h1>{{ config.site_name }}</h1>
	<p>{{ config.site_description }}</p>
</header>
<nav>
	<ul>
		<li><a href="#entry-1">First Entry</a></li>
		<li><a href="#copyright">Copyright</a></li>
	</ul>
</nav>
<section>
	{{ include_file(config.template, "content/description.md")|markdown }}
</section>
\ No newline at end of file