forked from mirrors/hugo-theme-terminal
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
985bed75ff | |||
20fc1079fa | |||
1d7e65f42e | |||
613325cba0 | |||
007d7f3df6 | |||
5b9dff342a | |||
c1952eb7d5 | |||
0b5cc9b75f | |||
2654974bdd | |||
1e65ffdf24 |
10
.stylelintrc.json
Normal file
10
.stylelintrc.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"stylelint-config-standard-scss",
|
||||||
|
"stylelint-config-prettier-scss"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"max-empty-lines": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@
|
|||||||

|

|
||||||
|
|
||||||
### DEMO - https://hugo-terminal.now.sh/
|
### DEMO - https://hugo-terminal.now.sh/
|
||||||
|
### ⚠️ The theme needs at least Hugo **Extended** v0.90.x.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -15,9 +15,10 @@ a.button {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 0;
|
border-radius: 8;
|
||||||
border: 1px solid $accent;
|
border: 1px solid $accent;
|
||||||
background: $accent;
|
background: $accent;
|
||||||
|
color: $background;
|
||||||
font: inherit;
|
font: inherit;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
@ -25,7 +26,7 @@ a.button {
|
|||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: opacify($accent, .9);
|
background: transparentize($accent, .1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* variants */
|
/* variants */
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: url("../fonts/FiraCode-Regular.woff") format("woff");
|
src: url("../fonts/FiraCode-Regular.woff") format("woff");
|
||||||
font-display: swap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
@ -13,5 +12,4 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
src: url("../fonts/FiraCode-Bold.woff") format("woff");
|
src: url("../fonts/FiraCode-Bold.woff") format("woff");
|
||||||
font-display: swap;
|
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,11 @@
|
|||||||
|
|
||||||
.copyright {
|
.copyright {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-flow: row wrap;
|
||||||
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
&--user {
|
&--user {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
@ -33,17 +35,10 @@
|
|||||||
|
|
||||||
& > *:first-child:not(:only-child) {
|
& > *:first-child:not(:only-child) {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
||||||
@media ($tablet) {
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media ($tablet) {
|
span {
|
||||||
flex-direction: column;
|
white-space: nowrap;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,5 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
::placeholder {
|
::placeholder {
|
||||||
color: color-mod($accent) a(50%);
|
color: transparentize($accent, .5);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ figure {
|
|||||||
code, kbd {
|
code, kbd {
|
||||||
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace !important;
|
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace !important;
|
||||||
font-feature-settings: normal;
|
font-feature-settings: normal;
|
||||||
background: color-mod($accent) a(20%);
|
background: transparentize($accent, .8);
|
||||||
color: $accent;
|
color: $accent;
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
@ -203,7 +203,7 @@ blockquote {
|
|||||||
|
|
||||||
&.twitter-tweet {
|
&.twitter-tweet {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: color-mod($accent) a(10%);
|
background: transparentize($accent, .9);
|
||||||
font: inherit;
|
font: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border: 1px solid $accent;
|
border: 1px solid $accent;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@mixin menu {
|
@mixin menu {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: column;
|
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;
|
$shadow: 0 10px $shadow-color, -10px 10px $shadow-color, 10px 10px $shadow-color;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: $background;
|
background: $background;
|
||||||
@ -48,6 +48,7 @@
|
|||||||
> li {
|
> li {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
&:not(:last-of-type) {
|
&:not(:last-of-type) {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
background: mix($accent, #1D1E28, 98%);
|
background: $background;
|
||||||
|
color: transparentize($color, .7);
|
||||||
font-size: .8rem;
|
font-size: .8rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -37,6 +38,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -47,22 +50,20 @@
|
|||||||
.button {
|
.button {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex: 1;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
border-radius: 8px;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
cursor: pointer;
|
|
||||||
appearance: none;
|
appearance: none;
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
+ .button {
|
@media($phone) {
|
||||||
margin-left: 10px;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex: 1;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
&-meta {
|
&-meta {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
color: opcift($accent, 70%);
|
color: transparentize($accent, .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
@ -113,7 +113,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hanchor {
|
.hanchor {
|
||||||
color: opacify($accent, .9);
|
color: transparentize($accent, .1);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@ -124,5 +124,5 @@ h1:hover a, h2:hover a, h3:hover a, h4:hover a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footnotes {
|
.footnotes {
|
||||||
color: opacify($color, .5);
|
color: transparentize($color, .5);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ code.language-scss,
|
|||||||
.token.class-name,
|
.token.class-name,
|
||||||
.token.constant,
|
.token.constant,
|
||||||
.token.symbol {
|
.token.symbol {
|
||||||
color: opacify($accent, .7) !important;
|
color: transparentize($accent, .3) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.property,
|
.token.property,
|
||||||
@ -80,7 +80,7 @@ pre[class*="language-"] {
|
|||||||
right: 0;
|
right: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: opacify(mix($accent, #999, 90%), .08);
|
background: transparentize(mix($accent, #999, 90%), .92);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
2
go.mod
2
go.mod
@ -1,3 +1,3 @@
|
|||||||
module github.com/panr/hugo-theme-terminal
|
module github.com/panr/hugo-theme-terminal/v3
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||||
{{ end }}
|
{{ 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>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -9,23 +9,23 @@
|
|||||||
|
|
||||||
{{ $defaultStyles := resources.Get "css/style.scss" }}
|
{{ $defaultStyles := resources.Get "css/style.scss" }}
|
||||||
<!-- Local Theme Variables -->
|
<!-- 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) }}
|
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
|
||||||
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
|
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
|
||||||
{{ $localColorStyles := $localCss | resources.ToCSS }}
|
{{ $localColorStyles := $localCss | resources.ToCSS }}
|
||||||
<link rel="stylesheet" href="{{ $localColorStyles.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- Theme Variables -->
|
<!-- Theme Variables -->
|
||||||
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
|
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
|
||||||
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
|
{{ $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 }}
|
{{ $styles := $css | resources.ToCSS $options }}
|
||||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $styles.Permalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Custom CSS to override theme properties (/static/style.scss) -->
|
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||||
{{ if (fileExists "static/style.scss") -}}
|
{{ if (fileExists "static/style.css") -}}
|
||||||
<link rel="stylesheet" href="{{ "style.scss" | absURL }}">
|
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<!-- Icons -->
|
<!-- Icons -->
|
||||||
|
@ -1,20 +1,16 @@
|
|||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<div class="pagination__buttons">
|
<div class="pagination__buttons">
|
||||||
{{ if .Paginator.HasPrev }}
|
{{ if .Paginator.HasPrev }}
|
||||||
<span class="button previous">
|
<a href="{{ .Paginator.Prev.URL }}" class="button previous">
|
||||||
<a href="{{ .Paginator.Prev.URL }}">
|
|
||||||
<span class="button__icon">←</span>
|
<span class="button__icon">←</span>
|
||||||
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
|
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Paginator.HasNext }}
|
{{ if .Paginator.HasNext }}
|
||||||
<span class="button next">
|
<a href="{{ .Paginator.Next.URL }}" class="button next">
|
||||||
<a href="{{ .Paginator.Next.URL }}">
|
|
||||||
<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>
|
<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>
|
||||||
<span class="button__icon">→</span>
|
<span class="button__icon">→</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
>{{ $inner }}</code></pre>
|
>{{ $inner }}</code></pre>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<pre class="language-{{ .Get 0 }}">
|
<pre class="language-{{ .Get 0 }}">
|
||||||
<code class="language-{{ .Get 0 }}">{{ $inner }}</code></pre>
|
<code class="language-{{ .Get 0 }}">{{ $inner }}</code>
|
||||||
|
</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
6743
package-lock.json
generated
Normal file
6743
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,9 @@
|
|||||||
"eslint-config-airbnb": "^18.2.0",
|
"eslint-config-airbnb": "^18.2.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,
|
|
||||||
],
|
|
||||||
});
|
|
Reference in New Issue
Block a user