1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-01-02 12:21:13 +00:00

Use boring font for consistent non-latin script appearance based on page heuristics

This commit is contained in:
Cadence Ember
2022-05-06 01:36:40 +12:00
parent d211470dca
commit 7461f25ca9
13 changed files with 43 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ html(lang=settings.language)
head
title Bibliogram
include includes/head
body.homepage
body.homepage(class={"use-boring-font": ll.meta_use_boring_font})
header
h1.banner
img.banner-image(src="/static/img/banner-min.svg" alt="Bibliogram")

View File

@@ -46,6 +46,6 @@ html
meta(property="og:image:alt" content=firstEntry.getAlt())
meta(property="og:site_name" content="Bibliogram")
body.post-page
body.post-page(class={"use-boring-font": !post.captionIsLatin()})
main
+post(post, false)

View File

@@ -36,7 +36,7 @@ html(dir=ll.meta_direction, lang=settings.language)
title= `${ll.t_settings} | Bibliogram`
include includes/head
script(src=getStaticURL("html", "/static/js/settings_message.js") type="module")
body.settings-page
body.settings-page(class={"use-boring-font": ll.meta_use_boring_font})
if status && message
.status-notice(class=status)= message
main.settings

View File

@@ -37,7 +37,7 @@ html
meta(property="og:image:type" content="image/jpeg")
meta(property="og:site_name" content="Bibliogram")
body
body(class={"use-boring-font": !user.bioIsLatin()})
nav(class=(settings.display_top_nav ? "always-displayed" : "")).top-nav
//- Alt text guidelines from https://axesslab.com/alt-texts/
a(href="/").nav-icon-link

View File

@@ -11,8 +11,10 @@ $theme: () !default
body
font-family: "Bariol", sans-serif
[lang="uk"] body // consistent cyrillic
font-family: "Cantarell", sans-serif
body.use-boring-font
// this is useful so that cyrillic and other scripts don't look conspicuous compared to nearby latin letters.
// the use-boring-font class is activated based on the page and heuristics of its contents
font-family: sans-serif
input, button, textarea
font-family: inherit