10 Commits

Author SHA1 Message Date
b6c2bafbdc fix list template .Description 2024-09-07 23:43:48 +02:00
3c03c1b0ea update README 2024-09-07 23:27:10 +02:00
c57581a3b3 fix read more link
closes #480
2024-09-07 23:27:10 +02:00
9cee0bf239 Merge pull request #468 from amtoine/add-katex-support-to-community-features
add KaTeX support as a community feature
2024-09-06 18:52:41 +02:00
a45f003c7a update marketing stuff v2 2024-08-31 12:07:54 +02:00
241ee05a3b update preview image for terminal.css 2024-08-30 19:22:52 +02:00
75878308e0 update base terminal.css to the new default scheme 2024-08-30 08:16:38 +02:00
d2397d672d fix headings, buttons and make it adaptable for updated terminal.css 2024-08-29 12:35:56 +02:00
ff186322b8 Update README.md 2024-08-25 09:59:05 +02:00
7910e41eb6 add my fork to the list of community features 2023-05-18 12:23:29 +02:00
13 changed files with 174 additions and 60 deletions

View File

@ -23,3 +23,7 @@ eg:
- **Single Page Website** (https://github.com/justinnuwin/hugo-theme-terminal)
- A layout where the homepage can render lists of pages and the navigation menu can link to sections on the homepage.
- Justin Nguyen, software and hardware developer.
- **Support for beautiful *KaTeX* formulae** ([amtoine/hugo-theme-terminal-katex](https://github.com/amtoine/hugo-theme-terminal-katex))
- SHORT DESCRIPTION
- Antoine Stevan ([@amtoine](https://github.com/amtoine)), software engineer into open source

View File

@ -1,12 +1,14 @@
# Terminal
----
**Demo: https://panr.github.io/hugo-theme-terminal-demo/**
**Create your own color scheme: https://panr.github.io/terminal-css/**
![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/terminal-theme.png?raw=true)
### DEMO - https://panr.github.io/hugo-theme-terminal-demo/
---
### ⚠️ The theme needs at least Hugo **Extended** v0.90.x.
⚠️ The theme needs at least Hugo **Extended** v0.90.x.
---
@ -26,7 +28,7 @@
## Features
- fully customizable color schemes generated by [**terminal.css**](https://panr.github.io/terminal-css/).
- fully customizable color schemes generated by [**Terminal.css**](https://panr.github.io/terminal-css/).
- [**Fira Code**](https://github.com/tonsky/FiraCode) as default monospaced font. It's gorgeous!
- **really nice duotone**, custom syntax highlighting based on [**PrismJS**](https://prismjs.com)
- fully responsive
@ -110,7 +112,7 @@ and in your config file add:
```toml
[module]
# this is needed when you fetch the theme as a submodule to your repo.
# replacements = "github.com/panr/hugo-theme-terminal -> themes/terminal"
# replacements = "github.com/panr/hugo-theme-terminal/4 -> themes/terminal"
[[module.imports]]
path = 'github.com/panr/hugo-theme-terminal/v4'
```

View File

@ -12,7 +12,6 @@ a.button {
align-items: center;
justify-content: center;
padding: 8px 18px;
margin: 5px 0;
text-decoration: none;
text-align: center;
border-radius: 8;
@ -73,19 +72,19 @@ a.button.inline:hover {
background: none;
}
a.button.inline:before {
a.button.inline::before {
content: "["
}
a.button.inline:after {
a.button.inline::after {
content: "]"
}
a.button.inline.prev:before {
a.button.inline.prev::before {
content: "← ["
}
a.button.inline.next:after {
a.button.inline.next::after {
content: "] →"
}

View File

@ -49,6 +49,7 @@
margin-bottom: 15px !important;
padding-bottom: 15px;
border-bottom: 3px dotted var(--accent);
text-decoration: none !important;
}
.post-title::after {
@ -109,6 +110,7 @@
}
.hanchor {
position: absolute;
color: var(--accent);
text-decoration: none;
margin-left: 10px;

View File

@ -1,20 +1,26 @@
@import url("https://fonts.googleapis.com/css2?family=Fira+Code&family=Fira+Code:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fira+Code&family=Fira+Code:wght@400;700&display=swap");
:root {
--background: #222129;
--foreground: #ffffff;
--accent: #ffa86a;
--background: #1a170f;
--foreground: #eceae5;
--accent: #eec35e;
--font-size: 1rem;
--line-height: 1.54rem;
--radius: 0px;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
@ -22,10 +28,11 @@ body {
"Fira Code",
Monaco,
Consolas,
Ubuntu Mono,
"Ubuntu Mono",
monospace;
font-size: 1rem;
line-height: 1.54;
font-weight: 400;
line-height: var(--line-height);
letter-spacing: -0.02em;
background-color: var(--background);
color: var(--foreground);
@ -36,47 +43,107 @@ body {
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
}
::placeholder {
color: color-mix(in srgb var(--foreground) 50%, black);
}
h1,
h2 {
font-size: calc(var(--font-size) * 1.1);
text-transform: uppercase;
letter-spacing: 0.04em;
}
h1 {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: calc(var(--font-size) * 0.2);
}
h3,
h4,
h5,
h6 {
font-size: calc(var(--font-size) * 1.1);
letter-spacing: 0.04em;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
img,
figure,
video,
table {
margin: calc(var(--line-height) * 1.2) 0;
}
a {
color: var(--accent);
}
button,
.button,
a.button {
button {
position: relative;
font: inherit;
font-weight: bold;
text-decoration: none;
text-align: center;
background: var(--accent);
color: var(--background);
background: transparent;
color: var(--accent);
padding: 5px 18px;
margin: 5px 0;
border: 1px solid var(--accent);
border: 4px solid var(--accent);
border-radius: var(--radius);
transition: background 0.15s linear;
appearance: none;
cursor: pointer;
outline: none;
}
button:hover,
.button:hover,
a.button:hover {
background: color-mix(in srgb, var(--accent) 85%, transparent);
button:hover {
background: color-mix(in srgb, var(--accent) 15%, transparent);
}
button:focus-visible,
.button:focus-visible,
a.button:focus-visible,
a:focus-visible {
outline: 1px solid var(--accent);
outline-offset: 2px;
}
fieldset {
display: inline-block;
border: 1px dashed var(--foreground);
border: 2px solid var(--foreground);
border-radius: calc(var(--radius) * 1.6);
padding: 10px;
}
fieldset *:first-child {
margin-top: 0;
}
fieldset input,
fieldset select,
fieldset textarea,
fieldset label,
fieldset button {
margin-top: calc(var(--line-height) * 0.5);
width: 100%;
}
label {
display: inline-block;
}
label input {
margin-top: 0;
}
input,
textarea,
select {
@ -85,10 +152,14 @@ select {
border: 1px solid var(--foreground);
border-radius: var(--radius);
padding: 10px;
margin: 5px 0;
font: inherit;
appearance: none;
}
input[type="checkbox"] {
width: auto;
}
input:focus-visible,
input:active,
textarea:focus-visible,
@ -99,11 +170,13 @@ select:active {
outline: 1px solid var(--accent);
outline-offset: 2px;
}
input:active,
textarea:active,
select:active {
box-shadow: none;
}
select {
background-image: linear-gradient(
45deg,
@ -118,17 +191,21 @@ select {
background-repeat: no-repeat;
padding-right: 40px;
}
select option {
background: var(--background);
}
input[type="checkbox"] {
vertical-align: middle;
padding: 10px;
box-shadow: inset 0 0 0 3px var(--background);
}
input[type="checkbox"]:checked {
background: var(--accent);
}
img {
display: block;
max-width: 100%;
@ -137,6 +214,12 @@ img {
padding: 8px;
overflow: hidden;
}
figure img,
figure video {
margin-bottom: 0;
}
figure figcaption {
background: var(--accent);
color: var(--background);
@ -144,22 +227,31 @@ figure figcaption {
font-size: 1rem;
font-weight: normal;
margin-top: -8px;
border-radius: 0 0 var(--radius) var(--radius);
}
p {
margin-bottom: 20px;
}
ul,
ol {
margin-left: 4ch;
padding: 0;
}
ul ul,
ul ol,
ol ul,
ol ol {
margin-top: 0;
}
li::marker {
color: var(--accent);
}
ul li,
ol li {
position: relative;
}
code,
kbd {
font-family:
@ -169,12 +261,13 @@ kbd {
Ubuntu Mono,
monospace !important;
font-feature-settings: normal;
background: color-mix(in srgb, var(--accent) 10%, transparent);
background: color-mix(in srgb, var(--foreground) 5%, transparent);
color: var(--accent);
padding: 1px 6px;
margin: 0 2px;
font-size: 0.95rem;
}
kbd {
border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
border-left: 1px solid var(--accent);
@ -182,21 +275,24 @@ kbd {
border-bottom: 4px solid var(--accent);
border-radius: 4px;
}
code code {
background: transparent;
padding: 0;
margin: 0;
}
pre {
tab-size: 4;
background: color-mix(in srgb, var(--accent) 5%, transparent) !important;
background: color-mix(in srgb, var(--foreground) 5%, transparent) !important;
color: var(--foreground);
padding: 20px 10px;
font-size: 0.95rem !important;
overflow: auto;
border-radius: var(--radius);
border: 1px solid color-mix(in srgb, var(--accent) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
}
pre code {
background: none !important;
margin: 0;
@ -204,28 +300,31 @@ pre code {
font-size: inherit;
border: none;
}
sup {
line-height: 0;
}
abbr {
position: relative;
text-decoration-style: wavy;
text-decoration-color: var(--accent);
cursor: help;
}
abbr:hover:before {
visibility: visible;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.25em;
}
mark {
background: color-mix(in srgb, var(--accent) 45%, transparent);
color: var(--foreground);
}
blockquote {
position: relative;
border-top: 1px solid var(--accent);
@ -233,6 +332,7 @@ blockquote {
margin: 0;
padding: 25px;
}
blockquote:before {
content: ">";
display: block;
@ -240,31 +340,38 @@ blockquote:before {
left: 0;
color: var(--accent);
}
blockquote p:first-child {
margin-top: 0;
}
blockquote p:last-child {
margin-bottom: 0;
}
table {
table-layout: auto;
border-collapse: collapse;
}
table,
th,
td {
border: 1px dashed var(--accent);
border: 2px solid var(--foreground);
padding: 10px;
}
th {
border-style: solid;
background: color-mix(in srgb, var(--accent) 10%, transparent);
color: var(--accent);
color: var(--foreground);
text-align: left;
text-transform: uppercase;
letter-spacing: 0.04em;
}
hr {
width: 100%;
border: none;
background: var(--accent);
height: 1px;
height: 2px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -16,9 +16,9 @@
{{ range $paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
</h2>
<div class="post-meta">
{{- if .Date -}}

View File

@ -7,9 +7,9 @@
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
</h2>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
@ -37,15 +37,15 @@
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }}</a>
<div>
<a class="read-more button inline" href="{{ .RelPermalink }}">{{ $.Site.Params.ReadMore }}</a>
</div>
{{ end }}
</article>

View File

@ -38,7 +38,7 @@
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
@ -46,7 +46,7 @@
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }}</a>
<a class="read-more button inline" href="{{ .RelPermalink }}">{{ $.Site.Params.ReadMore }}</a>
</div>
{{ end }}
</article>

View File

@ -9,13 +9,13 @@
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li>
{{ end }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>