1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

More stylesheet tweaks

- Increase list padding so that ordered-list decimal markers have space
  to fit without overflowing.
- Improve style for removing underline between h-card name and photo, so
  it doesn't apply to any unnecessary elements.
- Reduce budget for document size.
This commit is contained in:
Rohan Kumar 2022-08-05 07:24:16 -07:00
parent 1321f0bc35
commit d02b749425
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 22 additions and 14 deletions

View file

@ -367,12 +367,13 @@ sup {
/* narrow screens: reduce list indentation, hyphenate nested lists /* narrow screens: reduce list indentation, hyphenate nested lists
* touch screens: lists of links should be easy to tap so give them * touch screens: lists of links should be easy to tap so give them
* some spacing (partial SC 2.5.5). There should be non-interactive * some spacing (partial SC 2.5.5). There should be non-interactive
* space to the left that's safe to tap. */ * space to the left that's safe to tap.
* 1.75em is the minimum required for ol numbers to fit. */
dd, dd,
ol, ol,
ul { ul {
margin: 0; margin: 0;
padding-left: 1.5em; padding-left: 1.75em;
} }
blockquote, blockquote,
@ -425,8 +426,12 @@ h1 {
hyphens: auto; hyphens: auto;
} }
/* Very narrow screens: full hyphenation. /* Very narrow screens: full hyphenation, compactness
* This is the typical width of a smart feature phone. */ * This is the typical width of a smart feature phone, or a browser
* sidebar. At this tiny width, users are either unlikely to be using a
* touchscreen (KaiOS-like feature phones, desktop browser sidebars) or
* they're just reading non-interactively. being compact probably takes
* precedence over being touch-friendly. */
@media (max-width: 272px) { @media (max-width: 272px) {
body { body {
font-size: 100%; font-size: 100%;
@ -441,6 +446,10 @@ h1 {
padding: .25em; padding: .25em;
} }
dd {
padding-left: 1em;
}
hr { hr {
margin: .25em 0; margin: .25em 0;
} }
@ -565,11 +574,11 @@ summary {
vertical-align: -.1em; vertical-align: -.1em;
} }
.h-card a.u-uid { .p-author a.u-uid {
text-decoration: none; text-decoration: none;
} }
a .p-name { a .u-photo + .p-name {
text-decoration: underline; text-decoration: underline;
} }

View file

@ -22,7 +22,6 @@
(btw this is all made of <span> cuz it is supposed to be inline) (btw this is all made of <span> cuz it is supposed to be inline)
--><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard"> --><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName"> <a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
{{ partial "indieweb-icon.html" }} {{ partial "indieweb-icon.html" -}} <span itemprop="name" class="p-name fn n">
<span itemprop="name" class="p-name fn n">
<span itemprop="givenName" class="p-given-name given-name">Rohan</span>&#160;<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a> <span itemprop="givenName" class="p-given-name given-name">Rohan</span>&#160;<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
</span> </span>

View file

@ -2,9 +2,9 @@
{{- $favicon_base64 := $favicon.Content | base64Encode -}} {{- $favicon_base64 := $favicon.Content | base64Encode -}}
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}} {{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
{{- if in site.BaseURL ".onion" -}} {{- if in site.BaseURL ".onion" -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt="" <img itemprop="image" width="16" height="16" alt=""
src="data:image/png;base64,{{ $favicon_base64 }}" /> src="data:image/png;base64,{{ $favicon_base64 }}" class="u-photo photo" />
{{- else -}} {{- else -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt="" <img itemprop="image" width="16" height="16" alt=""
src="{{ $favicon_svg.Permalink }}" /> src="{{ $favicon_svg.Permalink }}" class="u-photo photo" />
{{- end }} {{- end }}

View file

@ -31,7 +31,7 @@
}, },
{ {
"resourceType": "document", "resourceType": "document",
"budget": 75 "budget": 70
}, },
{ {
"resourceType": "image", "resourceType": "image",

View file

@ -35,7 +35,7 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | sd '^\t(?:\t)?
| sd '<pre(?: tabindex="0")?>\n\t*<(code|samp)( |>)' '<pre tabindex="0"><$1$2' \ | sd '<pre(?: tabindex="0")?>\n\t*<(code|samp)( |>)' '<pre tabindex="0"><$1$2' \
| sd '(?:\n)?</(code|samp)>\n(?:[\t\s]*)?</pre>' '</$1></pre>' \ | sd '(?:\n)?</(code|samp)>\n(?:[\t\s]*)?</pre>' '</$1></pre>' \
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \ | sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
| sd '(</picture>|src="[^"]*" ?/>)<span itemprop="name" class="p-name fn n">' '$1 <span itemprop="name" class="p-name fn n">' \ | sd -f m 'class="u-photo photo"[^<]*<' 'class="u-photo photo"/> <' \
| sd '([a-z])<(data|time)' '$1 <$2' \ | sd '([a-z])<(data|time)' '$1 <$2' \
| sd '</span>(<a[^>]*rel="(?:nofollow ugc|ugc nofollow)"(?:[^>]*)?>liked</a>)' '</span> $1' \ | sd '</span>(<a[^>]*rel="(?:nofollow ugc|ugc nofollow)"(?:[^>]*)?>liked</a>)' '</span> $1' \
| sd -s '/>' ' />' | sd -s '/>' ' />'