Compare commits

..

No commits in common. "6921dbbd080602b1f1bb8b0d480add9604bba6c5" and "60041d1d37249a91836082e799be0c3332a88af8" have entirely different histories.

6 changed files with 12 additions and 40 deletions

View File

@ -150,7 +150,7 @@ a {
transition: color 0.25s;
}
&.external-link, &.same-page-link {
&.external-link {
.feather {
fill: none;
margin-left: 0.25rem;
@ -253,7 +253,6 @@ ul.post-list {
figure {
img {
border: $standard-border;
border-radius: 0.5rem;
max-width: 70%;
display: block;
@ -283,11 +282,6 @@ figure {
&.medium img {
max-height: 30rem;
}
&.fullwide {
margin-left: 0;
margin-right: 0;
}
}
.twitter-tweet {

View File

@ -1,4 +0,0 @@
{{- .Page.Scratch.SetInMap "definedSections" (printf "#%s" .Anchor) true -}}
<h{{ .Level }} id="{{ .Anchor }}">
{{- .Text | safeHTML -}}
</h{{ .Level }}>

View File

@ -1,31 +1,13 @@
{{- $scratch := newScratch -}}
{{- $absoluteDest := absLangURL .Destination -}}
{{- $siteRootUrl := absLangURL "" -}}
{{- $isExternal := not (hasPrefix $absoluteDest $siteRootUrl) -}}
{{- $isSamePage := hasPrefix .Destination "#" -}}
{{- if $isSamePage -}}
{{- $scratch.Set "class" "same-page-link" -}}
{{- if index (.Page.Scratch.Get "definedSections") .Destination -}}
{{- $scratch.Set "icon" "arrow-up" -}}
{{- else -}}
{{- /* Do not render "down" links because don't know how to distinguish unseen titles from paragraph links. */ -}}
{{- /* $scratch.Set "icon" "arrow-down" */ -}}
{{- end -}}
{{- else if $isExternal -}}
{{- $scratch.Set "class" "external-link" -}}
{{- $scratch.Set "icon" "external-link" -}}
{{- end -}}
<a href="{{ .Destination | safeURL }}"
{{- with .Title }} title="{{ . }}"{{ end -}}
{{- with $scratch.Get "class" -}}
class="{{ . }}"
{{- end -}}
{{- if $isExternal -}}
target="_blank" rel="noopener noreferrer"
class="external-link" target="_blank" rel="noopener noreferrer"
{{- end -}}
>
{{- with .Text | safeHTML }}{{ . }}{{ end -}}
{{- with $scratch.Get "icon" -}}{{- partial "icon.html" . -}}{{- end -}}
{{- if $isExternal -}}{{- partial "icon.html" "external-link" -}}{{- end -}}
</a>
{{- /* chomp trailing newline */ -}}

View File

@ -2,8 +2,8 @@
<h2>{{ .Title }}</h2>
<div class="post-subscript">
<p>
{{- range (.GetTerms "tags") -}}
<a class="button" href="{{ .Permalink }}">{{ .Title }}</a>
{{- range .Params.tags }}
<a class="button" href="{{ $.Site.BaseURL }}/tags/{{ . | urlize }}">{{ . }}</a>
{{ end -}}
</p>
<p>{{ i18n "postedOn" (.Date.Format "January 2, 2006") }}.</p>

View File

@ -1,7 +1,7 @@
{{ define "main" }}
<h2>{{ .Title }} </h2>
<script src="{{ .Site.Params.visNetworkJsUrl }}"></script>
<script type="module" src="{{ absLangURL "graph/graph.js" }}"></script>
<script type="module" src="{{ .Site.BaseURL }}/graph/graph.js"></script>
<style>
#graph-container {
width: 100%;

View File

@ -3,18 +3,18 @@
</div>
<nav>
<div class="container">
<a href="{{ .Site.Home.Permalink }}">{{ i18n "home" }}</a>
<a href="{{ .Site.BaseURL }}">{{ i18n "home" }}</a>
<a href="{{ relref . "about" }}">{{ i18n "about" }}</a>
{{ with .Site.Params.githubUsername }}
<a href="https://github.com/{{ . }}">GitHub</a>
{{ end }}
{{ if .Site.Params.resumeStaticFile }}
<a href="{{ absLangURL .Site.Params.resumeStaticFile }}">{{ i18n "resume" }}</a>
<a href="{{ .Site.BaseURL }}/{{ .Site.Params.resumeStaticFile }}">{{ i18n "resume" }}</a>
{{ end }}
<a href="{{ site.Taxonomies.tags.Page.Permalink }}">{{ i18n "tags" }}</a>
<a href="{{ site.Taxonomies.series.Page.Permalink }}">{{ i18n "series" }}</a>
<a href="{{ relref . "favorites" }}">{{ i18n "favorites" }}</a>
<a href="{{ relref . "search" }}">{{ i18n "search" }}</a>
<a href="{{ .Site.BaseURL }}/tags">{{ i18n "tags" }}</a>
<a href="{{ .Site.BaseURL }}/series">{{ i18n "series" }}</a>
<a href="{{ .Site.BaseURL }}/favorites">{{ i18n "favorites" }}</a>
<a href="{{ .Site.BaseURL }}/search">{{ i18n "search" }}</a>
<a href="{{ relref . "blog" }}">{{ i18n "allPosts" }}</a>
</div>
</nav>