Rework Notes page: balanced two columns, filter, bibliography section, drop prev/next links
This commit is contained in:
1 parent
0699938cd5
commit
2490e8bbb1
10 files changed
+364
-30
No files matched your search
@@ -0,0 +1,45 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{- $base := .File.BaseFileName }}
|
||||
{{- $needle := printf `/%s.md"` $base }}
|
||||
{{- $needle2 := printf `"%s.md"` $base }}
|
||||
{{- $refs := slice }}
|
||||
{{- range where site.RegularPages "Section" "in" (slice "book" "article" "phdthesis" "inproceedings" "inbook" "techreport") }}
|
||||
{{- if or (strings.Contains .RawContent (printf `relref "%s.md"` $base)) (strings.Contains .RawContent (printf `/%s.md"` $base)) }}{{ $refs = $refs | append . }}{{ end }}
|
||||
{{- end }}
|
||||
{{- with $refs }}
|
||||
<section class="note-references">
|
||||
<h2>References</h2>
|
||||
<ul>
|
||||
{{- range sort . "Title" }}<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user