Skip to content

Commit

Permalink
chore: saving files before refreshing line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-sid committed Apr 25, 2023
1 parent 025de05 commit 1cddbee
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 136 deletions.
4 changes: 2 additions & 2 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{ define "main"}}
<main class="wrapper" aria-label="Content">
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist...</p>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist...</p>
</main>
{{ end }}
52 changes: 27 additions & 25 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body data-theme = "{{ .Site.Params.defaultColor }}" class="notransition">
{{- partial "scriptsBodyStart.html" . -}}
{{- partial "header.html" . -}}
<div class="wrapper">
{{ partial "bio" . }}
<main aria-label="Content">
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
{{/* Show last 5 posts in reverse date order */}}
{{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $posts := $pagesToShow.ByDate.Reverse }}
{{ range first 5 $posts }}
{{ partial "postCard" . }}
{{ end }}
{{ if gt (len $posts) 5 }}
<p>
<a href="/posts/">See all posts</a>
</p>
{{ end }}
</main>
</div>
{{- partial "footer.html" . -}}
{{- partial "scriptsBodyEnd.html" . -}}
</body>
</html>
{{- partial "head.html" . -}}

<body data-theme="{{ .Site.Params.defaultColor }}" class="notransition">
{{- partial "scriptsBodyStart.html" . -}}
{{- partial "header.html" . -}}
<div class="wrapper">
{{ partial "bio" . }}
<main aria-label="Content">
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
{{/* Show last 5 posts in reverse date order */}}
{{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $posts := $pagesToShow.ByDate.Reverse }}
{{ range first 5 $posts }}
{{ partial "postCard" . }}
{{ end }}
{{ if gt (len $posts) 5 }}
<p>
<a href="/posts/">See all posts</a>
</p>
{{ end }}
</main>
</div>
{{- partial "footer.html" . -}}
{{- partial "scriptsBodyEnd.html" . -}}
</body>

</html>
5 changes: 2 additions & 3 deletions layouts/partials/bio.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<div class="author">
{{ with $image }}
{{ $image := $image.Fill "100x100 webp" }}
<img class="author-avatar"
src="{{ $image.RelPermalink }}"
alt="{{ $avatar_img_alt }}" width="{{ .Width }}" height="{{ .Height }}" />
<img class="author-avatar" src="{{ $image.RelPermalink }}" alt="{{ $avatar_img_alt }}" width="{{ .Width }}"
height="{{ .Height }}" />
{{ end }}
<h2 class="author-name">{{ .Site.Params.author.intro }}</h2>
<p class="author-bio">{{ .Site.Params.author.description }}</p>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
theme on
<a href="https://gohugo.io" target="_blank" rel="noreferrer noopener">Hugo</a>.
</small>
</footer>
</footer>
60 changes: 30 additions & 30 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
<head>
{{ partial "meta/main.html" . }}
{{ hugo.Generator }}
{{ partial "meta/main.html" . }}
{{ hugo.Generator }}

{{/* <!-- Permalink & RSSlink --> */}}
{{/* <!-- Permalink & RSSlink --> */}}

<link rel="canonical" href="{{ .Permalink }}">
{{- with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}">
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}">
{{- end -}}
<link rel="canonical" href="{{ .Permalink }}">
{{- with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}">
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}">
{{- end -}}

{{/* Styles */}}
{{/* Styles */}}

{{- $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint -}}
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{- $code_syntax_highlight_css := resources.Get "code-highlight.css" | minify | fingerprint -}}
<link href="{{ $code_syntax_highlight_css.RelPermalink }}" rel="stylesheet">
{{- $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint -}}
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{- $code_syntax_highlight_css := resources.Get "code-highlight.css" | minify | fingerprint -}}
<link href="{{ $code_syntax_highlight_css.RelPermalink }}" rel="stylesheet">

{{/* Favicons */}}
{{/* Favicons */}}

<link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png">
<link rel="manifest" href="/images/favicon/site.webmanifest">
<link rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/images/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="/images/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png">
<link rel="manifest" href="/images/favicon/site.webmanifest">
<link rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/images/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="/images/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">

{{/* SVG favicon for the modern web */}}
<link rel="icon" type="image/svg+xml" href="/images/favicon/favicon.svg">
{{/* SVG favicon for the modern web */}}
<link rel="icon" type="image/svg+xml" href="/images/favicon/favicon.svg">

{{/* Katex support (enabled on on specific pages). See 'helpers/katex.html' for more info. */}}
{{/* Katex support (enabled on on specific pages). See 'helpers/katex.html' for more info. */}}

{{- if or .Params.math .Site.Params.math }}{{ partial "helpers/katex.html" . -}}{{- end -}}
{{- if or .Params.math .Site.Params.math }}{{ partial "helpers/katex.html" . -}}{{- end -}}

{{/* Google analytics script. See config.toml to enable/disable this. */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
{{/* Google analytics script. See config.toml to enable/disable this. */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
{{ template "_internal/google_analytics.html" . }}
{{- end -}}
{{- end -}}

</head>
84 changes: 41 additions & 43 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
<div class="navbar" role="navigation">
<nav class="menu" aria-label="Main Navigation">
<a href="/" class="logo">
{{ partial "svgs/home.svg" (dict "height" 25 "width" 25) . }}
</a>
<input type="checkbox" id="menu-trigger" class="menu-trigger" />
<label for="menu-trigger">
<span class="menu-icon">
{{ partial "svgs/menu.svg" (dict "height" 25 "width" 25) . }}
</span>
</label>
<nav class="menu" aria-label="Main Navigation">
<a href="/" class="logo">
{{ partial "svgs/home.svg" (dict "height" 25 "width" 25) . }}
</a>
<input type="checkbox" id="menu-trigger" class="menu-trigger" />
<label for="menu-trigger">
<span class="menu-icon">
{{ partial "svgs/menu.svg" (dict "height" 25 "width" 25) . }}
</span>
</label>

<div class="trigger">
<ul class="trigger-container">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a
class="menu-link {{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }}"
href="{{ .URL }}">
{{ .Name }}
</a>
{{ if .HasChildren }}
<ul>
{{ range .Children }}
<li>
<a
class="menu-link {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"
href="{{ .URL }}">
{{ .Name }}
<div class="trigger">
<ul class="trigger-container">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a class="menu-link {{ if or ($currentPage.IsMenuCurrent " main" .)
($currentPage.HasMenuCurrent "main" .) }}active{{ end }}" href="{{ .URL }}">
{{ .Name }}
</a>
</li>
{{ if .HasChildren }}
<ul>
{{ range .Children }}
<li>
<a class="menu-link {{ if $currentPage.IsMenuCurrent " main" . }}active{{ end }}"
href="{{ .URL }}">
{{ .Name }}
</a>
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
<li class="menu-separator">
<span>|</span>
</li>
</ul>
<a id="mode" href="#">
{{ partial "svgs/sun.svg" (dict "height" 21 "width" 21 "class" "mode-sunny" "title" "LIGHT") . }}
{{ partial "svgs/sun.svg" (dict "height" 21 "width" 21 "class" "mode-moon" "title" "DARK") . }}
</a>
</div>
</nav>
<li class="menu-separator">
<span>|</span>
</li>
</ul>
<a id="mode" href="#">
{{ partial "svgs/sun.svg" (dict "height" 21 "width" 21 "class" "mode-sunny" "title" "LIGHT") . }}
{{ partial "svgs/sun.svg" (dict "height" 21 "width" 21 "class" "mode-moon" "title" "DARK") . }}
</a>
</div>
</nav>
</div>
28 changes: 8 additions & 20 deletions layouts/partials/helpers/katex.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css"
integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css"
integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous" />

<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script
defer
src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js"
integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4"
crossorigin="anonymous"
></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js"
integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4"
crossorigin="anonymous"></script>

<!-- To automatically render math in text elements, include the auto-render extension: -->
<script
defer
src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js"
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05"
crossorigin="anonymous"
onload="renderMathInElement(document.body, {
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js"
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false}
]
});"
></script>
});"></script>
2 changes: 1 addition & 1 deletion layouts/partials/meta/main.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{{ partial "meta/standard.html" . }}
{{ partial "meta/post.html" . }}
{{ partial "meta/post.html" . }}
2 changes: 1 addition & 1 deletion layouts/partials/meta/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
}
}
</script>
{{ end }}
{{ end }}
16 changes: 8 additions & 8 deletions layouts/partials/postCard.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<article class="post-item">
<h4 class="post-item-title">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h4>
{{/* format date string to create an ISO 8601 string */}}
{{ $ISO_date := "2006-01-02T15:04:05Z0700" }}
<time class="post-item-meta" datetime="{{ dateFormat $ISO_date .Date }}">
{{ .Date | time.Format ":date_medium" }}
</time>
<h4 class="post-item-title">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h4>
{{/* format date string to create an ISO 8601 string */}}
{{ $ISO_date := "2006-01-02T15:04:05Z0700" }}
<time class="post-item-meta" datetime="{{ dateFormat $ISO_date .Date }}">
{{ .Date | time.Format ":date_medium" }}
</time>
</article>
5 changes: 3 additions & 2 deletions layouts/partials/socialIcons.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- range . }}
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me"
title="{{ (.title | default .name) | title }}">
{{ partial "svgs/svgs.html" . }}
</a>
{{- end }}
{{- end }}

0 comments on commit 1cddbee

Please sign in to comment.