fix sidebar related items exclude own item
This commit is contained in:
parent
96bc990cf0
commit
922182442e
|
@ -6,13 +6,13 @@ html
|
|||
|
||||
|
||||
body, h1, h2, h3, h4, article p, article li, .box-masonry .box-masonry-text p
|
||||
color: var(--textcolor)
|
||||
color: $textcolor
|
||||
|
||||
.copyright
|
||||
color: var(--textcolor)
|
||||
color: $textcolor
|
||||
font-size: 0.8rem
|
||||
p.credit a
|
||||
color: var(--textcolor)
|
||||
color: $textcolor
|
||||
|
||||
.latest-all
|
||||
float: right
|
||||
|
@ -63,25 +63,26 @@ html body, h1, h2, h3, h4, h5, h6
|
|||
color: grey
|
||||
font-weight: bold
|
||||
|
||||
h1, .h1
|
||||
h1
|
||||
color: lighten($textcolor, 10%)
|
||||
font-size: 2.5rem
|
||||
font-weight: 700
|
||||
margin-bottom: 2rem
|
||||
margin-top: 0
|
||||
|
||||
h2, .h2
|
||||
h2
|
||||
font-size: 2rem
|
||||
font-weight: 700
|
||||
margin-top: 2rem
|
||||
margin-bottom: 2rem
|
||||
|
||||
h3, .h3
|
||||
h3
|
||||
font-size: 1.7rem
|
||||
font-weight: 700
|
||||
margin-top: 2rem
|
||||
margin-bottom: 2rem
|
||||
|
||||
h4, .h4
|
||||
h4
|
||||
font-size: 1.2rem
|
||||
font-weight: 700
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// can't mix both, but want to "lighten" this one dynamically
|
||||
$bglight: #f1f4dd
|
||||
$textcolor: #363636
|
||||
|
||||
html
|
||||
--accent: #a6a57c
|
||||
|
@ -7,7 +8,6 @@ html
|
|||
--bglightshade: #e7ead2
|
||||
--bgdarker: #e6ecb2
|
||||
--bgdark: #d7d7a3
|
||||
--textcolor: #363636
|
||||
--textlink: #b74a27
|
||||
--textlinktag: #5d5c43
|
||||
--textlinkdark: #483a07
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
{{- end -}}
|
||||
|
||||
<h3>Featured: <em>{{ .Title }}</em>
|
||||
<span class='pages'>(Page {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }})</span> »
|
||||
{{- if gt .Paginator.TotalPages 1 -}}
|
||||
<span class='pages'> (Page {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }})</span>
|
||||
{{- end -}} »
|
||||
</h3>
|
||||
|
||||
<section>
|
||||
|
|
|
@ -45,21 +45,21 @@
|
|||
|
||||
{{- $currRellink := substr .RelPermalink 0 -1 -}}
|
||||
{{- $currContent := .Content -}}
|
||||
{{- $currTitle := .Title -}}
|
||||
{{- $backlinks := slice -}}
|
||||
{{- $forwardlinks := slice -}}
|
||||
{{- range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") -}}
|
||||
{{- $found := findRE $currRellink .Content 1 -}}
|
||||
{{- if $found -}}
|
||||
{{- if and $found (ne .Title $currTitle) -}}
|
||||
{{- $backlinks = $backlinks | append . -}}
|
||||
{{- else -}}
|
||||
{{- $rellink := substr .RelPermalink 0 -1 -}}
|
||||
{{- $found = findRE $rellink $currContent 1 -}}
|
||||
{{- if $found -}}
|
||||
{{- if and $found (ne .Title $currTitle) -}}
|
||||
{{- $forwardlinks = $forwardlinks | append . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $related := append $backlinks $forwardlinks -}}
|
||||
{{- if and .Params.Date $related -}}
|
||||
<div class="sidebar-header">
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<div class="support">
|
||||
<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.
|
||||
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>
|
||||
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>
|
||||
<noscript>
|
||||
JavaScript is disabled. I use it to obfuscate my e-mail, keeping spambots at bay. <br/>
|
||||
|
|
Loading…
Reference in New Issue