Browse Source
Squashed commit of the following: commitmaster7e2125d97c
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:48:55 2025 -0400 footer and header li are the same; footer ul has 0 padding commit439f60d79f
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:44:48 2025 -0400 add 404 page commit6b326600c6
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:41:05 2025 -0400 img instead of image for variable shadowing commit885195eb80
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:40:47 2025 -0400 article has optional date commita64ea83de0
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:40:26 2025 -0400 add # prefix to tags commitbb07d1a9cd
Author: Alexander Avery <alex.avery@beetbox.io> Date: Fri May 30 13:37:38 2025 -0400 flex-start article groups and increase size commit715a99dbaf
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 17:33:14 2025 -0400 using image.html partial in authors/list.html; resize image in article-alt.html commit04db016788
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 15:18:04 2025 -0400 fit images in main to 100% width commit27dc432d65
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 15:12:14 2025 -0400 fix list to include images; introduce hideDate parameter commit165bcfcef7
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:48:56 2025 -0400 using article-group class and adding shadow class commit0f8172ef84
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:48:38 2025 -0400 reorganize css commit44661d9bff
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:29:57 2025 -0400 fix typo in image.html context commit7b710f1fd2
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:29:43 2025 -0400 add header info to authors/list.html commit9676f08755
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:29:23 2025 -0400 add index class to article.html commit178fa4dda0
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 14:28:16 2025 -0400 article-alternate for authors commit32b1417bd7
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 13:45:44 2025 -0400 begin author pages commitdec98241de
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 13:45:17 2025 -0400 refactor articles commitfeb576b1a6
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 13:22:55 2025 -0400 visual articles on home page commitc8d14f6d52
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 12:06:45 2025 -0400 formatting main.css commit783c338d23
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 11:59:00 2025 -0400 more css styling commitfbd8eb6b34
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 11:58:43 2025 -0400 site logo is a link commit0d3ee84cf9
Author: Alexander Avery <alex.avery@beetbox.io> Date: Thu May 29 11:58:16 2025 -0400 add rss feed to head.html commitb0945f9774
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 22:52:25 2025 -0400 add many styles commit1d0e3b74c4
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 22:52:18 2025 -0400 add div to header layout commita45a3a6b92
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:47:28 2025 -0400 configurable footer links with menu.html commit96536988e0
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:45:27 2025 -0400 include site logo if available commitf963a16109
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:44:26 2025 -0400 add explicit favicon commitf28a9ba7e9
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:11:39 2025 -0400 fix image.html shortcode to use image.html partial commitbd91ccffe9
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:08:28 2025 -0400 correctly use slice for classes argument commit7ebf7c33af
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 15:08:13 2025 -0400 better whitespace in image.html commit14827e7d97
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:52:41 2025 -0400 remove redundant <hr> from footer commit8fa9a9b673
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:52:28 2025 -0400 added image partial commit8978136c39
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:24:20 2025 -0400 include author and Posted prefix for single.html commitfca23d88f3
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:17:40 2025 -0400 adjust single.html date and list.html section commit49ce264c7e
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:10:40 2025 -0400 overwrite layout for home.html commit83b7ba1bfe
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:10:20 2025 -0400 url instead of pageRef for remote link commit4db3d6fec7
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:10:02 2025 -0400 hugo mod init commitbd1ca1f959
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 14:09:53 2025 -0400 temporary image shortcode commitb047841821
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:49:42 2025 -0400 update footer.html commita82d81531d
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:45:32 2025 -0400 example site configuration commite742e18a22
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:43:25 2025 -0400 remove taxonomy terms commiteac8874177
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:42:45 2025 -0400 update LICENSE; update theme.toml settings commit5aad5b82c1
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:38:23 2025 -0400 remove js commitebd14a6a64
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:37:09 2025 -0400 remove content directory commit269941d029
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:36:49 2025 -0400 hugo new theme commit323cb72d81
Author: Alexander Avery <alex.avery@beetbox.io> Date: Wed May 28 13:34:45 2025 -0400 remove old files
33 changed files with 574 additions and 453 deletions
@ -0,0 +1,5 @@ |
|||
+++ |
|||
title = '{{ replace .File.ContentBaseName "-" " " | title }}' |
|||
date = {{ .Date }} |
|||
draft = true |
|||
+++ |
@ -0,0 +1,203 @@ |
|||
:root { |
|||
--beetbox-red: #9e0008; |
|||
--beetbox-pink: #d93370; |
|||
--beetbox-purple: #ac65cb; |
|||
--beetbox-green: #003f56; |
|||
--beetbox-blue: #5fcfd0; |
|||
--light: #F8F8FF; |
|||
--background: #1f2835; |
|||
--text: var(--light); |
|||
--links: var(--beetbox-blue); |
|||
--link-hover: var(--beetbox-pink); |
|||
--header: #F8F8FFCC; |
|||
--header-link: #5C2673; /* darker beetbox-purple */ |
|||
} |
|||
|
|||
body { |
|||
background-color: var(--background); |
|||
color: var(--text); |
|||
font-family: sans-serif; |
|||
line-height: 1.5; |
|||
padding: 0; |
|||
margin: 0; |
|||
} |
|||
|
|||
a { |
|||
color: var(--links); |
|||
text-decoration: none; |
|||
} |
|||
|
|||
a:visited, a:hover { |
|||
color: var(--link-hover); |
|||
text-decoration: underline; |
|||
} |
|||
|
|||
p { |
|||
margin-bottom: 1.5rem; |
|||
} |
|||
|
|||
header div, main, footer { |
|||
max-width: 1200px; |
|||
margin: 0 auto; |
|||
padding: 1rem; |
|||
} |
|||
|
|||
/* Header */ |
|||
header { |
|||
background-color: var(--header); |
|||
box-shadow: 0 5px 10px black; |
|||
} |
|||
|
|||
header div { |
|||
display: flex; |
|||
align-items: baseline; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
header ul, footer ul { |
|||
margin: 0; |
|||
} |
|||
|
|||
header a { |
|||
color: var(--header-link); |
|||
} |
|||
|
|||
header li, footer li { |
|||
display: inline; |
|||
font-weight: 600; |
|||
margin-right: 8px; |
|||
} |
|||
|
|||
/* Responsive */ |
|||
@media (max-width: 700px) { |
|||
aside.index-articles { |
|||
display: none; |
|||
} |
|||
} |
|||
|
|||
main img { |
|||
max-width: 100%; |
|||
} |
|||
|
|||
/* Article Lists */ |
|||
.article-group { |
|||
display: flex; |
|||
flex-direction: row; |
|||
flex-wrap: wrap; |
|||
gap: 20px; |
|||
} |
|||
|
|||
.index-articles { |
|||
justify-content: flex-end; |
|||
} |
|||
|
|||
.author-articles { |
|||
justify-content: flex-start; |
|||
} |
|||
|
|||
.index-articles aside { |
|||
flex-shrink: 4; |
|||
} |
|||
|
|||
section.index { |
|||
display: flex; |
|||
flex-direction: row; |
|||
} |
|||
|
|||
section.index aside { |
|||
flex-shrink: 4; |
|||
} |
|||
|
|||
/* Article Cards */ |
|||
article { |
|||
background-color: #111; |
|||
border-radius: 10px; |
|||
padding: 1rem; |
|||
} |
|||
|
|||
article.index { |
|||
width: 300px; |
|||
height: 485px; |
|||
} |
|||
|
|||
article.index img { |
|||
height: 50%; |
|||
width: 100%; |
|||
border-radius: 10px; |
|||
object-fit: cover; |
|||
} |
|||
|
|||
article.index h3 { |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
|
|||
article.alt { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
gap: 8px; |
|||
justify-content: space-evenly; |
|||
align-items: center; |
|||
} |
|||
|
|||
article.alt img { |
|||
border-radius: 50%; |
|||
height: 256px; |
|||
width: 256px; |
|||
} |
|||
|
|||
/* Images */ |
|||
img.featured, img.author { |
|||
display: block; |
|||
border-radius: 8px; |
|||
margin: 12px 0; |
|||
object-fit: cover; |
|||
max-height: 500px; |
|||
} |
|||
|
|||
/* Code Blocks */ |
|||
code { |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
pre { |
|||
border-radius: .4rem; |
|||
max-width: 100%; |
|||
} |
|||
|
|||
pre code { |
|||
display: block; |
|||
tab-size: 4; |
|||
padding: 1rem 1.5rem; |
|||
font-size: 1.05rem; |
|||
white-space: pre; |
|||
max-width: 100%; |
|||
overflow-x: auto; |
|||
border-left: .3rem solid var(--beetbox-purple); |
|||
border-radius: .4rem; |
|||
box-shadow: 0 4px 8px black; |
|||
} |
|||
|
|||
/* Effects */ |
|||
.float-on-hover { |
|||
transition: all .25s cubic-bezier(.2,.1,.47,1); |
|||
} |
|||
|
|||
.float-on-hover:hover { |
|||
transform: translateY(-10px); |
|||
} |
|||
|
|||
.shadow{ |
|||
box-shadow: 0 4px 8px black; |
|||
} |
|||
|
|||
/* Footer */ |
|||
footer { |
|||
border-top: 1px solid var(--light); |
|||
} |
|||
|
|||
footer ul { |
|||
padding: 0px; |
|||
} |
|||
|
@ -1,42 +0,0 @@ |
|||
@mixin shadow { |
|||
box-shadow: 0px 4px 8px black; |
|||
} |
|||
|
|||
.shadow { |
|||
@include shadow |
|||
} |
|||
|
|||
.float-on-hover { |
|||
transition: (all 0.25s cubic-bezier(0.2,0.1,0.47,1)); |
|||
&:hover { |
|||
transform: (translateY(-10px)); |
|||
} |
|||
} |
|||
|
|||
.small-circle { |
|||
border-radius: 50%; |
|||
width: 250px; |
|||
height: 250px; |
|||
} |
|||
|
|||
article { |
|||
background-color: $dark; |
|||
border-radius: 10px; |
|||
height: 420px; |
|||
flex: 1 1 305px; |
|||
overflow: hidden; |
|||
|
|||
img { |
|||
height: 50%; |
|||
width: 100%; |
|||
object-fit: cover; |
|||
} |
|||
|
|||
div { |
|||
margin: 25px; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
} |
@ -1,18 +0,0 @@ |
|||
code { white-space: nowrap; } |
|||
|
|||
pre { |
|||
background-color: $background-color !important; |
|||
max-width: 100%; |
|||
|
|||
& > code { |
|||
@include shadow; |
|||
display: block; |
|||
padding: 1rem 1.5rem; |
|||
font-size: 1.05rem; |
|||
white-space: pre; |
|||
max-width: 100%; |
|||
overflow-x: auto; |
|||
border-left: .3rem solid $code-edge; |
|||
border-radius: .4rem; |
|||
} |
|||
} |
@ -1,14 +0,0 @@ |
|||
$beetbox-red: #9e0008; |
|||
$beetbox-pink: #d93370; |
|||
$beetbox-purple: #ac65cb; |
|||
$beetbox-green: #003f56; |
|||
$beetbox-blue: #5fcfd0; |
|||
|
|||
$background-color: #1f2835; |
|||
$font-color: #f8f8ff; |
|||
$font-color-alternate: #1f2835; |
|||
$top-bar: #f8f8ffcc; |
|||
$dark: #111; |
|||
$link-color: $beetbox-blue; |
|||
$link-color-visited: #e4cdef; |
|||
$code-edge: $beetbox-purple; |
@ -1,86 +0,0 @@ |
|||
@import 'colors.scss'; |
|||
@import 'cards.scss'; |
|||
@import 'code.scss'; |
|||
|
|||
@mixin screen-max($max) { |
|||
@media (max-width: $max - 1) { |
|||
@content |
|||
} |
|||
} |
|||
|
|||
body { |
|||
background-color: $background-color; |
|||
color: $font-color; |
|||
margin: 0px; |
|||
overflow-y: scroll; |
|||
font-family: 'Helvetica'; |
|||
font-size: 1.1rem; |
|||
} |
|||
|
|||
h2 {font-size: 1.2rem;} |
|||
|
|||
header { |
|||
background-color: $top-bar; |
|||
box-shadow: 0px 5px 10px black; |
|||
nav { |
|||
@include screen-max(500px){text-align: center;} |
|||
|
|||
div {display: inline-block;} |
|||
|
|||
img { max-width: 300px; } |
|||
|
|||
a { |
|||
margin-right: 12px; |
|||
font-weight: bold; |
|||
text-decoration: none; |
|||
&, &:visited, &:hover {color: $font-color-alternate;} |
|||
} |
|||
} |
|||
} |
|||
|
|||
header, main, section {padding: 0 16px;} |
|||
|
|||
nav, main, section {max-width: 1200px; margin: auto;} |
|||
main img {max-width: 100%} |
|||
|
|||
footer {text-align: center;} |
|||
|
|||
|
|||
a { |
|||
color: $link-color; |
|||
&:visited, &:hover { color: $link-color-visited; } |
|||
} |
|||
|
|||
img.featured{aspect-ratio: 4/3;} |
|||
img.featured, img.author { |
|||
display: block; |
|||
border-radius: 8px; |
|||
margin: 12px 0; |
|||
object-fit: cover; |
|||
max-height: 500px; |
|||
} |
|||
|
|||
.left-to-right { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
gap: 8px; |
|||
justify-content: space-evenly; |
|||
align-items: end; |
|||
} |
|||
|
|||
.align-center { |
|||
align-items: center; |
|||
} |
|||
|
|||
section.article-list { |
|||
margin: 8px 0px; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: center; |
|||
gap: 40px; |
|||
} |
|||
|
|||
.fill-wh { |
|||
width: 100%; |
|||
height: 100% |
|||
} |
@ -0,0 +1,29 @@ |
|||
# Example site configuration |
|||
baseURL = 'https://beetbox.io' |
|||
languageCode = 'en-US' |
|||
title = 'Beet Box' |
|||
|
|||
[[menus.main]] |
|||
name = 'Home' |
|||
pageRef = '/' |
|||
weight = 10 |
|||
|
|||
[[menus.main]] |
|||
name = 'Gitea' |
|||
url = 'https://gitea.beetbox.io/BeetBox' |
|||
weight = 20 |
|||
|
|||
[[menus.main]] |
|||
name = 'Games' |
|||
pageRef = '/games' |
|||
weight = 30 |
|||
|
|||
[[menus.footer]] |
|||
name = 'Authors' |
|||
pageRef = '/authors' |
|||
weight = 10 |
|||
|
|||
[module] |
|||
[module.hugoVersion] |
|||
extended = false |
|||
min = "0.116.0" |
@ -1,7 +1,5 @@ |
|||
{{ define "main" }} |
|||
<main> |
|||
<h1>404</h1> |
|||
<h2>This page doesn't exist. Let's go <a href="/">home</a></h2> |
|||
</main> |
|||
<h1>404 Page not found</h1> |
|||
<h2><a href="/">Home</a></h2> |
|||
{{ end }} |
|||
|
|||
|
@ -1,40 +1,17 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="{{ .Site.Language.Lang }}"> |
|||
<head> |
|||
|
|||
<link rel="shortcut icon" href="/images/favicon.ico"> |
|||
|
|||
{{- with .OutputFormats.Get "rss" }} |
|||
{{- printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML -}} |
|||
{{ end }} |
|||
|
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
|
|||
{{ with (default .Site.Params.description .Params.description) -}} |
|||
<meta name="description" content="{{- . -}}"> |
|||
{{- end -}} |
|||
|
|||
{{ with .Params.keywords -}} |
|||
<meta name="description" content="{{ delimit . "," }}"> |
|||
{{- end }} |
|||
|
|||
{{ $style := resources.Get "/sass/main.scss" | css.Sass | minify -}} |
|||
<link rel="stylesheet" href="{{ $style.Permalink }}"> |
|||
|
|||
<title> |
|||
{{- block "title" . }}{{ .Site.Title }}{{ end -}} |
|||
</title> |
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
{{ partial "header.html" . }} |
|||
|
|||
{{ block "main" . }} |
|||
{{ end }} |
|||
|
|||
{{ partial "footer.html" . }} |
|||
|
|||
</body> |
|||
<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}"> |
|||
<head> |
|||
{{ partial "head.html" . }} |
|||
</head> |
|||
<body> |
|||
<header> |
|||
{{ partial "header.html" . }} |
|||
</header> |
|||
<main> |
|||
{{ block "main" . }}{{ end }} |
|||
</main> |
|||
<footer> |
|||
{{ partial "footer.html" . }} |
|||
</footer> |
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,24 @@ |
|||
{{ define "main" }} |
|||
{{ .Content }} |
|||
<section class="index"> |
|||
<div class="article-list"> |
|||
<h2>All Posts:</h2> |
|||
{{ range site.RegularPages.GroupByDate "2006" }} |
|||
<p>{{ .Key }}</p> |
|||
<ul> |
|||
{{ range .Pages -}} |
|||
<li> |
|||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> |
|||
</li> |
|||
{{ end -}} |
|||
</ul> |
|||
{{ end }} |
|||
</div> |
|||
|
|||
<aside class="article-group index-articles"> |
|||
{{- range site.RegularPages.Limit 4 }} |
|||
{{ partial "article.html" . }} |
|||
{{- end }} |
|||
</aside> |
|||
</section> |
|||
{{ end }} |
@ -1,20 +1,28 @@ |
|||
{{ define "title" }}{{ .Title }}{{ end }} |
|||
|
|||
{{ define "main" }} |
|||
<main> |
|||
{{ partial "article-meta.html" . }} |
|||
<h1>{{ .Title }}</h1> |
|||
|
|||
{{ with .Params.authors }} |
|||
{{ $author := (index . 0) }} |
|||
<h4>Author: <a href={{ printf "/%s/%s" "authors" (urlize $author) }}>{{ $author }}</a></h4> |
|||
{{ end }} |
|||
|
|||
{{ .Content }} |
|||
</main> |
|||
{{- if (not .Params.hideDate) }} |
|||
{{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} |
|||
{{- $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }} |
|||
<h4>Posted: <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time></h4> |
|||
{{- end }} |
|||
|
|||
<section> |
|||
{{ with .NextInSection }} |
|||
<p>Next: <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></p> |
|||
{{ end }} |
|||
{{- range (.GetTerms "tags") }} |
|||
<span><a href="{{ .Permalink }}">#{{ .LinkTitle }}</a></span> |
|||
{{- end }} |
|||
|
|||
{{ with .PrevInSection }} |
|||
<p>Previous: <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></p> |
|||
{{ end }} |
|||
</section> |
|||
{{- partial "image.html" |
|||
(dict |
|||
"image" (.Resources.GetMatch "featured") |
|||
"alt" .Params.featured.alt |
|||
"sizes" (slice 320 480 600 800) |
|||
"classes" (slice "shadow" "featured")) }} |
|||
|
|||
{{ .Content }} |
|||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} |
|||
{{ end }} |
|||
|
@ -1,9 +1,14 @@ |
|||
{{ define "main" }} |
|||
|
|||
<section> |
|||
<h1 class="center-text">Authors</h1> |
|||
{{ range .Data.Pages }} |
|||
{{ partial "article-alternate.html" . }} |
|||
{{ end }} |
|||
{{- range .Data.Pages }} |
|||
{{- partial "article-alt.html" |
|||
(dict |
|||
"image" (.Resources.GetMatch "avatar") |
|||
"alt" .Params.alt |
|||
"title" .Params.name |
|||
"summary" .Params.bio |
|||
"url" (printf "/%s/%s" "authors" (.Params.name | urlize))) }} |
|||
{{- end }} |
|||
</section> |
|||
{{ end }} |
|||
{{ end }} |
@ -0,0 +1,25 @@ |
|||
{{- /* |
|||
Renders an article card with a circle image, title, and summary. |
|||
@context {image} the image resource. |
|||
@context {alt} alt text for the image. |
|||
@context {title} the title of the card. |
|||
@context {summary} the summary text. |
|||
@context {url} the url of the article. |
|||
*/}} |
|||
{{- $image := .image }} |
|||
{{- $alt := .alt }} |
|||
{{- $title := .title }} |
|||
{{- $summary := .summary }} |
|||
{{- $url := .url }} |
|||
{{- $img := ($image.Resize "256x webp q90") }} |
|||
<a href="{{ $url }}"> |
|||
<article class="alt float-on-hover shadow"> |
|||
<div> |
|||
<img src="{{ $img.RelPermalink }}" alt="{{ $alt }}" /> |
|||
</div> |
|||
<div> |
|||
<h2>{{ $title }}</h2> |
|||
<p>{{ $summary }}</p> |
|||
</div> |
|||
</article> |
|||
</a> |
@ -1,14 +0,0 @@ |
|||
<a href={{ printf "/%s/%s" "authors" (.Params.name | urlize) }}> |
|||
<article class="shadow left-to-right float-on-hover align-center"> |
|||
<div> |
|||
{{ with .Resources.GetMatch "avatar" }} |
|||
<img class="shadow small-circle" src="{{ .RelPermalink }}" alt="{{ .Params.alt }}"/> |
|||
{{ end }} |
|||
</div> |
|||
<div> |
|||
<h2>{{ .Params.name }}</h2> |
|||
<p>{{ .Params.bio }}</p> |
|||
</div> |
|||
</article> |
|||
</a> |
|||
|
@ -1,19 +0,0 @@ |
|||
<section> |
|||
{{ with .Params.authors }} |
|||
{{ $author := (index . 0) }} |
|||
<h4>Author: <a href={{ printf "/%s/%s" "authors" (urlize $author) }}>{{ $author }}</a></h4> |
|||
{{ end }} |
|||
|
|||
{{ with .Date }} |
|||
<h4>Posted: {{ .Format "Mon | Jan 2, 2006" }}</h4> |
|||
{{ end }} |
|||
|
|||
{{ range (.GetTerms "tags") }} |
|||
<span> |
|||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a> |
|||
</span> |
|||
{{ end }} |
|||
|
|||
{{ $image := (.Resources.GetMatch "featured") }} |
|||
{{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt "class" "shadow featured") }} |
|||
</section> |
@ -1,22 +1,15 @@ |
|||
<article class="shadow float-on-hover"> |
|||
|
|||
<a href=" {{.Permalink }}"> |
|||
{{ $image := .Resources.GetMatch "featured" }} |
|||
{{ partial "image-small.html" (dict "image" $image "alt" .Params.featured.alt) }} |
|||
<article class="index float-on-hover shadow"> |
|||
<a href=" {{ .Permalink }}"> |
|||
{{- $image := (.Resources.GetMatch "featured").Resize "256x webp q90" }} |
|||
<img src={{ $image.RelPermalink }} alt="{{ .Params.featured.alt }}"> |
|||
</a> |
|||
|
|||
<div> |
|||
|
|||
{{ with index (.GetTerms "tags") 0 }} |
|||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a> |
|||
{{ end }} |
|||
|
|||
<h2 class="title">{{ .Title | markdownify }}</h2> |
|||
|
|||
{{ with .Date }} |
|||
<p>{{ .Format "2006/01/02" }}</p> |
|||
{{ end }} |
|||
|
|||
</div> |
|||
|
|||
<h3 class="title">{{ .Title | markdownify }}</h3> |
|||
{{- if not (.Params.hideDate) }} |
|||
{{- with .Date }} |
|||
<p>{{ .Format "2006/01/02" }}</p> |
|||
{{- end }} |
|||
{{- end }} |
|||
{{- with index (.GetTerms "tags") 0 }} |
|||
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> |
|||
{{- end }} |
|||
</article> |
|||
|
@ -1,5 +1,2 @@ |
|||
<footer> |
|||
<hr> |
|||
<p><a href="/authors">Authors</a></p> |
|||
<p>{{ $.Site.Copyright | safeHTML }}</p> |
|||
</footer> |
|||
{{ partial "menu.html" (dict "menuID" "footer" "page" .) }} |
|||
<p>© 2020 – {{ now.Year }} Beet Box. All rights reserved.</p> |
|||
|
@ -0,0 +1,9 @@ |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width"> |
|||
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> |
|||
{{- partialCached "head/css.html" . }} |
|||
<link rel="shortcut icon" href="{{ site.Params.meta.favicon }}"> |
|||
|
|||
{{ with .OutputFormats.Get "rss" }} |
|||
{{- printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} |
|||
{{- end }} |
@ -0,0 +1,9 @@ |
|||
{{- with resources.Get "css/main.css" }} |
|||
{{- if eq hugo.Environment "development" }} |
|||
<link rel="stylesheet" href="{{ .RelPermalink }}"> |
|||
{{- else }} |
|||
{{- with . | minify | fingerprint }} |
|||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> |
|||
{{- end }} |
|||
{{- end }} |
|||
{{- end }} |
@ -0,0 +1,12 @@ |
|||
{{- with resources.Get "js/main.js" }} |
|||
{{- if eq hugo.Environment "development" }} |
|||
{{- with . | js.Build }} |
|||
<script src="{{ .RelPermalink }}"></script> |
|||
{{- end }} |
|||
{{- else }} |
|||
{{- $opts := dict "minify" true }} |
|||
{{- with . | js.Build $opts | fingerprint }} |
|||
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> |
|||
{{- end }} |
|||
{{- end }} |
|||
{{- end }} |
@ -1,11 +1,8 @@ |
|||
<header> |
|||
<nav> |
|||
<a href="/"><img src="{{ .Site.Params.logo }}" alt="The {{ .Site.Title }} Logo"></a> |
|||
<div> |
|||
{{ range .Site.Params.HeaderLinks -}} |
|||
<a href="{{ .url }}" title="{{ .title }}">{{ .title }}</a> |
|||
{{ end -}} |
|||
{{ printf `<a href="/index.xml" title="%s">RSS</a>` $.Site.Title | safeHTML }} |
|||
</div> |
|||
</nav> |
|||
</header> |
|||
<div> |
|||
{{ with resources.Get site.Params.logo.src }} |
|||
<a href="/"><img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="{{ site.Params.logo.alt }}"></a> |
|||
{{ else }} |
|||
<h1>{{ site.Title }}</h1> |
|||
{{ end }} |
|||
{{ partial "menu.html" (dict "menuID" "main" "page" .) }} |
|||
</div> |
|||
|
@ -1,28 +0,0 @@ |
|||
<img class="{{ .class }}" |
|||
{{- with .image -}} |
|||
|
|||
{{ $smallest := (.Resize "305x webp q60") }} |
|||
|
|||
srcset=" |
|||
{{- with $smallest -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
{{- with (.Resize "480x webp q60") -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
" |
|||
|
|||
sizes=" |
|||
(max-width: 480px) 305px; |
|||
480px" |
|||
|
|||
src=" |
|||
{{- with $smallest -}} |
|||
{{ .RelPermalink }} |
|||
{{- end -}}" |
|||
|
|||
alt="{{ .Params.alt }}" |
|||
{{- end -}} |
|||
> |
@ -1,38 +1,43 @@ |
|||
<img class="{{ .class }}" |
|||
{{- with .image -}} |
|||
|
|||
{{ $smallest := (.Resize "320x webp q60") }} |
|||
|
|||
srcset=" |
|||
{{- with $smallest -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
{{- with (.Resize "480x webp q60") -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
{{- with (.Resize "600x webp q70") -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
{{- with (.Resize "800x webp q90") -}} |
|||
{{ printf "%s %dw," .RelPermalink .Width }} |
|||
{{- end -}} |
|||
|
|||
" |
|||
|
|||
sizes=" |
|||
(max-width: 480px) 320px; |
|||
(max-width: 600px) 480px; |
|||
(max-width: 800px) 600px; |
|||
800px" |
|||
|
|||
src=" |
|||
{{- with $smallest -}} |
|||
{{ .RelPermalink }} |
|||
{{- end -}}" |
|||
|
|||
alt="{{ .Params.alt }}" |
|||
{{- end -}} |
|||
{{- /* |
|||
Renders an image with the given class, alt, and sizes. |
|||
@context {alt} alt text for the image. |
|||
@context {image} the image resource. |
|||
@context {sizes} each size to include in the srcset. |
|||
@context {classes} classes for the image. |
|||
*/}} |
|||
|
|||
{{- $alt := .alt }} |
|||
{{- $img := .image }} |
|||
{{- $sizes := .sizes }} |
|||
{{- $classes := .classes }} |
|||
|
|||
{{- $srcsetParts := slice }} |
|||
{{- $sizesParts := slice }} |
|||
{{- $len := len $sizes }} |
|||
|
|||
{{/* Loop through widths to resize images and build attributes */}} |
|||
{{- range $index, $width := $sizes }} |
|||
{{- $resizeSpec := printf "%dx webp q90" $width }} |
|||
{{- $resized := ($img.Resize $resizeSpec) }} |
|||
|
|||
{{- $srcsetParts = $srcsetParts | append (printf "%s %dw" $resized.RelPermalink $width) }} |
|||
|
|||
{{- /* Build sizes: media query for all but the last width */}} |
|||
{{- if lt $index (sub $len 1) }} |
|||
{{- $nextWidth := index $sizes (add $index 1) }} |
|||
{{- $sizesParts = $sizesParts | append (printf "(max-width: %dpx) %dpx" $nextWidth $width) }} |
|||
{{- else }} |
|||
{{- $sizesParts = $sizesParts | append (printf "%dpx" $width) }} |
|||
{{- end }} |
|||
{{- end }} |
|||
|
|||
{{- $smallestWidth := index $sizes 0 }} |
|||
{{- $smallestResizeSpec := printf "%dx webp q90" $smallestWidth }} |
|||
{{- $smallest := ($img.Resize $smallestResizeSpec) }} |
|||
{{- $src := $smallest.RelPermalink }} |
|||
<img class="{{ delimit $classes " " }}" |
|||
src="{{ $src }}" |
|||
srcset="{{ delimit $srcsetParts ", " }}" |
|||
sizes="{{ delimit $sizesParts ", " }}" |
|||
alt="{{ $alt }}" |
|||
> |
|||
|
@ -0,0 +1,51 @@ |
|||
{{- /* |
|||
Renders a menu for the given menu ID. |
|||
|
|||
@context {page} page The current page. |
|||
@context {string} menuID The menu ID. |
|||
|
|||
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} |
|||
*/}} |
|||
|
|||
{{- $page := .page }} |
|||
{{- $menuID := .menuID }} |
|||
|
|||
{{- with index site.Menus $menuID }} |
|||
<nav> |
|||
<ul> |
|||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} |
|||
</ul> |
|||
</nav> |
|||
{{- end }} |
|||
|
|||
{{- define "partials/inline/menu/walk.html" }} |
|||
{{- $page := .page }} |
|||
{{- range .menuEntries }} |
|||
{{- $attrs := dict "href" .URL }} |
|||
{{- if $page.IsMenuCurrent .Menu . }} |
|||
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} |
|||
{{- else if $page.HasMenuCurrent .Menu .}} |
|||
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} |
|||
{{- end }} |
|||
{{- $name := .Name }} |
|||
{{- with .Identifier }} |
|||
{{- with T . }} |
|||
{{- $name = . }} |
|||
{{- end }} |
|||
{{- end }} |
|||
<li> |
|||
<a |
|||
{{- range $k, $v := $attrs }} |
|||
{{- with $v }} |
|||
{{- printf " %s=%q" $k $v | safeHTMLAttr }} |
|||
{{- end }} |
|||
{{- end -}} |
|||
>{{ $name }}</a> |
|||
{{- with .Children }} |
|||
<ul> |
|||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} |
|||
</ul> |
|||
{{- end }} |
|||
</li> |
|||
{{- end }} |
|||
{{- end }} |
@ -1 +0,0 @@ |
|||
|
@ -1,20 +0,0 @@ |
|||
{{ with . }} |
|||
<section> |
|||
<h2>Latest Posts:</h2> |
|||
<section class="article-list"> |
|||
{{ range .Limit 5 }} |
|||
{{ partial "article.html" . }} |
|||
{{ end }} |
|||
</section> |
|||
|
|||
<h2>All Posts:</h2> |
|||
{{ range .GroupByDate "2006" }} |
|||
<p>{{ .Key}}</p> |
|||
<ul> |
|||
{{ range .Pages -}} |
|||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li> |
|||
{{ end -}} |
|||
</ul> |
|||
{{ end }} |
|||
</section> |
|||
{{ end }} |
@ -0,0 +1,23 @@ |
|||
{{- /* |
|||
For a given taxonomy, renders a list of terms assigned to the page. |
|||
|
|||
@context {page} page The current page. |
|||
@context {string} taxonomy The taxonomy. |
|||
|
|||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} |
|||
*/}} |
|||
|
|||
{{- $page := .page }} |
|||
{{- $taxonomy := .taxonomy }} |
|||
|
|||
{{- with $page.GetTerms $taxonomy }} |
|||
{{- $label := (index . 0).Parent.LinkTitle }} |
|||
<div> |
|||
<div>{{ $label }}:</div> |
|||
<ul> |
|||
{{- range . }} |
|||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li> |
|||
{{- end }} |
|||
</ul> |
|||
</div> |
|||
{{- end }} |
@ -1,3 +1,7 @@ |
|||
{{ $image := .Page.Resources.GetMatch (.Get "src") }} |
|||
{{ partial "image.html" (dict "image" $image "alt" (.Get "alt") "class" "fill-wh") }} |
|||
|
|||
{{ partial "image.html" |
|||
(dict |
|||
"image" $image |
|||
"alt" (.Get "alt") |
|||
"sizes" (slice 320 480 600) |
|||
"classes" (slice "fill-wh")) }} |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,12 @@ |
|||
name = 'neon-harvest' |
|||
license = 'BSD 3-Clause' |
|||
licenselink = 'https://gitea.beetbox.io/BeetBox/neon-harvest/raw/branch/master/LICENSE' |
|||
description = 'The current Hugo theme for beetbox.io' |
|||
|
|||
# The home page of the theme, where the source can be found |
|||
homepage = 'https://gitea.beetbox.io/BeetBox/neon-harvest/' |
|||
|
|||
# If the theme has a single author |
|||
[author] |
|||
name = 'Alexander Avery' |
|||
homepage = 'https://beetbox.io/authors/alexander-avery' |
Loading…
Reference in new issue