mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 12:12:18 +00:00
Move site specific layouts and JS to the site folders
This commit is contained in:
47
layouts/page/calendar.html
Normal file
47
layouts/page/calendar.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "extra_css" }}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.css">
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "extra_js" }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.4.1/event-calendar.min.js" type="application/javascript"></script>
|
||||
<script type="application/javascript">
|
||||
var events = [];
|
||||
$(document).ready(function () {
|
||||
$.getJSON('https://api.leighhack.org/events', function (data) {
|
||||
data.forEach(function (event) {
|
||||
events.push({
|
||||
id: event['uid'],
|
||||
title: event['summary'],
|
||||
body: event['description'],
|
||||
state: 'Free',
|
||||
dueDateClass: '',
|
||||
start: event['start']['dateTime'],
|
||||
end: event['end']['dateTime'],
|
||||
})
|
||||
});
|
||||
let ec = new EventCalendar(document.getElementById('calendar'), {
|
||||
view: 'listMonth',
|
||||
events: events,
|
||||
headerToolbar: {
|
||||
start: 'prev,next today',
|
||||
center: 'title',
|
||||
end: 'dayGridMonth, listMonth'
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div id="calendar"></div>
|
||||
{{ end }}
|
||||
23
layouts/page/home.html
Normal file
23
layouts/page/home.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ define "hero-content" }}
|
||||
<h1 class="title is-1 has-text-white">{{ .Title }}</h1>
|
||||
<p class="subtitle has-text-white">{{ .Params.subtitle }}</p>
|
||||
|
||||
<div class="columns _is-desktop">
|
||||
<div class="column is-mobile is-multiline is-fullwidth-touch">
|
||||
<a class="button is-primary is-medium is-fullwidth has-box-shadow" href="{{ ref . "about" }}">Learn more</a>
|
||||
</div>
|
||||
<div class="column is-mobile is-multiline is-fullwidth-touch">
|
||||
<a class="button is-primary is-medium is-fullwidth has-box-shadow is-inverted _is-outlined"
|
||||
href="{{ ref . "membership" }}">Become a member</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "cta" }}
|
||||
{{ partial "design/bigcta.html" . }}
|
||||
{{ end }}
|
||||
23
layouts/page/membership.html
Normal file
23
layouts/page/membership.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
|
||||
<div class="columns pricing-tiers is-centered is-multiline">
|
||||
{{- with $.Site.Data.memberships.membership_levels }}
|
||||
{{ range . -}}
|
||||
<div class="column is-one-quarter">
|
||||
<div class="box is-large hover-items">
|
||||
<h3 class="is-size-4 has-text-weight-bold">{{ .name }}</h3>
|
||||
<div class="is-size-1 has-text-weight-bold pricing-price">£{{ .price }}</div>
|
||||
<div class="_is-block mt-1 is-size-7 has-text-weight-normal">{{ default "per month" .period }}</div>
|
||||
<div class="content mt-5 pricing-description is-size-6">
|
||||
<p>{{ .description }}</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<a href="{{ .link }}" class="button is-primary is-medium is-fullwidth has-box-shadow ">{{ default "Join Today" .button }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
15
layouts/shortcodes/facilities.html
Normal file
15
layouts/shortcodes/facilities.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="columns pricing-tiers is-centered is-multiline">
|
||||
{{- range (where .Site.RegularPages "Section" "facilities") }}
|
||||
<div class="column is-one-quarter">
|
||||
<div class="box is-large hover-items">
|
||||
<h3 class="is-size-4 has-text-weight-bold">{{ .Title }}</h3>
|
||||
<div class="content mt-5 facility-description">
|
||||
<p>{{ .Params.subtitle }}</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<a href="{{ .Permalink }}" class="button is-primary is-medium is-fullwidth has-box-shadow ">Learn More</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
10
layouts/shortcodes/printers.html
Normal file
10
layouts/shortcodes/printers.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<template id="printer-block">
|
||||
<div class="column is-one-quarter">
|
||||
<div class="box">
|
||||
<h3 id="printer-name"></h3>
|
||||
<p id="printer-status"></p>
|
||||
<p class="is-hidden" id="printer-finish-block">ETA: <span id="printer-finish"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="columns is-centered" id="printer-status"></div>
|
||||
Reference in New Issue
Block a user