about summary refs log tree commit diff stats
path: root/themes/bear/templates
diff options
context:
space:
mode:
Diffstat (limited to 'themes/bear/templates')
-rw-r--r--themes/bear/templates/404.html8
-rw-r--r--themes/bear/templates/base.html30
-rw-r--r--themes/bear/templates/footer.html5
-rw-r--r--themes/bear/templates/header.html11
-rw-r--r--themes/bear/templates/index.html7
-rw-r--r--themes/bear/templates/nav.html6
-rw-r--r--themes/bear/templates/page.html29
-rw-r--r--themes/bear/templates/section.html34
-rw-r--r--themes/bear/templates/security_tags.html2
-rw-r--r--themes/bear/templates/seo_tags.html2
-rw-r--r--themes/bear/templates/style.css193
l---------themes/bear/templates/style.css.html1
-rw-r--r--themes/bear/templates/taxonomy_list.html14
-rw-r--r--themes/bear/templates/taxonomy_single.html34
14 files changed, 376 insertions, 0 deletions
diff --git a/themes/bear/templates/404.html b/themes/bear/templates/404.html
new file mode 100644
index 0000000..15fd75c
--- /dev/null
+++ b/themes/bear/templates/404.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+
+{% block title %}404{% endblock %}
+
+{% block main %}
+  <h1>404</h1>
+  <h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2>
+{% endblock %}
diff --git a/themes/bear/templates/base.html b/themes/bear/templates/base.html
new file mode 100644
index 0000000..3845773
--- /dev/null
+++ b/themes/bear/templates/base.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="{{ lang | default(value="en-US" ) }}">
+<head>
+  {%- if config.webserver_sends_csp_headers %}
+  {%- include "security_tags.html" ignore missing %}
+  {%- endif %}
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  {%- if config.extra.favicon %}
+  <link rel="shortcut icon" href="{{ config.extra.favicon }}">
+  {%- endif %}
+  <title>{%- block title %}{{ config.title }}{%- endblock %}</title>
+  <meta name="referrer" content="no-referrer-when-downgrade">
+  {%- if config.generate_feed %}
+  {% block rss -%}
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="/{{ config.feed_filename }}">
+  {%- endblock -%}
+  {%- endif %}
+  <style>
+  {%- include "style.css.html" ignore missing -%}
+  </style>
+  {% include "custom_head.html" ignore missing -%}
+</head>
+<body>
+  {% include "header.html" ignore missing -%}
+  {% block main %}{%- endblock -%}
+  {% include "footer.html" ignore missing -%}
+  {% include "custom_body.html" ignore missing -%}
+</body>
+</html>
diff --git a/themes/bear/templates/footer.html b/themes/bear/templates/footer.html
new file mode 100644
index 0000000..c952a93
--- /dev/null
+++ b/themes/bear/templates/footer.html
@@ -0,0 +1,5 @@
+<footer>
+  {%- if not config.extra.hide_made_with_line %}
+    Made with <a href="https://codeberg.org/alanpearce/zola-bearblog">Zola ʕ•ᴥ•ʔ Bear</a>
+  {%- endif %}
+</footer>
diff --git a/themes/bear/templates/header.html b/themes/bear/templates/header.html
new file mode 100644
index 0000000..55c1756
--- /dev/null
+++ b/themes/bear/templates/header.html
@@ -0,0 +1,11 @@
+<a class="skip" href="#content">Skip to main content</a>
+<header>
+  <h2>
+    <a href="/" class="title">
+      {{- config.title -}}
+    </a>
+  </h2>
+  <nav>
+    {% include "nav.html" %}
+  </nav>
+</header>{{ "" -}}
diff --git a/themes/bear/templates/index.html b/themes/bear/templates/index.html
new file mode 100644
index 0000000..6caf1d5
--- /dev/null
+++ b/themes/bear/templates/index.html
@@ -0,0 +1,7 @@
+{% extends "base.html" %}
+
+{% block main %}
+  <main>
+    {{ section.content | safe }}
+  </main>
+{% endblock %}
diff --git a/themes/bear/templates/nav.html b/themes/bear/templates/nav.html
new file mode 100644
index 0000000..fe5fdd6
--- /dev/null
+++ b/themes/bear/templates/nav.html
@@ -0,0 +1,6 @@
+  <a href="/">Home</a>
+{%- if config.extra.main_menu %}
+  {%- for item in config.extra.main_menu %}
+  <a href="{{ item.url | safe }}">{{ item.name }}</a>
+  {%- endfor %}
+{%- endif -%}
diff --git a/themes/bear/templates/page.html b/themes/bear/templates/page.html
new file mode 100644
index 0000000..93611b5
--- /dev/null
+++ b/themes/bear/templates/page.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+
+{% block title %}{{ page.title }} | {{ super() }}{% endblock %}
+
+{% block main %}
+  {%- if not page.extra.menu %}
+    <h1>{{ page.title }}</h1>
+    {%- if page.date %}
+      <p>
+        <time datetime='{{ page.date | date(format='%+') }}' pubdate>
+          {{- page.date | date(format=config.extra.date_format) -}}
+        </time>
+      </p>
+    {%- endif %}
+  {%- endif %}
+  <main id="content">
+    {{ page.content | trim | safe }}
+  </main>
+  <ul class="tags">
+    {%- if page.taxonomies %}
+      {%- for name, taxon in page.taxonomies %}
+        {{ name | capitalize }}:
+        {%- for item in taxon %}
+          <li><a href="{{ get_taxonomy_url(kind=name, name=item) }}">#{{ item }}</a></li>
+        {%- endfor %}
+      {%- endfor %}
+    {%- endif %}
+  </ul>
+{% endblock %}
diff --git a/themes/bear/templates/section.html b/themes/bear/templates/section.html
new file mode 100644
index 0000000..f633036
--- /dev/null
+++ b/themes/bear/templates/section.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+{% block main %}
+  <main id="content">
+    {%- if taxonomy.term %}
+      <h3 style="margin-bottom:0">Filtering for "{{ section.title }}"</h3>
+      <small>
+        <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a>
+      </small>
+    {%- endif %}
+    <ul class="blog-posts">
+      {%- for page in section.pages %}
+        <li>
+          <span>
+            <time datetime='{{ page.date | date(format='%+') }}' pubdate>
+              {{ page.date | date(format=config.extra.date_format) }}
+            </time>
+          </span>
+          <a href="{{ page.path | urlencode | safe }}">{{ page.title }}</a>
+        </li>
+      {% else %}
+        <li>
+          No posts yet
+        </li>
+      {%- endfor %}
+    </ul>
+    <ul class="tags">
+      {%- set tags = get_taxonomy(kind="tags") %}
+      {%- for post in tags.items %}
+        <li><a href="{{ post.path | urlencode | safe }}">#{{ post.name }}</a></li>
+      {%- endfor %}
+    </ul>
+  </main>
+{% endblock %}
diff --git a/themes/bear/templates/security_tags.html b/themes/bear/templates/security_tags.html
new file mode 100644
index 0000000..0f922ea
--- /dev/null
+++ b/themes/bear/templates/security_tags.html
@@ -0,0 +1,2 @@
+<!-- These tags are here for demostration. It's recommended to send them via HTTP headers instead. -->
+<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; object-src 'none'; script-src 'none'; style-src 'unsafe-inline'">
diff --git a/themes/bear/templates/seo_tags.html b/themes/bear/templates/seo_tags.html
new file mode 100644
index 0000000..4eb2bc8
--- /dev/null
+++ b/themes/bear/templates/seo_tags.html
@@ -0,0 +1,2 @@
+<meta name="title" content="{% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %}">
+<meta name="description" content="{{ config.description }}" />
diff --git a/themes/bear/templates/style.css b/themes/bear/templates/style.css
new file mode 100644
index 0000000..e1e12aa
--- /dev/null
+++ b/themes/bear/templates/style.css
@@ -0,0 +1,193 @@
+body {
+  font-family: Verdana, sans-serif;
+  margin: auto;
+  padding: 20px;
+  max-width: 720px;
+  text-align: left;
+  background-color: #fff;
+  word-wrap: break-word;
+  overflow-wrap: break-word;
+  line-height: 1.5;
+  color: #444;
+}
+
+.skip {
+  position: absolute;
+  top: -3em;
+  background: #fff;
+}
+.skip:focus {
+  top: 0;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+strong,
+b {
+  color: #222;
+}
+
+a {
+  color: #3273dc;
+}
+
+.title {
+  color: #222;
+  text-decoration: none;
+  border: 0;
+}
+
+time {
+  font-style: italic;
+}
+
+.title span {
+  font-weight: 400;
+}
+
+nav a {
+  margin-right: 10px;
+}
+
+.tags {
+  padding: unset;
+  font-size: small;
+}
+
+.tags > li {
+  list-style: none;
+  display: inline-block;
+}
+
+textarea {
+  width: 100%;
+  font-size: 1rem;
+}
+
+input {
+  font-size: 1rem;
+}
+
+main,article {
+  line-height: 1.6;
+}
+
+table {
+  width: 100%;
+}
+
+img {
+  max-width: 100%;
+}
+
+code {
+  padding: 2px 5px;
+  background-color: #f2f2f2;
+}
+
+pre code {
+  color: #222;
+  display: block;
+  padding: 20px;
+  white-space: pre-wrap;
+  font-size: 0.875rem;
+  overflow-x: auto;
+}
+
+div.highlight pre {
+  background-color: initial;
+  color: initial;
+}
+
+div.highlight code {
+  background-color: unset;
+  color: unset;
+}
+
+blockquote {
+  border-left: 1px solid #999;
+  color: #222;
+  padding-left: 20px;
+  font-style: italic;
+}
+
+footer {
+  padding: 25px;
+  text-align: center;
+}
+
+.helptext {
+  color: #777;
+  font-size: small;
+}
+
+.errorlist {
+  color: #eba613;
+  font-size: small;
+}
+
+/* blog posts */
+ul.blog-posts {
+  list-style-type: none;
+  padding: unset;
+}
+
+ul.blog-posts li {
+  display: flex;
+}
+
+ul.blog-posts li span {
+  flex: 0 0 130px;
+}
+
+ul.blog-posts li a:visited {
+  color: #8b6fcb;
+}
+
+@media (prefers-color-scheme: dark) {
+  body {
+    background-color: #333;
+    color: #ddd;
+  }
+
+  h1,
+  h2,
+  h3,
+  h4,
+  h5,
+  h6,
+  strong,
+  b {
+    color: #eee;
+  }
+
+  a {
+    color: #8cc2dd;
+  }
+
+  code {
+    background-color: #777;
+  }
+
+  pre code {
+    color: #ddd;
+  }
+
+  blockquote {
+    color: #ccc;
+  }
+
+  textarea,
+  input {
+    background-color: #252525;
+    color: #ddd;
+  }
+
+  .helptext {
+    color: #aaa;
+  }
+}
diff --git a/themes/bear/templates/style.css.html b/themes/bear/templates/style.css.html
new file mode 120000
index 0000000..f6b71cc
--- /dev/null
+++ b/themes/bear/templates/style.css.html
@@ -0,0 +1 @@
+style.css
\ No newline at end of file
diff --git a/themes/bear/templates/taxonomy_list.html b/themes/bear/templates/taxonomy_list.html
new file mode 100644
index 0000000..abf4294
--- /dev/null
+++ b/themes/bear/templates/taxonomy_list.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block main %}
+  <main id="content">
+    <small>
+      <div>
+        {% set tags = get_taxonomy(kind="tags") %}
+        {% for post in tags.items %}
+          <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
+        {% endfor %}
+      </div>
+    </small>
+  </main>
+{% endblock %}
diff --git a/themes/bear/templates/taxonomy_single.html b/themes/bear/templates/taxonomy_single.html
new file mode 100644
index 0000000..a96139c
--- /dev/null
+++ b/themes/bear/templates/taxonomy_single.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+{% block rss -%}
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="/{{ config.feed_filename }}">
+  {%- set rss_path = "/tags/" ~ term.name ~ "/" ~ config.feed_filename %}
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{% if term %}{{ term.name | title }}{% else %}{{ section.title | title }}{% endif %}" href="{{ rss_path }}">
+{%- endblock -%}
+
+{% block main -%}
+  <main id="content">
+    {%- if taxonomy.term %}
+      <h3 style="margin-bottom:0">Filtering for "{{ term.name }}"</h3>
+      <small>
+        <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a>
+      </small>
+    {%- endif %}
+    <ul class="blog-posts">
+      {%- for page in term.pages %}
+        <li>
+          <span>
+            <time datetime='{{ page.date | date(format='%+') }}' pubdate>
+              {{ page.date | date(format=config.extra.date_format) }}
+            </time>
+          </span>
+          <a href="{{ page.path | urlencode | safe }}">{{ page.title }}</a>
+        </li>
+      {% else %}
+        <li>
+          No posts yet
+        </li>
+      {%- endfor %}
+    </ul>
+  </main>
+{% endblock %}