diff options
-rw-r--r-- | config.toml | 21 | ||||
-rw-r--r-- | templates/footer.html | 1 | ||||
-rw-r--r-- | templates/index.html (renamed from themes/xmin/templates/index.html) | 17 | ||||
m--------- | themes/bear | 6 | ||||
-rw-r--r-- | themes/xmin/static/css/style.css | 75 | ||||
-rw-r--r-- | themes/xmin/templates/base.html | 25 | ||||
l--------- | themes/xmin/templates/categories/list.html | 1 | ||||
l--------- | themes/xmin/templates/categories/single.html | 1 | ||||
-rw-r--r-- | themes/xmin/templates/page.html | 28 | ||||
-rw-r--r-- | themes/xmin/templates/section.html | 18 | ||||
-rw-r--r-- | themes/xmin/templates/tags/list.html | 18 | ||||
-rw-r--r-- | themes/xmin/templates/tags/single.html | 25 | ||||
-rw-r--r-- | themes/xmin/theme.toml | 12 |
13 files changed, 20 insertions, 228 deletions
diff --git a/config.toml b/config.toml index aeafa11..840625f 100644 --- a/config.toml +++ b/config.toml @@ -9,7 +9,7 @@ description = "Developer, Emacs User" generate_feed = true -theme = "xmin" +theme = "bear" [markdown] highlight_code = true @@ -20,33 +20,30 @@ name = "tags" feed = true [extra] -footer = "Licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 International License</a>." gpg_fingerprint = "48E6 576C 0707 388C B8BE FD0C CD4B EB92 A8D4 6583" gpg_url = "/public_key.asc" author_name = "Alan Pearce" author_image = "/img/me-thumb.jpg" +hide_made_with_line = true +date_format = "%F" -[[extra.menu.main]] - name = "Home" - url = "/" - weight = 1 -[[extra.menu.main]] +[[extra.main_menu]] name = "Posts" url = "/post/" -[[extra.menu.main]] +[[extra.main_menu]] name = "Tags" url = "/tags/" -[[extra.menu.main]] +[[extra.main_menu]] name = "Repositories" url = "https://git.alanpearce.eu" -[[extra.menu.contact]] +[[extra.contact_menu]] name = "alan@alanpearce.eu" url = "mailto:alan@alanpearce.eu" weight = 1 -[[extra.menu.contact]] +[[extra.contact_menu]] name = "Codeberg" url = "https://codeberg.org/alanpearce" -[[extra.menu.contact]] +[[extra.contact_menu]] name = "GitHub" url = "https://github.com/alanpearce" diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..d66241b --- /dev/null +++ b/templates/footer.html @@ -0,0 +1 @@ +Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. diff --git a/themes/xmin/templates/index.html b/templates/index.html index 23ec4cd..10465a4 100644 --- a/themes/xmin/templates/index.html +++ b/templates/index.html @@ -1,15 +1,19 @@ {% extends "base.html" %} +{% block body_attrs %} class="h-card vcard"{% endblock %} + +{% block title_class %} p-name fn{% endblock %} + {% block main %} -<main class="h-card"> - <h1 class="p-name">{{ config.title }}</h1> - {{ section.content | safe }} + <content> + {{ section.content | safe }} + </content> <section> <h2>Latest Posts</h2> <ul class="h-feed"> {%- for page in section.pages | slice(end=3) %} <li class="h-entry"> - <time class="dt-published" datetime="{{ page.date | date(format="%+") }}">{{ page.date | date(format="%F") }}</time> + <time class="dt-published" datetime="{{ page.date | date(format="%+") }}">{{ page.date | date(format=config.extra.date_format) }}</time> <a class="u-url p-name" href="{{ page.path | safe }}">{{ page.title }}</a> </li> {%- endfor %} @@ -18,7 +22,7 @@ <section> <h2>Elsewhere on the Internet</h2> <ul> - {%- for item in config.extra.menu.contact %} + {%- for item in config.extra.contact_menu %} <li> {%- if item.url is starting_with("mailto:") %} <a href="{{ item.url | safe }}" class="u-email email" rel="me">{{ item.name }}</a> @@ -30,7 +34,6 @@ </ul> </section> <footer> - GPG Key: <a href="{{ config.extra.gpg_url | safe }}" rel="u-key pgpkey">{{ config.extra.gpg_fingerprint }}</a> + GPG Key: <a href="{{ config.extra.gpg_url | safe }}" rel="u-key key">{{ config.extra.gpg_fingerprint }}</a> </footer> -</main> {% endblock %} diff --git a/themes/bear b/themes/bear -Subproject c78a3f2301caa3dc4c03d3b2a75f4f003e5863d +Subproject 66874604ae503ee450c056817478f92b7d446cd diff --git a/themes/xmin/static/css/style.css b/themes/xmin/static/css/style.css deleted file mode 100644 index e605297..0000000 --- a/themes/xmin/static/css/style.css +++ /dev/null @@ -1,75 +0,0 @@ -body { - font-family: sans-serif; - line-height: 1.5em; - margin: auto; - max-width: 800px; - padding: 1em; -} - -/* header and footer areas */ -nav > ul { padding: 0; } -nav > ul > li { display: inline-block; } -article > header, nav > ul a { - background: #eee; - border-radius: 5px; - padding: 5px; - text-decoration: none; -} -.terms { font-size: .9em; } -nav > ul, article > header, footer { text-align: center; } -.title { font-size: 1.1em; } -footer a { text-decoration: none; } -hr { - border-style: dashed; - color: #ddd; -} -body > nav { - border-bottom: 1px solid #ddd; -} -body > footer { - border-top: 1px solid #ddd; -} - -/* code */ -pre { - border: 1px solid #ddd; - overflow-x: auto; - padding: 1em; -} -code { background: #f9f9f9; } -pre code { background: none; } - -/* misc elements */ -img, iframe, video { max-width: 100%; } -main { hyphens: auto; } -blockquote { - background: #f9f9f9; - border-left: 5px solid #ccc; - padding: 3px 1em 3px; -} - -table thead th { border-bottom: 1px solid #ddd; } -th, td { padding: 5px; } -thead, tfoot, tr:nth-child(even) { background: #eee; } -.hl { background-color: #ffc; } - -@media (prefers-color-scheme: dark) { - body { - background-color: #111; - color: white; - } - article > header, nav > ul a { - background: #222; - } - a { - color: #C4D4EE; - } - a:visited { - color: #CEDEE0; - } - code { background-color: #444; } - thead, tfoot, tr:nth-child(even) { background: #222; } - .hl { - background-color: #555; - } -} diff --git a/themes/xmin/templates/base.html b/themes/xmin/templates/base.html deleted file mode 100644 index 5942342..0000000 --- a/themes/xmin/templates/base.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html lang="{{ lang }}"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title {%- if current_path == '/' %} class="p-name"{% endif %}>{% block title %}{{ section.title }} | {{ config.title }}{% endblock %}</title> - <link rel="stylesheet" href="/css/style.css" /> - {%- 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="RSS" href="{{ get_url(path=config.feed_filename) | safe }}"> - {%- endblock %} - {%- endif %} - </head> - <body> - <nav> - <ul> - {%- for item in config.extra.menu.main %} - <li><a {%- if item.url == "/" %} class="author"{% endif %} href="{{ item.url | safe }}">{{ item.name }}</a></li> - {%- endfor %} - </ul> - </nav> - {% block main %}{% endblock %} - <footer>{{ config.extra.footer | safe }}</footer> - </body> -</html> diff --git a/themes/xmin/templates/categories/list.html b/themes/xmin/templates/categories/list.html deleted file mode 120000 index e0e4e08..0000000 --- a/themes/xmin/templates/categories/list.html +++ /dev/null @@ -1 +0,0 @@ -../tags/list.html \ No newline at end of file diff --git a/themes/xmin/templates/categories/single.html b/themes/xmin/templates/categories/single.html deleted file mode 120000 index 86f5e80..0000000 --- a/themes/xmin/templates/categories/single.html +++ /dev/null @@ -1 +0,0 @@ -../tags/single.html \ No newline at end of file diff --git a/themes/xmin/templates/page.html b/themes/xmin/templates/page.html deleted file mode 100644 index f32a6fc..0000000 --- a/themes/xmin/templates/page.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -{{- page.title -}} -{% endblock %} - -{% block main %} -<article class="h-entry"> - <header> - <h1><span class="title p-name">{{ page.title }}</span></h1> - <time class="dt-published" datetime="{{ page.date | date(format='%+') }}">{{ page.date | date(format="%F") }}</time> - <p class="terms"> - {%- if page.taxonomies %} - {%- for name, taxon in page.taxonomies %} - {{ name | capitalize }}: - {%- for item in taxon %} - <a class="p-category" href="{{ get_taxonomy_url(kind=name, name=item) }}">{{ item }}</a> - {%- endfor %} - {%- endfor %} - {%- endif %} - </p> - </header> - - <main class="e-content"> - {{ page.content | safe }} - </main> -</article> -{% endblock %} diff --git a/themes/xmin/templates/section.html b/themes/xmin/templates/section.html deleted file mode 100644 index e61566f..0000000 --- a/themes/xmin/templates/section.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block main %} -<main> - <h1>{{ section.title }}</h1> - {{ section.content }} - <section> - <ul> - {% for page in section.pages %} - <li class="h-entry"> - <time class="dt-published" datetime="{{ page.date | date(format="%+") }}">{{ page.date | date(format="%F") }}</time> - <a class="u-url p-name" href="{{ page.path | safe }}">{{ page.title }}</a> - </li> - {% endfor %} - </ul> - </section> -</main> -{% endblock %} diff --git a/themes/xmin/templates/tags/list.html b/themes/xmin/templates/tags/list.html deleted file mode 100644 index ee60c39..0000000 --- a/themes/xmin/templates/tags/list.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ taxonomy.name | capitalize }}{% endblock %} - -{% block main %} -<main> - <h1>{{ taxonomy.name | capitalize }}</h1> - <section> - <ul> - {%- for term in terms %} - <li> - <a href="{{ term.permalink }}">{{ term.name }}</a> - </li> - {%- endfor %} - </ul> - </section> -</main> -{% endblock %} diff --git a/themes/xmin/templates/tags/single.html b/themes/xmin/templates/tags/single.html deleted file mode 100644 index 25dde54..0000000 --- a/themes/xmin/templates/tags/single.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} - -{% block rss %} - {% set rss_path = "tags/" ~ term.name ~ "/atom.xml" %} - <link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path=rss_path, trailing_slash=false) | safe }}"> - -{% endblock %} - -{% block title %}{{ taxonomy.name | capitalize }}: {{ term.name }} | {{ config.title }}{% endblock %} - -{% block main %} -<main> - <h1>{{ taxonomy.name | capitalize }}: {{ term.name }}</h1> - <section> - <ul class="h-feed"> - {%- for page in term.pages %} - <li class="h-entry"> - <time class="dt-published" datetime="{{ page.date | date(format="%+") }}">{{ page.date | date(format="%F") }}</time> - <a class="u-url p-name" href="{{ page.permalink | safe }}">{{ page.title }}</a> - </li> - {%- endfor %} - </ul> - </section> -</main> -{% endblock %} diff --git a/themes/xmin/theme.toml b/themes/xmin/theme.toml deleted file mode 100644 index 99884b9..0000000 --- a/themes/xmin/theme.toml +++ /dev/null @@ -1,12 +0,0 @@ -name = "xmin" -description = "XMin is a Hugo theme written by Yihui Xie in about four hours" -license = "MIT" - -[author] -name = "Alan Pearce" -homepage = "https://www.alanpearce.eu" - -[original] -author = "yihui" -homepage = "https://yihui.org" -repo = "https://github.com/yihui/hugo-xmin" \ No newline at end of file |