all repos — zola-bearblog @ 760294e3c41b05ffd816a24193b9de89bda9e4ee

Port of bear blog theme to zola

Merge pull request 'Minor multilingual fix: change date format to "YYYY-MM-DD", add margin to active language in language switcher' (#13) from dobrvlskyi/zola-bearblog:multilingual into main Reviewed-on: https://codeberg.org/alanpearce/zola-bearblog/pulls/13

Alan Pearce
commit

760294e3c41b05ffd816a24193b9de89bda9e4ee

parent

e5ea07c4d62e19102764be22bfeb221bb77bd9c5

3 files changed, 7 insertions(+), 2 deletions(-)

jump to
M config.tomlconfig.toml
@@ -42,7 +42,7 @@ # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true [extra] -date_format="%d %b, %Y" +date_format="%Y-%m-%d" webserver_sends_csp_headers=true language_switcher=true
M templates/language_switcher.htmltemplates/language_switcher.html
@@ -3,7 +3,7 @@ <nav class="lang">
{%- set language_agnostic_path = current_path | default(value="/") | replace(from='/' ~ lang ~ '/', to = '/') | trim_start_matches(pat = '/') -%} {%- for tr in config.extra.translations %} {%- if tr.code == lang %} - <strong>{{ tr.name }}</strong> + <active>{{ tr.name }}</active> {%- else %} <a href="{{ get_url(path=language_agnostic_path, lang=tr.code) ~ "/" }}" hreflang="{{ tr.code }}">{{ tr.name }}</a> {%- endif %}
M templates/style.css.htmltemplates/style.css.html
@@ -47,6 +47,11 @@ nav a {
margin-right: 10px; } + nav active { + font-weight: bold; + margin-right: 10px; + } + textarea { width: 100%; font-size: 1rem;