summaryrefslogtreecommitdiffstatshomepage
path: root/templates/macros.html (follow)
Commit message (Collapse)AuthorAgeLines
* Have the post title contain a permalinkHEADtrunkWolfgang Müller2022-11-04-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.
* Use "related" instead of "mentions"Wolfgang Müller2022-11-04-1/+1
| | | | | | | | 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.
* templates: Use a unitless integer for the img width attributeWolfgang Müller2021-10-19-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
* templates: Also set avatar size in HTMLWolfgang Müller2021-10-18-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.
* templates: Fix permalink content for mentioned postsWolfgang Müller2021-08-13-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.
* templates: Do not show exact post timesWolfgang Müller2021-08-13-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.
* Use CSS to hide titles on single post pagesWolfgang Müller2021-06-16-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.
* Use "title" class for the header in the bannerWolfgang Müller2021-06-16-1/+1
| | | | This improves the readability and consistency of the CSS.
* templates: Make page titles mandatoryWolfgang Müller2021-06-16-1/+1
| | | | | | | 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.
* templates: Pass article class in render_post macroWolfgang Müller2021-06-16-7/+3
| | | | | | | 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.
* Remove special handling for draft postsWolfgang Müller2021-06-16-1/+0
| | | | This feature was only used once for testing.
* templates: Only render post title in the feedWolfgang Müller2021-06-16-2/+2
| | | | | 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.
* templates: Fix up some issues with whitespace controlWolfgang Müller2021-06-16-4/+4
| | | | This makes the HTML source slightly nicer.
* Use CSS to add spacersWolfgang Müller2021-06-16-1/+1
| | | | | | | | | | | | | | 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.
* templates: Set mute class on banner's <h2>Wolfgang Müller2021-06-12-1/+1
| | | | This way we do not have to specify the color in its selector.
* Put post titles in the bannerWolfgang Müller2021-06-12-2/+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.
* Initial commitWolfgang Müller2021-06-12-0/+43