1
0
Fork 0
forked from sr2/hugo-sr2

Compare commits

..

20 commits
main ... main

Author SHA1 Message Date
irl
2552bc1e9c feat: add status indicator option to footer links 2026-03-17 19:57:53 +00:00
irl
f7e91119a5
Translated using Weblate (Swedish)
Currently translated at 100.0% (10 of 10 strings)

Translation: SR2/hugo-sr2
Translate-URL: https://hosted.weblate.org/projects/sr2/hugo-sr2/sv/
2026-03-07 13:41:14 +01:00
irl
189cdab5c7
Translated using Weblate (Toki Pona)
Currently translated at 100.0% (10 of 10 strings)

Translation: SR2/hugo-sr2
Translate-URL: https://hosted.weblate.org/projects/sr2/hugo-sr2/tok/
2026-03-07 13:41:14 +01:00
irl
e6f91a16c5 doc: adds Dynamic5 example to readme 2026-03-07 09:42:22 +00:00
N-Pex
938f5efabd Add more meta data and move scripts to site
Makes it easy to add custom scripts by overriding _partials/scripts.html
2026-03-02 10:00:07 +01:00
irl
1c9895212e Merge branch 'main' of https://hosted.weblate.org/git/sr2/hugo-sr2 2026-02-17 20:38:06 +00:00
irl
46c881aa5e feat: add sv translations 2026-02-17 20:29:58 +00:00
irl
cdad1ec38f
Translated using Weblate (Swedish)
Currently translated at 100.0% (3 of 3 strings)

Translation: sr2/hugo-sr2
Translate-URL: https://hosted.weblate.org/projects/sr2/hugo-sr2/sv/
2026-02-17 21:29:05 +01:00
irl
1f4ee5dd22
Translated using Weblate (Toki Pona)
Currently translated at 100.0% (3 of 3 strings)

Translation: sr2/hugo-sr2
Translate-URL: https://hosted.weblate.org/projects/sr2/hugo-sr2/tok/
2026-02-17 21:29:05 +01:00
irl
3a539901bb feat: add more strings for translation 2026-02-17 20:28:00 +00:00
irl
96419e08dc Added translation using Weblate (Toki Pona) 2026-02-17 20:10:03 +00:00
irl
108a805f27 Add examples of usage to README 2026-02-17 19:54:10 +00:00
irl
a65dc757fe Add README.md 2026-02-17 19:50:32 +00:00
irl
40e78494ec fix: use sv for swedish 2026-02-17 19:33:06 +00:00
irl
8a6a4ad43c Add BSD-2-clause LICENCE file 2026-02-17 19:32:12 +00:00
irl
ac636aeb21 misc: add .hugo_build.lock to .gitignore 2026-02-08 14:18:26 +00:00
irl
fd8d2641b9 fix: responsive fixes 2026-02-08 13:41:56 +00:00
irl
bcdfb3c0fd feat: layout for GLNs 2026-02-08 13:41:32 +00:00
irl
7d650337f1 feat: move example content to an example directory 2026-02-08 13:41:17 +00:00
9be694621f Fix right aligned footer logos 2026-01-26 12:20:29 +01:00
24 changed files with 226 additions and 32 deletions

2
.gitignore vendored
View file

@ -24,3 +24,5 @@ _gen
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
.hugo_build.lock

22
LICENCE Normal file
View 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
View file

@ -0,0 +1,31 @@
SR2's Hugo Theme
================
[![Translation status](https://hosted.weblate.org/widget/sr2/hugo-sr2/svg-badge.svg)](https://hosted.weblate.org/engage/sr2/)
[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](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
-------------------
&copy; SR2 Communications Limited. See [LICENCE](./LICENCE) for details of the BSD 2 clause licence.

View file

@ -51,6 +51,10 @@
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
padding: 0 20px; padding: 0 20px;
@media (max-width: v.$bp_mobile) {
padding: 0;
}
} }
.contact-method__name { .contact-method__name {

47
assets/css/datapage.scss Normal file
View 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%;
}
}

View file

@ -2,6 +2,11 @@
.flex-section { .flex-section {
margin: 48px 95px; margin: 48px 95px;
@media (max-width: v.$bp_mobile) {
margin-left: 0;
margin-right: 0;
}
} }
.flex-section__title { .flex-section__title {

View file

@ -33,6 +33,9 @@ footer {
justify-items: end; justify-items: end;
a { a {
display: block; display: block;
img {
margin-left: auto;
}
} }
} }

View file

@ -10,6 +10,10 @@
box-sizing: border-box; box-sizing: border-box;
max-width: v.$max_content_width; max-width: v.$max_content_width;
} }
@media (max-width: v.$bp_mobile) {
padding: 10px 20px;
}
} }
.full-section__content { .full-section__content {

View file

@ -5,11 +5,16 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
&>div { & > div {
flex: 0 0 50%;
box-sizing: border-box; box-sizing: border-box;
max-width: calc(v.$max_content_width / 2); max-width: calc(v.$max_content_width / 2);
} }
@media (min-width: v.$bp_mobile) {
& > div {
flex: 0 0 50%;
}
}
} }
.half-section__content { .half-section__content {

View file

@ -9,6 +9,10 @@
flex-direction: column; flex-direction: column;
padding: 0 20px; padding: 0 20px;
margin-bottom: 2rem; margin-bottom: 2rem;
@media (max-width: v.$bp_mobile) {
padding: 0;
}
} }
.team-member__photo { .team-member__photo {

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

View file

@ -1,3 +1,10 @@
Published = 'Published' Published = 'Published'
Updated = 'Updated'
By = 'By %s' By = 'By %s'
'Show larger map' = 'Show larger map' 'Show larger map' = 'Show larger map'
Telephone = 'Telephone'
Email = 'Email'
Fax = 'Fax'
'Address' = 'Address'
'Our Team' = 'Our Team'
'Contact Us' = 'Contact Us'

View file

@ -1,3 +0,0 @@
Published = 'Publicerad'
By = 'Av %s'
'Show larger map' = 'Visa större karta'

10
i18n/sv.toml Normal file
View 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
View 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"

View file

@ -31,8 +31,11 @@
{{ if .icon }} {{ if .icon }}
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i> <i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
{{ end }} {{ end }}
{{ .text }}</a {{ .text }}
> {{ if .status }}
<span class="status-indicator"></span>
{{ end }}
</a>
{{ else if .caption }} {{ else if .caption }}
<div class="footer__menu__caption">{{ .caption }}</div> <div class="footer__menu__caption">{{ .caption }}</div>
{{ else if .logo }} {{ else if .logo }}
@ -68,8 +71,11 @@
{{ if .icon }} {{ if .icon }}
<i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i> <i class="footer__menu__link__icon" data-feather="{{ .icon }}"></i>
{{ end }} {{ end }}
{{ .text }}</a {{ .text }}
> {{ if .status }}
<span class="status-indicator"></span>
{{ end }}
</a>
{{ else if .caption }} {{ else if .caption }}
<div class="footer__menu__caption">{{ .caption }}</div> <div class="footer__menu__caption">{{ .caption }}</div>
{{ else if .logo }} {{ else if .logo }}

View file

@ -9,31 +9,27 @@
</title> </title>
{{ partialCached "head/css.html" . }} {{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }} {{ partialCached "head/js.html" . }}
{{ partial "head/scripts.html" . }}
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link <link
href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap" href="https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap"
rel="stylesheet" /> rel="stylesheet" />
{{ if not .IsHome }}
<meta property="og:title" content="{{ .Title }}" /> <!-- Meta data-->
<meta property="og:url" content="{{ .RelPermalink }}" /> {{- if .Description }}
<meta name="description" content="{{ .Description }}" />
<meta property="og:description" content="{{ .Description }}" /> <meta property="og:description" content="{{ .Description }}" />
<meta property="og:type" content="website" /> {{- end }}
{{ end }} {{- if .Params.MetaKeywords }}
{{ if eq .Name "Contact" }} <meta name="kaywords" content="{{ .Params.MetaKeywords }}" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> {{- end }}
<script {{- if .Params.MetaAuthor }}
id="zammad_form_script" <meta name="author" content="{{ .Params.MetaAuthor }}" />
src="https://help.sr2.uk/assets/form/form.js"></script> {{- end }}
<script> <meta name="robots" content="index, follow" />
$(function () { <meta name="language" content="{{ (page.Language.LanguageCode | default (site.LanguageCode | default "en")) }}" />
$("#zammad-feedback-form").ZammadForm({ <meta property="og:title" content="{{ .Title }}" />
agreementMessage: {{ site.Params.feedback.agreementMessage }}, <meta property="og:url" content="{{ .RelPermalink }}" />
messageSubmit:{{ site.Params.feedback.messageSubmit }}, <meta property="og:type" content="website" />
messageThankYou:{{ site.Params.feedback.messageThankYou }},
showTitle: false,
noCSS: true,
});
});
</script>
{{ end }}

View file

@ -0,0 +1,2 @@
<!-- Use this file to add additional scripts you might need -->

39
layouts/gln.html Normal file
View 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 }}