From: Duje Mihanović <duje.mihanovic@skole.hr>
Date: Sat, 24 Aug 2024 14:22:23 +0000 (+0200)
Subject: Initial commit
X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f0f84ba4f81b753ed494af4e950cd546c17b426a;p=hugo-skeleton.git

Initial commit
---

f0f84ba4f81b753ed494af4e950cd546c17b426a
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8aa2645
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) [year] [fullname]
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..00e77bd
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,6 @@
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
+
diff --git a/assets/css/style.css b/assets/css/style.css
new file mode 100644
index 0000000..4bc5ab6
--- /dev/null
+++ b/assets/css/style.css
@@ -0,0 +1,52 @@
+body {
+	max-width: 1000px;
+	margin: 0 auto;
+	padding: 0 10px;
+}
+
+main {
+	line-height: 1.5;
+}
+
+nav {
+	text-align: center;
+}
+
+nav ul {
+	list-style: none;
+	padding: 0 5px;
+}
+
+nav a {
+	text-decoration: none;
+	color: #000;
+}
+
+nav a:hover {
+	text-decoration: underline;
+}
+
+nav li {
+	display: inline;
+	padding: 0 10px;
+}
+
+p {
+	margin: 1em 0;
+}
+
+ul {
+	padding: 0 2em;
+}
+
+code {
+	overflow-wrap: anywhere;
+}
+
+pre, nav {
+	overflow-x: scroll;
+}
+
+img {
+	max-width: 100%;
+}
diff --git a/content/posts/_index.md b/content/posts/_index.md
new file mode 100644
index 0000000..a7721e4
--- /dev/null
+++ b/content/posts/_index.md
@@ -0,0 +1,4 @@
+---
+title: Blog
+---
+# Posts
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..f34c8e4
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html lang="en">
+	<head>
+		{{ partial "head.html" . }}
+	</head>
+
+	<body>
+		{{ partial "nav.html" }}
+		<main>
+			{{ block "main" . }}
+			{{ end }}
+		</main>
+	</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..ec936f4
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,14 @@
+{{ define "main" }}
+{{ .Content }}
+{{ end }}
+
+{{ define "footer" }}
+<footer>
+	<p>If you appreciate my work and would like to donate, you can donate XMR to this address or use the QR code below.</p>
+	<p>85qXBHh99bJ62p7s8upmoqYsvHrJvZWLTD7riHFo3E2jRvdQRoiNuXKRaDMAQiJ34Kfix3KHouNCW6bbD4zniWB5QxZR9Xx</p>
+	{{ $image := resources.Get "img/donate.png" }}
+	{{ with $image }}
+	<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="QR code for XMR donation">
+	{{ end }}
+</footer>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..8e99f87
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,3 @@
+{{ define "main" }}
+ {{ .Content }}
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..9cfa2d0
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+{{ .Content }}
+<h2>Recent Posts</h2>
+<ul>
+	{{ range first 5 ($.Site.GetPage "/posts").Pages }}
+	<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }}</li>
+	{{ end }}
+</ul>
+<ul style="list-style: none;"><li><a href="/posts">Read all the posts</a></li></ul>
+<h2>Recently Updated Projects</h2>
+<ul>
+	{{ range first 3 ($.Site.GetPage "/projects").Pages }}
+	<li><a href="{{ .RelPermalink }}">{{ .Title }}</a>
+	{{ end }}
+</ul>
+<ul style="list-style: none;"><li><a href="/projects">See all the projects</a></li></ul>
+{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..15dd634
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,10 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="Duje Mihanović's personal website">
+<title>{{ print .Page.Title }} | {{ print .Site.Title }}</title>
+{{ $style := resources.Get "css/style.css" | resources.Minify }}
+<link rel="stylesheet" href="{{ $style.RelPermalink }}?v=1.1.3">
+{{ $index := $.Site.GetPage "/" }}
+{{ range $index.AlternativeOutputFormats }}
+{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
+{{ end }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
new file mode 100644
index 0000000..cf8baab
--- /dev/null
+++ b/layouts/partials/nav.html
@@ -0,0 +1,8 @@
+<nav>
+	<ul>
+		<li><a href="/">Home</a></li>
+		<li><a href="/posts/">Blog</a></li>
+		<li><a href="/contact/">Contact</a></li>
+		<li><a href="/donate/">Donate</a></li>
+	</ul>
+</nav>
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
new file mode 100644
index 0000000..2536415
--- /dev/null
+++ b/layouts/posts/list.html
@@ -0,0 +1,15 @@
+{{ define "main" }}
+{{ .Content }}
+<ul>
+{{ range .Pages }}
+	<li>
+		<a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }} - {{ .ReadingTime }} minute read<br>
+		{{ .Summary }}
+		{{ if .Truncated }}
+		<br>
+		<a href="{{ .RelPermalink }}">Read full article...</a>
+		{{ end }}
+	</li>
+{{ end }}
+</ul>
+{{ end }}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
new file mode 100644
index 0000000..e49cbb0
--- /dev/null
+++ b/layouts/posts/single.html
@@ -0,0 +1,12 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ <p><i>{{ .WordCount }} words, estimated reading time: {{ .ReadingTime }}
+	 minute(s)</i>
+ <br>
+ <i>Originally published on {{ .PublishDate.Format "January 2, 2006"
+	 }}</i>
+ <br>
+ <i>Last modified on {{ .Lastmod.Format "January 2, 2006" }}</i></p>
+ <p></p>
+ {{ .Content }}
+{{ end }}
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
new file mode 100644
index 0000000..9e32e3f
--- /dev/null
+++ b/layouts/projects/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+{{ .Content }}
+<ul>
+{{ range .Pages }}
+	<li>
+		<a href="{{ .RelPermalink }}">{{ .Title }}</a>
+	</li>
+{{ end }}
+</ul>
+{{ end }}
diff --git a/layouts/projects/single.html b/layouts/projects/single.html
new file mode 100644
index 0000000..17b274b
--- /dev/null
+++ b/layouts/projects/single.html
@@ -0,0 +1,4 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+{{ .Content }}
+{{ end }}
diff --git a/layouts/rss.xml b/layouts/rss.xml
new file mode 100644
index 0000000..65a962d
--- /dev/null
+++ b/layouts/rss.xml
@@ -0,0 +1,35 @@
+{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | safeHTML }}
+<feed xmlns="http://www.w3.org/2005/Atom">
+	<title>{{ .Site.Title }}</title>
+	<id>{{ .Permalink }}</id>
+	{{ $lastmod := 0 }}
+	{{ range (.Site.GetPage "/posts").Pages }}
+		{{ if gt .Lastmod $lastmod }}
+			{{ $lastmod = .Lastmod }}
+		{{ end }}
+	{{ end }}
+	<updated>{{ $lastmod.Format "2006-01-02T15:04:05Z" }}</updated>
+	<link href="{{ .Permalink }}"/>
+	<link rel="self" href="{{ (.OutputFormats.Get "RSS").Permalink }}"/>
+	<!--
+	<author>
+		<name>Duje Mihanović</name>
+		<email>duje.mihanovic@skole.hr</email>
+		<uri>{{ .Permalink }}</uri>
+	</author>-->
+	<generator uri="https://gohugo.io/">Hugo</generator>
+
+	{{ with $.Site.GetPage "posts/" }}
+	{{ range first .Site.Config.Services.RSS.Limit .Pages }}
+	<entry>
+		<id>{{ .Permalink }}</id>
+		<link rel="alternate" href="{{ .RelPermalink }}"/>
+		<title>{{ .Title }}</title>
+		<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z" }}</updated>
+		<published>{{ .PublishDate.Format "2006-01-02T15:04:05Z" }}</published>
+		<content type="html">{{ .Content | html }}</content>
+		<summary type="html">{{ .Summary | html }}</summary>
+	</entry>
+	{{ end }}
+	{{ end }}
+</feed>
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..1fe25e5
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,14 @@
+name = 'Skeleton'
+license = 'MIT'
+licenselink = 'https://git.dujemihanovic.xyz/?p=hugo-skeleton.git;a=blob;f=LICENSE'
+description = 'A very barebones theme'
+
+# The home page of the theme, where the source can be found
+homepage = 'https://git.dujemihanovic.xyz/?p=hugo-skeleton.git'
+
+# If you have a running demo of the theme
+demosite = 'https://dujemihanovic.xyz'
+
+[author]
+  name = 'Duje Mihanović'
+  homepage = 'http://dujemihanovic.xyz'