fix sidebar related items exclude own item

This commit is contained in:
Wouter Groeneveld 2022-11-27 21:58:22 +01:00
parent 96bc990cf0
commit 922182442e
5 changed files with 17 additions and 14 deletions

View File

@ -6,13 +6,13 @@ html
body, h1, h2, h3, h4, article p, article li, .box-masonry .box-masonry-text p body, h1, h2, h3, h4, article p, article li, .box-masonry .box-masonry-text p
color: var(--textcolor) color: $textcolor
.copyright .copyright
color: var(--textcolor) color: $textcolor
font-size: 0.8rem font-size: 0.8rem
p.credit a p.credit a
color: var(--textcolor) color: $textcolor
.latest-all .latest-all
float: right float: right
@ -63,25 +63,26 @@ html body, h1, h2, h3, h4, h5, h6
color: grey color: grey
font-weight: bold font-weight: bold
h1, .h1 h1
color: lighten($textcolor, 10%)
font-size: 2.5rem font-size: 2.5rem
font-weight: 700 font-weight: 700
margin-bottom: 2rem margin-bottom: 2rem
margin-top: 0 margin-top: 0
h2, .h2 h2
font-size: 2rem font-size: 2rem
font-weight: 700 font-weight: 700
margin-top: 2rem margin-top: 2rem
margin-bottom: 2rem margin-bottom: 2rem
h3, .h3 h3
font-size: 1.7rem font-size: 1.7rem
font-weight: 700 font-weight: 700
margin-top: 2rem margin-top: 2rem
margin-bottom: 2rem margin-bottom: 2rem
h4, .h4 h4
font-size: 1.2rem font-size: 1.2rem
font-weight: 700 font-weight: 700

View File

@ -1,5 +1,6 @@
// can't mix both, but want to "lighten" this one dynamically // can't mix both, but want to "lighten" this one dynamically
$bglight: #f1f4dd $bglight: #f1f4dd
$textcolor: #363636
html html
--accent: #a6a57c --accent: #a6a57c
@ -7,7 +8,6 @@ html
--bglightshade: #e7ead2 --bglightshade: #e7ead2
--bgdarker: #e6ecb2 --bgdarker: #e6ecb2
--bgdark: #d7d7a3 --bgdark: #d7d7a3
--textcolor: #363636
--textlink: #b74a27 --textlink: #b74a27
--textlinktag: #5d5c43 --textlinktag: #5d5c43
--textlinkdark: #483a07 --textlinkdark: #483a07

View File

@ -9,7 +9,9 @@
{{- end -}} {{- end -}}
<h3>Featured: <em>{{ .Title }}</em> <h3>Featured: <em>{{ .Title }}</em>
<span class='pages'>(Page {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }})</span> &raquo; {{- if gt .Paginator.TotalPages 1 -}}
<span class='pages'>&nbsp;(Page {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }})</span>
{{- end -}}&nbsp;&raquo;
</h3> </h3>
<section> <section>

View File

@ -45,21 +45,21 @@
{{- $currRellink := substr .RelPermalink 0 -1 -}} {{- $currRellink := substr .RelPermalink 0 -1 -}}
{{- $currContent := .Content -}} {{- $currContent := .Content -}}
{{- $currTitle := .Title -}}
{{- $backlinks := slice -}} {{- $backlinks := slice -}}
{{- $forwardlinks := slice -}} {{- $forwardlinks := slice -}}
{{- range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") -}} {{- range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") -}}
{{- $found := findRE $currRellink .Content 1 -}} {{- $found := findRE $currRellink .Content 1 -}}
{{- if $found -}} {{- if and $found (ne .Title $currTitle) -}}
{{- $backlinks = $backlinks | append . -}} {{- $backlinks = $backlinks | append . -}}
{{- else -}} {{- else -}}
{{- $rellink := substr .RelPermalink 0 -1 -}} {{- $rellink := substr .RelPermalink 0 -1 -}}
{{- $found = findRE $rellink $currContent 1 -}} {{- $found = findRE $rellink $currContent 1 -}}
{{- if $found -}} {{- if and $found (ne .Title $currTitle) -}}
{{- $forwardlinks = $forwardlinks | append . -}} {{- $forwardlinks = $forwardlinks | append . -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- $related := append $backlinks $forwardlinks -}} {{- $related := append $backlinks $forwardlinks -}}
{{- if and .Params.Date $related -}} {{- if and .Params.Date $related -}}
<div class="sidebar-header"> <div class="sidebar-header">

View File

@ -11,10 +11,10 @@
<div class="support"> <div class="support">
<p class="p-note"> <p class="p-note">
I'm <span class="p-name">{{ .Site.Author.name }}</span>, a high-level <em class="p-job-title">Retro Gamer</em>, and I love the sight of experience points on old and forgotten hardware. I sometimes convince others to join in on the nostalgic grind. I'm <span class="p-name">{{ .Site.Author.name }}</span>, a high-level <em class="p-job-title">Retro Gamer</em>, and I love the sight of experience points on old and forgotten hardware. I sometimes convince others to join in on the nostalgic grind.
Read more <a rel="me" class="u-url" href="/about">about me here</a>. Read more <a rel="me" class="u-url" href="/about">about The Codex here</a>.
</p> </p>
<p> <p>
If you found this article amusing and/or helpful, you can <a rel="me" href="https://ko-fi.com/woutergroeneveld"><strong>buy me a coffee</strong></a> - although I'm more of a tea fan myself. I also like to hear your feedback via <a rel="me" href="{{ .Site.Author.mastodonlink }}">Mastodon</a> or e-mail: <span class="link meel">say hello</span>. Thanks! If you found this article amusing and/or helpful, you can <strong>support me</strong> via <a rel="me" href="https://www.paypal.com/donate/?hosted_button_id=R2WTKY7G9V2KQ">PayPal</a> or <a rel="me" href="https://ko-fi.com/woutergroeneveld">Ko-Fi</a>. I also like to hear your feedback via <a rel="me" href="{{ .Site.Author.mastodonlink }}">Mastodon</a> or e-mail: <span class="link meel">say hello</span>. Thanks!
</p> </p>
<noscript> <noscript>
JavaScript is disabled. I use it to obfuscate my e-mail, keeping spambots at bay. <br/> JavaScript is disabled. I use it to obfuscate my e-mail, keeping spambots at bay. <br/>