aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-09-26 17:40:43 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-09-26 17:40:43 +0200
commit583c01de122be399dcbf200ccc3f8bb8687c2cd1 (patch)
tree8afa844c8e720fa09d70190168791bc177b4cae0 /layouts
parent9a1294965f82a112079f29447e5e04ecc1f5e4ed (diff)
Added the changes that allow for blogging
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html11
-rw-r--r--layouts/_default/taxonomy.html7
-rw-r--r--layouts/partials/header.html8
-rw-r--r--layouts/posts/page.html7
-rw-r--r--layouts/posts/section.html12
5 files changed, 38 insertions, 7 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 93eb168..19128ec 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -3,17 +3,14 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
+ <meta name="description" content="Karan Jayachandra is a signal processing engineer. He is working on algorithm development at NXP for automotive radar systems to make driving safer." />
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karanj/monochromecss/main.min.css">
+ <link rel="stylesheet" href="/main.css">
</head>
<body>
- <nav><ul>
- {{ range .Site.Menus.main }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul></nav>
+ {{partial "header.html"}}
<main>
{{ block "main" . }}{{ end }}
</main>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..c2e7875
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,7 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+ {{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+ {{ end }}
+{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..181c75e
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,8 @@
+<nav>
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="/posts">Posts</a></li>
+ <li><a href="https://gitlab.com/KaranJayachandra">Gitlab</a></li>
+ <li><a href="https://karanjayachandra.gitlab.io/cv">CV</a></li>
+ </ul>
+</nav> \ No newline at end of file
diff --git a/layouts/posts/page.html b/layouts/posts/page.html
new file mode 100644
index 0000000..dd21496
--- /dev/null
+++ b/layouts/posts/page.html
@@ -0,0 +1,7 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
+ {{ $dateHuman := .Date | time.Format "2006-01-02" }}
+ <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ {{ .Content }}
+{{ end }}
diff --git a/layouts/posts/section.html b/layouts/posts/section.html
new file mode 100644
index 0000000..eedc63e
--- /dev/null
+++ b/layouts/posts/section.html
@@ -0,0 +1,12 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+ <ul>
+ {{ range .Pages }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
+ <p>{{ .Date | time.Format "2006-01-02" }}</p>{{ .Summary }}
+ </li>
+ {{ end }}
+ </ul>
+{{ end }}