mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-12 16:47:24 +01:00
Fix fallback page titles
This commit is contained in:
parent
b405fe2994
commit
510df4bec1
8 changed files with 33 additions and 9 deletions
|
@ -451,6 +451,10 @@ figure {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
|
a:before {
|
||||||
|
content: '' !important;
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
color: lch(60% 60 var(--accentHue));
|
color: lch(60% 60 var(--accentHue));
|
||||||
margin-right: 0.3rem;
|
margin-right: 0.3rem;
|
||||||
|
|
|
@ -3,5 +3,14 @@ date: "2009-07-11T21:35:33Z"
|
||||||
tags:
|
tags:
|
||||||
- imported
|
- imported
|
||||||
- from-twitter
|
- from-twitter
|
||||||
|
type: repost
|
||||||
|
repostOf: http://homepage.ntlworld.com/keir.clarke/nsfw.htm
|
||||||
|
references:
|
||||||
|
- url: http://homepage.ntlworld.com/keir.clarke/nsfw.htm
|
||||||
|
archiveURL: https://web.archive.org/web/20090715070455/https://homepage.ntlworld.com/keir.clarke/nsfw.htm
|
||||||
|
name: NSFW Map
|
||||||
|
date: 2009-07-15
|
||||||
---
|
---
|
||||||
Yay for being purile\! http://homepage.ntlworld.com/keir.clarke/nsfw.htm
|
Yay for being purile![^1]
|
||||||
|
|
||||||
|
[^1]: Here in 2024 even the archived version of that site is pretty broken; it rotates through ~100 comically "NSFW" placenames around the world, showing them on what was once a Google map.
|
||||||
|
|
|
@ -3,5 +3,6 @@ date: "2009-07-11T23:36:38Z"
|
||||||
tags:
|
tags:
|
||||||
- imported
|
- imported
|
||||||
- from-twitter
|
- from-twitter
|
||||||
|
- maps
|
||||||
---
|
---
|
||||||
Anyone know where I can find a monochrome land/sea mercator projection map of the world in SVG, pref lat ±85º?
|
Anyone know where I can find a monochrome land/sea mercator projection map of the world in SVG, pref lat ±85º?
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<li class="post-item">
|
<li class="post-item">
|
||||||
<a href="{{.RelPermalink}}">
|
<a href="{{.RelPermalink}}">
|
||||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||||
<span class="post-title">{{ partial "fallbacktitle.txt" . }}</span>
|
<span class="post-title">{{ partial "page-title.txt" . }}</span>
|
||||||
<span class="post-day">
|
<span class="post-day">
|
||||||
{{ if .Site.Params.dateformShort }}
|
{{ if .Site.Params.dateformShort }}
|
||||||
{{ .Date.Format .Site.Params.dateformShort }}
|
{{ .Date.Format .Site.Params.dateformShort }}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{{ if .Title -}}
|
|
||||||
{{- .Title -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Type | singularize | title }} from {{ partial "year-relative-date.txt" .Date -}}
|
|
||||||
{{- end -}}
|
|
|
@ -26,7 +26,7 @@
|
||||||
{{- if .IsHome -}}
|
{{- if .IsHome -}}
|
||||||
{{- $.Site.Title -}}
|
{{- $.Site.Title -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- if .Title -}}{{- .Title -}}{{- else -}}Untitled {{ $.Type | singularize -}}{{- end -}}, {{ $.Site.Title -}}
|
{{ partial "page-title.txt" . }}, {{ $.Site.Title -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</title>
|
</title>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
15
layouts/partials/page-title.txt
Normal file
15
layouts/partials/page-title.txt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{{- define "partials/fallback-title.txt" -}}
|
||||||
|
{{- .Type | singularize | title }} from {{ partial "year-relative-date.txt" .Date -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Title -}}
|
||||||
|
{{- .Title -}}
|
||||||
|
{{- else if or .Params.bookmarkOf .Params.repostOf -}}
|
||||||
|
{{- $ref := partial "reference.obj" (dict "url" (.Params.bookmarkOf | default .Params.repostOf) "references" .Params.references) -}}
|
||||||
|
{{- if $ref -}}
|
||||||
|
Comments on '{{ $ref.name }}'
|
||||||
|
{{- else -}}
|
||||||
|
{{- partial "partials/fallback-title.txt" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- partial "partials/fallback-title.txt" . -}}
|
||||||
|
{{- end -}}
|
|
@ -18,7 +18,7 @@
|
||||||
{{- if and (not $reference.name) (strings.HasPrefix $url "/") -}}
|
{{- if and (not $reference.name) (strings.HasPrefix $url "/") -}}
|
||||||
{{- $other := site.GetPage $url -}}
|
{{- $other := site.GetPage $url -}}
|
||||||
{{- if and $other $other.Page -}}
|
{{- if and $other $other.Page -}}
|
||||||
{{- $reference = dict "name" (partial "fallbacktitle.txt" $other.Page) "type" $other.Page.Type "internal" true -}}
|
{{- $reference = dict "name" (partial "page-title.txt" $other.Page) "type" $other.Page.Type "internal" true -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partial "svg.html" (dict "name" .svg) }} {{ .phrase }}{{" "}}
|
{{ partial "svg.html" (dict "name" .svg) }} {{ .phrase }}{{" "}}
|
||||||
|
|
Loading…
Reference in a new issue