This commit is contained in:
Jakub 2024-01-28 23:53:34 -05:00
commit fa031b36a9
11 changed files with 443 additions and 0 deletions

4
archetypes/default.md Normal file
View File

@ -0,0 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
---

12
layouts/404.html Normal file
View File

@ -0,0 +1,12 @@
{{ partial "header.html" . }}
<div class="content">
<h1>Error 404: </h1>
<h2>Page Not Found</h2>
<p>The url you entered is invalid or has been deleted.</p>
<p><a class="button" href="/">Click here to return home.</a></p>
</div>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,18 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range.Data.Pages }}
<article class="post-snippet">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
</time>
</article>
{{ end }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "footer.html" . }}

12
layouts/index.html Normal file
View File

@ -0,0 +1,12 @@
{{ partial "header.html" . }}
{{ .Content }}
<h2>Recent Posts</h2>
<ul>
{{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections).ByTitle }}
<li><a href="{{ .RelPermalink }}">{{ .Title}}</a></li>
{{ end }}
</ul>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,8 @@
<footer>
<hr/>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a><br/>
<a href="/contact">[ Contact ]</a> <a href="/donate">[ Donate ]</a> <a href="/donate">[ RSS ]</a> <br/>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="stylesheet" href="/css/style.css" type="text/css" />
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
</head>
<body>
{{ partial "nav.html" . }}
<div class="content">

View File

@ -0,0 +1,23 @@
<style>
.image-gallery {overflow: auto; margin-left: -1%!important;}
.image-gallery li {float: left; display: block; margin: 0 0 1% 1%; width: 19%;}
.image-gallery li a {text-align: center; text-decoration: none!important; color: #777;}
.image-gallery li a span {display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; padding: 3px 0;}
.image-gallery li a img {width: 100%; display: block;}
</style>
{{ $dir := string .gallery_dir }}
<ul class="image-gallery">
{{ range (readDir (print "/static" $dir)) }}
{{- $image := resources.Get (printf "%s/%s" $dir .Name) -}}
{{- $imageurl := printf "%s/%s" $dir .Name -}}
{{- $imagetitle := index (split .Name ".") 0 -}}
<li>
<a href="{{ ($image.Fit "1600x1600 q50").Permalink }}" title="{{ $imagetitle }}" class="lightbox-image">
<img src="{{ ($image.Fill "300x300 q50").Permalink }}" alt="{{ $imagetitle }}" title="{{ $imagetitle }}">
<span>{{ $imagetitle }}</span>
</a>
</li>
{{ end }}
</ul>

17
layouts/partials/nav.html Normal file
View File

@ -0,0 +1,17 @@
<header class="header">
<input class="menu-btn" type="checkbox" id="menu-btn" />
<ul class="menu" >
<li>
<label class="menu-icon" for="menu-btn">
<a href="/" class="logo" >{{ .Site.Title }}</a>
</label>
<span class="menu-entries">
<a href="/" class="home-link" >Home</a>
{{ range.Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</span>
</li>
</ul>
</header>

19
readme.md Normal file
View File

@ -0,0 +1,19 @@
# Hugo Starter Theme
A simple Hugo theme. See it in action [on my website](https://jakubb.xyz)
## Getting started
Inside your project folder, copy the theme to your `themes` folder. Since you're just using it as a starter for your theme, remove the git history.
```bash
git clone https://github.com/ericmurphyxyz/hugo-starter-theme themes/your-theme-name
rm -rf themes/your-theme-name/.git
```
If you'd like some example content and an example config file to get started, you can copy the `exampleSite` directory into your root Hugo directory.
```bash
cp -r themes/your-theme-name/exampleSite/* ./
```
To learn more about building themes in Hugo, refer to Hugo's [templating documentation](https://gohugo.io/templates/).

306
static/css/style.css Normal file
View File

@ -0,0 +1,306 @@
/* modifying it for now. */
a.home-link{
display: none;
}
.logo img, .logo {
height: 24px;
}
html, body {
margin: 0;
padding: 0;
}
body {
background-color: #1d2021;
color: #ebdbb2;
font-size: 100%;
line-height: 1.5;
}
a {
color: #83a598;
text-decoration: none;
}
.content {
overflow: none;
margin: auto 5% auto 5%;
word-wrap: break-word;
/* padding-bottom: 15%; */
/* display: inline-grid; */
/* max-width: 45rem; */
/* margin-bottom: 2rem; */
/* margin: 2rem auto; */
/* padding-top: 100px; */
}
/* Lists */
.post-snippet {
margin-bottom: 1rem;
}
.post-snippet h3 {
margin-bottom: 0.25rem;
}
/* header */
.header {
background-color: #504945;
/* width: 100%; */
/* /1* position: fixed; *1/ */
/* z-index: 3; */
}
.header .menu {
margin: 0;
padding: 0;
/* /1* width: 100%; *1/ */
/* height: auto; */
position: relative;
list-style: none;
/* overflow: hidden; */
overflow: auto;
/* background-color: #a89984; */
}
.header .menu li a{
padding: 15px;
display: block;
}
.menu-entries a:hover,
.header .menu-btn:hover {
background-color: #83a598;
color: #504945;
}
.header .logo {
/* float: left; */
padding: 15px 20px;
}
/* menu */
.menu-entries {
display: block;
clear: both;
/* display: none; */
transition: max-height .2s ease-out;
}
.header .menu {
}
/* menu icon */
.logo {
cursor: pointer;
}
.header .menu-icon {
/* cursor: pointer; */
/* float: right; */
/* padding: 28px 20px; */
/* position: relative; */
/* user-select: none; */
}
/* menu btn */
.header .menu-btn {
display: none;
}
.menu .logo {
transition: 400ms;
}
footer {
/* position: fixed; */
left: 0;
/* bottom: 0; */
/* width: 100%; */
text-align: center;
/* max-height: 15%; */
padding-top; 10px;
padding-bottom: 10px;
}
footer .buttons {
margin-top: 5px;
}
footer .buttons img {
/* margin: 5px; */
display: inline-block;
max-height: 25em;
max-width: 100%;
}
/* div.content, footer{ */
/* margin-left: 0; */
/* /1* height: 1000px; *1/ */
/* } */
/* @media screen and (max-width: 900px) { */
/* ul.menu { width: 100%; */
/* height: auto; */
/* position: relative; */
/* } */
/* ul.menu li a { */
/* padding: 15px; */
/* } */
/* div.content, footer {margin-left: 0;} */
/* } */
/* .menu a { */
/* padding: 20px 30px; */
/* } */
/* ul.menu li a { */
/* float: left; */
/* } */
/* .menu-entries { */
/* float: right; */
/* } */
/* .header .menu li .menu-entries{ */
/* clear: none; */
/* align-self: right; */
/* width: auto; */
/* max-height: none; */
/* } */
/* .header .menu-icon { */
/* display: none; */
/* } */
/* } */
@media screen and (max-width: 750px) {
.header .menu-btn:checked ~ .menu li .menu-entries,
.menu li .menu-entries a.home-link {
display: block;
}
.menu-entries {
text-align: center;
float: none;
display: none;
}
.logo {
/* clear: none; */
pointer-events: none;
}
.menu-icon {
cursor: pointer;
}
.menu {
overflow: auto;
}
.header .menu-btn:checked ~ .menu .logo {
background-color:#83a598;
color: #504945;
}
.content {
margin: auto 5% auto 5%;
}
}
@media screen and (min-width: 750px) {
.menu-entries {
float: right;
}
.header .menu li a {
width: fit-content;
display: inline-block;
}
.menu-entries a {
float: left;
}
}
@media screen and (min-width: 1040px) {
/* ul.menu { */
.header {
top: 0;
width: 15%;
height: 100%;
position: fixed;
}
.menu {
height: 100%;
}
/* .header .logo { */
/* float: none; */
/* } */
/* .header .menu { */
/* clear: both; */
/* } */
.menu-entries{
float: none;
}
.menu-entries a:hover,
.header .menu-btn:hover {
color: #83a598;
background-color: #504945;
}
/* ul.menu li a { */
/* float: none; */
/* padding: 20px; */
/* } */
.content, footer {
/* margin: auto; */
padding: 1px 16px;
}
.header .menu li a {
display: block;
/* width: 100%; */
float: none;
}
.content {
margin: auto 5% auto 20%;
}
}
/* .logo { */
/* height: 28px; */
/* width: fit-content; */
/* } */
/* } */
/* .header .logo { */
/* display: block; */