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

Make webmentions a <dl>, don't translate code

This commit is contained in:
Rohan Kumar 2022-05-19 19:26:21 -07:00
parent 1b5062d090
commit a0644d74c3
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 11 additions and 8 deletions

View file

@ -41,7 +41,7 @@
@media (prefers-contrast: less) {
/* stylelint-enable */
html {
background-color: #222;
background-color: #333;
}
}
}

View file

@ -72,11 +72,12 @@ html {
* Typically meets SC 1.4.8, plus or minus a few characters. */
div[itemprop="articleBody"] {
margin: auto;
max-width: 36em;
max-width: 35em;
}
/* Compensate for misalignment and wasted space caused by padding
* and margin adjustments in nav children made to meet SC 2.5.5 */
dt > a,
header > nav,
footer > nav,
h2 + a {
@ -118,6 +119,8 @@ html {
* links that should be easy to fat-finger
* - links that directly follow h2 without being contained in a
* paragraph are section permalinks. */
dt,
dt > a,
summary,
h2 + a,
li > a {
@ -243,7 +246,7 @@ span[hidden] {
* viewport, triggering horizontal scrolling. Allow breaking words in
* content I don't control (comments, names). For content I do control,
* I just add soft hyphens to the HTML. */
li[itemprop="comment"],
div[itemprop="comment"],
:not(pre) > code,
:not(pre) > samp,
span[itemtype="https://schema.org/Person"] {

View file

@ -15,7 +15,7 @@
article summary,
/* Currently only used for in-page heading anchors,
* useless in printouts. */
span[aria-hidden],
h2 + a,
/* You can't navigate in a printout. */
footer nav,
nav a:not([rel="home"]) span {

View file

@ -18,11 +18,11 @@
{{- end -}}
<pre tabindex="0">
{{- if $samp -}}
<samp itemprop="text">
<samp translate="no" itemprop="text">
{{- $contents | safeHTML -}}
</samp>
{{- else -}}
<code itemprop="text">
<code translate="no" itemprop="text">
{{- $contents | safeHTML -}}
</code>
{{- end -}}

View file

@ -21,7 +21,7 @@
{{ dateFormat "2006-01-02" $webmention.created_at }}
</time>
</dt>
<dd><p>
<dd>
{{ if (eq $webmention.type "like") -}}
{{ if $webmention.author_name -}}
<span itemprop="agent" itemscope itemtype="https://schema.org/Person" class="h-card p-author vcard"><span itemprop="name" class="p-name fn n">{{ $webmention.author_name }}</span></span>
@ -45,7 +45,7 @@
by <span itemprop="author" itemscope itemtype="https://schema.org/Person" class="h-card p-author vcard"><span itemprop="name" class="p-name fn n">{{ $webmention.author_name }}</span></span>
{{- end -}}
{{- end }}
</p></dd>
</dd>
</div>
{{ else -}}
<dt>Nothing here</dt>