From f59b40a8e0ee3f4c808ab7b269667ab31c43c34e Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 09 Jul 2023 16:07:43 +0000
Subject: [PATCH] Merge branch 'master' into #114

---
 layouts/partials/nav.html |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 7becffa..c4efcf1 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,4 +1,4 @@
-{{- $s := .Site }}
+{{- $s := site }}
 {{- $sp := $s.Params }}
 <nav class="wrap nav menu">
 	<a href='{{ absLangURL "" }}' class="nav_brand">
@@ -31,19 +31,19 @@
 		</li>
 		{{- end }}
 		{{ $repo := $sp.source }}
+		{{ with $sp.source }}
 		<li class="nav-item nav_repo">
-			<a class="nav-link" href="{{ $repo.url }}" target="_blank">
-				{{ if $repo.iconLight }}
-					{{- $litPath := absURL ($repo.iconLight) }}
-					{{- $darkPath := absURL ($repo.iconDark) }}
+			<a class="nav-link" href="{{ .url }}" target="_blank">
+				{{ if .iconLight }}
+					{{- $litPath := absURL .iconLight }}
+					{{- $darkPath := absURL .iconDark }}
 					<picture data-lit="{{ $litPath }}" data-dark="{{ $darkPath }}">
-						<img src="{{ $litPath }}" alt="{{ $repo.name }} Repo">
+						<img src="{{ $litPath }}" alt="{{ .name }} Repo">
 					</picture>
-				{{ else }}
-					{{ $repo.name }}
-				{{ end }}
+				{{ else }}{{ .name }}{{ end }}
 			</a>
 		</li>
+		{{ end }}
 		<li class="nav-item">{{ partial "mode" . }}</li>
 	</ul>
 </nav>

--
Gitblit v1.10.0