Feat: better layout for projects

Chore: rename products to projects
This commit is contained in:
Dorian Zedler 2022-08-05 19:04:42 +02:00
parent 61f2befe89
commit 651e8a2781
Signed by: dorian
GPG key ID: 989DE36109AFA354
8 changed files with 30 additions and 17 deletions

View file

@ -1,5 +1,5 @@
--- ---
layout: redirect layout: redirect
redirectUrl: "/scstw?ref=ScStwApp" redirectUrl: "/projects/scstw?ref=ScStwApp"
redirectDelay: "0" redirectDelay: "0"
--- ---

View file

@ -1,12 +1,12 @@
--- ---
title: Products title: Projects
layout: redirect layout: blog
redirectUrl: "reader-clock" redirectUrl: "reader-clock"
bodyClasses: 'title-h1h2 header-animated sticky-footer' bodyClasses: 'title-h1h2 header-animated sticky-footer'
menu: menu:
main: main:
title: Products title: Projects
name: Products name: Projects
weight: 2 weight: 2
--- ---

View file

@ -3,13 +3,15 @@ title: 'Reader Clock'
layout: "modular" layout: "modular"
bodyClasses: 'title-h1h2 header-fixed header-animated header-dark header-transparent sticky-footer' bodyClasses: 'title-h1h2 header-fixed header-animated header-dark header-transparent sticky-footer'
modularDataDir: "reader-clock" modularDataDir: "reader-clock"
image: images/reader-clock/front.jpg
summary: "The Reader-Clock is a digital clock which tells the time by showing a quote from an actual book."
menu: menu:
main: main:
title: Reader Clock title: Reader Clock
name: Reader Clock name: Reader Clock
weight: 2 weight: 2
parent: Products parent: Projects
--- ---
# Reader Clock # Reader Clock

View file

@ -3,13 +3,15 @@ title: 'Speed Climbing Stopwatch'
layout: "modular" layout: "modular"
bodyClasses: 'title-h1h2 header-fixed header-animated header-dark header-transparent sticky-footer' bodyClasses: 'title-h1h2 header-fixed header-animated header-dark header-transparent sticky-footer'
modularDataDir: "scstw" modularDataDir: "scstw"
image: "images/scstw/BaseStation.jpg"
summary: "The Speed Climbing Stopwatch (aka ScStw) is a modern speed climbing timing system that just works. "
menu: menu:
main: main:
title: Speed Climbing Stopwatch title: Speed Climbing Stopwatch
name: Speed Climbing Stopwatch name: Speed Climbing Stopwatch
weight: 2 weight: 2
parent: Products parent: Projects
--- ---
## What next? ## What next?

View file

@ -1,6 +1,6 @@
--- ---
title: ScStw title: ScStw
layout: redirect layout: redirect
redirectUrl: "../products/scstw" redirectUrl: "/projects/scstw"
bodyClasses: 'title-h1h2 header-animated sticky-footer' bodyClasses: 'title-h1h2 header-animated sticky-footer'
--- ---

View file

@ -12,7 +12,7 @@
links: links:
- -
text: "Check it out" text: "Check it out"
href: "products/reader-clock" href: "projects/reader-clock"
classes: "btn btn-primary" classes: "btn btn-primary"
- -
image: "images/scstw/hero.jpeg" image: "images/scstw/hero.jpeg"
@ -23,7 +23,7 @@
links: links:
- -
text: "Learn more" text: "Learn more"
href: "products/scstw" href: "projects/scstw"
classes: "btn btn-primary" classes: "btn btn-primary"
01-hero: 01-hero:
@ -38,7 +38,7 @@
links: links:
- -
text: "Check it out" text: "Check it out"
href: "products/reader-clock" href: "projects/reader-clock"
classes: "btn btn-primary" classes: "btn btn-primary"
02-highlights: 02-highlights:

View file

@ -23,7 +23,11 @@
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
{{ .Summary }} <a href="{{ .RelPermalink }}">Read More…</a> {{ if .Params.summary }}
{{ .Params.summary }}
{{ else }}
{{ .Summary }}
{{ end }}<a href="{{ .RelPermalink }}">Read More…</a>
</div> </div>
</div> </div>
{{ end }} {{ end }}
@ -35,8 +39,8 @@
{{ end }} {{ end }}
{{ define "javascripts" }} {{ define "javascripts" }}
<script src="/js/bricklayer.min.js"></script> <script src="{{ site.BaseURL }}/js/bricklayer.min.js"></script>
<script src="/js/scopedQuerySelectorShim.min.js"></script> <script src="{{ site.BaseURL }}/js/scopedQuerySelectorShim.min.js"></script>
<script> <script>
//Bricklayer //Bricklayer
var bricklayer = new Bricklayer(document.querySelector('.bricklayer')) var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))

View file

@ -1,11 +1,16 @@
{{ define "content" }} {{ define "content" }}
{{ $redirectUrl := .Params.redirectUrl }}
{{ if hasPrefix .Params.redirectUrl "/" }}
{{ $redirectUrl = printf "%s" .Params.redirectUrl | printf "%s%s" site.BaseURL | printf "%s" }}
{{ end }}
<article class="mb-16 max-w-5xl mx-auto px-4 prose lg:prose-lg prose-blue dark:prose-dark"> <article class="mb-16 max-w-5xl mx-auto px-4 prose lg:prose-lg prose-blue dark:prose-dark">
<noscript><meta http-equiv="refresh" content="{{ default 0 .Params.redirectDelay }}; url={{ .Params.redirectUrl }}" /></noscript> <noscript><meta http-equiv="refresh" content="{{ default 0 .Params.redirectDelay }}; url={{ $redirectUrl }}" /></noscript>
<h1 class="font-bold text-3xl">Redirecting ...</h1> <h1 class="font-bold text-3xl">Redirecting ...</h1>
<a href="{{ .Params.redirectUrl }}">Click here if nothing happens</a> <a href="{{ $redirectUrl }}">Click here if nothing happens</a>
<script> <script>
var destination = "{{ .Params.redirectUrl }}"; var destination = "{{ $redirectUrl }}";
window.location.href = destination + (window.location.search || '') + (window.location.hash || ''); window.location.href = destination + (window.location.search || '') + (window.location.hash || '');
</script> </script>