Browse Source

Remove mentionedin again

master
Jan-Lukas Else 8 months ago
parent
commit
232c15c6df
5 changed files with 3 additions and 36 deletions
  1. +1
    -1
      assets/css/style.scss
  2. +1
    -4
      i18n/de.yaml
  3. +1
    -4
      i18n/en.yaml
  4. +0
    -1
      layouts/_default/single.html
  5. +0
    -26
      layouts/partials/mentionedin.html

+ 1
- 1
assets/css/style.scss View File

@ -779,7 +779,7 @@ select {
}
/* Related articles and webmentions */
.related, .mentions, .mentionedin {
.related, .mentions {
@include subarticle-element;
@media screen and (max-width: $break1) {
min-width: 100%;


+ 1
- 4
i18n/de.yaml View File

@ -65,7 +65,4 @@
translation: Lies mir bitte vor.
- id: stopspeak
translation: Hör auf zu sprechen!
- id: mentionedin
translation: Erwähnt in
translation: Hör auf zu sprechen!

+ 1
- 4
i18n/en.yaml View File

@ -68,7 +68,4 @@
translation: Read to me, please.
- id: stopspeak
translation: Stop speaking!
- id: mentionedin
translation: Mentioned in
translation: Stop speaking!

+ 0
- 1
layouts/_default/single.html View File

@ -22,7 +22,6 @@
</div>
{{ partial "post_tags" . }}
</article>
{{ partial "mentionedin.html" . }}
{{ if (.Param "authorbox") }}{{ partialCached "authorbox" . }}{{ end }}
</main>
{{ if (and (.Param "promo") .CurrentSection.Parent) }}{{ partialCached "promo" . }}{{ end }}


+ 0
- 26
layouts/partials/mentionedin.html View File

@ -1,26 +0,0 @@
{{ if .Param "mentionedin" }}
{{ if in (.Site.Param "postSections" | default (slice "posts")) .Type }}
{{ $mentionedIn := slice }}
{{ $current := .RelPermalink }}
{{ range .Sites }}
{{ $allPages := ( where .RegularPages "Type" "in" (.Param "postSections" | default (slice "posts")) ) }}
{{ range $allPages }}
{{ if strings.Contains .RawContent $current }}
{{ $mentionedIn = $mentionedIn | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ with $mentionedIn }}
<div class="mentionedin">
<details>
<summary class="mentionedin-caption">{{ T "mentionedin" }}</summary>
<ul class="mentionedin-list">
{{ range sort . "Date" "desc" }}
<li><a href="{{ .RelPermalink }}">{{ with .Title }}{{ . }}{{ else }}{{ .Summary | truncate 60 }}{{ end }}</a> <i>{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</i></li>
{{ end }}
</ul>
</details>
</div>
{{ end }}
{{ end }}
{{ end }}

Loading…
Cancel
Save