mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
More markup formatting, remove unnecessary div
- Decrease the article dom depth by 1 by replacing <main><div> with just <main>. - Fix some whitespace so the HTML output looks better.
This commit is contained in:
parent
87a89ce514
commit
b1efab7def
8 changed files with 45 additions and 50 deletions
|
@ -1,10 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{- default "" .Site.LanguageCode -}}" prefix="og: https://ogp.me/ns# article: https://ogp.me/ns/article# cc: http://creativecommons.org/ns#">
|
<html lang="{{- default "" .Site.LanguageCode -}}" prefix="og: https://ogp.me/ns# article: https://ogp.me/ns/article# cc: http://creativecommons.org/ns#">
|
||||||
{{- partial "head.html" . -}}
|
{{ partial "head.html" . -}}
|
||||||
<body itemscope itemtype="https://schema.org/Blog https://schema.org/WebPage">
|
<body itemscope itemtype="https://schema.org/Blog https://schema.org/WebPage">
|
||||||
{{ partial "header.html" . -}}
|
{{ partial "header.html" . -}}
|
||||||
<main id="content">
|
{{- block "main" . }}{{- end -}}
|
||||||
{{- block "main" . }}{{- end -}}
|
|
||||||
</main>
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
<main class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
||||||
<h1 id="bookmarks" class="p-name" itemprop="name headline">My book­marks</h1>
|
<h1 id="bookmarks" class="p-name" itemprop="name headline">My book­marks</h1>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
<p><em>Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite></em></p>
|
<p><em>Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite></em></p>
|
||||||
|
@ -41,5 +41,5 @@
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
<main itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
||||||
<article class="h-entry hentry">
|
<article class="h-entry hentry">
|
||||||
<header>
|
<header>
|
||||||
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
||||||
|
@ -21,5 +21,5 @@
|
||||||
{{ partial "processed-content" . -}}
|
{{ partial "processed-content" . -}}
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="https://seirdy.one{{ .RelPermalink }}" rel="canonical">
|
<link href="https://seirdy.one{{ .RelPermalink }}" rel="canonical">
|
||||||
<link href="https://seirdy.one/webmentions/receive" rel="webmention">
|
<link href="https://seirdy.one/webmentions/receive" rel="webmention">
|
||||||
{{ if or (eq site.BaseURL "https://seirdy.one/") (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") }}
|
{{ if or (eq site.BaseURL "https://seirdy.one/") (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}}
|
||||||
<!-- IDC how much content is extracted from my pages, go knock yourself out. huge images, long snippets, whatever. -->
|
<!-- IDC how much content is extracted from my pages, go knock yourself out. huge images, long snippets, whatever. -->
|
||||||
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
|
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1">
|
||||||
{{ end }}
|
{{ end -}}
|
||||||
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne .RelPermalink "/") }} - Seirdy{{ end }}</title>
|
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne .RelPermalink "/") }} - Seirdy{{ end }}</title>
|
||||||
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||||
<meta content="{{ .Site.Author.name }}" name="author">
|
<meta content="{{ .Site.Author.name }}" name="author">
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
{{- $isHome := false -}}
|
{{- $isHome := false -}}
|
||||||
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
||||||
{{- $isHome = true -}}
|
{{- $isHome = true -}}
|
||||||
{{- end -}}
|
{{- end }}
|
||||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||||
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"{{- if $isHome -}} aria-current="page"{{- end -}}>
|
<a rel="home" itemprop="url" href="{{ .Site.BaseURL }}"{{- if $isHome }} aria-current="page"{{- end -}}>
|
||||||
{{- if $isHome -}}
|
{{- if $isHome -}}
|
||||||
<strong itemprop="name">{{ .Site.Title }}</strong>
|
<strong itemprop="name">{{ .Site.Title }}</strong>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
{{ range .Site.Menus.main -}}
|
{{ range .Site.Menus.main -}}
|
||||||
{{ $isCurrent := false }}
|
{{ $isCurrent := false }}
|
||||||
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
<li itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||||
<a href="{{ .URL }}" itemprop="url" {{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}}{{- $isCurrent = true -}} aria-current="page"{{- end -}}>
|
<a href="{{ .URL }}" itemprop="url" {{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}}{{- $isCurrent = true }} aria-current="page"{{- end -}}>
|
||||||
{{- if or $isCurrent (eq $currentPage.Section .Title) -}}
|
{{- if or $isCurrent (eq $currentPage.Section .Title) -}}
|
||||||
<strong itemprop="name">{{- .Name -}}</strong>
|
<strong itemprop="name">{{- .Name -}}</strong>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
{{ $isStandalone := false }}
|
{{- $isStandalone := false -}}
|
||||||
{{ if ne .Permalink .Site.BaseURL -}}
|
{{- if ne .Permalink .Site.BaseURL -}}
|
||||||
{{ $isStandalone = true }}
|
{{- $isStandalone = true -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
<section class="h-feed hfeed" itemscope itemtype="https://schema.org/{{ if $isStandalone }}Complete{{ end }}DataFeed">
|
<section class="h-feed hfeed" itemscope itemtype="https://schema.org/{{ if $isStandalone }}Complete{{ end }}DataFeed">
|
||||||
{{ if $isStandalone -}}
|
{{- if $isStandalone }}
|
||||||
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
|
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
|
||||||
{{ else -}}
|
{{- else }}
|
||||||
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
|
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
|
||||||
<p>Here's a selection of my best posts. To see the rest, visit <a href="/posts.html">my Posts page</a>.</p>
|
<p>Here's a selection of my best posts. To see the rest, visit <a href="/posts.html">my Posts page</a>.</p>
|
||||||
{{ end -}}
|
{{- end }}
|
||||||
<p>I edit some of these posts quite often; some are updated indefinitely. Check the "updated" timestamps.</p>
|
<p>I edit some of these posts quite often; some are updated indefinitely. Check the "updated" timestamps.</p>
|
||||||
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite></em></p>
|
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite></em></p>
|
||||||
<ol class="unstyled-list" reversed>
|
<ol class="unstyled-list" reversed>
|
||||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- range where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||||
{{- if or ($isStandalone) (.Params.featured) -}}
|
{{- if or ($isStandalone) (.Params.featured) }}
|
||||||
<li>
|
<li>
|
||||||
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
||||||
{{ if $isStandalone }}
|
{{ if $isStandalone -}}
|
||||||
<h2
|
<h2
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
<h3
|
<h3
|
||||||
{{ end }}
|
{{- end }}
|
||||||
itemprop="name headline" class="p-name entry-title">
|
itemprop="name headline" class="p-name entry-title">
|
||||||
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
||||||
{{ .Title -}}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
{{ if $isStandalone }}
|
{{ if $isStandalone -}}
|
||||||
</h2>
|
</h2>
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
</h3>
|
</h3>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
|
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
|
||||||
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||||
|
|
|
@ -1,25 +1,22 @@
|
||||||
<h2 id="part-of">Webrings</h2>
|
<h2 id="part-of">Webrings</h2>
|
||||||
|
|
||||||
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>:</p>
|
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>:</p>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Some webrings require the sending of a "Referer" header,
|
Some webrings require the sending of a "Referer" header,
|
||||||
but my site has two non-canonical mirrors. Don't add those.
|
but my site has two non-canonical mirrors. Don't add those.
|
||||||
-->
|
-->
|
||||||
{{ $refPol := "no-referrer" }}
|
{{- $refPol := "no-referrer" -}}
|
||||||
{{ if eq site.BaseURL "https://seirdy.one/" }}
|
{{- if eq site.BaseURL "https://seirdy.one/" -}}
|
||||||
{{ $refPol = "strict-origin" }}
|
{{- $refPol = "strict-origin" -}}
|
||||||
{{ end }}
|
{{ end -}}
|
||||||
<ul class="unstyled-list">
|
<ul class="unstyled-list">
|
||||||
{{ range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }}
|
{{- range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }}
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{- index $r 1 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="previous site">←</a> ·
|
<a href="{{- index $r 1 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="previous site">←</a> ·
|
||||||
<a href="{{- index $r 2 -}}">{{- index $r 0 -}}</a> ·
|
<a href="{{- index $r 2 -}}">{{- index $r 0 -}}</a> ·
|
||||||
<a href="{{- index $r 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="next site">→</a>
|
<a href="{{- index $r 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="next site">→</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>If you're part of a webring and would like me to join, just ask. I'll probably accept if joining only requires me to add hyperlinks to this page (no scripts, external content, or images), and if the ring doesn't seem to promote anything I find objectionable.</p>
|
<p>If you're part of a webring and would like me to join, just ask. I'll probably accept if joining only requires me to add hyperlinks to this page (no scripts, external content, or images), and if the ring doesn't seem to promote anything I find objectionable.</p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ define "main" }}
|
{{- define "main" -}}
|
||||||
{{ .Scratch.Set "codeIndex" 1 }}
|
{{- .Scratch.Set "codeIndex" 1 -}}
|
||||||
<div itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
<main itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
||||||
<article class="h-entry hentry">
|
<article class="h-entry hentry">
|
||||||
<header>
|
<header>
|
||||||
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<!--the "comment" class is read by a few content extractors-->
|
<!--the "comment" class is read by a few content extractors-->
|
||||||
<section class="comment" aria-labelledby="webmentions">
|
<section aria-labelledby="webmentions">
|
||||||
<h2 id="webmentions">Webmen­tions</h2>
|
<h2 id="webmentions">Webmen­tions</h2>
|
||||||
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear below after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p>
|
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear below after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p>
|
||||||
<ul class="unstyled-list">
|
<ul class="unstyled-list">
|
||||||
|
@ -67,5 +67,5 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p></p>
|
<p></p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue