Testing Hugo with bootstrap5
This commit is contained in:
2
assets/js/index.js
Normal file
2
assets/js/index.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import "js/bootstrap/src/collapse";
|
||||
import "js/bootstrap/src/dropdown";
|
||||
11
assets/jsconfig.json
Normal file
11
assets/jsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"../../../../../var/folders/qd/j16_xdd11jsdfhg61d2r6s940000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*",
|
||||
"../../../../../var/folders/qd/j16_xdd11jsdfhg61d2r6s940000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.3+incompatible/js/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1
assets/scss/styles.scss
Normal file
1
assets/scss/styles.scss
Normal file
@@ -0,0 +1 @@
|
||||
@import "bootstrap/bootstrap";
|
||||
@@ -1,4 +1,8 @@
|
||||
baseURL = 'http://example.org/'
|
||||
languageCode = 'en-US'
|
||||
title = 'Fransz Portfolio'
|
||||
theme = 'Basic'
|
||||
theme = 'bootstrap5'
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
@@ -3,10 +3,15 @@ title: "Welcome"
|
||||
date: 2025-11-01T21:52:55+01:00
|
||||
description: "Landing page"
|
||||
---
|
||||
* Persönliche Vorstellung
|
||||
* Andere Websites
|
||||
* Mein Lebenslauf
|
||||
|
||||
Das soll irgendwann mal eine ordentliche Portfolio Seite werden.
|
||||
|
||||
Anfangs wird es hier Folgendes zu finden sein:
|
||||
|
||||
### Persönliche Vorstellung
|
||||
Wie es mir ergangen ist, wo ich jetzt stehe und wo ich mich in einigen Jahren sehe.
|
||||
|
||||
### Andere Websites
|
||||
gitea, linkace
|
||||
|
||||
## Mein Lebenslauf
|
||||
Tabelarisch mit Kontaktformular?
|
||||
5
go.mod
Normal file
5
go.mod
Normal file
@@ -0,0 +1,5 @@
|
||||
module git.effeff.cloud/FranzR/sumup.git
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400 // indirect
|
||||
4
go.sum
Normal file
4
go.sum
Normal file
@@ -0,0 +1,4 @@
|
||||
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400 h1:L6+F22i76xmeWWwrtijAhUbf3BiRLmpO5j34bgl1ggU=
|
||||
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400/go.mod h1:uekq1D4ebeXgduLj8VIZy8TgfTjrLdSl6nPtVczso78=
|
||||
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
|
||||
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"Target":"scss/styles.css","MediaType":"text/css","Data":{}}
|
||||
BIN
themes/.DS_Store
vendored
Normal file
BIN
themes/.DS_Store
vendored
Normal file
Binary file not shown.
20
themes/bootstrap5/LICENSE
Normal file
20
themes/bootstrap5/LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2025 YOUR_NAME_HERE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
2
themes/bootstrap5/archetypes/default.md
Normal file
2
themes/bootstrap5/archetypes/default.md
Normal file
@@ -0,0 +1,2 @@
|
||||
+++
|
||||
+++
|
||||
0
themes/bootstrap5/layouts/404.html
Normal file
0
themes/bootstrap5/layouts/404.html
Normal file
19
themes/bootstrap5/layouts/_default/baseof.html
Normal file
19
themes/bootstrap5/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
<div class="container-fluid p-5 bg-primary text-white text-center">
|
||||
{{- partial "header.html" . -}}
|
||||
</div>
|
||||
{{- partial "nav.html" . -}}
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
0
themes/bootstrap5/layouts/_default/list.html
Normal file
0
themes/bootstrap5/layouts/_default/list.html
Normal file
7
themes/bootstrap5/layouts/_default/single.html
Normal file
7
themes/bootstrap5/layouts/_default/single.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<h2>{{ .Title }}</h2>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ end }}
|
||||
5
themes/bootstrap5/layouts/index.html
Normal file
5
themes/bootstrap5/layouts/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ end }}
|
||||
3
themes/bootstrap5/layouts/partials/footer.html
Normal file
3
themes/bootstrap5/layouts/partials/footer.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer>
|
||||
<small>Copyright {{now.Format "2006"}} Me.</small>
|
||||
</footer>
|
||||
31
themes/bootstrap5/layouts/partials/head.html
Normal file
31
themes/bootstrap5/layouts/partials/head.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<!-- <link rel="stylesheet" href="{{ "css/style.css"
|
||||
| relURL }}"> -->
|
||||
<title>{{ .Site.Title }}</title>
|
||||
|
||||
<!-- https://rodneymaiato.dev/posts/how-to-add-the-official-bootstrap-module-in-a-hugo-site/ -->
|
||||
{{/* Load Bootstrap SCSS. */}}
|
||||
{{ $options := dict "enableSourceMap" true }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $options := dict "enableSourceMap" false "outputStyle" }}
|
||||
{{ end }}
|
||||
{{ $styles := resources.Get "scss/styles.scss" }}
|
||||
{{ $styles := $styles | resources.ToCSS $options }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $styles = $styles | fingerprint }}
|
||||
{{ end }}
|
||||
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
|
||||
|
||||
{{/* Load Bootstrap JS. */}}
|
||||
{{ $js := resources.Get "js/index.js" }}
|
||||
{{ $params := dict }}
|
||||
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
|
||||
{{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2018" "params" $params }}
|
||||
{{ $js = $js | js.Build $opts }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $js = $js | fingerprint }}
|
||||
{{ end }}
|
||||
<script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
|
||||
</head>
|
||||
3
themes/bootstrap5/layouts/partials/header.html
Normal file
3
themes/bootstrap5/layouts/partials/header.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<header>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
</header>
|
||||
6
themes/bootstrap5/layouts/partials/nav.html
Normal file
6
themes/bootstrap5/layouts/partials/nav.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
<a href="/about">About</a>
|
||||
<a href="/resume">Résumé</a>
|
||||
<a href="/contact"></a>
|
||||
</nav>
|
||||
24
themes/bootstrap5/static/css/style.css
Normal file
24
themes/bootstrap5/static/css/style.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
width: 80%;
|
||||
}
|
||||
nav, footer {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
nav > a {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 768px) {
|
||||
nav { flex-direction: row; }
|
||||
}
|
||||
21
themes/bootstrap5/theme.toml
Normal file
21
themes/bootstrap5/theme.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
# theme.toml template for a Hugo theme
|
||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||
|
||||
name = "Basic"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
|
||||
description = ""
|
||||
homepage = "http://example.com/"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.41.0"
|
||||
|
||||
[author]
|
||||
name = ""
|
||||
homepage = ""
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = ""
|
||||
homepage = ""
|
||||
repo = ""
|
||||
Reference in New Issue
Block a user