Skip to content

Commit 9f78aa3

Browse files
committed
Add Hugo site structure and styles
- Updated .gitignore to exclude Hugo build directories. - Added initial Hugo layout files including base, list, single, header, footer, and meta partials. - Introduced critical and non-critical SCSS files for styling. - Created a Hugo build lock file to manage dependencies.
1 parent 2d822c6 commit 9f78aa3

11 files changed

Lines changed: 197 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
3232

3333
# Finder (MacOS) folder config
3434
.DS_Store
35+
36+
# Hugo
37+
public
38+
hugo/resources

hugo/.hugo_build.lock

Whitespace-only changes.

hugo/assets/scss/non-critical.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Non-critical styles - loaded asynchronously
2+
.header {
3+
background: #f8f9fa;
4+
padding: 1rem 0;
5+
}
6+
7+
.footer {
8+
background: #343a40;
9+
color: white;
10+
padding: 2rem 0;
11+
margin-top: 4rem;
12+
}
13+
14+
// Add your non-critical CSS here
15+
.btn {
16+
display: inline-block;
17+
padding: 0.5rem 1rem;
18+
background: #007bff;
19+
color: white;
20+
text-decoration: none;
21+
border-radius: 0.25rem;
22+
23+
&:hover {
24+
background: #0056b3;
25+
}
26+
}

hugo/assets/scss/styles.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Critical styles - loaded inline
2+
body {
3+
margin: 0;
4+
padding: 0;
5+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
6+
}
7+
8+
// Add your critical CSS here that needs to be inlined
9+
.container {
10+
max-width: 1200px;
11+
margin: 0 auto;
12+
padding: 0 1rem;
13+
}

hugo/layouts/_default/baseof.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
{{ partial "head.html" . }}
5+
6+
{{- block "head-scripts" . -}}
7+
{{- end -}}
8+
9+
{{- block "head-styles" . -}}
10+
{{- end -}}
11+
</head>
12+
13+
<body>
14+
<header class="header">
15+
{{ block "header" . }}
16+
{{ partial "header.html" . }}
17+
{{ end }}
18+
</header>
19+
20+
<main class="main">
21+
{{ block "main" . }}{{ end }}
22+
</main>
23+
24+
<footer class="footer">
25+
{{ block "footer" . }}
26+
{{ partial "footer.html" . }}
27+
{{ end }}
28+
</footer>
29+
30+
{{ block "footer-scripts" . }}{{ end }}
31+
</body>
32+
</html>

hugo/layouts/_default/list.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ define "main" }}
2+
<div class="content-wrapper list-container">
3+
<ul>
4+
{{ range .Pages.ByTitle }}
5+
<li>
6+
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
7+
</li>
8+
{{ end }}
9+
</ul>
10+
</div>
11+
{{ end }}

hugo/layouts/_default/single.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{ define "main" }}
2+
<h1>{{ .Title }}</h1>
3+
<article class="content-wrapper">
4+
<section>
5+
{{ .Content }}
6+
</section>
7+
</article>
8+
{{- end }}

hugo/layouts/partials/footer.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<footer class="footer">
2+
<div class="container">
3+
<p>&copy; {{ now.Year }} {{ .Site.Title }}. All rights reserved.</p>
4+
</div>
5+
</footer>

hugo/layouts/partials/head.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<meta charset="utf-8" />
2+
<meta name="viewport" content="width=device-width,minimum-scale=1" />
3+
<title>{{ .Title }}</title>
4+
5+
<!-- Load Critical CSS Inline -->
6+
{{ $applicationCSS := "scss/styles.scss" }}
7+
{{ $options := (dict "transpiler" "dartsass" "outputStyle" "compressed") }}
8+
{{ $appInlineCSS := resources.Get $applicationCSS | css.Sass $options }}
9+
<style>{{ $appInlineCSS.Content | safeCSS }}</style>
10+
11+
<!-- Load Non-Critical Styles Asynchronously -->
12+
{{ $options := (dict "transpiler" "dartsass" "targetPath" "non-critical.css" "outputStyle" "compressed") }}
13+
{{ $nonCriticalCSS := resources.Get "scss/non-critical.scss" | css.Sass $options | resources.Fingerprint }}
14+
<link
15+
rel="preload"
16+
href="{{ $nonCriticalCSS.RelPermalink }}"
17+
as="style"
18+
onload="this.onload=null;this.rel='stylesheet'" />
19+
<noscript>
20+
<link rel="stylesheet" href="{{ $nonCriticalCSS.RelPermalink }}" />
21+
</noscript>
22+
23+
<link
24+
rel="preload"
25+
href="/assets/fonts/Alice-Regular.woff2"
26+
as="font"
27+
crossorigin />
28+
<link
29+
rel="preload"
30+
href="/assets/fonts/Gantari-VariableFont_wght.woff2"
31+
as="font"
32+
crossorigin />
33+
34+
{{ if hugo.IsProduction }}
35+
{{/* <script
36+
defer
37+
src="https://api.pirsch.io/pa.js"
38+
id="pianjs"
39+
data-code="Knt697vyf6mctHZEsHchqzVx1eLvT2QW"
40+
></script>
41+
*/}}
42+
{{ end }}

hugo/layouts/partials/header.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<nav class="navbar">
2+
<ul class="navbar-nav">
3+
<li class="navbar-list-item">
4+
<a class="navbar-link" href="/about-us/">About Us</a>
5+
</li>
6+
<li class="navbar-list-item">
7+
<a class="navbar-link" href="/sermons/">Sermons</a>
8+
</li>
9+
<li class="navbar-list-item">
10+
<a class="navbar-link" href="/articles/">Articles</a>
11+
</li>
12+
<li class="navbar-list-item">
13+
<a class="navbar-link" href="/lessons/">Lessons</a>
14+
</li>
15+
<li class="navbar-list-item">
16+
<a class="navbar-link" href="/studies/">Studies</a>
17+
</li>
18+
<li class="navbar-list-item">
19+
<a class="navbar-link" href="/visitors/">Visitors</a>
20+
</li>
21+
<li class="navbar-list-item">
22+
<a class="navbar-link" href="/contact-us/">Contact Us</a>
23+
</li>
24+
</ul>
25+
</nav>

0 commit comments

Comments
 (0)