Updates migrating previous theme to hugo-bearcub
Some checks failed
github pages / deploy (push) Failing after 2s
Some checks failed
github pages / deploy (push) Failing after 2s
This commit is contained in:
parent
1d12a76549
commit
ef8f417c6c
14 changed files with 213 additions and 26 deletions
156
assets/auto-theme.css
Normal file
156
assets/auto-theme.css
Normal file
|
|
@ -0,0 +1,156 @@
|
||||||
|
:root {
|
||||||
|
--size: 0.96rem;
|
||||||
|
--spacing: calc(var(--size) * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Nunito", "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue",
|
||||||
|
Helvetica, Arial, sans-serif;
|
||||||
|
font-size: calc(var(--size) * 1.6);
|
||||||
|
line-height: 1.45;
|
||||||
|
padding: 0 2.8rem 2.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header,
|
||||||
|
main,
|
||||||
|
footer {
|
||||||
|
max-width: 66ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
header,
|
||||||
|
footer {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mesh-wrap {
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
width: 100vw;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
pointer-events: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mesh-image {
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
max-width: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mesh-wrap-top {
|
||||||
|
height: 100px;
|
||||||
|
margin-bottom: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mesh-image-top {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-copy {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: calc(var(--size) * 3.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: calc(var(--size) * 2.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title h1 {
|
||||||
|
font-size: calc(var(--size) * 2.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a,
|
||||||
|
a.blog-tags {
|
||||||
|
margin-right: calc(var(--spacing) / 2.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:focus-visible {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.blog-posts li {
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin-block-start: calc(var(--spacing) / 2.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
body {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #1f2328;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
strong,
|
||||||
|
b {
|
||||||
|
color: #111827;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #0969da;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited,
|
||||||
|
ul.blog-posts li a:visited {
|
||||||
|
color: #8250df;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea,
|
||||||
|
input {
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
color: #1f2328;
|
||||||
|
border: 1px solid #d0d7de;
|
||||||
|
}
|
||||||
|
|
||||||
|
table,
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
border-color: #d0d7de;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
color: #24292f;
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left-color: #8c959f;
|
||||||
|
color: #57606a;
|
||||||
|
}
|
||||||
|
|
||||||
|
figcaption > p,
|
||||||
|
.helptext {
|
||||||
|
color: #57606a;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ if not .Params.menu }}
|
{{ if not .Params.menu }}
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ if not .Params.hideDate }}
|
||||||
<p class="byline">
|
<p class="byline">
|
||||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||||
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||||
|
|
@ -8,6 +9,7 @@
|
||||||
{{ with .Params.author }}· {{.}}{{ end }}
|
{{ with .Params.author }}· {{.}}{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<content>
|
<content>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</content>
|
</content>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<content>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
|
<h2>My most recent posts</h2>
|
||||||
|
<ul class="blog-posts">
|
||||||
|
{{ $max := default 3 .Site.Params.postsToShowOnIndex }}
|
||||||
|
{{ $posts := where .Site.RegularPages "Section" "posts" }}
|
||||||
|
{{ range first $max $posts.ByDate.Reverse }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><a href="/posts/">All posts →</a></p>
|
||||||
|
|
||||||
|
</content>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
5
layouts/page/presentation.html
Normal file
5
layouts/page/presentation.html
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<ul>
|
||||||
|
{{ range sort .Site.Data.presentations "date" }}
|
||||||
|
<li><a href={{ .link }}>{{ .title }} ({{ .author }})</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
<!-- A partial to be overwritten by the user.
|
{{ $autoTheme := resources.Get "auto-theme.css" | minify }}
|
||||||
Simply place a custom_head.html into
|
<link href="{{ $autoTheme.RelPermalink }}" rel="stylesheet">
|
||||||
your local /layouts/partials-directory -->
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
<small>
|
<div class="footer-copy">
|
||||||
{{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }}
|
{{ .Site.Copyright }}
|
||||||
</small>
|
{{ with .Site.Params.madeWith }} | {{ markdownify . }}{{ end }}
|
||||||
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<a class="skip-link" href="#main-content">{{ i18n "skip-link" }}</a>
|
<div class="mesh-wrap mesh-wrap-top" aria-hidden="true">
|
||||||
|
<img src="/mesh.svg" alt="" class="mesh-image mesh-image-top">
|
||||||
|
</div>
|
||||||
|
|
||||||
<a href="{{ relURL .Site.Home.RelPermalink }}" class="title"><h1>{{ .Site.Title }}</h1></a>
|
<a href="{{ relURL .Site.Home.RelPermalink }}" class="title"><h1>{{ .Site.Title }}</h1></a>
|
||||||
<nav>{{- partial "nav.html" . -}}</nav>
|
<nav>{{- partial "nav.html" . -}}</nav>
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,3 @@
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
||||||
|
|
||||||
<!-- Convert this page's translations into a dict -->
|
|
||||||
{{ $translations := dict }}
|
|
||||||
{{ range .Translations }}
|
|
||||||
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<!-- Create a link to every translation -->
|
|
||||||
{{ range where .Site.Languages "Lang" "!=" .Page.Lang }}
|
|
||||||
{{ with (index $translations .Lang) }}
|
|
||||||
<a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
|
|
||||||
{{ else }}
|
|
||||||
<!-- The complicated setup was necessary to make a grayed out link -->
|
|
||||||
{{ if not .Params.hideUntranslated }}
|
|
||||||
<a class="disabled" role="link" aria-disabled="true">{{ .LanguageName }}</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
|
||||||
6
layouts/shortcodes/code.html
Normal file
6
layouts/shortcodes/code.html
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{{ .Page.Store.Set "hasCodeBlock" true }}
|
||||||
|
{{ $lang := .Get "language" | default "" }}
|
||||||
|
{{ with .Get "title" }}
|
||||||
|
<p><strong>{{ . }}</strong></p>
|
||||||
|
{{ end }}
|
||||||
|
{{ highlight (trim .Inner "\r\n") $lang "" }}
|
||||||
1
layouts/shortcodes/fontawesome.html
Normal file
1
layouts/shortcodes/fontawesome.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<i class={{ .Get "class" }}></i>
|
||||||
6
layouts/shortcodes/img.html
Normal file
6
layouts/shortcodes/img.html
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<center>
|
||||||
|
<img {{ with .Get "src" }} src="{{ . }}"{{ end }}
|
||||||
|
{{ with .Get "width" }} width="{{ . }}"{{ end }}
|
||||||
|
{{ with .Get "max-width" }} style=" max-width:{{ . }}" {{ end }}
|
||||||
|
>
|
||||||
|
</center>
|
||||||
6
layouts/shortcodes/presentations.html
Normal file
6
layouts/shortcodes/presentations.html
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<ul>
|
||||||
|
{{ range .Site.Data.presentations }}
|
||||||
|
<li>{{ .authors }} ({{ .date }}) {{ .title }}. {{ .conference }} {{ with .link }}
|
||||||
|
<a href={{ . }}>[Link]</a>{{ end }}</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
5
layouts/shortcodes/publications.html
Normal file
5
layouts/shortcodes/publications.html
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<ul>
|
||||||
|
{{ range .Site.Data.publications }}
|
||||||
|
<li>{{ .authors }} ({{ .year }}). {{ .title }}. <em>{{ .journal }}</em> {{ .volume }}, {{ .pages }} {{ with .link }} <a href={{ . }}>[Link]</a>{{ end }}</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
0
layouts/shortcodes/recent-articles.html
Normal file
0
layouts/shortcodes/recent-articles.html
Normal file
Loading…
Add table
Add a link
Reference in a new issue