Compare commits
10 Commits
ee9eea2674
...
d5205fc159
Author | SHA1 | Date | |
---|---|---|---|
d5205fc159 | |||
|
fab58b1697 | ||
|
c9e3c8294c | ||
|
17c236db9d | ||
|
9e870a1c0b | ||
|
94513b2e42 | ||
|
4779fd62c0 | ||
|
6362d29a2c | ||
|
9795a7535f | ||
|
e1866ffa63 |
@ -16,6 +16,15 @@ 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!
|
||||
|
||||
## 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)
|
||||
|
@ -4,6 +4,7 @@ date = "{{ .Date }}"
|
||||
author = ""
|
||||
authorTwitter = "" #do not include @
|
||||
cover = ""
|
||||
coverCaption = ""
|
||||
tags = ["", ""]
|
||||
keywords = ["", ""]
|
||||
description = ""
|
||||
|
@ -1,3 +1,3 @@
|
||||
:root {
|
||||
--accent: #FF6266;
|
||||
}
|
||||
--accent: #c00101;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
position: absolute;
|
||||
background: var(--background);
|
||||
box-shadow: var(--shadow);
|
||||
color: white;
|
||||
color: var(--color);
|
||||
border: 2px solid;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
|
@ -134,3 +134,16 @@ h1:hover a, h2:hover a, h3:hover a, h4:hover a {
|
||||
.footnotes {
|
||||
color: color-mix(in srgb, var(--accent), transparent 50%);
|
||||
}
|
||||
|
||||
figure:has(.post-cover) {
|
||||
margin: 40px 0;
|
||||
|
||||
|
||||
& > .post-cover {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& > figcaption {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
:root {
|
||||
/* COLOR VARIABLES */
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #1D1E28 98%);
|
||||
--accent-contrast-color: black;
|
||||
--color: white;
|
||||
--border-color: rgba(255, 255, 255, .1);
|
||||
--background: color-mix(in srgb, var(--accent) 2%, #FFF 98%);
|
||||
--accent-contrast-color: white;
|
||||
--color: black;
|
||||
--border-color: rgba(0, 0, 0, .1);
|
||||
|
||||
/* MEDIA QUERIES */
|
||||
--phone: "max-width: 684px";
|
||||
--tablet: "max-width: 900px";
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ title = "CSS Variables update"
|
||||
date = "2024-07-30"
|
||||
author = "Mirus"
|
||||
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!"
|
||||
layout = "css-vars-showcase"
|
||||
Toc=true
|
||||
|
@ -4,72 +4,72 @@ languageCode = "en-us"
|
||||
paginate = 5
|
||||
|
||||
[params]
|
||||
contentTypeName = "posts"
|
||||
themeColor = "blue"
|
||||
showMenuItems = 3
|
||||
fullWidthTheme = false
|
||||
centerTheme = true
|
||||
[params.banner]
|
||||
dismissible = false
|
||||
text = "Check it out on GitHub"
|
||||
url = "https://github.com/mirus-ua/hugo-theme-re-terminal"
|
||||
contentTypeName = "posts"
|
||||
themeColor = "blue"
|
||||
showMenuItems = 3
|
||||
fullWidthTheme = false
|
||||
centerTheme = true
|
||||
[params.banner]
|
||||
dismissible = false
|
||||
text = "Check it out on GitHub"
|
||||
url = "https://github.com/mirus-ua/hugo-theme-re-terminal"
|
||||
|
||||
[languages]
|
||||
[languages.en.params]
|
||||
title = "re-Terminal"
|
||||
subtitle = "A simple, retro theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
[languages.en.params]
|
||||
title = "re-Terminal"
|
||||
subtitle = "A simple, retro theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "re-Terminal"
|
||||
logoHomeLink = "/"
|
||||
[languages.en.params.logo]
|
||||
logoText = "re-Terminal"
|
||||
logoHomeLink = "/"
|
||||
|
||||
[languages.en.menu]
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "submenu"
|
||||
name = "Sub menus"
|
||||
weight = 10
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "subabout"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
parent = "submenu"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "subshowcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
parent = "submenu"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "showcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "submenu"
|
||||
name = "Sub menus"
|
||||
weight = 10
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "subabout"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
parent = "submenu"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "subshowcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
parent = "submenu"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "showcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
|
||||
|
||||
# Only for demo deploy perpous
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/content'
|
||||
target = 'content'
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/static'
|
||||
target = 'static'
|
||||
[[module.mounts]]
|
||||
source = 'static'
|
||||
target = 'static'
|
||||
[[module.mounts]]
|
||||
source = 'layouts'
|
||||
target = 'layouts'
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/layouts'
|
||||
target = 'layouts'
|
||||
[[module.mounts]]
|
||||
source = 'archetypes'
|
||||
target = 'archetypes'
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/content'
|
||||
target = 'content'
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/static'
|
||||
target = 'static'
|
||||
[[module.mounts]]
|
||||
source = 'static'
|
||||
target = 'static'
|
||||
[[module.mounts]]
|
||||
source = 'layouts'
|
||||
target = 'layouts'
|
||||
[[module.mounts]]
|
||||
source = 'demoSite/layouts'
|
||||
target = 'layouts'
|
||||
[[module.mounts]]
|
||||
source = 'archetypes'
|
||||
target = 'archetypes'
|
||||
|
@ -29,7 +29,7 @@
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "cover.html" . }}
|
||||
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }}
|
||||
|
||||
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||
<div class="table-of-contents">
|
||||
|
@ -1,24 +1,54 @@
|
||||
|
||||
|
||||
{{- $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 -}}
|
||||
{{- $autoCover := default $.Site.Params.autoCover false }}
|
||||
|
||||
{{- if index .Params "cover" -}}
|
||||
{{- if .Resources.GetMatch .Params.Cover }}
|
||||
{{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
|
||||
{{- if index $ctx.Params "cover" -}}
|
||||
{{- if .Resources.GetMatch $ctx.Params.Cover }}
|
||||
{{- $cover = (.Resources.GetMatch $ctx.Params.Cover).RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- $cover = absURL .Params.Cover -}}
|
||||
{{- $cover = absURL $ctx.Params.Cover -}}
|
||||
{{- end -}}
|
||||
{{- else if $.Site.Params.AutoCover -}}
|
||||
{{- if (not .Params.Cover) -}}
|
||||
{{- if (not $ctx.Params.Cover) -}}
|
||||
{{- if .Resources.GetMatch "cover.*" -}}
|
||||
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{if $cover -}}
|
||||
<!-- Cover image found -->
|
||||
<img src="{{ $cover }}"
|
||||
class="post-cover"
|
||||
alt="{{ .Title | plainify | default " " }}"
|
||||
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" />
|
||||
{{- if $cover -}}
|
||||
{{ if and $ctx.Params.coverCaption $isCoverCaptionEnabled }}
|
||||
<figure>
|
||||
<!-- Cover image found -->
|
||||
<img src="{{ $cover }}"
|
||||
class="post-cover"
|
||||
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 }}
|
||||
|
||||
|
@ -1,30 +1,24 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if $.Site.Copyright }}
|
||||
{{ if $.Site.Params.Copyright }}
|
||||
<div class="copyright copyright--user">
|
||||
<span>{{ $.Site.Copyright | safeHTML }}</span>
|
||||
<span>{{ $.Site.Params.Copyright | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
|
||||
<span>© {{ now.Year }} Basé sur <a href="https://gohugo.io">Hugo</a></span>
|
||||
{{ end }}
|
||||
<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>:: <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>:: Hébergé par <a href="https://jean-cloud.net">Jean-Cloud</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build }}
|
||||
{{ $prism := resources.Get "js/prism.js" | js.Build }}
|
||||
|
||||
{{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }}
|
||||
{{ $bundle := slice $menu | resources.Concat "bundle.js" | resources.Minify }}
|
||||
|
||||
<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-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
|
||||
<div class="logo">
|
||||
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}re-Terminal{{ end }}
|
||||
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}<img src="/img/logo1.JPG" alt="Logo"/>{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
|
@ -67,7 +67,7 @@ HERE INSERT ANY CUSTOM <script/> or <style/>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "cover.html" . }}
|
||||
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }}
|
||||
|
||||
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||
<div class="table-of-contents">
|
||||
|
Loading…
Reference in New Issue
Block a user