the home site for me: also iteration 3 or 4 of my site

chore: give code blocks a title

Changed files
+137 -138
content
static
css
templates
+2
content/_index.md
···
- [example](./tags/example)
## Code
+
+
> typescript
```ts
const stuff: string = "stuff"
```
+27 -4
static/css/style.css
···
float: left
}
-
/* shortcodes css */
-
.webring {
-
margin: .375rem;
-
}
+
pre {
+
border-top-left-radius: 0;
+
}
+
+
blockquote:has(+ pre) {
+
display: inline-block;
+
border: none;
+
font-family: "code" !important;
+
font-size: .8rem;
+
font-weight: 600;
+
margin: 0;
+
margin-bottom: 0.2rem;
+
margin-block: 0 0;
+
border-top-left-radius: 5px;
+
border-top-right-radius: 5px;
+
padding-left: .75rem;
+
padding-right: .75rem;
+
padding-top: .25rem;
+
padding-bottom: .25rem;
+
position: relative;
+
background-color: var(--accent);
+
}
+
+
blockquote:has(+ pre) p {
+
margin: 0;
+
color: var(--accent-text);
+
}
+78 -92
templates/head.html
···
-
<meta charset="UTF-8">
-
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
-
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
-
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
-
<meta name="robots" content="index, follow">
-
{% if page.title %}
-
{% set title = page.title %}
-
{% elif section.title %}
-
{% set title = section.title %}
-
{% elif config.title %}
-
{% set title = config.title %}
-
{% endif %}
-
{% if page.extra.author %}
-
{% set author = page.extra.author %}
-
{% elif section.extra.author %}
-
{% set author = section.extra.author %}
-
{% elif config.extra.author %}
-
{% set author = config.extra.author %}
-
{% endif %}
-
{% if page.description %}
-
{% set description = page.description | truncate(length=150) %}
-
{% elif section.description %}
-
{% set description = section.description | truncate(length=150) %}
-
{% elif config.description %}
-
{% set description = config.description | truncate(length=150) %}
-
{% endif %}
-
{% if page.extra.image %}
-
{% set image = get_url(path=page.extra.image, trailing_slash=false) %}
-
{% elif section.extra.image %}
-
{% set image = get_url(path=section.extra.image, trailing_slash=false) %}
-
{% elif config.extra.favicon %}
-
{% set image = get_url(path=config.extra.favicon, trailing_slash=false) %}
-
{% endif %}
-
{% if page.permalink %}
-
{% set url = page.permalink %}
-
{% elif section.permalink %}
-
{% set url = section.permalink %}
-
{% elif config.base_url %}
-
{% set url = config.base_url %}
-
{% endif %}
-
{% if title %}
+
<meta charset="UTF-8" />
+
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
+
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+
<meta
+
name="viewport"
+
content="width=device-width, initial-scale=1, user-scalable=no"
+
/>
+
<meta name="robots" content="index, follow" />
+
{% if page.title %} {% set title = page.title %} {% elif section.title %} {% set
+
title = section.title %} {% elif config.title %} {% set title = config.title %}
+
{% endif %} {% if page.extra.author %} {% set author = page.extra.author %} {%
+
elif section.extra.author %} {% set author = section.extra.author %} {% elif
+
config.extra.author %} {% set author = config.extra.author %} {% endif %} {% if
+
page.description %} {% set description = page.description | truncate(length=150)
+
%} {% elif section.description %} {% set description = section.description |
+
truncate(length=150) %} {% elif config.description %} {% set description =
+
config.description | truncate(length=150) %} {% endif %} {% if page.extra.image
+
%} {% set image = get_url(path=page.extra.image, trailing_slash=false) %} {%
+
elif section.extra.image %} {% set image = get_url(path=section.extra.image,
+
trailing_slash=false) %} {% elif config.extra.favicon %} {% set image =
+
get_url(path=config.extra.favicon, trailing_slash=false) %} {% endif %} {% if
+
page.permalink %} {% set url = page.permalink %} {% elif section.permalink %} {%
+
set url = section.permalink %} {% elif config.base_url %} {% set url =
+
config.base_url %} {% endif %} {% if title %}
<title>{{ title }}</title>
-
{% endif %}
-
{% block metatags %}
-
{% if title %}
-
<meta name="title" content="{{ title }}">
-
{% endif %}
-
{% if author %}
-
<meta name="author" content="{{ author }}">
-
{% endif %}
-
{% if description %}
-
<meta name="description" content="{{ description }}">
-
{% endif %}
-
<meta property="og:type" content="website">
-
<meta property="og:url" content="{{ url | safe }}">
-
{% if title %}
-
<meta property="og:site_name" content="{{ config.title }}">
+
{% endif %} {% block metatags %} {% if title %}
+
<meta name="title" content="{{ title }}" />
+
{% endif %} {% if author %}
+
<meta name="author" content="{{ author }}" />
+
{% endif %} {% if description %}
+
<meta name="description" content="{{ description }}" />
{% endif %}
+
<meta property="og:type" content="website" />
+
<meta property="og:url" content="{{ url | safe }}" />
{% if title %}
-
<meta property="og:title" content="{{ title }}">
-
{% endif %}
-
{% if description %}
-
<meta property="og:description" content="{{ description }}">
-
{% endif %}
-
{% if image %}
-
<meta property="og:image" content="{{ image }}">
-
{% endif %}
-
{% set twitter_card = config.extra.twitter_card | default(value=true) %}
-
{% if twitter_card != false %}
-
<meta property="twitter:card" content="summary_large_image">
-
<meta property="twitter:url" content="{{ url | safe }}">
+
<meta property="og:site_name" content="{{ config.title }}" />
+
{% endif %} {% if title %}
+
<meta property="og:title" content="{{ title }}" />
+
{% endif %} {% if description %}
+
<meta property="og:description" content="{{ description }}" />
+
{% endif %} {% if image %}
+
<meta property="og:image" content="{{ image }}" />
+
{% endif %} {% set twitter_card = config.extra.twitter_card |
+
default(value=true) %} {% if twitter_card != false %}
+
<meta property="twitter:card" content="summary_large_image" />
+
<meta property="twitter:url" content="{{ url | safe }}" />
{% if title %}
-
<meta property="twitter:title" content="{{ title }}">
-
{% endif %}
-
{% if description %}
-
<meta property="twitter:description" content="{{ description }}">
-
{% endif %}
+
<meta property="twitter:title" content="{{ title }}" />
+
{% endif %} {% if description %}
+
<meta property="twitter:description" content="{{ description }}" />
+
{% endif %} {% if image %}
+
<meta property="twitter:image" content="{{ image }}" />
+
{% endif %} {% endif %}
+
<link rel="canonical" href="{{ url | safe }}" />
{% if image %}
-
<meta property="twitter:image" content="{{ image }}">
-
{% endif %}
-
{% endif %}
-
<link rel="canonical" href="{{ url | safe }}">
-
{% if image %}
-
<link rel="shortcut icon" type="image/x-icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}">
-
{% endif %}
-
{% endblock metatags %}
-
{% if config.generate_feeds %}
-
{% block feed %}
-
<link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
-
{% endblock feed %}
-
{% endif %}
-
{% block css %}
-
<link rel="stylesheet" type="text/css" href="https://speyll.github.io/suCSS/reset-min.css"/>
-
<link rel="stylesheet" type="text/css" href="https://speyll.github.io/suCSS/suCSS-min.css"/>
-
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/style.css', trailing_slash=false) | safe }}"/>
+
<link
+
rel="shortcut icon"
+
type="image/x-icon"
+
href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}"
+
/>
+
{% endif %} {% endblock metatags %} {% if config.generate_feeds %} {% block feed
+
%} <link rel="alternate" type="application/atom+xml" title="RSS" href="{{
+
get_url(path="atom.xml", trailing_slash=false) }}"> {% endblock feed %} {% endif
+
%} {% block css %}
+
<link
+
rel="stylesheet"
+
type="text/css"
+
href="https://speyll.github.io/suCSS/reset-min.css"
+
/>
+
<link
+
rel="stylesheet"
+
type="text/css"
+
href="https://speyll.github.io/suCSS/suCSS-min.css"
+
/>
+
<link
+
rel="stylesheet"
+
type="text/css"
+
href="{{ get_url(path='css/style.css', trailing_slash=false) | safe }}"
+
/>
{% endblock css %}
-
<script src="{{ get_url(path='js/script.js', trailing_slash=false) | safe }}" defer></script>
-
+
<script
+
src="{{ get_url(path='js/script.js', trailing_slash=false) | safe }}"
+
defer
+
></script>
+13 -19
templates/index.html
···
-
{% extends "base.html" %}
-
-
{% block content %}
-
{{ section.content | safe }}
-
-
{% if config.extra.list_pages %}
-
-
{% if paginator %}
-
{% set pages = paginator.pages %}
-
{% else %}
-
{% set pages = section.pages %}
-
{% endif %}
+
{% extends "base.html" %} {% block content %} {{ section.content | safe }} {% if
+
config.extra.list_pages %} {% if paginator %} {% set pages = paginator.pages %}
+
{% else %} {% set pages = section.pages %} {% endif %}
<ul class="titleList">
-
{% for page in pages %}
+
{% for page in pages %}
<li>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
<br />
{{ page.description }}
</li>
-
{% endfor %}
+
{% endfor %}
</ul>
{% if paginator %}
-
<div class="metaData">{% if paginator.previous %}<a href="{{ paginator.first }}">⥶</a> &nbsp <a href="{{ paginator.previous }}"><</a>{% endif %} &nbsp {{ paginator.current_index }} / {{ paginator.number_pagers }} &nbsp {% if paginator.next %}<a href="{{ paginator.next }}">></a> &nbsp <a href="{{ paginator.last }}">⥸</a>{% endif %}</div>
-
{% endif %}
-
-
{% endif %}
-
{% endblock content %}
+
<div class="metaData">
+
{% if paginator.previous %}<a href="{{ paginator.first }}">⥶</a> &nbsp
+
<a href="{{ paginator.previous }}"><</a>{% endif %} &nbsp {{
+
paginator.current_index }} / {{ paginator.number_pagers }} &nbsp {% if
+
paginator.next %}<a href="{{ paginator.next }}">></a> &nbsp
+
<a href="{{ paginator.last }}">⥸</a>{% endif %}
+
</div>
+
{% endif %} {% endif %} {% endblock content %}
+17 -23
templates/page.html
···
-
{% extends "base.html" %}
-
-
{% block content %}
+
{% extends "base.html" %} {% block content %}
<h1>{{ page.title }}</h1>
{% if page.toc and page.extra.toc %}
<h2>Table of contents</h2>
<ul>
-
{% for h1 in page.toc %}
+
{% for h1 in page.toc %}
<li>
-
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
-
{% if h1.children %}
+
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
+
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
-
<li>
+
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
-
<ul>
+
<ul>
{% for h3 in h2.children %}
-
<li>
+
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
-
</li>
+
</li>
{% endfor %}
-
</ul>
-
</li>
+
</ul>
+
</li>
{% endfor %}
</ul>
-
{% endif %}
+
{% endif %}
</li>
-
{% endfor %}
+
{% endfor %}
</ul>
-
{% endif %}
-
-
{{ page.content | safe }}
+
{% endif %} {{ page.content | safe }}
<p class="tags-data">
-
{% if page.taxonomies.tags %}
-
{% for tag in page.taxonomies.tags %}
-
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
-
{% endfor %}
-
{% endif %}
+
{% if page.taxonomies.tags %} {% for tag in page.taxonomies.tags %}
+
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
+
{% endfor %} {% endif %}
</p>
-
{% endblock content %}
+
{% endblock content %}