forked from sr2/hugo-sr2
Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2552bc1e9c | |||
| f7e91119a5 | |||
| 189cdab5c7 | |||
| e6f91a16c5 | |||
|
|
938f5efabd | ||
| 1c9895212e | |||
| 46c881aa5e | |||
| cdad1ec38f | |||
| 1f4ee5dd22 | |||
| 3a539901bb | |||
| 96419e08dc | |||
| 108a805f27 | |||
| a65dc757fe | |||
| 40e78494ec | |||
| 8a6a4ad43c | |||
| ac636aeb21 | |||
| fd8d2641b9 | |||
| bcdfb3c0fd | |||
| 7d650337f1 | |||
| 9be694621f |
24 changed files with 226 additions and 32 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -24,3 +24,5 @@ _gen
|
|||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
.hugo_build.lock
|
||||
|
|
|
|||
22
LICENCE
Normal file
22
LICENCE
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Copyright 2021-2026 SR2 Communications Limited.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
31
README.md
Normal file
31
README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
SR2's Hugo Theme
|
||||
================
|
||||
|
||||
|
||||
[](https://hosted.weblate.org/engage/sr2/)
|
||||
[](https://opensource.org/licenses/BSD-2-Clause)
|
||||
|
||||
A Hugo theme created for SR2, with some simple page and blog layouts.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
* [SR2 Communications](https://www.sr2.uk/) ([Source Code](https://guardianproject.dev/sr2/www.sr2.uk/))
|
||||
* [SR2 Professional Services](https://www.sr2pro.uk/) ([Source Code](https://guardianproject.dev/sr2/www.sr2pro.uk/))
|
||||
* [499-501 Union Street (Management) Limited](https://www.499501.com/) ([Source Code](https://guardianproject.dev/sr2/www.499501.com/))
|
||||
* [Dynamic5 AB](https://dynamic5.com/)
|
||||
|
||||
Translations
|
||||
------------
|
||||
|
||||
The theme is created to support multiple languages.
|
||||
Translations of strings in the themes are managed on Weblate.
|
||||
|
||||
<a href="https://hosted.weblate.org/engage/sr2/">
|
||||
<img src="https://hosted.weblate.org/widget/sr2/hugo-sr2/multi-auto.svg" alt="Translation status" />
|
||||
</a>
|
||||
|
||||
Licence & Copyright
|
||||
-------------------
|
||||
|
||||
© SR2 Communications Limited. See [LICENCE](./LICENCE) for details of the BSD 2 clause licence.
|
||||
|
|
@ -51,6 +51,10 @@
|
|||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 0 20px;
|
||||
|
||||
@media (max-width: v.$bp_mobile) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.contact-method__name {
|
||||
|
|
|
|||
47
assets/css/datapage.scss
Normal file
47
assets/css/datapage.scss
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
@use "hugo:vars" as v;
|
||||
|
||||
|
||||
@media(min-width: v.$bp_mobile) {
|
||||
.datapage {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.datapage__content {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.datapage__data {
|
||||
order: 2;
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
.datapage__datacard {
|
||||
background-color: white;
|
||||
box-shadow: 0 1.5rem 4rem rgba(22,28,45,0.05) !important;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.datapage__datacard {
|
||||
address {
|
||||
white-space: preserve-breaks;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: v.$color_tertiary;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
}
|
||||
|
||||
.datapage__content {
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
.flex-section {
|
||||
margin: 48px 95px;
|
||||
|
||||
@media (max-width: v.$bp_mobile) {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-section__title {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ footer {
|
|||
justify-items: end;
|
||||
a {
|
||||
display: block;
|
||||
img {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
box-sizing: border-box;
|
||||
max-width: v.$max_content_width;
|
||||
}
|
||||
|
||||
@media (max-width: v.$bp_mobile) {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.full-section__content {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,16 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
&>div {
|
||||
flex: 0 0 50%;
|
||||
& > div {
|
||||
box-sizing: border-box;
|
||||
max-width: calc(v.$max_content_width / 2);
|
||||
}
|
||||
|
||||
@media (min-width: v.$bp_mobile) {
|
||||
& > div {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.half-section__content {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@
|
|||
flex-direction: column;
|
||||
padding: 0 20px;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
@media (max-width: v.$bp_mobile) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.team-member__photo {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
|
@ -1,3 +1,10 @@
|
|||
Published = 'Published'
|
||||
Updated = 'Updated'
|
||||
By = 'By %s'
|
||||
'Show larger map' = 'Show larger map'
|
||||
Telephone = 'Telephone'
|
||||
Email = 'Email'
|
||||
Fax = 'Fax'
|
||||
'Address' = 'Address'
|
||||
'Our Team' = 'Our Team'
|
||||
'Contact Us' = 'Contact Us'
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
Published = 'Publicerad'
|
||||
By = 'Av %s'
|
||||
'Show larger map' = 'Visa större karta'
|
||||
10
i18n/sv.toml
Normal file
10
i18n/sv.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Published = 'Publicerad'
|
||||
Updated = 'Ändrad'
|
||||
By = 'Av %s'
|
||||
'Show larger map' = 'Visa större karta'
|
||||
Telephone = 'Telefon'
|
||||
Email = 'Epost'
|
||||
Fax = 'Fax'
|
||||
'Our Team' = 'Vårt Team'
|
||||
'Contact Us' = "Kontakta Oss"
|
||||
Address = "Adress"
|
||||
10
i18n/tok.toml
Normal file
10
i18n/tok.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Published = "tenpo toki"
|
||||
By = "tan %s"
|
||||
'Show larger map' = "o suli e sitelen ma"
|
||||
Updated = "tenpo ante"
|
||||
Telephone = "nanpa pi toki weka"
|
||||
Email = "sitelen kon"
|
||||
Fax = "nanpa pi sitelen weka"
|
||||
Address = "nimi ma"
|
||||
"Our Team" = "kulupu pali mi"
|
||||
"Contact Us" = "o toki e mi"
|
||||
|
|
@ -31,8 +31,11 @@
|
|||
{{ if .icon }}
|
||||
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
|
||||
{{ end }}
|
||||
{{ .text }}</a
|
||||
>
|
||||
{{ .text }}
|
||||
{{ if .status }}
|
||||
<span class="status-indicator"></span>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ else if .caption }}
|
||||
<div class="footer__menu__caption">{{ .caption }}</div>
|
||||
{{ else if .logo }}
|
||||
|
|
@ -68,8 +71,11 @@
|
|||
{{ if .icon }}
|
||||
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
|
||||
{{ end }}
|
||||
{{ .text }}</a
|
||||
>
|
||||
{{ .text }}
|
||||
{{ if .status }}
|
||||
<span class="status-indicator"></span>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ else if .caption }}
|
||||
<div class="footer__menu__caption">{{ .caption }}</div>
|
||||
{{ else if .logo }}
|
||||
|
|
|
|||
|
|
@ -9,31 +9,27 @@
|
|||
</title>
|
||||
{{ partialCached "head/css.html" . }}
|
||||
{{ partialCached "head/js.html" . }}
|
||||
{{ partial "head/scripts.html" . }}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap"
|
||||
rel="stylesheet" />
|
||||
{{ if not .IsHome }}
|
||||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:url" content="{{ .RelPermalink }}" />
|
||||
|
||||
<!-- Meta data-->
|
||||
{{- if .Description }}
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
<meta property="og:description" content="{{ .Description }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
{{ end }}
|
||||
{{ if eq .Name "Contact" }}
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script
|
||||
id="zammad_form_script"
|
||||
src="https://help.sr2.uk/assets/form/form.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$("#zammad-feedback-form").ZammadForm({
|
||||
agreementMessage: {{ site.Params.feedback.agreementMessage }},
|
||||
messageSubmit:{{ site.Params.feedback.messageSubmit }},
|
||||
messageThankYou:{{ site.Params.feedback.messageThankYou }},
|
||||
showTitle: false,
|
||||
noCSS: true,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- if .Params.MetaKeywords }}
|
||||
<meta name="kaywords" content="{{ .Params.MetaKeywords }}" />
|
||||
{{- end }}
|
||||
{{- if .Params.MetaAuthor }}
|
||||
<meta name="author" content="{{ .Params.MetaAuthor }}" />
|
||||
{{- end }}
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="language" content="{{ (page.Language.LanguageCode | default (site.LanguageCode | default "en")) }}" />
|
||||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:url" content="{{ .RelPermalink }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
|
|
|
|||
2
layouts/_partials/head/scripts.html
Normal file
2
layouts/_partials/head/scripts.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!-- Use this file to add additional scripts you might need -->
|
||||
|
||||
39
layouts/gln.html
Normal file
39
layouts/gln.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<h1 class="page__title">{{ .Title }}</h1>
|
||||
|
||||
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Lastmod | time.Format ":date_long" }}
|
||||
<div class="page__date">
|
||||
{{ T "Updated" }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
</div>
|
||||
<div class="datapage">
|
||||
<div class="datapage__data">
|
||||
<div class="datapage__datacard">
|
||||
<h3>{{ T "Location Details" }}</h3>
|
||||
<h4>{{ T "Address" }}</h4>
|
||||
<address>{{ .Params.address }}</address>
|
||||
<h4>
|
||||
{{ T "Telephone" }}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="tel:{{ .Params.telephone }}">{{ .Params.telephone }}</a>
|
||||
</p>
|
||||
<h4 class="fw-bold text-uppercase text-gray-700 mb-2">
|
||||
GLN
|
||||
</h4>
|
||||
<p>
|
||||
{{ with resources.Get (printf "/images/gln/%s.png" .Params.gln) }}
|
||||
<img src="{{ .RelPermalink }}" alt="{{ .Params.gln }}" style="width: 100%;">
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="datapage__content">
|
||||
|
||||
{{ .Content }}
|
||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue