Merge pull request #167 from szpak/talksDisableLink3

Ability to disable link do talk page or provide external one
This commit is contained in:
zzossig 2020-02-14 00:22:56 +09:00 committed by GitHub
commit 510e9d8f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,11 @@
<span class="talk__date" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
{{ .PublishDate.Format (i18n "talks-dateformat") }}
</span>
<a href="{{ .Permalink }}" class="talk__title" data-title-wrap="{{ $titleWrap | default "wrap"}}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">{{ .Title }}</a>
{{ if .Params.disableLink }}
<div class="talk__title" data-title-wrap="{{ $titleWrap | default "wrap"}}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">{{ .Title }}</div>
{{ else }}
<a href="{{ if .Params.externalLink }}{{ .Params.externalLink }}{{ else }}{{ .Permalink }}{{ end }}" class="talk__title" data-title-wrap="{{ $titleWrap | default "wrap"}}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">{{ .Title }}</a>
{{ end }}
</li>
{{ end }}
</ul>
@ -45,4 +49,4 @@
</div>
{{ partial "script/archive-script" . }}
</main>
{{ end }}
{{ end }}