mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +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>
|
||||
<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">
|
||||
{{ partial "header.html" . -}}
|
||||
<main id="content">
|
||||
{{- block "main" . }}{{- end -}}
|
||||
</main>
|
||||
{{- block "main" . }}{{- end -}}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ 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>
|
||||
{{ .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>
|
||||
|
@ -41,5 +41,5 @@
|
|||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ 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">
|
||||
<header>
|
||||
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
||||
|
@ -21,5 +21,5 @@
|
|||
{{ partial "processed-content" . -}}
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://seirdy.one{{ .RelPermalink }}" rel="canonical">
|
||||
<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. -->
|
||||
<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>
|
||||
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||
<meta content="{{ .Site.Author.name }}" name="author">
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
{{- $isHome := false -}}
|
||||
{{- if eq $currentPage.Permalink .Site.BaseURL -}}
|
||||
{{- $isHome = true -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<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 -}}
|
||||
<strong itemprop="name">{{ .Site.Title }}</strong>
|
||||
{{- else -}}
|
||||
|
@ -18,7 +18,7 @@
|
|||
{{ range .Site.Menus.main -}}
|
||||
{{ $isCurrent := false }}
|
||||
<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) -}}
|
||||
<strong itemprop="name">{{- .Name -}}</strong>
|
||||
{{- else -}}
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
{{ $isStandalone := false }}
|
||||
{{ if ne .Permalink .Site.BaseURL -}}
|
||||
{{ $isStandalone = true }}
|
||||
{{ end }}
|
||||
{{- $isStandalone := false -}}
|
||||
{{- if ne .Permalink .Site.BaseURL -}}
|
||||
{{- $isStandalone = true -}}
|
||||
{{- end -}}
|
||||
<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>
|
||||
{{ else -}}
|
||||
{{- else }}
|
||||
<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>
|
||||
{{ end -}}
|
||||
{{- end }}
|
||||
<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>
|
||||
<ol class="unstyled-list" reversed>
|
||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- if or ($isStandalone) (.Params.featured) -}}
|
||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||
{{- if or ($isStandalone) (.Params.featured) }}
|
||||
<li>
|
||||
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
||||
{{ if $isStandalone }}
|
||||
{{ if $isStandalone -}}
|
||||
<h2
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
<h3
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
itemprop="name headline" class="p-name entry-title">
|
||||
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
||||
{{ .Title -}}
|
||||
{{ .Title }}
|
||||
</a>
|
||||
{{ if $isStandalone }}
|
||||
{{ if $isStandalone -}}
|
||||
</h2>
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
</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
|
||||
<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>
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
<h2 id="part-of">Webrings</h2>
|
||||
|
||||
<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,
|
||||
but my site has two non-canonical mirrors. Don't add those.
|
||||
-->
|
||||
{{ $refPol := "no-referrer" }}
|
||||
{{ if eq site.BaseURL "https://seirdy.one/" }}
|
||||
{{ $refPol = "strict-origin" }}
|
||||
{{ end }}
|
||||
{{- $refPol := "no-referrer" -}}
|
||||
{{- if eq site.BaseURL "https://seirdy.one/" -}}
|
||||
{{- $refPol = "strict-origin" -}}
|
||||
{{ end -}}
|
||||
<ul class="unstyled-list">
|
||||
{{ range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }}
|
||||
<li>
|
||||
<p>
|
||||
<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 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="next site">→</a>
|
||||
</p>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }}
|
||||
<li>
|
||||
<p>
|
||||
<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 3 -}}" rel="nofollow ugc" referrerpolicy="{{ $refPol }}" aria-label="next site">→</a>
|
||||
</p>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ define "main" }}
|
||||
{{ .Scratch.Set "codeIndex" 1 }}
|
||||
<div itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
{{- define "main" -}}
|
||||
{{- .Scratch.Set "codeIndex" 1 -}}
|
||||
<main itemprop="blogPost mainEntity" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<article class="h-entry hentry">
|
||||
<header>
|
||||
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
||||
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
</article>
|
||||
<!--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>
|
||||
<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">
|
||||
|
@ -67,5 +67,5 @@
|
|||
</ul>
|
||||
<p></p>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue