mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 10:22:21 +00:00
Add retro theme
This commit is contained in:
11
themes/lhs-retro/layouts/404.html
Normal file
11
themes/lhs-retro/layouts/404.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "title" }}
|
||||
Page Not Found
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
Oops!
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
Sorry, this page doesn't exist!
|
||||
{{ end }}
|
||||
15
themes/lhs-retro/layouts/_default/baseof.html
Normal file
15
themes/lhs-retro/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<body background="#FFFFFF" text="#000000">
|
||||
{{ partial "header.html" . }}
|
||||
{{ block "content" . }}
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
17
themes/lhs-retro/layouts/_default/list.html
Normal file
17
themes/lhs-retro/layouts/_default/list.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
11
themes/lhs-retro/layouts/_default/single.html
Normal file
11
themes/lhs-retro/layouts/_default/single.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
37
themes/lhs-retro/layouts/blog/list.html
Normal file
37
themes/lhs-retro/layouts/blog/list.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
|
||||
<p><i>Subscribe to our <a href="index.xml" type="application/rss+xml">RSS feed</a> to keep up to date with new
|
||||
posts.</i></p>
|
||||
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<h3 id="{{ .Key }}">{{ .Key }}</h3>
|
||||
|
||||
{{- range .Pages }}
|
||||
{{ $image := .Resources.GetMatch .Params.listing_image }}
|
||||
{{ $image = $image.Fill "128x128 Center jpg picture" }}
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ $image.RelPermalink}}">
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="{{ .Permalink }}">{{.Title}}</a> - {{ .Params.author }}<br />
|
||||
{{ dateFormat "Jan 2, 2006" .PublishDate }}
|
||||
</p>
|
||||
<p><i>{{ .Summary }}</i></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
26
themes/lhs-retro/layouts/blog/single.html
Normal file
26
themes/lhs-retro/layouts/blog/single.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
{{ $avatar := resources.GetRemote (print "https://www.gravatar.com/avatar/" (sha256 .Params.author_email)) |
|
||||
resources.Copy (print "images/avatars/" (sha256 .Params.author_email) ".jpg") }}
|
||||
<img src="{{ $avatar.Permalink }}">
|
||||
</td>
|
||||
<td>
|
||||
<p class="is-size-5 is-italic">This is a post by <b>{{ .Params.author }}</b>.<br />Originally
|
||||
posted {{ .PublishDate | time.Format ":date_full" }}</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ end }}
|
||||
0
themes/lhs-retro/layouts/partials/foot.html
Normal file
0
themes/lhs-retro/layouts/partials/foot.html
Normal file
23
themes/lhs-retro/layouts/partials/footer.html
Normal file
23
themes/lhs-retro/layouts/partials/footer.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<hr>
|
||||
<p>
|
||||
<b>Leigh Hackspace</b><br>
|
||||
Unit 3.14, Leigh Spinners Mill<br>
|
||||
Park Lane, Leigh <br>
|
||||
WN7 2LB <br>
|
||||
<a href="mailto:info@leighhack.org">info@leighhack.org</a>
|
||||
</p>
|
||||
<p>
|
||||
<b>Socials:</b>
|
||||
{{ $menu_items := add (len .Site.Params.social_links) -1 }}
|
||||
{{- range $i, $e := .Site.Params.social_links }}
|
||||
<a href="{{ .url | safeURL }}" target="_blank" rel="noopener me" title="{{ .name | humanize }}">{{ .name | humanize
|
||||
}}</a>{{ if lt $i $menu_items }} / {{ end }}
|
||||
{{- end }}
|
||||
</p>
|
||||
|
||||
|
||||
<p>© {{ .Site.Params.company }} {{ .Site.Params.copyright_years }} | Initial website design by <a
|
||||
href="https://www.studiocosmos.co.uk" target="_blank" rel="noopener">COSMOS</a><br />
|
||||
{{ .Site.Title }} is a trading name of {{ .Site.Params.Company }}, registered in England & Wales No. <a
|
||||
href="https://find-and-update.company-information.service.gov.uk/company/{{ .Site.Params.company_number }}">{{
|
||||
.Site.Params.company_number }}</a></p>
|
||||
7
themes/lhs-retro/layouts/partials/head.html
Normal file
7
themes/lhs-retro/layouts/partials/head.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<meta charset="utf-8">
|
||||
<title>{{ block "title" . }}{{ .Site.Title }} - {{ .Title }}{{ end }}</title>
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ absURL "blog/index.xml" }}" title="{{ .Site.Title }}">
|
||||
<link rel="alternate" type="text/calendar" href="https://api.leighhack.org/events.ics" title="{{ .Site.Title }} Events">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
13
themes/lhs-retro/layouts/partials/header.html
Normal file
13
themes/lhs-retro/layouts/partials/header.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ with resources.Get "images/rose_logo.jpg" }}
|
||||
<h1><a href="{{ absURL "" }}"><img src="{{ .RelPermalink }}" alt="The logo of Leigh Hackspace" width="70px"></a> Leigh Hackspace</h1>
|
||||
{{ end }}
|
||||
<p>
|
||||
{{ $menu_items := add (len site.Menus.main) -1 }}
|
||||
{{- range $i, $e := site.Menus.main }}
|
||||
<a href="{{ .URL }}" class="active navbar-item has-shadow is-size-5">{{ .Name }}</a>{{ if lt $i $menu_items }} / {{
|
||||
end }}
|
||||
</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
<hr>
|
||||
<h2>{{ .Title }}</h2>
|
||||
7
themes/lhs-retro/layouts/shortcodes/image.html
Normal file
7
themes/lhs-retro/layouts/shortcodes/image.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $img = $img.Resize (print (default "640x" $width) " jpeg picture") }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $class := .Get "class" }}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" {{ if $title }}
|
||||
alt="{{ $title }}" {{ end }}>
|
||||
2
themes/lhs-retro/layouts/shortcodes/rawhtml.html
Normal file
2
themes/lhs-retro/layouts/shortcodes/rawhtml.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!-- raw html -->
|
||||
{{.Inner}}
|
||||
Reference in New Issue
Block a user