another commit

This commit is contained in:
Gabriel 2023-12-27 20:47:48 -05:00
parent 2f7cc446b9
commit b8034c3821
18 changed files with 392 additions and 0 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) [year] [fullname]
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.

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# Theme Name
## Features
## Installation
## Configuration

22
assets/css/main.css Normal file
View file

@ -0,0 +1,22 @@
body {
color: #222;
font-family: sans-serif;
line-height: 1.5;
margin: 1rem;
max-width: 768px;
}
header {
border-bottom: 1px solid #222;
margin-bottom: 1rem;
}
footer {
border-top: 1px solid #222;
margin-top: 1rem;
}
a {
color: #00e;
text-decoration: none;
}

1
assets/js/main.js Normal file
View file

@ -0,0 +1 @@
console.log('This site was generated by Hugo.');

23
hugo.toml Normal file
View file

@ -0,0 +1,23 @@
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
[[menus.main]]
name = 'Home'
pageRef = '/'
weight = 10
[[menus.main]]
name = 'Posts'
pageRef = '/posts'
weight = 20
[[menus.main]]
name = 'Tags'
pageRef = '/tags'
weight = 30
[module]
[module.hugoVersion]
extended = false
min = "0.116.0"

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{partial "header" .}}
<main>
{{ if .Content}}
<article>{{.Content}}</article>
{{end}}
</main>
{{partial "footer" .}}
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{ partial "header" .}}
<main>
{{ if .Content}}
<article>{{.Content}}</article>
{{end}} {{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Params.description }} {{ end }} {{ if (not .Pages)}} {{if eq "fr" .Language.Lang }}
<p>Il n'y a rien ici pour l'instant, veuillez consulter l'index anglais</p>
{{end}} {{end}}
</main>
{{partial "footer" .}}
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{partial "header" .}}
<main>
{{ if .Content}}
<article>{{.Content}}</article>
{{end}}
</main>
{{partial "footer" .}}
</body>
</html>

View file

View file

@ -0,0 +1,4 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
<link rel="stylesheet" href="/theme.css">

View file

@ -0,0 +1,12 @@
<header>
<a href='{{if eq "fr" .Language.Lang }}/{{.Language.Lang}}{{end}}/'><img src="/logo.webp" style="max-height:5rem;"></a>
<h1>{{.Site.Title}}</h1>
<nav>
{{ partial "language-picker" .}}
</nav>
<nav>{{ range .Site.Sections.ByWeight}}
<a href="{{.Permalink}}">
<h2>{{.Title}}</h2>
</a> {{end}}
</nav>
</header>

View file

@ -0,0 +1,3 @@
<!-- https://discourse.gohugo.io/t/language-switcher-in-menu/11570/5 -->
{{ range .Site.Languages }} {{ if eq . $.Site.Language }} {{ else }} {{ range $.Translations }}
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> {{ end }} {{ end }} {{ end }}

View file

@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View file

@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonony.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

4
readme.md Normal file
View file

@ -0,0 +1,4 @@
# Justice
A hugo theme

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

141
static/theme.css Normal file
View file

@ -0,0 +1,141 @@
body {
margin: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
--theme-accent: rgb(77, 3, 3);
--theme-accent2: rgb(255, 226, 158);
--theme-primary: white;
--theme-secondary: black;
}
header {
background-color: var(--theme-accent);
color: var(--theme-primary);
display: flex;
flex-wrap: wrap;
justify-content: center;
flex-direction: row;
align-items: center;
font-weight: bolder;
font-size: 18px;
font-family: Arial, Helvetica, sans-serif;
padding-bottom: 0.5rem;
}
a {
color: var(--theme-accent);
}
header a {
color: var(--theme-accent2);
}
header>* {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
header nav {
display: flex;
flex-direction: row;
align-items: center;
}
header nav>* {
margin-left: 1rem;
margin-right: 1rem;
}
main {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
main article {
min-width: 80vw;
width: 95vw;
max-width: 60rem;
font-size: 20px;
line-height: 24px;
}
article {
margin-top: 1rem;
margin-bottom: 1rem;
padding: 0.5rem;
display: flex;
flex-direction: column;
align-items: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
width: 70rem;
font-size: 26px;
line-height: 36px;
max-width: 90vw;
}
article h3,
section h3,
article h4,
section h4,
article h5,
article p {
width: 100%;
text-align: left;
margin: 15px;
}
article ul,
article ol,
article blockquote {
width: 100%;
}
article table {}
main article h1 {
width: 100%;
text-align: center;
}
footer {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
color: var(--theme-primary);
background-color: var(--theme-accent);
}
footer a {
color: white;
}
hr {
color: var(--theme-accent);
margin-top: 0.5rem;
margin-bottom: 0.5rem;
width: 100%;
}
table {
border-collapse: collapse;
}
th {
background-color: var(--theme-accent);
color: var(--theme-primary);
}
th,
td {
border: 1px solid var(--theme-accent);
padding: 5px;
}
blockquote {
border-left: 10px solid var(--theme-accent);
padding-left: 5px;
}

31
theme.toml Normal file
View file

@ -0,0 +1,31 @@
name = 'Justice'
license = 'MIT'
licenselink = 'https://github.com/owner/repo/LICENSE'
description = 'For Advocacy'
# The home page of the theme, where the source can be found
homepage = 'https://github.com/owner/repo'
# If you have a running demo of the theme
demosite = 'https://cyberfreedom.ca'
# Taxonomy terms
tags = ['blog', 'company']
features = ['some', 'awesome', 'features']
# If the theme has multiple authors
authors = [
{name = 'Name of author', homepage = 'Website of author'},
{name = 'Name of author', homepage = 'Website of author'}
]
# If the theme has a single author
[author]
name = 'Your name'
homepage = 'Your website'
# If porting an existing theme
[original]
author = 'Name of original author'
homepage = 'Website of original author'
repo = 'https://github.com/owner/repo'