Deprecate bulma in favor of normalize and milligram

Deprecate the bulma css framework in favor of normalize and
milligram. Adapt the templates to work with the new css libraries.
This commit is contained in:
finga 2024-04-20 00:02:14 +02:00
parent be9da23070
commit 4aff0378ac
27 changed files with 408 additions and 334 deletions

View file

@ -1,11 +1,13 @@
{% extends "base.html" %}
{% block title %}
404
{% endblock title %}
{% block subtitle %}
<h2>404</h2>
{% endblock subtitle %}
{% block content %}
<navbar class="navbar level">
<div class="level-left">
<a href="{{ config.base_url }}">home</a>
</div>
</navbar>
<h1 class="title">404</h1>
<h2 class="subtitle">Diese URL führt zu nichts!</h2>
Diese URL führt zu nichts!
{% endblock content %}

View file

@ -1,12 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ config.description }}">
<title>{% block title %}{% endblock title %}</title>
<link href="{{ config.base_url | safe}}/style.css" rel="stylesheet">
<link href="{{ get_url(path="normalize.css", trailing_slash=false) }}" rel="stylesheet">
<link href="{{ config.base_url | safe}}/onders.org.css" rel="stylesheet">
<link rel="icon" href="/favicon.png" type="image/png" sizes="16x16">
{% if config.generate_feed %}
<link rel="alternate" type="application/rss+xml" title="rss" href="/rss.xml">
@ -15,11 +15,24 @@
{% endblock js %}
</head>
<body>
<section class="section">
<div class="container">
{% block content %} {% endblock content %}
</div>
{% include "footer.html" %}
</section>
<main class="container">
<header>
<h1>{{ config.title }}</h1>
{% block subtitle %}{% endblock subtitle %}
</header>
{% include "navbar.html" %}
{% block content %} {% endblock content %}
{% include "navbar.html" %}
<footer>
<ul>
<li>
<a href="/credits">credits</a>
</li>
<li>
<a href="/rss.xml">RSS feed</a>
</li>
</ul>
</footer>
</main>
</body>
</html>

View file

@ -1,5 +1,6 @@
{% block js %}
<script data-isso-lang="de" data-isso-require-author="true" src="{{ config.base_url }}/comments/js/embed.min.js"></script>
<script data-isso-lang="de" src="{{ config.base_url }}/comments/js/embed.min.js"></script>
{% endblock js %}
<section id="isso-thread"></section>
{# <embed type="text/html" src="http://localhost:3000/"> #}
<section data-title="{{ page.title }}" data-isso-id="{{ page.path }}" id="isso-thread"></section>

View file

@ -1,25 +0,0 @@
{% extends "base.html" %}
{% block title %}
{{ config.title }} - {{ page.title }}
{% endblock title %}
{% block content %}
<h1 class="title">{{ config.title }}</h1>
<h2 class="subtitle">{{ page.title }}</h2>
<navbar class="navbar level">
<div class="level-left">
<a href="{{ config.base_url }}">home</a>
</div>
</navbar>
<div class="content">
<div class="block">
{{ page.content | safe }}
</div>
</div>
<navbar class="navbar level">
<div class="level-left">
<a href="{{ config.base_url }}">home</a>
</div>
</navbar>
{% endblock content %}

View file

@ -1,10 +0,0 @@
<footer class="footer has-text-centered is-size-7">
<ul class="has-text-centered">
<li>
<a href="/credits">credits</a>
</li>
<li>
<a href="/rss.xml">RSS feed</a>
</li>
</ul>
</footer>

View file

@ -1,12 +0,0 @@
<header class="header">
<h1 class="title">{{ config.title }}</h1>
{% if section.title %}
<h2 class="subtitle">{{ section.title }}</h2>
{% endif %}
{% if page.title %}
<h3 class="subtitle">{{ page.title }}</h3>
{% endif %}
<navbar class="navbar">
<a href="{{ config.base_url }}">home</a>
</navbar>
</header>

View file

@ -5,7 +5,6 @@
{% endblock title %}
{% block content %}
<h1 class="title">{{ config.title }}</h1>
<div class="content">
<div class="block">
{{ section.content | safe }}

View file

@ -1,19 +1,31 @@
{% set section = get_section(path=page.ancestors | last) %}
<navbar class="navbar level">
<div class="level-left">
<ul>
<li><a href="{{ config.base_url }}">home</a></li>
{% if page.higher %}
<li><a href="{{ page.higher.path }}">{{ page.higher.title }}</a></li>
{% endif %}
</ul>
{% if page.ancestors %}
{% set ancestor = get_section(path=page.ancestors | last) %}
{% endif %}
{% if current_path and current_path == "/" %}
{% else %}
<nav>
<div class="row">
<div class="column">
<a href="{{ config.base_url }}">home</a>
</div>
{% if ancestor.extra %}
<div class="column align-right">
<a href="{{ ancestor.path }}">Reiseindex</a>
</div>
{% endif %}
</div>
<div class="level-right has-text-right">
<ul>
<a href="{{ section.path }}">Reiseindex</a>
{% if page.lower %}
<li><a href="{{ page.lower.path }}">{{ page.lower.title }}</a></li>
{% endif %}
</ul>
<div class="row">
{% if page.higher %}
<div class="column">
<a href="{{ page.higher.path }}">{{ page.higher.title }}</a>
</div>
{% endif %}
{% if page.lower %}
<div class="column align-right">
<a href="{{ page.lower.path }}">{{ page.lower.title }}</a>
</div>
{% endif %}
</div>
</navbar>
</nav>
{% endif %}

View file

@ -1,23 +1,33 @@
{% extends "base.html" %}
{% block title %}
{% set section = get_section(path=page.ancestors | last) %}
{{ config.title }} - {{ section.title }} - {{ page.title }}: {{ page.date }}
{% if page.ancestors %}
{% set ancestor = get_section(path=page.ancestors | last) %}
{% if ancestor.extra %}
{{ config.title }} | {{ page.date }} - {{ page.title }} ({{ ancestor.title }})
{% else %}
{{ config.title }} | {{ page.title }}
{% endif %}
{% endif %}
{% endblock title %}
{% block subtitle %}
{% if page.ancestors %}
{% set ancestor = get_section(path=page.ancestors | last) %}
{% if ancestor.extra %}
<h2>{{ ancestor.extra.start }} - {{ ancestor.extra.end }}: {{ ancestor.title }}</h2>
{% else %}
<h2>{{ page.title }}</h2>
{% endif %}
{% endif %}
{% endblock subtitle %}
{% block content %}
{% set section = get_section(path=page.ancestors | last) %}
<h1 class="title">{{ config.title }}</h1>
<h2 class="subtitle">{{ section.title }}</h2>
{% include "navbar.html" %}
<h3 class="subtitle">{{ page.title }} ({{ page.date }})</h3>
<div class="content">
<div class="block">
{{ page.content | safe }}
</div>
<div class="block">
{% include "comments.html" %}
</div>
</div>
{% include "navbar.html" %}
{% if page.date %}
<h3>{{ page.title }} ({{ page.date }})</h3>
{% endif %}
{{ page.content | safe }}
{% if page.date %}
{% include "comments.html" %}
{% endif %}
{% endblock content %}

View file

@ -1,32 +1,24 @@
{% extends "base.html" %}
{% block title %}
{{ config.title }} - {{ section.title }}
{% if section.extra.start %}
{{ config.title }} | {{ section.extra.start }} - {{ section.extra.end }}: {{ section.title }}
{% else %}
{{ config.title }}
{% endif %}
{% endblock title %}
{% block subtitle %}
{% if section.extra.start %}
<h2>{{ section.extra.start }} - {{ section.extra.end }}: {{ section.title }}</h2>
{% endif %}
{% endblock subtitle %}
{% block content %}
<h1 class="title">{{ config.title }}</h1>
<h2 class="subtitle">{{ section.title }}</h2>
<navbar class="navbar level">
<div class="level-left">
<a href="{{ config.base_url }}">home</a>
</div>
</navbar>
<div class="content">
<div class="block">
{{ section.content | safe }}
</div>
<div class="block">
<ul>
{% for page in section.pages | reverse %}
<li><a href="{{ page.permalink | safe }}">{{ page.date | safe }} - {{ page.title | safe }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<navbar class="navbar level">
<div class="level-left">
<a href="{{ config.base_url }}">home</a>
</div>
</navbar>
{{ section.content | safe }}
<ul>
{% for page in section.pages | reverse %}
<li><a href="{{ page.permalink | safe }}">{{ page.date | safe }} - {{ page.title | safe }}</a></li>
{% endfor %}
</ul>
{% endblock content %}

View file

@ -1,4 +1,4 @@
<div class="gallery is-flex is-flex-wrap-wrap">
<div class="gallery">
{% for path in images %}
{% if section %}
{% set full_path = section.path ~ path %}
@ -7,61 +7,31 @@
{% set full_path = page.path ~ path %}
{% endif %}
{% set thumb = resize_image(path=full_path, width=120, height=120) %}
<a href="#{{ loop.index }}"><img class="thumbnail" src="{{ thumb.url }}"></a>
<div class="gallery-item">
<a href="#{{ path }}">
<img src="{{ thumb.url }}" class="thumbnail" />
<div class="lightbox" id="{{ loop.index }}">
{% if loop.first and loop.last %}
<a href="#" class="close full">
<div class="image">
<img src="{{ path }}">
</div>
</a>
<div class="lightbox has-text-centered" id="{{ path }}">
{% if images | length > 1 %}
<span class="spacer"></span>
{% if loop.first %}
<a href="#{{ images | nth(n=images | length - 1) }}" class="lightbox-nav-previous">
</a>
{% else %}
<a href="#{{ images | nth(n=loop.index0 - 1) }}" class="lightbox-nav-previous">
&lt;
</a>
{% endif %}
<img src="{{ path }}" />
<a class="delete is-large" href="#"></a>
{% if loop.last %}
<a href="#{{ images | nth(n=0) }}" class="lightbox-nav-next">
</a>
{% else %}
<a href="#{{ images | nth(n=loop.index) }}" class="lightbox-nav-next">
&gt;
</a>
{% endif %}
{% else %}
<a href="#" class="close">
<span class="spacer"></span>
<img src="{{ path }}" />
</a>
{% endif %}
{% if images | length > 1 %}
{% if loop.first %}
<a href="#{{ images | nth(n=images | length - 1) }}" class="is-desktop">
<span class="lightbox-previous"></span>
</a>
{% else %}
<a href="#{{ images | nth(n=loop.index0 - 1) }}" class="is-desktop">
<span class="lightbox-previous"></span>
</a>
{% endif %}
{% if loop.last %}
<a href="#{{ images | nth(n=0) }}" class="is-desktop">
<span class="lightbox-next"></span>
</a>
{% else %}
<a href="#{{ images | nth(n=loop.index) }}" class="is-desktop">
<span class="lightbox-next"></span>
</a>
{% endif %}
{% endif %}
{% else %}
<a href="#"><span class="close"></span></a>
{% if loop.first %}
<a href="#{{ images | length }}"><span class="prev end"></span></a>
{% else %}
<a href="#{{ loop.index - 1 }}"><span class="prev"></span></a>
{% endif %}
{% if loop.last %}
<a href="#1"><span class="next start"></span></a>
{% else %}
<a href="#{{ loop.index + 1 }}"><span class="next"></span></a>
{% endif %}
<div class="image">
<img src="{{ path }}">
</div>
{% endif %}
</div>
{% endfor %}
</div>

View file

@ -6,11 +6,11 @@
{% endif %}
{% set thumb = resize_image(path=full_path, width=400, height=400, op="fit") %}
<div class="item">
<div>
<a href="#{{ path }}">
<img src="{{ thumb.url }}"/>
<img class="modal-thumbnail" src="{{ thumb.url }}"/>
</a>
<div class="lightbox image has-text-centered" id="{{ path }}">
<div class="modal" id="{{ path }}">
<a href="#" class="close">
<span class="spacer"></span>
<img src="{{ path }}" />