summaryrefslogtreecommitdiffstatshomepage
path: root/templates (unfollow)
Commit message (Collapse)AuthorLines
2024-10-18templates: Sort tags in render_tags macroWolfgang Müller-1/+1
2024-10-05templates: Show page title before config.titleWolfgang Müller-1/+1
The page title is way more important than the title of the microblog, so make sure it gets prominent treatment.
2024-10-05Use gutter to mark related postsWolfgang Müller-1/+2
Now that we can put nicely-aligned content at the side we can use the space to mark the "Related posts" header in a nicer way.
2024-10-05Use CSS grid for post layoutWolfgang Müller-1/+3
We've always been wanting to have the avatars aligned in the negative space next to the posts but never found an adequately nice way to do it. With grid this is now easy. We can also replace lots of the old margin and padding rules with gaps.
2024-10-05templates: Add "Authored by" to the avatar's alt propertyWolfgang Müller-1/+1
2024-10-05templates: Use correct closing tag for related postsWolfgang Müller-1/+1
Judging from the CSS this was supposed to be </h3> and not </h2>.
2022-11-04Have the post title contain a permalinkWolfgang Müller-2/+1
The use of the section sign § as a permalink marker has been bugging us for a while now. Whilst being fairly well highlighted it is very hard to click on account of being so small. Some other sites usually "hide" the permalink behind the date, but that feels very counterintuitive to us. Instead, use the most prominent feature of the banner, the title. Make sure to underline it so that people know it's clickable. Whilst we're there, also remove the special handling for related posts (no need anymore now to reveal the post number on the page). Since we were using the 'bold-hover' class in this particular element only, also remove it.
2022-11-04Use "related" instead of "mentions"Wolfgang Müller-5/+5
Whilst we specifically mention related or relevant posts in some cases, sometimes related posts are added without any commentary. In that case it is confusing to name them "mentioned" without there being any mention of them in the post itself. Naming these kinds of posts "related" makes more sense and is clearer.
2022-11-04templates: Increase default width for img shortcodeWolfgang Müller-1/+1
This should make sure that the picture takes all of the available space in the post since the earlier value of 500px was too small to fill the entire <figure> element.
2022-04-09Use float classes instead of inline stylesWolfgang Müller-1/+1
Commit ea7baaa (templates: Allow setting 'float' for figures in the 'img' shortcode, 2022-04-09) introduces inline styles which were considered more straightforward than adding special CSS rules. Sadly, restrictive Content-Security-Policy settings will make browsers disregard inline styles as a security measure. Since we don't want to turn off CSP, this comment implement CSS rules for setting the float attribute on elements.
2022-04-09templates: Allow setting custom links in the 'img' shortcodeWolfgang Müller-1/+1
Up until now we always linked to the image itself, but in the future we may want to link to any arbitrary (even external) page. Add a 'link' argument to the 'img' shortcode to facilitate this. If no link is given, we fall back to linking to the image; this makes sure that older posts need not be changed.
2022-04-09templates: Allow setting 'float' for figures in the 'img' shortcodeWolfgang Müller-0/+4
We've never had to flow text around a <figure> element before, so this particular feature was missing. Instead of creating small CSS rules, interface with the style attribute directly. This is easier and allows more straight-forward control.
2022-04-09templates: Allow specifying widths for images in the 'img' shortcodeWolfgang Müller-1/+1
An upcoming post will require a smaller figure which has text flowing around it. This is not nicely possible with the hard-coded setting of 500 pixels. Introduce an optional argument 'width' to the shortcode to make custom sizes possible.
2022-02-06Update image template functions for zola 0.14.0Wolfgang Müller-1/+2
The 'resize_image' function was changed to return a map in [1], so we have to update our code accordingly. [1] https://github.com/getzola/zola/commit/7fb99eaa44f387fadf744354c605f0cfcc582800
2021-10-19templates: Use a unitless integer for the img width attributeWolfgang Müller-1/+1
According to MDN [1], the width attribute carries a unitless integer instead of "px" et al. Make sure we conform to the standard. [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-width
2021-10-18templates: Also set avatar size in HTMLWolfgang Müller-1/+1
Legacy devices might not render the CSS correctly, making the high-resolution avatar images take up most of the space on the site. Make sure to resize them to 64px in HTML using a width attribute.
2021-08-13templates: Fix permalink content for mentioned postsWolfgang Müller-1/+1
A regular posts indicates its permalink with a section sign. However, for mentioned posts we'd like to be explicit about the post number, since we may refer to them this way in the parent post. This behaviour should have been working since day one in ad2be2b (Initial commit, 2021-06-12), but it was subtly broken. Since the render_post macro does not have access to the 'mention' variable, only the section sign would ever be used to indicate a permalink. This probably happened because the rendering code for a post used to live in the post template instead of a macro.
2021-08-13templates: Do not show exact post timesWolfgang Müller-1/+1
Now that about two months have passed since the initial publication, we know better with which frequency posts are made. Since there's usually more than one day between posts, rendering prominently the time at which posts were made is needlessly noisy. We already put the exact date and time in the HTML source and the title tag, so it is still there if really needed.
2021-08-09templates: Render markdown in img's figcaptionWolfgang Müller-1/+1
The img shortcode inserts, along the picture itself, a figcaption element containing a brief description. We may want to include links or other HTML elements in that description. This is not possible right now because we insert the caption content verbatim. This commit changes the img shortcode such that markdown is now rendered inline for the figcaption element.
2021-07-25templates: Have the 'ref' shortcode use a.internalWolfgang Müller-1/+1
Added in the previous commit, this class renders a link more subtly and is supposed to be used when referencing internal content. We do exactly this here.
2021-07-25Use h3 for "Mentioned posts"Wolfgang Müller-1/+1
An upcoming post will (finally) make use of the "mentions" feature. Whilst working on that post we noticed that the header indicating mentioned posts is a big too big and clashes even with the site title. h3 should be better suited for this purpose. Since the default margins are slightly different from h2, make sure to tweak the stylesheet too.
2021-07-03templates: Allow passing format to img shortcodeWolfgang Müller-1/+1
Sometimes we may want to override the default setting when processing images. Furthermore, since we will most likely want to generate JPG files in the general case in order to minimise the amount of data transferred when opening the front page, have the default in the shortcode be "jpg" instead of "auto".
2021-06-24templates: Simplify Tera blocksWolfgang Müller-4/+4
We don't need to reference the block name in the 'endblock' statement if blocks are not nested.
2021-06-24templates: Add "about" link to the first postWolfgang Müller-0/+1
The first post has information on what to expect from this site. Since it will scroll further and further down, make sure we reference it for quick access.
2021-06-16Use CSS to hide titles on single post pagesWolfgang Müller-1/+1
This removes a branch from the template and also makes sure that screen readers and similar software still get access to the post title even if we want to hide it on the presentational layer.
2021-06-16Use "title" class for the header in the bannerWolfgang Müller-1/+1
This improves the readability and consistency of the CSS.
2021-06-16templates: Make page titles mandatoryWolfgang Müller-3/+3
Currently we allow empty post titles, gracefully falling back to a default value. This increases complexity somewhat. Since we think we'll always be able to think of a title for a post, make it mandatory for now to provide one.
2021-06-16templates: Pass article class in render_post macroWolfgang Müller-9/+5
Instead of using boolean arguments to control the article class (and which parts of the article are rendered), accept a class string that is used directly. For now, check for the right class before rendering a title - an upcoming commit will change this to be cleaner.
2021-06-16Remove special handling for draft postsWolfgang Müller-1/+0
This feature was only used once for testing.
2021-06-16templates: Only render post title in the feedWolfgang Müller-3/+3
We can get rid of the post title in the banner since the base template now renders it in the main banner whenever we show a single post.
2021-06-16templates: Fix up some issues with whitespace controlWolfgang Müller-4/+4
This makes the HTML source slightly nicer.
2021-06-16Use CSS to add spacersWolfgang Müller-7/+16
Currently, we pad certain elements with manual interpunct spacers that are defined in the templates themselves. This is suboptimal for a number of reasons. Templates should be used for textual or semantic data, not presentation. Additionally, we have no good control over how whitespace characters will end up being rendered. Adding or deleting spacers is a nightmare. To fix this, use CSS to render spacers instead. To that end, introduce a couple of HTML elements in the top banner and keep supplementary links in a list inside a <nav> element. Add a spacer mixin that can be applied to any element that needs it.
2021-06-16templates: Do not show slogan on all pagesWolfgang Müller-6/+5
Currently we show the slogan both on the index as well as all sub-pages. This needs some special handling in the template, since the page description for the index is empty (the slogan takes its place). Simplify the template further by making sure description is always set, and set it to the slogan only on the index page.
2021-06-16templates: Consolidate blocks into base templateWolfgang Müller-38/+26
This is the first in a series of commits that will attempt to clean up and simplify the templates, most of which were put together hastily. One particular egregious example of this is how Tera blocks are employed to set per-page titles, provide banner descriptions and links, and include additional RSS feeds. These elements are all outside the normal 'content' block provided by the base template. Almost always they contain only one line of text. This solution was chosen because there did not seem to be a cleaner way of having per-page variables in the base template. This is a problem especially for the 'single' and list' taxonomy pages which do not even have front matter (and therefore cannot carry additional metadata). Furthermore, we want to keep each page's front matter as minimal as possible and avoid hard-coding a post description of "post № <X>". Instead rely on the fact that each type of page is identifiable in the base template by the variables that are set in it. The index carries the 'section' variable, pages carry 'page', a single taxonomy term carries 'term', and a single taxonomy carries 'terms'. Using this information we can consolidate all these blocks into the base template in a simple and clean way.
2021-06-12templates: Set mute class on banner's <h2>Wolfgang Müller-1/+1
This way we do not have to specify the color in its selector.
2021-06-12Put post titles in the bannerWolfgang Müller-5/+3
Post titles are currently only visible in the feed, or on the post page itself. Since people may remember posts by their titles rather than their number, display the titles on each post's banner as well for easier searching. This means we can now get rid of the extra item in the post page's description. A neat side effect is that we now have a header element for each <article>, making W3C a bit happier.