Compare commits

..

No commits in common. "d5205fc159f180f3bd08b8cd81910470bb84c33a" and "ee9eea2674a44dcaac9f593357d279aded4dd005" have entirely different histories.

13 changed files with 94 additions and 142 deletions

View File

@ -16,15 +16,6 @@ In the coming weeks and months, you can expect to see new features, and bug fixe
So, welcome aboard! I'm excited to have you join us on this journey as we shape the future of Hugo Theme re-Terminal together. Let's get started! So, welcome aboard! I'm excited to have you join us on this journey as we shape the future of Hugo Theme re-Terminal together. Let's get started!
## Changes vs original Terminal
- removed all deprecated HUGO code
- comments counter for pages
- added post base primitive for more flexible pages where you can embed your code
- site top banner, aka call to action banner
- migrated from SCSS variable to CSS' Native, it brings super easy color customization via `style.css`
- add submenus for the main menu
- `coverCaption` for your article covers. Now you can add some information about the image in proper way
---- ----
![re-Terminal](https://github.com/mirus-ua/hugo-theme-re-terminal/blob/main/images/screenshot.png?raw=true) ![re-Terminal](https://github.com/mirus-ua/hugo-theme-re-terminal/blob/main/images/screenshot.png?raw=true)

View File

@ -4,7 +4,6 @@ date = "{{ .Date }}"
author = "" author = ""
authorTwitter = "" #do not include @ authorTwitter = "" #do not include @
cover = "" cover = ""
coverCaption = ""
tags = ["", ""] tags = ["", ""]
keywords = ["", ""] keywords = ["", ""]
description = "" description = ""

View File

@ -1,3 +1,3 @@
:root { :root {
--accent: #c00101; --accent: #FF6266;
} }

View File

@ -6,7 +6,7 @@
position: absolute; position: absolute;
background: var(--background); background: var(--background);
box-shadow: var(--shadow); box-shadow: var(--shadow);
color: var(--color); color: white;
border: 2px solid; border: 2px solid;
margin: 0; margin: 0;
padding: 10px; padding: 10px;

View File

@ -134,16 +134,3 @@ h1:hover a, h2:hover a, h3:hover a, h4:hover a {
.footnotes { .footnotes {
color: color-mix(in srgb, var(--accent), transparent 50%); color: color-mix(in srgb, var(--accent), transparent 50%);
} }
figure:has(.post-cover) {
margin: 40px 0;
& > .post-cover {
margin: 0;
}
& > figcaption {
margin-top: 0;
}
}

View File

@ -1,11 +1,11 @@
:root { :root {
/* COLOR VARIABLES */ /* COLOR VARIABLES */
--background: color-mix(in srgb, var(--accent) 2%, #FFF 98%); --background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
--accent-contrast-color: white; --accent-contrast-color: black;
--color: black; --color: white;
--border-color: rgba(0, 0, 0, .1); --border-color: rgba(255, 255, 255, .1);
/* MEDIA QUERIES */ /* MEDIA QUERIES */
--phone: "max-width: 684px"; --phone: "max-width: 684px";
--tablet: "max-width: 900px"; --tablet: "max-width: 900px";
} }

View File

@ -3,7 +3,6 @@ title = "CSS Variables update"
date = "2024-07-30" date = "2024-07-30"
author = "Mirus" author = "Mirus"
cover = "img/css-variables-update.webp" cover = "img/css-variables-update.webp"
coverCaption = "By the way, you can add a caption for your cover"
description = "A small demo of native CSS Variables. You can create your very own re-Terminal today!" description = "A small demo of native CSS Variables. You can create your very own re-Terminal today!"
layout = "css-vars-showcase" layout = "css-vars-showcase"
Toc=true Toc=true

View File

@ -4,72 +4,72 @@ languageCode = "en-us"
paginate = 5 paginate = 5
[params] [params]
contentTypeName = "posts" contentTypeName = "posts"
themeColor = "blue" themeColor = "blue"
showMenuItems = 3 showMenuItems = 3
fullWidthTheme = false fullWidthTheme = false
centerTheme = true centerTheme = true
[params.banner] [params.banner]
dismissible = false dismissible = false
text = "Check it out on GitHub" text = "Check it out on GitHub"
url = "https://github.com/mirus-ua/hugo-theme-re-terminal" url = "https://github.com/mirus-ua/hugo-theme-re-terminal"
[languages] [languages]
[languages.en.params] [languages.en.params]
title = "re-Terminal" title = "re-Terminal"
subtitle = "A simple, retro theme for Hugo" subtitle = "A simple, retro theme for Hugo"
keywords = "" keywords = ""
copyright = "" copyright = ""
menuMore = "Show more" menuMore = "Show more"
readMore = "Read more" readMore = "Read more"
readOtherPosts = "Read other posts" readOtherPosts = "Read other posts"
[languages.en.params.logo] [languages.en.params.logo]
logoText = "re-Terminal" logoText = "re-Terminal"
logoHomeLink = "/" logoHomeLink = "/"
[languages.en.menu] [languages.en.menu]
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "submenu" identifier = "submenu"
name = "Sub menus" name = "Sub menus"
weight = 10 weight = 10
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "subabout" identifier = "subabout"
name = "About" name = "About"
url = "/about" url = "/about"
parent = "submenu" parent = "submenu"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "subshowcase" identifier = "subshowcase"
name = "Showcase" name = "Showcase"
url = "/showcase" url = "/showcase"
parent = "submenu" parent = "submenu"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "about" identifier = "about"
name = "About" name = "About"
url = "/about" url = "/about"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "showcase" identifier = "showcase"
name = "Showcase" name = "Showcase"
url = "/showcase" url = "/showcase"
# Only for demo deploy perpous # Only for demo deploy perpous
[module] [module]
[[module.mounts]] [[module.mounts]]
source = 'demoSite/content' source = 'demoSite/content'
target = 'content' target = 'content'
[[module.mounts]] [[module.mounts]]
source = 'demoSite/static' source = 'demoSite/static'
target = 'static' target = 'static'
[[module.mounts]] [[module.mounts]]
source = 'static' source = 'static'
target = 'static' target = 'static'
[[module.mounts]] [[module.mounts]]
source = 'layouts' source = 'layouts'
target = 'layouts' target = 'layouts'
[[module.mounts]] [[module.mounts]]
source = 'demoSite/layouts' source = 'demoSite/layouts'
target = 'layouts' target = 'layouts'
[[module.mounts]] [[module.mounts]]
source = 'archetypes' source = 'archetypes'
target = 'archetypes' target = 'archetypes'

View File

@ -29,7 +29,7 @@
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }} {{ partial "cover.html" . }}
{{ if (.Params.Toc | default .Site.Params.Toc) }} {{ if (.Params.Toc | default .Site.Params.Toc) }}
<div class="table-of-contents"> <div class="table-of-contents">

View File

@ -1,54 +1,24 @@
{{- $ctx := "" -}}
{{- $isCoverCaptionEnabled := default nil -}}
{{- if (reflect.IsMap . ) -}}
{{- /* Assign Custom Context */ -}}
{{- $ctx = .ctx -}}
{{- /* Assign value of .isCoverCaptionEnabled */ -}}
{{- $isCoverCaptionEnabled = cond (not .isCoverCaptionEnabled) nil .isCoverCaptionEnabled -}}
{{- else -}}
{{- /* Passing dot context, default behaviour */ -}}
{{- $ctx = . -}}
{{- /* Default isCoverCaptionEnabled for Dot Context */ -}}
{{- $isCoverCaptionEnabled = false -}}
{{- end -}}
{{- $cover := false -}} {{- $cover := false -}}
{{- $autoCover := default $.Site.Params.autoCover false }} {{- $autoCover := default $.Site.Params.autoCover false }}
{{- if index $ctx.Params "cover" -}} {{- if index .Params "cover" -}}
{{- if .Resources.GetMatch $ctx.Params.Cover }} {{- if .Resources.GetMatch .Params.Cover }}
{{- $cover = (.Resources.GetMatch $ctx.Params.Cover).RelPermalink -}} {{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
{{- else -}} {{- else -}}
{{- $cover = absURL $ctx.Params.Cover -}} {{- $cover = absURL .Params.Cover -}}
{{- end -}} {{- end -}}
{{- else if $.Site.Params.AutoCover -}} {{- else if $.Site.Params.AutoCover -}}
{{- if (not $ctx.Params.Cover) -}} {{- if (not .Params.Cover) -}}
{{- if .Resources.GetMatch "cover.*" -}} {{- if .Resources.GetMatch "cover.*" -}}
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}} {{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if $cover -}} {{if $cover -}}
{{ if and $ctx.Params.coverCaption $isCoverCaptionEnabled }} <!-- Cover image found -->
<figure> <img src="{{ $cover }}"
<!-- Cover image found --> class="post-cover"
<img src="{{ $cover }}" alt="{{ .Title | plainify | default " " }}"
class="post-cover" title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" />
alt="{{ .Title | plainify | default " " }}"
title="{{ $ctx.Params.CoverCredit |plainify|default "Cover Image" }}" />
<figcaption class="right">{{ $ctx.Params.coverCaption | safeHTML }}</figcaption>
</figure>
{{ else }}
<!-- Cover image found -->
<img src="{{ $cover }}"
class="post-cover"
alt="{{ .Title | plainify | default " " }}"
title="{{ $ctx.Params.CoverCredit |plainify|default "Cover Image" }}" />
{{ end }}
{{- end }} {{- end }}

View File

@ -1,24 +1,30 @@
<footer class="footer"> <footer class="footer">
<div class="footer__inner"> <div class="footer__inner">
{{ if $.Site.Params.Copyright }} {{ if $.Site.Copyright }}
<div class="copyright copyright--user"> <div class="copyright copyright--user">
<span>{{ $.Site.Params.Copyright | safeHTML }}</span> <span>{{ $.Site.Copyright | safeHTML }}</span>
{{ else }} {{ else }}
<div class="copyright"> <div class="copyright">
<span>© {{ now.Year }} Basé sur <a href="https://gohugo.io">Hugo</a></span> <span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
{{ end }} {{ end }}
<span>:: <a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank">Theme</a> par <a href="https://github.com/mirus-ua" target="_blank">Mirus</a> modifié par <a href="https://jean-cloud.net">Jean-Cloud</a></span> <span>:: <a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank">Theme</a> made by <a href="https://github.com/mirus-ua" target="_blank">Mirus</a></span>
<span>:: Hébergé par <a href="https://jean-cloud.net">Jean-Cloud</a></div>
</div> </div>
</div> </div>
</footer> </footer>
{{ $menu := resources.Get "js/menu.js" | js.Build }} {{ $menu := resources.Get "js/menu.js" | js.Build }}
{{ $prism := resources.Get "js/prism.js" | js.Build }}
{{ $bundle := slice $menu | resources.Concat "bundle.js" | resources.Minify }} {{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }}
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script> <script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
<!-- Banner JS if it enabled -->
{{ if .Site.Params.Banner }}
{{ $banner := resources.Get "js/banner.js" | js.Build | resources.Minify }}
<script type="text/javascript" src="{{ $banner.RelPermalink }}"></script>
{{ end }}
<!-- Extended footer section--> <!-- Extended footer section-->
{{ partial "extended_footer.html" . }} {{ partial "extended_footer.html" . }}

View File

@ -1,5 +1,5 @@
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}"> <a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
<div class="logo"> <div class="logo">
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}<img src="/img/logo1.JPG" alt="Logo"/>{{ end }} {{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}re-Terminal{{ end }}
</div> </div>
</a> </a>

View File

@ -67,7 +67,7 @@ HERE INSERT ANY CUSTOM <script/> or <style/>
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }} {{ partial "cover.html" . }}
{{ if (.Params.Toc | default .Site.Params.Toc) }} {{ if (.Params.Toc | default .Site.Params.Toc) }}
<div class="table-of-contents"> <div class="table-of-contents">