clean pronouns

This commit is contained in:
Artemis 2025-01-23 18:48:19 +01:00
parent b4c02a685d
commit ec79a05fe5
3 changed files with 15 additions and 2 deletions

View file

@ -79,12 +79,12 @@ header.padded,
main {
padding-left: 1em;
padding-right: 1em;
align-items: center;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
}
section {
@ -229,6 +229,10 @@ input#ident {
letter-spacing: .1ch;
}
.pronoun_fragment {
font-weight: bold;
}
.profile h2 {
font-size: 2em;
}

View file

@ -0,0 +1,7 @@
{% macro pretty_pronouns(pronouns) %}
{% set fragments = pronouns | split(pat="/") %}
{% for fr in fragments %}
<span class="pronoun_fragment">{{fr}}</span>
{% if not loop.last %}/{% endif %}
{% endfor %}
{% endmacro pretty_pronouns %}

View file

@ -1,4 +1,6 @@
{% extends "base" %}
{% import "macros" as macros %}
{% block title %}{{ profile.name }} - {% endblock title %}
{% block main %}
<section class="raised profile">
@ -11,7 +13,7 @@
Not microchipped
{% endif %}
</p>
<p class="pronouns">{{profile.pronouns}}</p>
<p class="pronouns">{{ macros::pretty_pronouns(pronouns=profile.pronouns) }}</p>
</header>
<h2>{{profile.name}}</h2>