10 Commits

Author SHA1 Message Date
985bed75ff update go.mod version 2023-01-04 08:26:16 +01:00
20fc1079fa update footer links 2023-01-02 23:19:52 +01:00
1d7e65f42e fix external static style.css path (part 2) 2022-12-09 15:54:14 +01:00
613325cba0 fix external static style.css path 2022-12-08 23:42:23 +01:00
007d7f3df6 Update README.md 2022-11-21 08:48:27 +01:00
5b9dff342a Merge pull request #396 from hubba1987/389-fix
#389 Added additional check if color param is empty string
2022-11-17 10:41:52 +01:00
c1952eb7d5 #389 Added additional check if color param is empty string 2022-11-17 00:55:10 +02:00
0b5cc9b75f Fix menu items 2022-11-13 23:36:26 +01:00
2654974bdd Layout fixes 2022-11-13 23:21:03 +01:00
1e65ffdf24 Layout fixes 2022-11-13 22:45:10 +01:00
20 changed files with 7568 additions and 82 deletions

10
.stylelintrc.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-prettier-scss"
],
"rules": {
"max-empty-lines": 1
}
}

View File

@ -3,6 +3,7 @@
![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/screenshot.png?raw=true)
### DEMO - https://hugo-terminal.now.sh/
### ⚠️ The theme needs at least Hugo **Extended** v0.90.x.
---

View File

@ -15,9 +15,10 @@ a.button {
margin-bottom: 5px;
text-decoration: none;
text-align: center;
border-radius: 0;
border-radius: 8;
border: 1px solid $accent;
background: $accent;
color: $background;
font: inherit;
font-weight: bold;
appearance: none;
@ -25,7 +26,7 @@ a.button {
outline: none;
&:hover {
background: opacify($accent, .9);
background: transparentize($accent, .1);
}
/* variants */

View File

@ -4,7 +4,6 @@
font-style: normal;
font-weight: 400;
src: url("../fonts/FiraCode-Regular.woff") format("woff");
font-display: swap;
}
@font-face {
@ -13,5 +12,4 @@
font-style: normal;
font-weight: 800;
src: url("../fonts/FiraCode-Bold.woff") format("woff");
font-display: swap;
}

View File

@ -22,9 +22,11 @@
.copyright {
display: flex;
flex-direction: row;
flex-flow: row wrap;
flex: 1;
align-items: center;
font-size: 1rem;
justify-content: center;
&--user {
margin: auto;
@ -33,17 +35,10 @@
& > *:first-child:not(:only-child) {
margin-right: 10px;
@media ($tablet) {
border: none;
padding: 0;
margin: 0;
}
}
@media ($tablet) {
flex-direction: column;
margin-top: 10px;
span {
white-space: nowrap;
}
}
}

View File

@ -26,5 +26,5 @@ select {
}
::placeholder {
color: color-mod($accent) a(50%);
color: transparentize($accent, .5);
}

View File

@ -130,7 +130,7 @@ figure {
code, kbd {
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace !important;
font-feature-settings: normal;
background: color-mod($accent) a(20%);
background: transparentize($accent, .8);
color: $accent;
padding: 1px 6px;
margin: 0 2px;
@ -203,7 +203,7 @@ blockquote {
&.twitter-tweet {
position: relative;
background: color-mod($accent) a(10%);
background: transparentize($accent, .9);
font: inherit;
color: inherit;
border: 1px solid $accent;

View File

@ -1,7 +1,7 @@
@mixin menu {
display: none;
flex-direction: column;
$shadow-color: opacify($background, .8);
$shadow-color: transparentize($background, .2);
$shadow: 0 10px $shadow-color, -10px 10px $shadow-color, 10px 10px $shadow-color;
position: absolute;
background: $background;
@ -48,6 +48,7 @@
> li {
flex: 0 0 auto;
margin-bottom: 10px;
white-space: nowrap;
&:not(:last-of-type) {
margin-right: 20px;

View File

@ -15,7 +15,8 @@
text-align: center;
margin: 0 auto;
padding: 5px 10px;
background: mix($accent, #1D1E28, 98%);
background: $background;
color: transparentize($color, .7);
font-size: .8rem;
text-transform: uppercase;
text-decoration: none;
@ -37,6 +38,8 @@
display: flex;
align-items: center;
justify-content: center;
flex-flow: row wrap;
gap: 10px;
a {
text-decoration: none;
@ -47,22 +50,20 @@
.button {
position: relative;
display: inline-flex;
flex: 1;
align-items: center;
justify-content: center;
font-size: 1rem;
border-radius: 8px;
padding: 0;
cursor: pointer;
appearance: none;
overflow: hidden;
+ .button {
margin-left: 10px;
@media($phone) {
flex: 1;
}
a {
display: flex;
justify-content: center;
flex: 1;
padding: 8px 16px;
text-decoration: none;
text-overflow: ellipsis;

View File

@ -32,7 +32,7 @@
&-meta {
font-size: 1rem;
margin-bottom: 10px;
color: opcift($accent, 70%);
color: transparentize($accent, .3);
}
&-title {
@ -113,7 +113,7 @@
}
.hanchor {
color: opacify($accent, .9);
color: transparentize($accent, .1);
text-decoration: none;
margin-left: 10px;
visibility: hidden;
@ -124,5 +124,5 @@ h1:hover a, h2:hover a, h3:hover a, h4:hover a {
}
.footnotes {
color: opacify($color, .5);
color: transparentize($color, .5);
}

View File

@ -34,7 +34,7 @@ code.language-scss,
.token.class-name,
.token.constant,
.token.symbol {
color: opacify($accent, .7) !important;
color: transparentize($accent, .3) !important;
}
.token.property,
@ -80,7 +80,7 @@ pre[class*="language-"] {
right: 0;
padding: 0;
margin: 0;
background: opacify(mix($accent, #999, 90%), .08);
background: transparentize(mix($accent, #999, 90%), .92);
pointer-events: none;
line-height: inherit;
white-space: pre;

2
go.mod
View File

@ -1,3 +1,3 @@
module github.com/panr/hugo-theme-terminal
module github.com/panr/hugo-theme-terminal/v3
go 1.19

View File

@ -7,7 +7,7 @@
<div class="copyright">
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
{{ end }}
<span>:: Theme made by <a href="https://twitter.com/panr">panr</a></span>
<span>:: <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">Theme</a> made by <a href="https://github.com/panr" target="_blank">panr</a></span>
</div>
</div>
</footer>

View File

@ -9,23 +9,23 @@
{{ $defaultStyles := resources.Get "css/style.scss" }}
<!-- Local Theme Variables -->
{{ if (isset .Params "color") }}
{{ if and (isset .Params "color") (not (eq .Params.color "")) }}
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
{{ $localColorStyles := $localCss | resources.ToCSS }}
<link rel="stylesheet" href="{{ $localColorStyles.RelPermalink }}">
<link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
{{ else }}
<!-- Theme Variables -->
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
{{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
{{ $styles := $css | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}">
<link rel="stylesheet" href="{{ $styles.Permalink }}">
{{ end }}
<!-- Custom CSS to override theme properties (/static/style.scss) -->
{{ if (fileExists "static/style.scss") -}}
<link rel="stylesheet" href="{{ "style.scss" | absURL }}">
<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end }}
<!-- Icons -->

View File

@ -1,20 +1,16 @@
<div class="pagination">
<div class="pagination__buttons">
{{ if .Paginator.HasPrev }}
<span class="button previous">
<a href="{{ .Paginator.Prev.URL }}">
<a href="{{ .Paginator.Prev.URL }}" class="button previous">
<span class="button__icon"></span>
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
</a>
</span>
{{ end }}
{{ if .Paginator.HasNext }}
<span class="button next">
<a href="{{ .Paginator.Next.URL }}">
<a href="{{ .Paginator.Next.URL }}" class="button next">
<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div>

View File

@ -20,6 +20,7 @@
>{{ $inner }}</code></pre>
{{ else }}
<pre class="language-{{ .Get 0 }}">
<code class="language-{{ .Get 0 }}">{{ $inner }}</code></pre>
<code class="language-{{ .Get 0 }}">{{ $inner }}</code>
</pre>
{{ end }}
{{ end }}

6743
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,9 @@
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"husky": "^5.1.3"
"husky": "^5.1.3",
"stylelint": "^14.14.1",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^6.1.0"
}
}

View File

@ -1,21 +0,0 @@
const url = require("postcss-url");
const imports = require("postcss-import");
const nested = require("postcss-nested");
const postcssCustomMedia = require("postcss-custom-media");
const cssnano = require("cssnano");
const color = require("postcss-color-mod-function");
const mixins = require("postcss-mixins");
module.exports = () => ({
plugins: [
url,
imports,
mixins,
nested,
postcssCustomMedia,
cssnano({
preset: "default",
}),
color,
],
});

773
yarn.lock

File diff suppressed because it is too large Load Diff