diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cec74e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Theme Name + +## Features + +## Installation + +## Configuration diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..166ade9 --- /dev/null +++ b/assets/css/main.css @@ -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; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..e2aac52 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1 @@ +console.log('This site was generated by Hugo.'); diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..890e58d --- /dev/null +++ b/hugo.toml @@ -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" diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..3002f3a --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,15 @@ + + +{{partial "head" .}} + + + {{partial "header" .}} +
+ {{ if .Content}} +
{{.Content}}
+ {{end}} +
+ {{partial "footer" .}} + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..77cac73 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,19 @@ + + +{{partial "head" .}} + + + {{ partial "header" .}} +
+ {{ if .Content}} +
{{.Content}}
+ {{end}} {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ .Params.description }} {{ end }} {{ if (not .Pages)}} {{if eq "fr" .Language.Lang }} +

Il n'y a rien ici pour l'instant, veuillez consulter l'index anglais

+ {{end}} {{end}} +
+ {{partial "footer" .}} + + + \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..3002f3a --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,15 @@ + + +{{partial "head" .}} + + + {{partial "header" .}} +
+ {{ if .Content}} +
{{.Content}}
+ {{end}} +
+ {{partial "footer" .}} + + + \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..14abeb6 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,4 @@ + + +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..6ea920f --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,12 @@ +
+ +

{{.Site.Title}}

+ + +
\ No newline at end of file diff --git a/layouts/partials/language-picker.html b/layouts/partials/language-picker.html new file mode 100644 index 0000000..0feaef9 --- /dev/null +++ b/layouts/partials/language-picker.html @@ -0,0 +1,3 @@ + +{{ range .Site.Languages }} {{ if eq . $.Site.Language }} {{ else }} {{ range $.Translations }} +{{ .Language.LanguageName }} {{ end }} {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..7183180 --- /dev/null +++ b/layouts/partials/menu.html @@ -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 }} + +{{- 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 }} +
  • + {{ $name }} + {{- with .Children }} + + {{- end }} +
  • + {{- end }} +{{- end }} diff --git a/layouts/partials/terms.html b/layouts/partials/terms.html new file mode 100644 index 0000000..47cf6e4 --- /dev/null +++ b/layouts/partials/terms.html @@ -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 }} +
    +
    {{ $label }}:
    + +
    +{{- end }} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..6911db1 --- /dev/null +++ b/readme.md @@ -0,0 +1,4 @@ +# Justice + +A hugo theme + diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..67f8b77 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/theme.css b/static/theme.css new file mode 100644 index 0000000..f54e182 --- /dev/null +++ b/static/theme.css @@ -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; +} \ No newline at end of file diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..91e6edc --- /dev/null +++ b/theme.toml @@ -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'