List of publications: nicer links
This commit is contained in:
1 parent
23fc8a95cc
commit
eaa0af474b
5 files changed
+21
-12
No files matched your search
@@ -6,6 +6,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $links -}}
|
{{- with $links -}}
|
||||||
<div class="post-meta pub-links{{ with $class }} {{ . }}{{ end }}" style="margin-top:0.35em;">
|
<div class="post-meta pub-links{{ with $class }} {{ . }}{{ end }}" style="margin-top:0.35em;">
|
||||||
{{ delimit . " <span class=\"more-meta\">·</span> " | safeHTML }}
|
{{ delimit . " <span class=\"pub-sep\">·</span> " | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $links := slice -}}
|
{{- $links := slice -}}
|
||||||
{{- with $page }}{{ $links = $links | append (printf "<a href=\"%s\">Page</a>" .RelPermalink) }}{{ end -}}
|
|
||||||
|
|
||||||
{{- $pdf := "" -}}
|
{{- $pdf := "" -}}
|
||||||
{{- if $page }}
|
{{- if $page }}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
{{- $depth := len $segments -}}
|
{{- $depth := len $segments -}}
|
||||||
|
|
||||||
{{- if eq $depth 1 -}}
|
{{- if eq $depth 1 -}}
|
||||||
{{/* Research root: data-driven publication list, no visible title or intro. */}}
|
{{/* Research root: optional intro (content of _index.md), then data-driven publication list. */}}
|
||||||
|
{{- with .Content }}<div class="post-content">{{ . }}</div>{{ end -}}
|
||||||
|
|
||||||
{{- $pubs := hugo.Data.publications.publications -}}
|
{{- $pubs := hugo.Data.publications.publications -}}
|
||||||
{{- $groups := slice
|
{{- $groups := slice
|
||||||
|
|||||||
+3
-7
@@ -1,16 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Remove content/<section>/*.md (zettels and bibliography) whose org source in ~/Cloud/brain no longer exists.
|
# Remove content/zettels/*.md whose org source in ~/Cloud/brain no longer exists.
|
||||||
# Dry run by default; pass --delete to actually remove files.
|
# Dry run by default; pass --delete to actually remove files.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
brain=~/Cloud/brain
|
brain=~/Cloud/brain
|
||||||
content="$(cd "$(dirname "$0")" && pwd)/content"
|
zet="$(cd "$(dirname "$0")" && pwd)/content/zettels"
|
||||||
sections=(zettels book phdthesis inbook techreport article inproceedings websites)
|
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
for section in "${sections[@]}"; do
|
for md in "$zet"/*.md; do
|
||||||
for md in "$content/$section"/*.md; do
|
|
||||||
[[ -e $md ]] || continue
|
|
||||||
name=$(basename "$md" .md)
|
name=$(basename "$md" .md)
|
||||||
[[ $name == _index ]] && continue
|
[[ $name == _index ]] && continue
|
||||||
if [[ ! -f "$brain/$name.org" ]]; then
|
if [[ ! -f "$brain/$name.org" ]]; then
|
||||||
@@ -19,7 +16,6 @@ for section in "${sections[@]}"; do
|
|||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $count -eq 0 ]]; then
|
if [[ $count -eq 0 ]]; then
|
||||||
echo "No orphans."
|
echo "No orphans."
|
||||||
|
|||||||
+15
-2
@@ -28,9 +28,13 @@
|
|||||||
color: #8a8a8a;
|
color: #8a8a8a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pub-title,
|
/* Title in the default text color, and in the link color when it links to a page */
|
||||||
a.pub-title {
|
.pub-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.pub-title {
|
||||||
color: hsl(232, 61%, 64%);
|
color: hsl(232, 61%, 64%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +63,11 @@ a.pub-title:hover {
|
|||||||
|
|
||||||
.pub-links a {
|
.pub-links a {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
color: #c05b4d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pub-links a:hover {
|
||||||
|
border-bottom: 1px solid #c05b4d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
@@ -66,3 +75,7 @@ a.pub-title:hover {
|
|||||||
min-width: 2.4em;
|
min-width: 2.4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pub-sep {
|
||||||
|
color: #8a8a8a;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user