Compare commits

...

65 Commits

Author SHA1 Message Date
07396d31c4 comit 2024-03-08 22:08:03 -05:00
90556d90b3 calendar imporvements
- removed exessive margin from day numbers
- days with events now have JS click event that simulates clicking on
  the event
- event no longer has a seperate bg, cleaner look
2024-03-08 13:01:24 -05:00
d107e7c97a make emty table headers invisible 2024-03-08 11:54:11 -05:00
Jakub
777e53ef81 Rework colorscheme 2024-03-08 09:00:30 -05:00
Jakub
61be30e518 Merge branch 'master' of git.jakubb.xyz:34mdh/hugo-theme 2024-03-07 06:28:58 -05:00
Jakub
d03176171c Merge branch 'master' of git.jakubb.xyz:34mdh/hugo-theme 2024-03-06 22:45:04 -05:00
Jakub
5a9d101d37 change thumbnail resolution 2024-03-06 22:44:22 -05:00
64ea83f0e2 reworking colorscheme start 2024-03-06 15:57:33 -05:00
1153683582 open documents in new tab 2024-03-04 10:06:10 -05:00
Jakub
55122f137d add title filter to dirs and include underscores for documents layout 2024-03-03 00:37:26 -05:00
Jakub
293ced3505 add document layout 2024-03-03 00:05:16 -05:00
Jakub
3cb43796ea remove button class from 404 link 2024-03-01 23:34:00 -05:00
Jakub
2c71573c97 finish photo gallery 2024-03-01 22:53:26 -05:00
Jakub
1db3d7cf24 made download shortcode 2024-03-01 22:17:22 -05:00
Jakub
be6204aa1e rename map-button to button 2024-03-01 21:34:32 -05:00
Jakub
ed080385e8 change height of imgs wide mode 2024-03-01 21:28:55 -05:00
Jakub
a365f82360 remove testing string and use proper path var 2024-03-01 21:27:01 -05:00
Jakub
1639033905 add compressing to jpeg for images and thumbnails 2024-03-01 21:11:13 -05:00
Jakub
6433fb41ba finish css layout for gallery 2024-03-01 20:50:04 -05:00
Jakub
07dce0f1b6 fix unclosed div 2024-03-01 17:05:49 -05:00
Jakub
406f91b557 updatre translated string 2024-03-01 16:55:33 -05:00
3dfb87a4e3 started gal layout 2024-03-01 16:02:34 -05:00
Jakub
d99c90c007 merge calendar.css to main stylesheet 2024-02-27 20:46:31 -05:00
Jakub
758ccf59f5 use localized date for further events 2024-02-27 00:15:51 -05:00
Jakub
6b221f66f5 add calendar page layout as shortcode 2024-02-26 23:55:51 -05:00
9969b19f99 removed JS from footer, now pinned to bottom w/ pure css 2024-02-22 16:04:54 -05:00
9e5d95551b work on bobile layout for cal 2024-02-21 16:06:15 -05:00
889d3ef230 change d.o.w. label to single letters 2024-02-20 15:55:50 -05:00
a6b5fdb348 adjust triger widths for diff layouts 2024-02-20 14:26:28 -05:00
b25bbbd072 Adjust font sizes 2024-02-20 14:26:07 -05:00
Jakub
a540c7b60a re-add whitespace to lang switch label 2024-02-16 21:48:44 -05:00
Jakub
06b6982c1b fix dropdowns not animating 2024-02-16 21:43:03 -05:00
Jakub
3b62ff8a12 remove poiner events from plain text in calendar 2024-02-16 21:26:25 -05:00
Jakub
ade686db21 Remove whitepsace 2024-02-16 21:26:00 -05:00
f21dc85430 (mostly) finish calendar. needs some stylework but its fully func 2024-02-16 15:08:34 -05:00
48823310da work on cal, non func 2024-02-15 15:54:26 -05:00
Jakub
2f1228da9a work on cal shorcode - now only needs a date, will auto calc pad days and month length 2024-02-14 01:34:53 -05:00
Jakub
c2532014be remove JUST the dupe 404.css file this time 2024-02-13 22:19:15 -05:00
Jakub
68c478352b Revert "removed dupe 404 css file"
This reverts commit e98fd9f5a5.
2024-02-13 22:18:51 -05:00
Jakub
e09e958022 rename to colors.css 2024-02-13 22:17:27 -05:00
cd0f6067b1 work on claendar layout 2024-02-13 15:55:36 -05:00
Jakub
e98fd9f5a5 removed dupe 404 css file 2024-02-12 23:33:19 -05:00
Jakub
2e0c569dfb fix uncenetered site logo 2024-02-12 22:43:09 -05:00
8aebce91cc adjust .content margins for wide layout 2024-02-12 14:39:55 -05:00
d8221a2474 rename apiKey to geoapifyApiKey 2024-02-12 13:00:10 -05:00
a096f71b5f fix html tag being hardcoded to english 2024-02-12 11:32:58 -05:00
9207d66049 Make sure lang switch is only on muli-lang sites + optional ensure all pages are translated 2024-02-12 11:30:23 -05:00
Jakub
8b7d450a12 comit 2024-02-11 15:21:08 -05:00
Jakub
6101ec652a commit 2024-02-09 01:04:22 -05:00
Jakub
98bdeac3db commit 2024-02-09 00:28:36 -05:00
70ecccf427 remove footer from content div, style so its always on bottom 2024-02-08 11:04:37 -05:00
Jakub
23e658e768 comit 2024-02-08 06:08:24 -05:00
Jakub
32836308d2 add table styling & clean up .content styles 2024-02-08 00:44:20 -05:00
c17913e3ff Change styling for blockquotes. Kept for maps 2024-02-07 15:41:41 -05:00
Jakub
932fbd1d72 clean css, again. after i finito map, iwill keep css clean (no promise) 2024-02-07 00:54:21 -05:00
37e021db1c commit 2024-02-06 16:02:29 -05:00
Jakub
dcc0dd02b4 cache images w/ map shortcode - apiKey can now be priv again 2024-02-05 23:24:17 -05:00
4e7f19f5b3 styled for norm layouts and added logic for optional maps info 2024-02-05 16:11:28 -05:00
Jakub
b50c0b64ed added a map shortcode 2024-02-05 06:39:47 -05:00
3c09ff3556 added blockquote styling 2024-02-02 15:56:06 -05:00
64aba78917 add anims. to menu and clened up a few things 2024-02-02 13:44:05 -05:00
Jakub
be6208af22 wip - hamburger menu 2024-02-02 06:31:53 -05:00
Jakub
97f1d637eb remove old css file 2024-02-01 21:37:39 -05:00
8a9005bd0e cleaned up css & added shadows 2024-02-01 15:57:48 -05:00
Jakub
76dd32d8cf wip rewrite of css - much cleaner even RN 2024-02-01 06:22:34 -05:00
18 changed files with 1295 additions and 274 deletions

14
i18n/en.toml Normal file
View File

@ -0,0 +1,14 @@
[days]
sun = "Su"
mon = "M"
tues = "Tu"
wend = "W"
thurs = "Th"
fri = "F"
sat = "Sa"
[dates]
far = "Further Events"
[gallery]
download = "lol"

14
i18n/pl.toml Normal file
View File

@ -0,0 +1,14 @@
[days]
sun = "N"
mon = "Po"
tues = "W"
wend = "Ś"
thurs = "C"
fri = "Pi"
sat = "S"
[dates]
far = "Dalsze wydarzenia"
[gallery]
download = "temp"

View File

@ -1,12 +1,27 @@
{{ 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>
<header class="not-found">
<ul class="menu" >
<li>
<a class="logo" >{{ .Site.Title }}</a>
</li>
</ul>
</header>
<div class="content">
<link rel="stylesheet" href="/css/404.css" type="text/css">
<h1 class="not-found">Error</h1>
<h1 class="not-found-num" >404</h1>
<div style="padding: 30px;"></div>
<hr/>
<h2>Strona nie odnaleziona</h2>
<p>Podany adres URL nie został odnaleziony.</p>
<p><a href="/">Kliknij tutaj, aby przejść do polskej strony głównej.</a></p>
<hr/>
<h2>Page Not Found</h2>
<p>The url you entered couldn't be found.</p>
<p><a href="/en">Click here to go to the english homepage.</a></p>
<p><a class="button" href="/">Click here to return home.</a></p>
</div>
{{ partial "footer.html" . }}
<hr/>
</div>

View File

@ -0,0 +1,30 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{- define "listDir" -}}
{{- $dir := .dir -}}
<ul>
{{ $files := readDir (printf "/assets/%s" $dir)}}
{{- range $files -}}
<li>
{{- if .IsDir -}}
{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}
{{- template "listDir" (dict "dir" (printf "%s/%s" $dir .Name)) -}}
{{- else -}}
{{- with resources.Get (printf "%s/%s" $dir .Name) -}}
<a href="{{ .RelPermalink }}" target="_blank" >{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}</a>
{{- end -}}
{{- end -}}
</li>
{{- end -}}
</ul>
{{- end -}}
{{- template "listDir" (dict "dir" "dokumenty") -}}
</div>
{{ partial "footer.html" . }}

View File

@ -1,4 +1,6 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
@ -15,4 +17,6 @@
</article>
{{ end }}
</div>
{{ partial "footer.html" . }}

View File

@ -1,7 +1,10 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
</div>
{{ partial "footer.html" . }}

View File

@ -1,12 +1,10 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
{{ .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>
</div>
{{ partial "footer.html" . }}

View File

@ -1,8 +1,6 @@
<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/>
<a href="/{{ .Language.LanguageCode }}">{{ .Site.Title }}</a><br/>
</footer>
</div>
</body>
</html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ .Language }}">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -12,6 +12,5 @@
</head>
<body>
{{ partial "nav.html" . }}
<div class="content">

View File

@ -1,17 +1,47 @@
<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>
<div class="menu" >
<a href="/{{- .Language.LanguageCode -}}" class="logo" >{{- .Site.Title -}}</a>
<label class="menu-icon" for="menu-btn">
<div class="hamburger" onclick="myFunction(this)">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
<script>
function myFunction(x) {
x.classList.toggle("change");
}
</script>
</label>
<div class="menu-entries">
{{- range.Site.Menus.main -}}
{{- if eq .Identifier "home" -}}
<a class="home-link" href="{{- .URL -}}">{{- .Name -}}</a>
{{- else -}}
<a href="{{- .URL -}}">{{- .Name -}}</a>
{{- end -}}
{{- end -}}
{{- if gt (len .Site.Languages) 1 -}}
{{- if and (gt (len .Site.Languages) (len .AllTranslations)) .Site.Params.allTranslated -}}
{{- errorf "Error: %s is missing atleast 1 translation" .RelPermalink -}}
{{- end -}}
<div class="lang-switch" >
<input class="lang-btn" type="checkbox" id="lang-btn" />
<label class="lang-switch" for="lang-btn">
<a>{{ .Language.LanguageName }} ⏷</a>
</label>
<div class="translation-list" >
{{- with .Translations -}}
{{- range . -}}
<a href="{{- .RelPermalink -}}"> {{- .Language.LanguageName -}}</a>
{{- end -}}
{{- end -}}
</div>
</div>
{{- end -}}
</div>
</div>
</header>

View File

@ -0,0 +1,37 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
{{ $path := printf "%s/*" $path }}
{{ $images := where (resources.Match $path ) "ResourceType" "eq" "image" }}
<div class="gallery">
{{ range $images }}
<div class="gallery-item">
{{ $thumbnail := .Process "resize x400 q50 jpeg" }}
{{ $public := .Process "resize 2160x jpeg" }}
<a href="{{ $public.RelPermalink }}" target="_blank"><img src="{{ $thumbnail.RelPermalink }}" /></a>
</div>
{{ end }}
</div>
{{ $file:= .Page.Params.archive }}
{{ with $file }}
{{ if not (resources.Get $file) }}
{{ errorf "Error: 'file' is a required parameter." }}
{{ end }}
<p>{{ i18n "gallery.download" }}</p>
{{- with resources.Get $file -}}
<a class="button" href="{{ .RelPermalink }}" download>Download {{ path.Ext $file }}</a>
{{- end -}}
{{ end }}
</div>
{{ partial "footer.html" . }}

View File

@ -0,0 +1,230 @@
{{ $date := now }}
{{ $month := $date.Month | int }}
{{ $year := $date.Year }}
{{ $t1 := printf "%4d-%02d-01" $year $month }}
{{ $t1 := time.AsTime $t1 }}
{{ $t2 := $t1.AddDate 0 1 0 }}
{{ $daysInMonth := $t2.Sub $t1 }}
{{ $daysInMonth := $daysInMonth.Hours }}
{{ $daysInMonth := div $daysInMonth 24 }}
<div class="calendar">
{{ if eq .Site.Language.Lang "pl" }}
{{ $polish_month_names := slice "Styczeń" "Luty" "Marzec" "Kwiecień" "Maj" "Czerwiec" "Lipiec" "Sierpień" "Wrzesień" "Październik" "Listopad" "Grudzień" }}
{{ $month := sub $month 1}}
{{ $label := index $polish_month_names $month }}
<a class="month">{{ printf "%s %d" $label $year }}</a>
{{ else }}
<a class="month">{{ time.Format "January 2006" $t1 }}</a>
{{ end }}
<div class="weekdays" >
{{ $days := slice "sun" "mon" "tues" "wend" "thurs" "fri" "sat" }}
{{ range $days }}<p>{{ i18n (printf "days.%s" .) }}</p>{{ end }}
</div>
<div class="days">
{{ $padding := $t1.Weekday | int }}
{{ if gt $padding 0 }}
{{ range seq 1 $padding }}
<div class="pad-day"></div>
{{ end }}
{{ end }}
{{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" >
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</div>
{{ end }}
{{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div>
{{ end }}
</div>
</div>
<script>
function simulateLinkClick() {
var link = document.querySelector('.div a');
if (link) {
link.click();
}
}
</script>
{{ $date := $date.AddDate 0 1 0 }}
{{ $month := $date.Month | int }}
{{ $year := $date.Year }}
{{ $t1 := printf "%4d-%02d-01" $year $month }}
{{ $t1 := time.AsTime $t1 }}
{{ $t2 := $t1.AddDate 0 1 0 }}
{{ $daysInMonth := $t2.Sub $t1 }}
{{ $daysInMonth := $daysInMonth.Hours }}
{{ $daysInMonth := div $daysInMonth 24 }}
<div class="calendar">
{{ if eq .Site.Language.Lang "pl" }}
{{ $polish_month_names := slice "Styczeń" "Luty" "Marzec" "Kwiecień" "Maj" "Czerwiec" "Lipiec" "Sierpień" "Wrzesień" "Październik" "Listopad" "Grudzień" }}
{{ $month := sub $month 1}}
{{ $label := index $polish_month_names $month }}
<a class="month">{{ printf "%s %d" $label $year }}</a>
{{ else }}
<a class="month">{{ time.Format "January 2006" $t1 }}</a>
{{ end }}
<div class="weekdays" >
{{ $days := slice "sun" "mon" "tues" "wend" "thurs" "fri" "sat" }}
{{ range $days }}<p>{{ i18n (printf "days.%s" .) }}</p>{{ end }}
</div>
<div class="days">
{{ $padding := $t1.Weekday | int }}
{{ if gt $padding 0 }}
{{ range seq 1 $padding }}
<div class="pad-day"></div>
{{ end }}
{{ end }}
{{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" >
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</div>
{{ end }}
{{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div>
{{ end }}
</div>
</div>
{{ $date := $date.AddDate 0 1 0 }}
{{ $month := $date.Month | int }}
{{ $year := $date.Year }}
{{ $t1 := printf "%4d-%02d-01" $year $month }}
{{ $t1 := time.AsTime $t1 }}
{{ $t2 := $t1.AddDate 0 1 0 }}
{{ $daysInMonth := $t2.Sub $t1 }}
{{ $daysInMonth := $daysInMonth.Hours }}
{{ $daysInMonth := div $daysInMonth 24 }}
<div class="calendar">
{{ if eq .Site.Language.Lang "pl" }}
{{ $polish_month_names := slice "Styczeń" "Luty" "Marzec" "Kwiecień" "Maj" "Czerwiec" "Lipiec" "Sierpień" "Wrzesień" "Październik" "Listopad" "Grudzień" }}
{{ $month := sub $month 1}}
{{ $label := index $polish_month_names $month }}
<a class="month">{{ printf "%s %d" $label $year }}</a>
{{ else }}
<a class="month">{{ time.Format "January 2006" $t1 }}</a>
{{ end }}
<div class="weekdays" >
{{ $days := slice "sun" "mon" "tues" "wend" "thurs" "fri" "sat" }}
{{ range $days }}<p>{{ i18n (printf "days.%s" .) }}</p>{{ end }}
</div>
<div class="days">
{{ $padding := $t1.Weekday | int }}
{{ if gt $padding 0 }}
{{ range seq 1 $padding }}
<div class="pad-day"></div>
{{ end }}
{{ end }}
{{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" >
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</div>
{{ end }}
{{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div>
{{ end }}
</div>
</div>
<h2>{{ i18n "dates.far" }}</h2>
{{ $startDate := now }}
{{ $month := $startDate.Month | int }}
{{ $year := $startDate.Year }}
{{ $startDate := printf "%4d-%02d-01" $year $month }}
{{ $startDate := time.AsTime $startDate }}
{{ $startDate := $startDate.AddDate 0 3 0 }}
{{ $endDate := $startDate.AddDate 0 6 0 }}
<ul>
{{ range sort (where .Site.RegularPages "Section" "events") "Params.start_date" "asc" }}
{{ $eventDate := time.AsTime .Params.start_date }}
{{ if and ( or ($eventDate.After $startDate) ($eventDate.Equal $startDate)) ($eventDate.Before $endDate) }}
<li>{{$eventDate | time.Format ":date_medium" }} - <a href="{{ .RelPermalink }}">{{.Title}}</a></li>
{{ end }}
{{ end }}
</ul>
<script>
function simulateLinkClick() {
var link = document.querySelector('.day a');
if (link) {
link.click();
}
}
</script>

View File

@ -0,0 +1,76 @@
{{ $date:= .Get "date" }}
{{ if not $date }}
{{ errorf "Error: 'date' is a required parameter." }}
{{ end }}
{{ $date := time.AsTime $date }}
{{ $month := $date.Month | int }}
{{ $year := $date.Year }}
{{ $t1 := printf "%4d-%02d-01" $year $month }}
{{ $t1 := time.AsTime $t1 }}
{{ $t2 := $t1.AddDate 0 1 0 }}
{{ $daysInMonth := $t2.Sub $t1 }}
{{ $daysInMonth := $daysInMonth.Hours }}
{{ $daysInMonth := div $daysInMonth 24 }}
<div class="calendar">
{{ if eq .Site.Language.Lang "pl" }}
{{ $polish_month_names := slice "Styczeń" "Luty" "Marzec" "Kwiecień" "Maj" "Czerwiec" "Lipiec" "Sierpień" "Wrzesień" "Październik" "Listopad" "Grudzień" }}
{{ $month := sub $month 1}}
{{ $label := index $polish_month_names $month }}
<a class="month">{{ printf "%s %d" $label $year }}</a>
{{ else }}
<a class="month">{{ time.Format "January 2006" $t1 }}</a>
{{ end }}
<div class="weekdays" >
{{ $days := slice "sun" "mon" "tues" "wend" "thurs" "fri" "sat" }}
{{ range $days }}<p>{{ i18n (printf "days.%s" .) }}</p>{{ end }}
</div>
<div class="days">
{{ $padding := $t1.Weekday | int }}
{{ if gt $padding 0 }}
{{ range seq 1 $padding }}
<div class="pad-day"></div>
{{ end }}
{{ end }}
{{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" >
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</div>
{{ end }}
{{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported" }}
{{ end }}
</div>
{{ end }}
</div>
</div>
<script>
function simulateLinkClick() {
var link = document.querySelector('.day a');
if (link) {
link.click();
}
}
</script>

View File

@ -0,0 +1,12 @@
{{ $file:= .Get "file" }}
{{ if not (resources.Get $file) }}
{{ errorf "Error: 'file' is a required parameter." }}
{{ end }}
{{- with .Get "message" -}}
<p>{{- . -}}</p>
{{- end -}}
{{- with resources.Get $file -}}
<a class="button" href="{{ .RelPermalink }}" download>Download {{ path.Ext $file }}</a>
{{- end -}}

View File

@ -0,0 +1,61 @@
{{/* Required params. Fail if missing. */}}
{{ $apiKey := .Site.Params.geoapifyApiKey }}
{{ if not $apiKey }}
{{ errorf "Error: 'geoapifyApiKey' is a required site parameter for this shortcode." }}
{{ end }}
{{ $adr := .Get "address" }}
{{ if not $adr }}
{{ errorf "Error: 'address' is a required parameter for this shortcode." }}
{{ end }}
{{ $path := .Get "path" }}
{{ if not $path }}
{{ errorf "Error: 'path' is a required parameter for this shortcode." }}
{{ end }}
{{/* Optional params. No error checking. */}}
{{ $label := .Get "label" }}
{{ $url := .Get "url" }}
{{ $adrURL := urlquery $adr }}
{{ $LLapiURL := printf "https://api.geoapify.com/v1/geocode/search?text=%s&format=json&apiKey=%s" $adrURL $apiKey }}
{{ $data := getJSON $LLapiURL }}
{{ with index $data.results 0 }}
{{ $lon := .lon }}
{{ $lat := .lat }}
{{ $MapApiUrl := printf "https://maps.geoapify.com/v1/staticmap?style=osm-bright&width=500&height=500&center=lonlat:%f,%f&zoom=12&marker=lonlat:%f,%f;color:%%23ff0000;size:medium&scaleFactor=2&apiKey=%s" $lon $lat $lon $lat $apiKey }}
<blockquote class="location">
<div class="map" >
{{ with resources.GetRemote $MapApiUrl }}
{{ with resources.Copy $path . }}
{{ with .Err }}
{{ errorf "%s" . }}
{{ else }}
<img src="{{ .RelPermalink }}" width=350px />
{{ end }}
{{ else }}
{{ errorf "Unable to get remote resource %q" $MapApiUrl }}
{{ end }}
{{ end }}
<div class="map-txt-grid">
<div class="grid-item">
{{ with $label }}
<p><b>{{ $label }}</b></p>
{{ end }}
</div>
<div class="grid-item"><p>{{ .address_line1 }}<br/>{{ replaceRE `, United States of America$` "" .address_line2 }}</p></div>
{{end}}
<div class="grid-item">
<div class="child-element">
{{ with $url }}
<a class="button" href="{{ $url }}" target="_blank">See on Google Maps</a>
{{ end }}
</div>
</div>
</div>
</div>
</blockquote>

29
static/css/404.css Normal file
View File

@ -0,0 +1,29 @@
.not-found ul.menu li {
width: 100%;
}
.not-found a.logo {
width: 100%;
padding: 20px 0;
background-color: var(--header-bg);
text-align: center;
pointer-events: none;
box-shadow: inset 0 -20px 20px -20px var(--header-shadow);
}
h1.not-found-num {
text-align: center;
font-size: 72px;
margin-top: 0;
}
h1.not-found {
text-align: center;
margin-bottom: 0;
}
@media screen and (min-width: 1040px) {
.content {
margin: 5em 5% auto 5%;
}
}

View File

@ -0,0 +1,106 @@
:root {
/* Colors */
--fg: #06080E;
--alt-fg: #F1F2F9;
--bg: #D4D8ED;
--alt-bg: #C5CCE8;
--dark-alt-bg: #A9B2DB;
--acc: #3C5197;
--dark-acc: #12182B;
--light-acc: #5F75BF;
/* Color Sheme linking */
/* Body Colors */
--body-bg: var(--bg);
--body-fg: var(--fg);
--link-fg: var(--acc);
/* Navbar Colors */
--header-bg: var(--alt-bg);
--header-bg-hov: var(--acc);
--header-fg: var(--fg);
--header-fg-hov: var(--alt-fg);
--header-shadow: var(--dark-acc);
--header-shadow-hov: var(--header-shadow);
--hamburger-fg: var(--fg);
--hamburger-fg-checked: var(--hamburger-fg);
--langs-bg: var(--header-bg);
--lang-btn-bg: var(--header-bg) ;
--langs-bg-hov: var(--header-bg-hov);
--langs-fg-hov: var(--header-fg-hov);
/* Content Colors */
--blockquote-border: var(--alt-bg);
--table-bg: var(--dark-alt-bg);
--table-bg-alt: var(--alt-bg);
--table-border: var(--body-bg);
--maps-bg: var(--alt-bg);
--maps-border: var(--acc);
--button-bg: var(--acc);
--button-fg: var(--alt-fg);
/* Calendar Colors */
--cal-bg: var(--alt-bg);
--cal-fg: var(--fg);
--cal-month-bg: var(--alt-bg);
--cal-month-fg: var(--fg);
--cal-weekdays-bg: var(--light-acc);
--cal-weekdays-fg: var(--alt-fg);
--cal-day-empty-fg: var(--alt-fg);
--cal-day-empty-bg: var(--dark-alt-bg);
--cal-day-busy-fg: var(--alt-fg);
--cal-day-busy-bg: var(--acc);
--cal-day-hover-fg: var(--cal-day-busy-fg);
--cal-day-hover-bg: var(--cal-day-busy-bg);
--cal-event-fg: var(--alt-fg);
--cal-event-bg: var(--light-acc) ;
--cal-mobile-bg: var(--alt-bg);
--cal-mobile-fg: var(--fg);
--cal-mobile-border: var(--acc);
--cal-mobile-link: var(--light-acc);
}
@media (prefers-color-scheme: dark) {
:root {
/* Dark Mode Colors */
--bg: #06080E;
--fg: #F0F2F9;
--dark-acc: #0C101D;
--alt-bg: #18203A;
--dark-alt-bg: #12182B;
/* Dark Mode Colorscheme Changes */
--link-fg: var(--light-acc);
--table-bg: var(--dark-acc);
--table-bg-alt: var(----alt-bg);
--button-fg: var(--body-fg);
--cal-bg: var(--dark-acc);
--cal-weekdays-fg: var(--fg);
--cal-day-empty-fg: var(--dark-acc);
--cal-day-busy-fg: var(--acc);
--cal-day-busy-bg: var(--alt-bg);
--cal-event-fg: var(--fg);
--cal-event-bg: var(--acc) ;
}
}

View File

@ -1,306 +1,671 @@
/* modifying it for now. */
/* Include */
@import url('./colorschemes/colors.css'); /* Include colorscheme */
a.home-link{
display: none;
}
.logo img, .logo {
height: 24px;
}
/* Global options */
html, body {
margin: 0;
padding: 0;
}
body {
background-color: #1d2021;
color: #ebdbb2;
font-size: 100%;
body{
/* font-size: 100%; */
line-height: 1.5;
background-color: var(--body-bg);
color: var(--body-fg);
display: flex;
flex-direction: column;
min-height: 100vh;
}
a {
color: #83a598;
a{
text-decoration: none;
color: var(--link-fg);
}
/* Main Body */
.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;
margin: 5em 5% auto 5%;
flex: 1;
}
.post-snippet h3 {
margin-bottom: 0.25rem;
footer {
width: calc(100% - 40px);
text-align: center;
padding: 20px;
}
/* header */
footer.fixed {
margin: 0;
position: fixed;
bottom: 0;
}
/* Header and Navigation Menu */
.header {
background-color: #504945;
/* width: 100%; */
/* /1* position: fixed; *1/ */
/* z-index: 3; */
width: 100%;
background-color: var(--header-bg);
position: fixed;
top: 0;
z-index: 100;
box-shadow: inset 0 -20px 20px -20px var(--header-shadow);
}
.header .menu {
.menu-entries a{
transition: 400ms;
}
.menu-entries a:hover{
background-color: var(--header-bg-hov);
color: var(--header-fg-hov);
box-shadow: inset 0 -20px 20px -20px var(--header-shadow-hov);
}
.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 a {
color: var(--header-fg);
display: inline-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;
float: right;
padding: inherit;
position: absolute;
top: 0;
right: 0;
}
.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 {
.menu-btn, .lang-btn {
display: none;
}
.menu .logo {
transition: 400ms;
.menu a {
display: inline-block;
padding: 20px;
}
footer {
/* position: fixed; */
left: 0;
/* bottom: 0; */
/* width: 100%; */
text-align: center;
/* max-height: 15%; */
padding-top; 10px;
padding-bottom: 10px;
a.home-link { display: none; }
/* Mobile layout - logo now serves as toggle for rest of menu items */
@media screen and (max-width: 755px) {
/* disable clicking and clickable cursor indication */
.logo {
pointer-events: none;
text-align: center;
}
.menu-entries a:hover { box-shadow: none; }
.menu-entries {
text-align: center;
float: none;
position: inherit;
/* Hide Entries until toggled */
height: 0;
max-height: 0;
overflow: hidden;
/* Slide out Animation */
transition: 400ms;
transition-property: all;
}
.menu-btn:checked ~ .menu .menu-entries {
/* Reveal Entries */
height: auto;
max-height: 750px; /* May Need to be change manually for nav lists */
overflow: scroll;
}
footer .buttons {
margin-top: 5px;
.menu-btn:checked ~ .menu .logo, .menu-entries a:hover {
/* BG Color on logo an hover effect */
background-color: var(--header-bg-hov);
color: var(--header-fg-hov);
}
.menu li, .menu-entries a{ display: block; }
/* TODO Make sure we can combine these 2 blocks */
a.logo { display: block; transition: 400ms; }
/* Hamburger Menu */
.hamburger {
display: block;
float: right;
position: absolute;
top: 0;
right: 0;
margin-top: 12px;
margin-right: 12px;
cursor: pointer;
}
.bar1, .bar2, .bar3 {
width: 35px;
height: 5px;
background-color: var(--hamburger-fg);
margin: 6px 0;
transition: 0.4s;
}
.change .bar1 {
background-color: var(--hamburger-fg-checked);
transform: translate(0, 11px) rotate(45deg);
}
.change .bar2 { opacity: 0; }
.change .bar3 {
transform: translate(0, -11px) rotate(-45deg);
background-color: var(--hamburger-fg-checked);
}
}
/* Wide window - links on the left in a sidebar */
@media screen and (min-width: 1040px) {
.header {
width: 15%;
height: 100%;
box-shadow: inset -22px 0 20px -20px var(--header-shadow);
}
.menu-entries{
float: none;
position: inherit;
}
.menu a, .menu a { display: block; }
a.home-link { display: none; }
.content {
margin-left: calc(15%);
margin-right: 0;
margin-top: auto;
padding: 20px;
}
.menu-entries a {
box-shadow: none;
}
.menu-entries a:hover{
box-shadow: inset -22px 0 20px -20px var(--header-shadow-hov);
}
footer {
width: calc(85% - 40px);
margin-left: 15%;
padding-top: 0;
}
footer.fixed { left: 15%; }
}
footer .buttons img {
/* margin: 5px; */
display: inline-block;
max-height: 25em;
max-width: 100%;
/* Table Styles */
table { width: 100%; }
th, td, table {
border: 2px solid var(--table-border);
border-collapse: collapse;
padding: 6px 13px;
}
/* div.content, footer{ */
/* margin-left: 0; */
/* /1* height: 1000px; *1/ */
/* } */
table thead tr { background-color: var(--table-bg); }
/* @media screen and (max-width: 900px) { */
/* ul.menu { width: 100%; */
/* height: auto; */
/* position: relative; */
/* } */
table tr { background-color: var(--table-bg-alt); }
/* ul.menu li a { */
/* padding: 15px; */
/* } */
table tr:nth-child(2n) { background-color: var(--table-bg); }
/* div.content, footer {margin-left: 0;} */
/* } */
table thead tr th:empty { display: none; }
/* .menu a { */
/* padding: 20px 30px; */
/* } */
/* ul.menu li a { */
/* float: left; */
/* } */
/* Markdown Blockquote styles */
/* .menu-entries { */
/* float: right; */
/* } */
blockquote {
border-left-color: var(--blockquote-border);
border-left-width: 5px;
border-left-style: solid;
margin: 20px 0;
padding: 20px 0 20px 20px;
}
/* .header .menu li .menu-entries{ */
/* clear: none; */
/* align-self: right; */
/* width: auto; */
/* max-height: none; */
/* } */
blockquote blockquote { margin-left: 20px }
/* .header .menu-icon { */
/* display: none; */
/* } */
/* Maps Shortcode */
blockquote.location {
background-color: var(--maps-bg);
border-left-color: var(--maps-border);
padding: 20px;
}
/* } */
@media screen and (max-width: 750px) {
blockquote p { margin: 0; }
.header .menu-btn:checked ~ .menu li .menu-entries,
.menu li .menu-entries a.home-link {
blockquote.location p { padding: inherit; }
.map-txt-grid .child-element a.button { margin: 0; }
/* =========================================== Still Needs cleaning */
/* Maps shortcode styling */
/* TODO rename most grid related elements for clarity */
.grid-item {
margin: 0;
position: relative;
}
.grid-item p {
margin: 0;
}
.button {
color: var(--button-fg);
background-color: var(--button-bg);
padding: 5px;
border: solid 3px var(--button-bg);
border-radius: 8px;
margin-top: 10px;
margin-bottom: 10px;
display: inline-block;
}
.map {
display: flex;
}
.map img {
width: 350px;
max-height: 350px;
}
.map-txt-grid {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
grid-gap: 10px;
position: relative;
left: 15px;
z-index: 1;
}
.map img {
display: block;
}
.map-txt-grid {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
grid-gap: 10px;
position: relative;
left: 15px;
z-index: 1;
}
.map img {
display: block;
}
@media screen and (max-width: 755px) {
.map {
display: block;
}
.button {
position: absolute;
bottom: 0;
right: 0;
}
.map img {
width: 100%;
max-height: inherit;
}
.map-txt-grid {
display: grid;
grid-template-rows: auto auto; /* Two rows, first row adjusts to content, second row adjusts to content */
grid-template-columns: 1fr 1fr; /* Two columns for the entire grid */
}
.map-txt-grid {
margin-top: 10px;
left: 0;
}
.grid-item:first-child {
grid-column: span 2; /* Span two columns */
}
}
/* TODO put in a clean spot */
.lang-switch {
display: inline-block;
background-color: var(--lang-btn-bg);
text-align: center;
width: 120px;
}
.lang-switch a {
width: 100%;
padding-left: 0;
padding-right: 0;
box-shadow: inset 0 -20px 20px -20px var(--header-shadow);
}
.lang-switch a:hover {
background-color: var(--langs-bg-hov);
box-shadow: none;
}
.lang-btn:checked ~ .lang-switch a {
box-shadow: none;
color: var(--langs-fg-hov);
}
/* lang-switch content (hidden by default) */
.translation-list {
display: block;
position: absolute;
background-color: var(--langs-bg);
width: 120px;
top: 64px;
right: 0;
overflow: hidden;
height: 0;
max-height: 0;
transition-property: all;
transition: 400ms;
}
/* Links inside the lang-switch */
.translation-list a {
float: none;
display: block;
}
.menu-entries {
text-align: center;
float: none;
display: none;
}
/* Add a grey background color to lang-switch links on hover */
.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;
/* Show the lang-switch menu on hover */
.lang-btn:checked ~ .translation-list {
height: auto;
max-height: 100px;
}
.lang-btn:checked ~ .lang-switch {
background-color: var(--langs-bg-hov);
}
@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;
.lang-switch {
width: 100%;
text-align: left;
}
/* ul.menu li a { */
/* float: none; */
/* padding: 20px; */
/* } */
.content, footer {
/* margin: auto; */
padding: 1px 16px;
.lang-switch a {
padding: 20px;
width: auto;
box-shadow: inset -22px 0 20px -20px var(--header-shadow);
}
.translation-list {
position: static;
width: auto;
}
}
@media screen and (max-width: 755px) {
.lang-switch {
width: 100%;
display: block;
}
.lang-switch a {
padding: 20px;
width: auto;
box-shadow: none;
}
.lang-switch a:hover { box-shadow: none; }
.translation-list {
position: static;
width: auto;
}
}
/* Calendar TODO Mix in for clean stylesheet */
.calendar {
width: 100%;
max-width: 1000px;
margin: 20px auto;
padding: 0;
background-color: var(--cal-bg);
color: var(--cal-fg);
}
a.month {
display: block;
width: 100%;
padding: 15px 0;
text-align: center;
background-color: var(--cal-month-bg);
color: var(--cal-month-fg);
pointer-events: none;
}
.days {
width: calc(100% - 10 px) ;
padding: 5px;
margin: auto;
display: flex;
flex-wrap: wrap;
}
.weekdays {
display: block;
width: 100%;
margin: 0;
padding: 0;
pointer-events: none;
}
.weekdays p {
display: inline-block;
width: calc(14.28%);
background-color: var(--cal-weekdays-bg);
color: var(--cal-weekdays-fg);
margin: 0;
padding: 0;
text-align: center;
/* border: 0px solid var(--bg); */
/* border-collapse: collapse; */
}
.pad-day, .day {
width: calc(14.28% - 3px - 10px);
padding: 0 5px;
margin: 1.5px;
aspect-ratio: 1;
}
.day {
background-color: var(--cal-day-empty-bg);
color: var(--cal-day-empty-fg);
transition: 400ms;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.day:has(>.event) {
/* display: block; */
color: var(--cal-day-busy-fg);
background-color: var(--cal-day-busy-bg);
}
.day:has(>.event):hover {
transform: scale(1.2);
background-color: var(--cal-day-hover-bg);
color: var(--cal-day-hover-fg);
cursor: pointer;
}
.day-num {
font-size: 6.5vh;
line-height: 1;
pointer-events: none;
margin: 0;
}
.day:has(>.event) .day-num {
font-size: 3vh;
margin-bottom: 1vh;
}
.event, .event a {
font-size: 1.5vh;
color: var(--cal-event-fg);
/* background-color: var(--cal-event-bg); */
}
.mobile-date { display: none;}
/* mobile layout */
@media screen and (max-width: 755px) {
.day, .pad-day, .weekdays, a.month { display: none; }
.days {
padding: 0;
text-align: left;
}
.calendar{
background-color: inherit;
}
.header .menu li a {
.day:has(>.event) {
display: block;
/* width: 100%; */
float: none;
width: 100%;
aspect-ratio: auto;
text-align: left;
border-left-width: 5px;
border-left-style: solid;
margin-top: 10px;
background-color: var(--cal-mobile-bg);
border-left-color: var(--cal-mobile-border);
padding: 20px;
color: var(--cal-mobile-fg);
}
.content {
margin: auto 5% auto 20%;
}
.day:has(>.event):hover {
transform: none;
background-color: var(--cal-mobile-bg);
color: var(--cal-mobile-fg);
}
.day-num { display: none; }
.mobile-date {
display: inline-block;
text-align: left;
font-size: 3vh;
width: auto;
}
.event {
float: right;
height: 100%;
display:flex;justify-content:flex-end;align-items:center;
}
.event, .event a {
background: none;
}
.event a {
color: var(--cal-mobile-link);
font-size: 2vh;
}
}
/* .logo { */
/* height: 28px; */
/* width: fit-content; */
/* } */
/* } */
/* pics stuff */
.gallery {
display: flex;
flex-wrap: wrap;
gap: 8px;
width: 100%;
}
.gallery-item {
flex-grow: 1;
flex: 1 1 auto;
height: 25vh;
}
.gallery-item img {
object-fit: cover;
width: 100%;
height: 100%;
transition: 140ms;
border-radius: 8px;
}
.gallery-item img:hover {
transform: scale(1.2);
transition: 400ms;
}
/* .header .logo { */
/* display: block; */
@media screen and (max-width: 755px) {
.gallery-item {
width: 100%;
height: auto;
}
.gallery-item img:hover {
transform: none;
}
}