diff --git a/Dockerfile b/Dockerfile index d907b02..a8c1e57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ FROM golang:alpine AS builder -RUN apk update && apk add --no-cache git +RUN apk update \ + && apk add --no-cache git \ + && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo WORKDIR $GOPATH/src/www-jmbit-de COPY . . RUN go get -d -v -RUN go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/www +RUN hugo --minify +UN go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/www FROM scratch COPY --from=builder /go/bin/www /go/bin/www diff --git a/Makefile b/Makefile index 2ff66fb..5c77a58 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ HEAD=$(shell git rev-parse --short HEAD) CTNAME:=git.jmbit.de/jmb/www-jmbit-de -all: hugo container +all: hugo webserver dev: hugo server -D hugo: - hugo --minify + hugo webserver: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app . diff --git a/config.toml b/config.toml index 0e69ca6..d751f5d 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ baseurl = "https://www.jmbit.de/" languageCode = "de-de" -theme = "hugo-theme-terminal" +theme = "terminal" paginate = 5 defaultContentLanguage= "de" diff --git a/content/blog/2024-06-05-nullbulge-investigation.md b/content/blog/2024-06-05-nullbulge-investigation.md new file mode 100644 index 0000000..6757aa1 --- /dev/null +++ b/content/blog/2024-06-05-nullbulge-investigation.md @@ -0,0 +1,139 @@ +--- +title: "Investigating Nullbulge - a BeamNG mods malware Group" +date: 2024-06-05 +draft: true +--- + +Over the last few days, I started Investigating a piece of malware that got downloaded with BeamNG[^1] mods. +It was originally discovered by Eric Parker, who describes both its discovery and major features in [his video](https://youtu.be/k52GwOWGy7o?si=4o5A7UkEpeuYWa20). + +## First Sample +The sample originally uncovered by Eric Parker is a modified version of the PySilo[^2] malware that has been compiled using PyInstaller and Python 3.10, +making it fairly difficult to reverse engineer. However, I was still able to analyze it using both static and dynamic analysis tooling. + +### General static analysis +First, I used a couple general tools for static file analysis. To be mentioned here are [^3]Capa, Detect-It-Easy[^4] and yara[^5]. +All of those gave certain insights on the file and informed the way to go forward. + +Detect-It-Easy is essentially a more powerful `file` command that gives you additional information about a file. +In this case, it gave me the following Information: +``` +PE64 + Linker: Microsoft Linker(14.36.33135) + Compiler: Microsoft Visual C/C++(19.36.33135)[C] + Tool: Visual Studio(2022 version 17.6) + Packer: PyInstaller +``` +This tells us the File is a 64Bit PE (Portable Executable) packed with PyInstaller[^6], meaning it's compiled and packed from Python for +64 Bit Windows. In this case, we can likely ignore the Linker, compiler and Tool information, as Pyinstaller likely just uses those under the hood. + +Capa is much more verbose, but has a nicely formatted output. It analyzes the calls the program makes to the OS or other common locations to make informed +guesses about the likely capabilities/uses of the program: +{{< rawhtml >}} +
+┍━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
+│ ATT&CK Tactic          │ ATT&CK Technique                                                                   │
+┝━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
+│ DEFENSE EVASIONObfuscated Files or Information T1027                                              │
+│                        │ Virtualization/Sandbox Evasion::System Checks T1497.001                            │
+├────────────────────────┼────────────────────────────────────────────────────────────────────────────────────┤
+│ DISCOVERYFile and Directory Discovery T1083                                                 │
+│                        │ System Information Discovery T1082                                                 │
+├────────────────────────┼────────────────────────────────────────────────────────────────────────────────────┤
+│ EXECUTIONCommand and Scripting Interpreter T1059                                            │
+│                        │ Shared Modules T1129                                                               │
+┕━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
+
+┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
+│ MBC Objective               │ MBC Behavior                                                                  │
+┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
+│ ANTI-BEHAVIORAL ANALYSISVirtual Machine Detection [B0009]                                             │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ DATAChecksum::Adler [C0032.005]                                                   │
+│                             │ Compress Data [C0024]                                                         │
+│                             │ Compression Library [C0060]                                                   │
+│                             │ Encode Data::XOR [C0026.002]                                                  │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ DEFENSE EVASIONObfuscated Files or Information::Encoding-Standard Algorithm [E1027.m02]      │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ DISCOVERYAnalysis Tool Discovery::Process detection [B0013.001]                        │
+│                             │ File and Directory Discovery [E1083]                                          │
+│                             │ System Information Discovery [E1082]                                          │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ EXECUTIONCommand and Scripting Interpreter [E1059]                                     │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ FILE SYSTEMCreate Directory [C0046]                                                      │
+│                             │ Delete Directory [C0048]                                                      │
+│                             │ Delete File [C0047]                                                           │
+│                             │ Read File [C0051]                                                             │
+│                             │ Writes File [C0052]                                                           │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ OPERATING SYSTEMEnvironment Variable::Set Variable [C0034.001]                                │
+├─────────────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
+│ PROCESSCreate Process [C0017]                                                        │
+│                             │ Terminate Process [C0018]                                                     │
+┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
+
+┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
+│ Capability                                           │ Namespace                                            │
+┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┥
+│ reference analysis tools strings                     │ anti-analysis                                        │
+│ reference anti-VM strings targeting Qemu             │ anti-analysis/anti-vm/vm-detection                   │
+│ reference anti-VM strings targeting Xen              │ anti-analysis/anti-vm/vm-detection                   │
+│ compute adler32 checksum                             │ data-manipulation/checksum/adler32                   │
+│ compress data via ZLIB inflate or deflate            │ data-manipulation/compression                        │
+│ encode data using XOR (6 matches)                    │ data-manipulation/encoding/xor                       │
+│ accept command line arguments                        │ host-interaction/cli                                 │
+│ query environment variable (4 matches)               │ host-interaction/environment-variable                │
+│ set environment variable (4 matches)                 │ host-interaction/environment-variable                │
+│ get common file path                                 │ host-interaction/file-system                         │
+│ create directory (2 matches)                         │ host-interaction/file-system/create                  │
+│ delete directory                                     │ host-interaction/file-system/delete                  │
+│ delete file                                          │ host-interaction/file-system/delete                  │
+│ enumerate files on Windows                           │ host-interaction/file-system/files/list              │
+│ get file size                                        │ host-interaction/file-system/meta                    │
+│ read file on Windows (10 matches)                    │ host-interaction/file-system/read                    │
+│ write file on Windows (2 matches)                    │ host-interaction/file-system/write                   │
+│ get disk information (2 matches)                     │ host-interaction/hardware/storage                    │
+│ create process on Windows                            │ host-interaction/process/create                      │
+│ terminate process                                    │ host-interaction/process/terminate                   │
+│ link many functions at runtime (2 matches)           │ linking/runtime-linking                              │
+│ linked against ZLIB                                  │ linking/static/zlib                                  │
+│ parse PE header (3 matches)                          │ load-code/pe                                         │
+│ resolve function by parsing PE exports               │ load-code/pe                                         │
+┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
+
+{{}} +If we weren't sure already, this wold certainly greatly increase the likelyhood of this software being malicious. No normal software needs to evade +sandboxing and virtualization. We will later see that these features are implemented in a very simple way and not really relevant for most sandboxing +platforms. + +Finally, for a good measure, I ran it through yara: +``` +DebuggerException__SetConsoleCtrl +anti_dbg +screenshot +win_token +win_files_operation +Big_Numbers1 +CRC32_poly_Constant +CRC32_table +MachO_File_pyinstaller +IsPE64 +IsWindowsGUI +IsPacked +HasOverlay +HasDigitalSignature +HasDebugData +HasRichSignature +Microsoft_Visual_Cpp_80 +Microsoft_Visual_Cpp_80_DLL +``` +Yara can be a bit noisy, but in this case it also shows us that the application has some anti-debug operations, the ability to take screenshots and some +features indicative of encryption. + +### Dynamic analysis + +Dynamic analysis essentially just means watching the Malware do its thing and analyzing that. For this I usually use my own installation of CAPE sandbox, +but hosted services like tria.ge and intezer are also available. + diff --git a/server.go b/server.go index 33119db..0c58556 100644 --- a/server.go +++ b/server.go @@ -1,31 +1,30 @@ package main import ( + "embed" + "io/fs" "log" "net/http" - - "git.jmbit.de/jmb/www-jmbit-de/public" ) +//go:embed public/* +var publicFS embed.FS + + func main() { // Register a custom handler http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - // Specify the file path you want to block - blockFilePath := "/public.go" - // Check if the requested path matches the blocked file path - if r.URL.Path == blockFilePath { - // Return a 404 Not Found error - http.NotFound(w, r) - return - } + fsroot, err := fs.Sub(publicFS, "public") + if err != nil { + panic(err) + } + http.FileServer(http.FS(fsroot)).ServeHTTP(w,r) - // For other paths, serve the files using the file server - http.FileServer(http.FS(public.HtmlFS)).ServeHTTP(w, r) }) // Start the HTTP server on port 80 - err := http.ListenAndServe(":80", nil) + err := http.ListenAndServe(":1313", nil) if err != nil { log.Fatal(err) } diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..48947c5 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/og-image.png b/static/og-image.png new file mode 100644 index 0000000..7b4d973 Binary files /dev/null and b/static/og-image.png differ diff --git a/static/public.go b/static/public.go deleted file mode 100644 index 1283fe3..0000000 --- a/static/public.go +++ /dev/null @@ -1,8 +0,0 @@ -package public - -import ( - "embed" -) - -//go:embed * -var HtmlFS embed.FS diff --git a/static/terminal.css b/static/terminal.css new file mode 100644 index 0000000..3c67634 --- /dev/null +++ b/static/terminal.css @@ -0,0 +1,368 @@ +:root { + --background: #1d212c; + --foreground: #ffffff; + --accent: #23B0FF; + --font-size: 1rem; + --line-height: 1.54rem; + --radius: 3px; +} + +html { + box-sizing: border-box; +} + +*, +*:before, +*:after { + box-sizing: inherit; + margin: 0; + padding: 0; +} + +body { + margin: 0; + padding: 0; + font-family: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace; + font-size: 1rem; + font-weight: 400; + line-height: var(--line-height); + letter-spacing: -0.02em; + background-color: var(--background); + color: var(--foreground); + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -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 { + position: relative; + font: inherit; + font-weight: bold; + text-decoration: none; + text-align: center; + background: transparent; + color: var(--accent); + padding: 5px 18px; + border: 4px solid var(--accent); + border-radius: var(--radius); + transition: background 0.15s linear; + appearance: none; + cursor: pointer; + outline: none; +} + +button:hover { + background: color-mix(in srgb, var(--accent) 15%, transparent); +} + +button:focus-visible, +a:focus-visible { + outline: 1px solid var(--accent); + outline-offset: 2px; +} + +fieldset { + display: inline-block; + 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 { + background: transparent; + color: var(--foreground); + border: 1px solid var(--foreground); + border-radius: var(--radius); + padding: 10px; + font: inherit; + appearance: none; +} + +input[type="checkbox"] { + width: auto; +} + +input:focus-visible, +input:active, +textarea:focus-visible, +textarea:active, +select:focus-visible, +select:active { + border-color: var(--accent); + outline: 1px solid var(--accent); + outline-offset: 2px; +} + +input:active, +textarea:active, +select:active { + box-shadow: none; +} + +select { + background-image: linear-gradient( + 45deg, + transparent 50%, + var(--foreground) 50% + ), + linear-gradient(135deg, var(--foreground) 50%, transparent 50%); + background-position: calc(100% - 20px), calc(100% - 1em); + background-size: + 5px 5px, + 5px 5px; + 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%; + border: 8px solid var(--accent); + border-radius: var(--radius); + padding: 8px; + overflow: hidden; +} + +figure img, +figure video { + margin-bottom: 0; +} + +figure figcaption { + background: var(--accent); + color: var(--background); + text-align: center; + font-size: 1rem; + font-weight: normal; + margin-top: -8px; + border-radius: 0 0 var(--radius) var(--radius); +} + +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: + "Fira Code", + Monaco, + Consolas, + Ubuntu Mono, + monospace !important; + font-feature-settings: normal; + 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); + border-right: 1px solid var(--accent); + 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(--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(--foreground) 10%, transparent); +} + +pre code { + background: none !important; + margin: 0; + padding: 0; + font-size: inherit; + border: none; +} + +sup { + line-height: 0; +} + +abbr { + position: relative; + text-decoration-style: wavy; + text-decoration-color: var(--accent); + cursor: help; +} + +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); + border-bottom: 1px solid var(--accent); + margin: 0; + padding: 25px; +} + +blockquote:before { + content: ">"; + display: block; + position: absolute; + 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: 2px solid var(--foreground); + padding: 10px; +} + +th { + border-style: solid; + color: var(--foreground); + text-align: left; + text-transform: uppercase; + letter-spacing: 0.04em; +} + +hr { + width: 100%; + border: none; + background: var(--accent); + height: 2px; +} diff --git a/themes/hugo-theme-terminal/.stylelintrc.json b/themes/hugo-theme-terminal/.stylelintrc.json deleted file mode 100644 index ca7b34e..0000000 --- a/themes/hugo-theme-terminal/.stylelintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "stylelint-config-standard-scss", - "stylelint-config-prettier-scss" - ], - "rules": { - "max-empty-lines": 1 - } -} - diff --git a/themes/hugo-theme-terminal/assets/css/buttons.scss b/themes/hugo-theme-terminal/assets/css/buttons.scss deleted file mode 100644 index 2adc317..0000000 --- a/themes/hugo-theme-terminal/assets/css/buttons.scss +++ /dev/null @@ -1,95 +0,0 @@ -.button-container { - display: table; - margin-left: auto; - margin-right: auto; -} - -button, -.button, -a.button { - position: relative; - display: flex; - align-items: center; - justify-content: center; - padding: 8px 18px; - margin-bottom: 5px; - text-decoration: none; - text-align: center; - border-radius: 8; - border: 1px solid $accent; - background: $accent; - color: $background; - font: inherit; - font-weight: bold; - appearance: none; - cursor: pointer; - outline: none; - - &:hover { - background: transparentize($accent, .1); - } - - /* variants */ - - &.outline { - background: transparent; - box-shadow: none; - padding: 8px 18px; - - :hover { - transform: none; - box-shadow: none; - } - } - - &.link { - background: none; - font-size: 1rem; - } - - /* sizes */ - - &.small { - font-size: .8rem; - } - - &.wide { - min-width: 200px; - padding: 14px 24px; - } -} - -a.read-more, -a.read-more:hover, -a.read-more:active { - display: inline-flex; - border: none; - color: $accent; - background: none; - box-shadow: none; - padding: 0; - margin: 20px 0; - max-width: 100%; -} - -.code-toolbar { - margin-bottom: 20px; - - .toolbar-item a { - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - padding: 3px 8px; - margin-bottom: 5px; - text-decoration: none; - text-align: center; - font-size: 13px; - font-weight: 500; - border-radius: 8px; - border: 1px solid transparent; - appearance: none; - cursor: pointer; - outline: none; - } -} diff --git a/themes/hugo-theme-terminal/assets/css/code.scss b/themes/hugo-theme-terminal/assets/css/code.scss deleted file mode 100644 index 9ac2f6b..0000000 --- a/themes/hugo-theme-terminal/assets/css/code.scss +++ /dev/null @@ -1,84 +0,0 @@ -.collapsable-code { - $border-color: mix($accent, #999, 90%); - - position: relative; - width: 100%; - margin: 40px 0; - - input[type="checkbox"] { - position: absolute; - visibility: hidden; - } - - input[type="checkbox"]:checked { - ~ pre, - ~ .code-toolbar pre { - height: 0; - padding: 0; - border-top: none; - } - - ~ .code-toolbar { - padding: 0; - border-top: none; - - .toolbar { - display: none; - } - } - - ~ label .collapsable-code__toggle:after { - content: attr(data-label-expand); - } - } - - label { - position: relative; - display: flex; - justify-content: space-between; - min-width: 30px; - min-height: 30px; - margin: 0; - border-bottom: 1px solid $border-color; - cursor: pointer; - } - - &__title { - flex: 1; - color: $accent; - padding: 3px 10px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - &__language { - color: $accent; - border: 1px solid $border-color; - border-bottom: none; - text-transform: uppercase; - padding: 3px 10px; - } - - &__toggle { - color: $accent; - font-size: 16px; - padding: 3px 10px; - - &:after { - content: attr(data-label-collapse); - } - } - - pre { - margin-top: 0; - - &::first-line { - line-height: 0; - } - } - - .code-toolbar { - margin: 0; - } -} diff --git a/themes/hugo-theme-terminal/assets/css/color/blue.scss b/themes/hugo-theme-terminal/assets/css/color/blue.scss deleted file mode 100644 index 5a3b455..0000000 --- a/themes/hugo-theme-terminal/assets/css/color/blue.scss +++ /dev/null @@ -1 +0,0 @@ -$accent: #23B0FF; diff --git a/themes/hugo-theme-terminal/assets/css/color/green.scss b/themes/hugo-theme-terminal/assets/css/color/green.scss deleted file mode 100644 index efb853a..0000000 --- a/themes/hugo-theme-terminal/assets/css/color/green.scss +++ /dev/null @@ -1 +0,0 @@ -$accent: #78E2A0; diff --git a/themes/hugo-theme-terminal/assets/css/color/orange.scss b/themes/hugo-theme-terminal/assets/css/color/orange.scss deleted file mode 100644 index 5a6ab3c..0000000 --- a/themes/hugo-theme-terminal/assets/css/color/orange.scss +++ /dev/null @@ -1 +0,0 @@ -$accent: #FFA86A; diff --git a/themes/hugo-theme-terminal/assets/css/color/pink.scss b/themes/hugo-theme-terminal/assets/css/color/pink.scss deleted file mode 100644 index fce2e73..0000000 --- a/themes/hugo-theme-terminal/assets/css/color/pink.scss +++ /dev/null @@ -1 +0,0 @@ -$accent: #EE72F1; diff --git a/themes/hugo-theme-terminal/assets/css/color/red.scss b/themes/hugo-theme-terminal/assets/css/color/red.scss deleted file mode 100644 index 1f9bd6e..0000000 --- a/themes/hugo-theme-terminal/assets/css/color/red.scss +++ /dev/null @@ -1 +0,0 @@ -$accent: #FF6266; diff --git a/themes/hugo-theme-terminal/assets/css/font.scss b/themes/hugo-theme-terminal/assets/css/font.scss deleted file mode 100644 index aab7249..0000000 --- a/themes/hugo-theme-terminal/assets/css/font.scss +++ /dev/null @@ -1,15 +0,0 @@ -@font-face { - font-display: swap; - font-family: 'Fira Code'; - font-style: normal; - font-weight: 400; - src: url("../fonts/FiraCode-Regular.woff") format("woff"); -} - -@font-face { - font-display: swap; - font-family: 'Fira Code'; - font-style: normal; - font-weight: 800; - src: url("../fonts/FiraCode-Bold.woff") format("woff"); -} diff --git a/themes/hugo-theme-terminal/assets/css/footer.scss b/themes/hugo-theme-terminal/assets/css/footer.scss deleted file mode 100644 index d7297b6..0000000 --- a/themes/hugo-theme-terminal/assets/css/footer.scss +++ /dev/null @@ -1,44 +0,0 @@ -.footer { - padding: 40px 0; - flex-grow: 0; - opacity: .5; - - &__inner { - display: flex; - align-items: center; - justify-content: space-between; - margin: 0; - width: 760px; - max-width: 100%; - - @media ($tablet) { - flex-direction: column; - } - } - - a { - color: inherit; - } - - .copyright { - display: flex; - flex-flow: row wrap; - flex: 1; - align-items: center; - font-size: 1rem; - justify-content: center; - - &--user { - margin: auto; - text-align: center; - } - - & > *:first-child:not(:only-child) { - margin-right: 10px; - } - - span { - white-space: nowrap; - } - } -} diff --git a/themes/hugo-theme-terminal/assets/css/form.scss b/themes/hugo-theme-terminal/assets/css/form.scss deleted file mode 100644 index 5ce8a04..0000000 --- a/themes/hugo-theme-terminal/assets/css/form.scss +++ /dev/null @@ -1,30 +0,0 @@ -input, textarea, select { - background: transparent; - color: $accent; - border: 1px solid $accent; - border-radius: 0; - padding: 10px; - font: inherit; - appearance: none; - - &:focus, :active { - border-color: $color; - outline: 1px solid $color; - } - - &:active { - box-shadow: none; - } -} - -select { - background: $background; - - option { - background: $background; - } -} - -::placeholder { - color: transparentize($accent, .5); -} diff --git a/themes/hugo-theme-terminal/assets/css/gist.scss b/themes/hugo-theme-terminal/assets/css/gist.scss deleted file mode 100644 index 3ed8145..0000000 --- a/themes/hugo-theme-terminal/assets/css/gist.scss +++ /dev/null @@ -1,6 +0,0 @@ -body .gist .blob-num /* line numbers */, -body .gist .blob-code-inner -{ - border: none; -} - diff --git a/themes/hugo-theme-terminal/assets/css/header.scss b/themes/hugo-theme-terminal/assets/css/header.scss deleted file mode 100644 index 61c45a8..0000000 --- a/themes/hugo-theme-terminal/assets/css/header.scss +++ /dev/null @@ -1,34 +0,0 @@ -.header { - display: flex; - flex-direction: column; - position: relative; - - @media print { - display: none; - } - - &__inner { - display: flex; - align-items: center; - justify-content: space-between; - } - - &__logo { - display: flex; - flex: 1; - - &:after { - content: ''; - background: repeating-linear-gradient(90deg, $accent, $accent 2px, transparent 0, transparent 10px); - display: block; - width: 100%; - right: 10px; - } - - a { - flex: 0 0 auto; - max-width: 100%; - text-decoration: none; - } - } -} diff --git a/themes/hugo-theme-terminal/assets/css/logo.scss b/themes/hugo-theme-terminal/assets/css/logo.scss deleted file mode 100644 index 33c7fef..0000000 --- a/themes/hugo-theme-terminal/assets/css/logo.scss +++ /dev/null @@ -1,8 +0,0 @@ -.logo { - display: flex; - align-items: center; - text-decoration: none; - background: $accent; - color: black; - padding: 5px 10px; -} diff --git a/themes/hugo-theme-terminal/assets/css/main.scss b/themes/hugo-theme-terminal/assets/css/main.scss deleted file mode 100644 index dac8283..0000000 --- a/themes/hugo-theme-terminal/assets/css/main.scss +++ /dev/null @@ -1,346 +0,0 @@ -html { - box-sizing: border-box; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -body { - margin: 0; - padding: 0; - font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace; - font-size: 1rem; - line-height: 1.54; - letter-spacing: -0.02em; - background-color: $background; - color: $color; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - font-feature-settings: "liga", "tnum", "zero", "ss01", "locl"; - font-variant-ligatures: contextual; - -webkit-overflow-scrolling: touch; - -webkit-text-size-adjust: 100%; - - @media ($phone) { - font-size: 1rem; - } -} - -.headings--one-size { - h1, - h2, - h3, - h4, - h5, - h6 { - line-height: 1.3; - - &:not(first-child) { - margin-top: 40px; - } - } - - h1, - h2, - h3 { - font-size: 1.4rem; - } - - h4, - h5, - h6 { - font-size: 1.2rem; - } -} - -a { - color: inherit; - - /* Waiting for a better times... */ - /* &:has(code) { - text-decoration-color: $accent; - } */ -} - -img { - display: block; - max-width: 100%; - - &.left { - margin-right: auto; - } - - &.center { - margin-left: auto; - margin-right: auto; - } - - &.right { - margin-left: auto; - } -} - -p { - margin-bottom: 20px; -} - -figure { - display: table; - max-width: 100%; - margin: 25px 0; - - &.left { - margin-right: auto; - } - - &.center { - margin-left: auto; - margin-right: auto; - } - - &.right { - margin-left: auto; - } - - figcaption { - font-size: 14px; - padding: 5px 10px; - margin-top: 5px; - background: $accent; - color: $background; - /* opacity: .8; */ - - &.left { - text-align: left; - } - - &.center { - text-align: center; - } - - &.right { - text-align: right; - } - } -} - -code, kbd { - font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace !important; - font-feature-settings: normal; - background: transparentize($accent, .8); - color: $accent; - padding: 1px 6px; - margin: 0 2px; - font-size: .95rem; - - code, kbd { - background: transparent; - padding: 0; - margin: 0; - } -} - -pre { - background: transparent !important; - padding: 20px 10px; - margin: 40px 0; - font-size: .95rem !important; - overflow: auto; - border-top: 1px solid rgba(255, 255, 255, .1); - border-bottom: 1px solid rgba(255, 255, 255, .1); - - + pre { - border-top: 0; - margin-top: -40px; - } - - @media ($phone) { - white-space: pre-wrap; - word-wrap: break-word; - } - - code { - background: none !important; - margin: 0; - padding: 0; - font-size: inherit; - border: none; - } -} - -blockquote { - border-top: 1px solid $accent; - border-bottom: 1px solid $accent; - margin: 40px 0; - padding: 25px; - - @media ($phone) { - padding-right: 0; - } - - p:first-of-type { - margin-top: 0; - } - - p:last-of-type { - margin-bottom: 0; - } - - p { - position: relative; - } - - p:first-of-type:before { - content: '>'; - display: block; - position: absolute; - left: -25px; - color: $accent; - } - - &.twitter-tweet { - position: relative; - background: transparentize($accent, .9); - font: inherit; - color: inherit; - border: 1px solid $accent; - padding-top: 60px; - - p:before { - content: ''; - } - - &:before { - content: '> From Twitter:'; - position: absolute; - top: 20px; - color: $accent; - font-weight: bold; - } - - a { - color: $accent; - } - } -} - -table { - table-layout: auto; - border-collapse: collapse; - width: 100%; - margin: 40px 0; -} - -table, -th, -td { - border: 1px dashed $accent; - padding: 10px; -} - -th { - color: $accent; -} - -ul, -ol { - margin-left: 22px; - padding: 0; - - li { - position: relative; - } - - @media ($phone) { - margin-left: 20px; - } -} - -ol { - list-style: none; - counter-reset: li; - - li { - counter-increment: li; - } - - li:before { - content: counter(li); - position: absolute; - right: calc(100% + 10px); - color: $accent; - display: inline-block; - text-align: right; - } - - ol { - margin-left: 38px; - - li { - counter-increment: li; - } - - li:before { - content: counters(li, ".") " "; - } - } -} - -mark { - background: $accent; - color: $background; -} - -.container { - display: flex; - flex-direction: column; - padding: 40px; - max-width: 864px; - min-height: 100vh; - border-right: 1px solid rgba(255, 255, 255, 0.1); - - &.full, - &.center { - border: none; - margin: 0 auto; - } - - &.full { - max-width: 100%; - } - - @media ($phone) { - padding: 20px; - } - - @media print { - display: initial; - } -} - -.content { - display: flex; - flex-direction: column; - - @media print { - display: initial; - } -} - -hr { - width: 100%; - border: none; - background: $border-color; - height: 1px; -} - -.hidden { - display: none; -} - -sup { - line-height: 0; -} diff --git a/themes/hugo-theme-terminal/assets/css/menu.scss b/themes/hugo-theme-terminal/assets/css/menu.scss deleted file mode 100644 index fdd3075..0000000 --- a/themes/hugo-theme-terminal/assets/css/menu.scss +++ /dev/null @@ -1,157 +0,0 @@ -@mixin menu { - display: none; - flex-direction: column; - $shadow-color: transparentize($background, .2); - $shadow: 0 10px $shadow-color, -10px 10px $shadow-color, 10px 10px $shadow-color; - position: absolute; - background: $background; - box-shadow: $shadow; - color: white; - border: 2px solid; - margin: 0; - padding: 10px; - top: 10px; - left: 0; - list-style: none; - z-index: 99; -} - -@mixin header-menu-trigger { - color: $accent; - border: 2px solid; - margin-left: 10px; - height: 100%; - padding: 3px 8px; - margin-bottom: 0 !important; - position: relative; - cursor: pointer; -} - -.navigation-menu { - display: flex; - align-items: flex-start; - justify-content: space-between; - margin: 20px 1px; - - @media ($phone) { - margin: 0; - } - - &__inner { - display: flex; - flex: 1; - flex-wrap: wrap; - list-style: none; - margin: 0; - padding: 0; - - > li { - flex: 0 0 auto; - margin-bottom: 10px; - white-space: nowrap; - - &:not(:last-of-type) { - margin-right: 20px; - } - } - - @media ($phone) { - flex-direction: column; - align-items: flex-start; - padding: 0; - - li { - margin: 0; - padding: 5px; - } - } - } - - .spacer { - flex-grow: 1 !important; - } -} - -.menu { - display: flex; - flex-direction: column; - position: relative; - list-style: none; - padding: 0; - margin: 0; - - &__trigger { - margin-right: 0 !important; - color: $accent; - user-select: none; - cursor: pointer; - } - - &__dropdown { - @include menu; - - .open & { - display: flex; - } - - > li { - flex: 0 0 auto; - - &:not(:last-of-type) { - margin-bottom: 10px; - } - - a { - display: flex; - padding: 5px; - } - } - } - - &--desktop { - @media ($phone) { - display: none - } - } - - &--mobile { - .menu__trigger { - @include header-menu-trigger; - display: none; - - @media ($phone) { - display: block; - } - } - - .menu__dropdown { - @media ($phone) { - left: auto; - right: 0; - } - } - - li { - flex: 0 0 auto; - - &:not(:last-of-type) { - margin-bottom: 10px; - } - } - } - - &--language-selector { - .menu__trigger { - @include header-menu-trigger; - - @media ($phone) { - display: none; - } - } - - .menu__dropdown { - left: auto; - right: 0; - } - } -} diff --git a/themes/hugo-theme-terminal/assets/css/pagination.scss b/themes/hugo-theme-terminal/assets/css/pagination.scss deleted file mode 100644 index c65efcb..0000000 --- a/themes/hugo-theme-terminal/assets/css/pagination.scss +++ /dev/null @@ -1,87 +0,0 @@ -.pagination { - margin-top: 50px; - - @media print { - display: none; - } - - &__title { - display: flex; - text-align: center; - position: relative; - margin: 100px 0 20px; - - &-h { - text-align: center; - margin: 0 auto; - padding: 5px 10px; - background: $background; - color: transparentize($color, .7); - font-size: .8rem; - text-transform: uppercase; - text-decoration: none; - letter-spacing: .1em; - z-index: 1; - } - - hr { - position: absolute; - left: 0; - right: 0; - width: 100%; - margin-top: 15px; - z-index: 0; - } - } - - &__buttons { - display: flex; - align-items: center; - justify-content: center; - flex-flow: row wrap; - gap: 10px; - - a { - text-decoration: none; - } - } -} - -.button { - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - font-size: 1rem; - padding: 0; - appearance: none; - - @media($phone) { - flex: 1; - } - - a { - display: flex; - justify-content: center; - flex: 1; - padding: 8px 16px; - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - &__text { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - &.next .button__icon { - margin-left: 8px; - } - - &.previous .button__icon { - margin-right: 8px; - } -} diff --git a/themes/hugo-theme-terminal/assets/css/post.scss b/themes/hugo-theme-terminal/assets/css/post.scss deleted file mode 100644 index 223139b..0000000 --- a/themes/hugo-theme-terminal/assets/css/post.scss +++ /dev/null @@ -1,128 +0,0 @@ -.index-content { - margin-top: 20px; -} - -.framed { - border: 1px solid $accent; - padding: 20px; - - *:first-child { - margin-top: 0; - } - - *:last-child { - margin-bottom: 0; - } -} - -.posts { - width: 100%; -} - -.post { - width: 100%; - text-align: left; - margin: 20px auto; - padding: 20px 0; - - &:not(:last-of-type) { - border-bottom: 1px solid $border-color; - } - - &-meta { - font-size: 1rem; - margin-bottom: 10px; - color: transparentize($accent, .3); - } - - &-title { - $border: 3px dotted $accent; - position: relative; - color: $accent; - margin: 0 0 15px; - padding-bottom: 15px; - border-bottom: $border; - - &:after { - content: ''; - position: absolute; - bottom: 2px; - display: block; - width: 100%; - border-bottom: $border; - } - - a { - text-decoration: none; - } - } - - &-tags { - display: block; - margin-bottom: 20px; - font-size: 1rem; - opacity: .5; - - a { - text-decoration: none; - } - } - - &-content { - margin-top: 30px; - } - - &-cover { - border: 20px solid $accent; - background: transparent; - margin: 40px 0; - padding: 20px; - - @media ($phone) { - padding: 10px; - border-width: 10px; - } - } - - ul { - list-style: none; - - li:not(:empty):before { - content: '-'; - position: absolute; - left: -20px; - color: $accent; - } - } -} - -.post--regulation { - h1 { - justify-content: center; - } - - h2 { - justify-content: center; - margin-bottom: 10px; - - & + h2 { - margin-top: -10px; - margin-bottom: 20px; - } - } -} - -.hanchor { - color: transparentize($accent, .1); - text-decoration: none; - margin-left: 10px; - visibility: hidden; -} - -h1:hover a, h2:hover a, h3:hover a, h4:hover a { - visibility: visible; -} - -.footnotes { - color: transparentize($color, .5); -} diff --git a/themes/hugo-theme-terminal/assets/css/prism.scss b/themes/hugo-theme-terminal/assets/css/prism.scss deleted file mode 100644 index e4268ae..0000000 --- a/themes/hugo-theme-terminal/assets/css/prism.scss +++ /dev/null @@ -1,336 +0,0 @@ -/* PrismJS 1.24.1 -https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+actionscript+apacheconf+applescript+bash+c+csharp+cpp+cmake+coffeescript+csp+css-extras+diff+django+docker+elixir+elm+erlang+fsharp+flow+git+go+graphql+haml+handlebars+haskell+http+java+json+kotlin+latex+less+llvm+makefile+markdown+markup-templating+nasm+objectivec+ocaml+perl+php+php-extras+powershell+processing+pug+python+r+jsx+tsx+reason+ruby+rust+sass+scss+scala+scheme+sql+stylus+swift+textile+toml+twig+typescript+vim+visual-basic+wasm+yaml&plugins=line-highlight+line-numbers+jsonp-highlight+highlight-keywords+command-line+toolbar+copy-to-clipboard */ -/** - * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML - * Based on https://github.com/chriskempson/tomorrow-theme - * @author Rose Pritchard - */ - -code[class*="language-"], -pre[class*="language-"] { - color: #ccc; - background: none; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #2d2d2d; -} - -/* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.block-comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #999; -} - -.token.punctuation { - color: #ccc; -} - -.token.tag, -.token.attr-name, -.token.namespace, -.token.deleted { - color: #e2777a; -} - -.token.function-name { - color: #6196cc; -} - -.token.boolean, -.token.number, -.token.function { - color: #f08d49; -} - -.token.property, -.token.class-name, -.token.constant, -.token.symbol { - color: #f8c555; -} - -.token.selector, -.token.important, -.token.atrule, -.token.keyword, -.token.builtin { - color: #cc99cd; -} - -.token.string, -.token.char, -.token.attr-value, -.token.regex, -.token.variable { - color: #7ec699; -} - -.token.operator, -.token.entity, -.token.url { - color: #67cdcc; -} - -.token.important, -.token.bold { - font-weight: bold; -} -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.inserted { - color: green; -} - -pre[data-line] { - position: relative; - padding: 1em 0 1em 3em; -} - -.line-highlight { - position: absolute; - left: 0; - right: 0; - padding: inherit 0; - margin-top: 1em; /* Same as .prism’s padding-top */ - - background: hsla(24, 20%, 50%,.08); - background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); - - pointer-events: none; - - line-height: inherit; - white-space: pre; -} - -@media print { - .line-highlight { - /* - * This will prevent browsers from replacing the background color with white. - * It's necessary because the element is layered on top of the displayed code. - */ - -webkit-print-color-adjust: exact; - color-adjust: exact; - } -} - - .line-highlight:before, - .line-highlight[data-end]:after { - content: attr(data-start); - position: absolute; - top: .4em; - left: .6em; - min-width: 1em; - padding: 0 .5em; - background-color: hsla(24, 20%, 50%,.4); - color: hsl(24, 20%, 95%); - font: bold 65%/1.5 sans-serif; - text-align: center; - vertical-align: .3em; - border-radius: 999px; - text-shadow: none; - box-shadow: 0 1px white; - } - - .line-highlight[data-end]:after { - content: attr(data-end); - top: auto; - bottom: .4em; - } - -.line-numbers .line-highlight:before, -.line-numbers .line-highlight:after { - content: none; -} - -pre[id].linkable-line-numbers span.line-numbers-rows { - pointer-events: all; -} -pre[id].linkable-line-numbers span.line-numbers-rows > span:before { - cursor: pointer; -} -pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before { - background-color: rgba(128, 128, 128, .2); -} - -pre[class*="language-"].line-numbers { - position: relative; - padding-left: 3.8em; - counter-reset: linenumber; -} - -pre[class*="language-"].line-numbers > code { - position: relative; - white-space: inherit; -} - -.line-numbers .line-numbers-rows { - position: absolute; - pointer-events: none; - top: 0; - font-size: 100%; - left: -3.8em; - width: 3em; /* works for line-numbers below 1000 lines */ - letter-spacing: -1px; - border-right: 1px solid #999; - - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -} - - .line-numbers-rows > span { - display: block; - counter-increment: linenumber; - } - - .line-numbers-rows > span:before { - content: counter(linenumber); - color: #999; - display: block; - padding-right: 0.8em; - text-align: right; - } - -.command-line-prompt { - border-right: 1px solid #999; - display: block; - float: left; - font-size: 100%; - letter-spacing: -1px; - margin-right: 1em; - pointer-events: none; - - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.command-line-prompt > span:before { - color: #999; - content: ' '; - display: block; - padding-right: 0.8em; -} - -.command-line-prompt > span[data-user]:before { - content: "[" attr(data-user) "@" attr(data-host) "] $"; -} - -.command-line-prompt > span[data-user="root"]:before { - content: "[" attr(data-user) "@" attr(data-host) "] #"; -} - -.command-line-prompt > span[data-prompt]:before { - content: attr(data-prompt); -} - -div.code-toolbar { - position: relative; -} - -div.code-toolbar > .toolbar { - position: absolute; - top: .3em; - right: .2em; - transition: opacity 0.3s ease-in-out; - opacity: 0; -} - -div.code-toolbar:hover > .toolbar { - opacity: 1; -} - -/* Separate line b/c rules are thrown out if selector is invalid. - IE11 and old Edge versions don't support :focus-within. */ -div.code-toolbar:focus-within > .toolbar { - opacity: 1; -} - -div.code-toolbar > .toolbar > .toolbar-item { - display: inline-block; -} - -div.code-toolbar > .toolbar > .toolbar-item > a { - cursor: pointer; -} - -div.code-toolbar > .toolbar > .toolbar-item > button { - background: none; - border: 0; - color: inherit; - font: inherit; - line-height: normal; - overflow: visible; - padding: 0; - -webkit-user-select: none; /* for button */ - -moz-user-select: none; - -ms-user-select: none; -} - -div.code-toolbar > .toolbar > .toolbar-item > a, -div.code-toolbar > .toolbar > .toolbar-item > button, -div.code-toolbar > .toolbar > .toolbar-item > span { - color: #bbb; - font-size: .8em; - padding: 0 .5em; - background: #f5f2f0; - background: rgba(224, 224, 224, 0.2); - box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); - border-radius: .5em; -} - -div.code-toolbar > .toolbar > .toolbar-item > a:hover, -div.code-toolbar > .toolbar > .toolbar-item > a:focus, -div.code-toolbar > .toolbar > .toolbar-item > button:hover, -div.code-toolbar > .toolbar > .toolbar-item > button:focus, -div.code-toolbar > .toolbar > .toolbar-item > span:hover, -div.code-toolbar > .toolbar > .toolbar-item > span:focus { - color: inherit; - text-decoration: none; -} - diff --git a/themes/hugo-theme-terminal/assets/css/style.scss b/themes/hugo-theme-terminal/assets/css/style.scss deleted file mode 100644 index f32f759..0000000 --- a/themes/hugo-theme-terminal/assets/css/style.scss +++ /dev/null @@ -1,19 +0,0 @@ -@import "variables"; - -@import "font"; -@import "buttons"; -@import "form"; - -@import "header"; -@import "menu"; -@import "logo"; -@import "main"; -@import "post"; -@import "pagination"; -@import "footer"; - -@import "prism"; -@import "syntax"; -@import "code"; -@import "terms"; -@import "gist"; diff --git a/themes/hugo-theme-terminal/assets/css/syntax.scss b/themes/hugo-theme-terminal/assets/css/syntax.scss deleted file mode 100644 index 27aecc7..0000000 --- a/themes/hugo-theme-terminal/assets/css/syntax.scss +++ /dev/null @@ -1,153 +0,0 @@ -code.language-css, -code.language-scss, -.token.boolean, -.token.string, -.token.entity, -.token.url, -.language-css .token.string, -.language-scss .token.string, -.style .token.string, -.token.attr-value, -.token.keyword, -.token.control, -.token.directive, -.token.statement, -.token.regex, -.token.atrule, -.token.number, -.token.inserted, -.token.important { - color: $accent !important; -} - -.token.tag-id, -.token.atrule-id, -.token.operator, -.token.unit, -.token.placeholder, -.token.variable, -.token.tag, -.token.attr-name, -.token.namespace, -.token.deleted, -.token.property, -.token.class-name, -.token.constant, -.token.symbol { - color: transparentize($accent, .3) !important; -} - -.token.property, -.token.function, -.token.function-name, -.token.deleted, -code.language-javascript, -code.language-html, -.command-line-prompt > span:before { - color: mix($accent, #999, .9) !important; -} - -.token.selector, -.token.tag, -.token.punctuation { - color: white; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: rgba(255, 255, 255, .3) !important; -} - -.token.namespace { - opacity: .7 !important; -} - -pre[data-line] { - position: relative; -} - -pre[class*="language-"] { - margin: 0; - padding: 0; - overflow: auto; -} - -.line-highlight { - position: absolute; - left: 0; - right: 0; - padding: 0; - margin: 0; - background: transparentize(mix($accent, #999, 90%), .92); - pointer-events: none; - line-height: inherit; - white-space: pre; -} - -.line-highlight:before, -.line-highlight[data-end]:after { - content: attr(data-start); - position: absolute; - /* top: .4em; */ - left: .6em; - min-width: 1em; - padding: 0 .5em; - background-color: hsla(24, 20%, 50%, .4); - color: hsl(24, 20%, 95%); - font: bold 65%/1.5 sans-serif; - text-align: center; - vertical-align: .3em; - border-radius: 999px; - text-shadow: none; - box-shadow: 0 1px white; -} - -.line-highlight[data-end]:after { - content: attr(data-end); - top: auto; - bottom: .4em; -} - -.line-numbers .line-highlight:before, -.line-numbers .line-highlight:after { - content: none; -} - -.code-toolbar { - $code-margin: 40px; - position: relative; - margin: $code-margin 0; - padding: 20px; - border: 1px solid rgba(255, 255, 255, .1); - - + .code-toolbar, - + .highlight, - + .highlight .code-toolbar { - border-top: 0; - margin-top: calc(-1 * $code-margin); - } - - pre, code { - border: none; - } - - code { - display: block; - color: inherit; - } - - > .toolbar { - button { - font-size: .8em !important; - background: hsla(0,0%,87.8%,.2) !important; - color: #bbb !important; - box-shadow: 0 2px 0 0 rgba(0,0,0,.2) !important; - border-radius: 0 !important; - margin: 6px !important; - padding: 10px !important; - user-select:none - } - } -} diff --git a/themes/hugo-theme-terminal/assets/css/terms.scss b/themes/hugo-theme-terminal/assets/css/terms.scss deleted file mode 100644 index 0c9a61b..0000000 --- a/themes/hugo-theme-terminal/assets/css/terms.scss +++ /dev/null @@ -1,9 +0,0 @@ -.terms { - h1 { - color: $accent; - } - - h3 { - font-size: initial; - } -} diff --git a/themes/hugo-theme-terminal/assets/css/variables.scss b/themes/hugo-theme-terminal/assets/css/variables.scss deleted file mode 100644 index 09c7e28..0000000 --- a/themes/hugo-theme-terminal/assets/css/variables.scss +++ /dev/null @@ -1,14 +0,0 @@ -/* COLOR VARIABLES */ -$background: mix($accent, #1D1E28, 2%); -$color: white; -$border-color: rgba(255, 255, 255, .1); - -/* MEDIA QUERIES */ -$phone: "max-width: 684px"; -$tablet: "max-width: 900px"; - -/* variables for js, must be the same as these in @custom-media queries */ -:root { - --phoneWidth: (max-width: 684px); - --tabletWidth: (max-width: 900px); -} diff --git a/themes/hugo-theme-terminal/exampleSite/content/showcase.md b/themes/hugo-theme-terminal/exampleSite/content/showcase.md deleted file mode 100644 index 1ffc150..0000000 --- a/themes/hugo-theme-terminal/exampleSite/content/showcase.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "Showcase" -date: "2018-07-18" -author: "Hello Robot" ---- - -## Header 2 - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec interdum metus. Aenean rutrum ligula sodales ex auctor, sed tempus dui mollis. Curabitur ipsum dui, aliquet nec commodo at, tristique eget ante. **Donec quis dolor nec nunc mollis interdum vel in purus**. Sed vitae leo scelerisque, sollicitudin elit sed, congue ante. In augue nisl, vestibulum commodo est a, tristique porttitor est. Proin laoreet iaculis ornare. Nullam ut neque quam. - -> Fusce pharetra suscipit orci nec tempor. Quisque vitae sem sit amet sem mollis consequat. Sed at imperdiet lorem. Vestibulum pharetra faucibus odio, ac feugiat tellus sollicitudin at. Pellentesque varius tristique mi imperdiet dapibus. Duis orci odio, sodales lacinia venenatis sit amet, feugiat et diam. - -### Header 3 - -Nulla libero turpis, lacinia vitae cursus ut, auctor dictum nisl. Fusce varius felis nec sem ullamcorper, at convallis nisi vestibulum. Duis risus odio, porta sit amet placerat mollis, tincidunt non mauris. Suspendisse fringilla, `odio a dignissim pharetra`, est urna sollicitudin urna, eu scelerisque magna ex vitae tellus. - -```css -/* PostCSS code */ - -pre { - background: #1a1a1d; - padding: 20px; - border-radius: 8px; - font-size: 1rem; - overflow: auto; - - @media (--phone) { - white-space: pre-wrap; - word-wrap: break-word; - } - - code { - background: none !important; - color: #ccc; - padding: 0; - font-size: inherit; - } -} -``` - -```js -// JS code - -const menuTrigger = document.querySelector('.menu-trigger') -const menu = document.querySelector('.menu') -const mobileQuery = getComputedStyle(document.body).getPropertyValue('--phoneWidth') -const isMobile = () => window.matchMedia(mobileQuery).matches -const isMobileMenu = () => { - menuTrigger.classList.toggle('hidden', !isMobile()) - menu.classList.toggle('hidden', isMobile()) -} - -isMobileMenu() - -menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden')) - -window.addEventListener('resize', isMobileMenu) -``` - -```html - - -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-``` - -#### Header 4 - -Curabitur scelerisque felis viverra varius scelerisque. Ut enim libero, molestie gravida blandit at, mollis ornare tellus. Cras arcu mi, ultrices vel pulvinar vel, volutpat eu tortor. Nullam nec eros quis massa ultrices iaculis sed in metus. Praesent sollicitudin sem sit amet orci tempor gravida. - -- Maecenas elementum vitae nibh vitae porttitor. -- Aenean consequat, risus ut cursus placerat, arcu nulla sodales risus, ut molestie tellus tellus et dui. -- Integer imperdiet turpis vitae lacus imperdiet, ut ornare ligula auctor. Integer in mi eu velit vehicula suscipit eget vulputate nulla. -- Etiam vitae enim quis velit lobortis placerat a ut sem. - - Curabitur lobortis ante sit amet orci pulvinar, sollicitudin viverra nunc accumsan. - - Praesent fermentum orci quis leo facilisis posuere. - -Aliquam erat volutpat. In hac habitasse platea dictumst. Nunc ut tincidunt mauris. Sed at gravida risus, id semper magna. Nullam vitae enim mattis, sodales neque non, pharetra elit. Cras sit amet sagittis augue, et finibus turpis. Ut tempus tincidunt diam vel pharetra. Nulla porttitor odio sit amet nulla scelerisque, quis aliquam mi imperdiet. Sed tincidunt dui vel tellus vestibulum rhoncus. Donec tempus ultrices velit. diff --git a/themes/hugo-theme-terminal/go.mod b/themes/hugo-theme-terminal/go.mod deleted file mode 100644 index b5dd62c..0000000 --- a/themes/hugo-theme-terminal/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/panr/hugo-theme-terminal/v3 - -go 1.19 diff --git a/themes/hugo-theme-terminal/images/tn.png b/themes/hugo-theme-terminal/images/tn.png deleted file mode 100644 index e6f363d..0000000 Binary files a/themes/hugo-theme-terminal/images/tn.png and /dev/null differ diff --git a/themes/hugo-theme-terminal/layouts/_default/terms.html b/themes/hugo-theme-terminal/layouts/_default/terms.html deleted file mode 100644 index 399d665..0000000 --- a/themes/hugo-theme-terminal/layouts/_default/terms.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ define "main" }} -
-

{{ .Title }}

- -
-{{ end }} diff --git a/themes/hugo-theme-terminal/layouts/partials/footer.html b/themes/hugo-theme-terminal/layouts/partials/footer.html deleted file mode 100644 index 17a44c5..0000000 --- a/themes/hugo-theme-terminal/layouts/partials/footer.html +++ /dev/null @@ -1,35 +0,0 @@ - - -{{ $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 }} - - - - - -{{ partial "extended_footer.html" . }} diff --git a/themes/hugo-theme-terminal/layouts/partials/posts_pagination.html b/themes/hugo-theme-terminal/layouts/partials/posts_pagination.html deleted file mode 100644 index 04951d5..0000000 --- a/themes/hugo-theme-terminal/layouts/partials/posts_pagination.html +++ /dev/null @@ -1,26 +0,0 @@ -{{ if or .NextInSection .PrevInSection }} - -{{ end }} \ No newline at end of file diff --git a/themes/hugo-theme-terminal/layouts/shortcodes/image.html b/themes/hugo-theme-terminal/layouts/shortcodes/image.html deleted file mode 100644 index 6b2a2c0..0000000 --- a/themes/hugo-theme-terminal/layouts/shortcodes/image.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ if .Get "src" }} - {{ . | plainify }} -{{ end }} diff --git a/themes/hugo-theme-terminal/static/img/theme-colors/blue.png b/themes/hugo-theme-terminal/static/img/theme-colors/blue.png deleted file mode 100644 index cb5fd99..0000000 Binary files a/themes/hugo-theme-terminal/static/img/theme-colors/blue.png and /dev/null differ diff --git a/themes/hugo-theme-terminal/static/img/theme-colors/green.png b/themes/hugo-theme-terminal/static/img/theme-colors/green.png deleted file mode 100644 index 4909792..0000000 Binary files a/themes/hugo-theme-terminal/static/img/theme-colors/green.png and /dev/null differ diff --git a/themes/hugo-theme-terminal/static/img/theme-colors/pink.png b/themes/hugo-theme-terminal/static/img/theme-colors/pink.png deleted file mode 100644 index 96d49ec..0000000 Binary files a/themes/hugo-theme-terminal/static/img/theme-colors/pink.png and /dev/null differ diff --git a/themes/hugo-theme-terminal/static/img/theme-colors/red.png b/themes/hugo-theme-terminal/static/img/theme-colors/red.png deleted file mode 100644 index a0541a6..0000000 Binary files a/themes/hugo-theme-terminal/static/img/theme-colors/red.png and /dev/null differ diff --git a/themes/hugo-theme-terminal/.babelrc b/themes/terminal/.babelrc similarity index 100% rename from themes/hugo-theme-terminal/.babelrc rename to themes/terminal/.babelrc diff --git a/themes/hugo-theme-terminal/.eslintrc.yml b/themes/terminal/.eslintrc.yml similarity index 100% rename from themes/hugo-theme-terminal/.eslintrc.yml rename to themes/terminal/.eslintrc.yml diff --git a/themes/hugo-theme-terminal/.gitignore b/themes/terminal/.gitignore similarity index 99% rename from themes/hugo-theme-terminal/.gitignore rename to themes/terminal/.gitignore index 9692bf1..ed97239 100644 --- a/themes/hugo-theme-terminal/.gitignore +++ b/themes/terminal/.gitignore @@ -88,6 +88,6 @@ typings/ .dynamodb/ # End of https://www.gitignore.io/api/node - public +resources .hugo_build.lock diff --git a/themes/hugo-theme-terminal/.husky/.gitignore b/themes/terminal/.husky/.gitignore similarity index 100% rename from themes/hugo-theme-terminal/.husky/.gitignore rename to themes/terminal/.husky/.gitignore diff --git a/themes/hugo-theme-terminal/.husky/pre-push b/themes/terminal/.husky/pre-push similarity index 100% rename from themes/hugo-theme-terminal/.husky/pre-push rename to themes/terminal/.husky/pre-push diff --git a/themes/hugo-theme-terminal/.prettierrc b/themes/terminal/.prettierrc similarity index 100% rename from themes/hugo-theme-terminal/.prettierrc rename to themes/terminal/.prettierrc diff --git a/themes/terminal/.stylelintrc.json b/themes/terminal/.stylelintrc.json new file mode 100644 index 0000000..300e374 --- /dev/null +++ b/themes/terminal/.stylelintrc.json @@ -0,0 +1,12 @@ +{ + "extends": [ + "stylelint-config-standard-scss", + "stylelint-config-prettier-scss" + ], + "rules": { + "max-empty-lines": 1, + "color-function-notation": null, + "no-descending-specificity": null, + "selector-class-pattern": null + } +} diff --git a/themes/hugo-theme-terminal/COMMUNITY-FEATURES.md b/themes/terminal/COMMUNITY-FEATURES.md similarity index 63% rename from themes/hugo-theme-terminal/COMMUNITY-FEATURES.md rename to themes/terminal/COMMUNITY-FEATURES.md index 1108747..f20b670 100644 --- a/themes/hugo-theme-terminal/COMMUNITY-FEATURES.md +++ b/themes/terminal/COMMUNITY-FEATURES.md @@ -23,3 +23,12 @@ 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 + +- **Configurable timestamping for posts** ([KatieTheDev/hugo-theme-terminal](https://github.com/KatieTheDev/hugo-theme-terminal)) + - Allows for configuring timestamping, not just datestamping + - Works with last modification dates as well + - KatieTheDev ([@KatieTheDev](https://github.com/KatieTheDev)) \ No newline at end of file diff --git a/themes/hugo-theme-terminal/LICENSE.md b/themes/terminal/LICENSE.md similarity index 97% rename from themes/hugo-theme-terminal/LICENSE.md rename to themes/terminal/LICENSE.md index 770457f..d1a70b3 100644 --- a/themes/hugo-theme-terminal/LICENSE.md +++ b/themes/terminal/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 panr +Copyright (c) 2024 panr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/themes/hugo-theme-terminal/README.md b/themes/terminal/README.md similarity index 81% rename from themes/hugo-theme-terminal/README.md rename to themes/terminal/README.md index f57b78c..e794aed 100644 --- a/themes/hugo-theme-terminal/README.md +++ b/themes/terminal/README.md @@ -1,9 +1,14 @@ # Terminal -![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/screenshot.png?raw=true) +**Demo: https://panr.github.io/hugo-theme-terminal-demo/** -### DEMO - https://hugo-terminal.now.sh/ -### ⚠️ The theme needs at least Hugo **Extended** v0.90.x. +**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) + +--- + +⚠️ The theme needs at least Hugo **Extended** v0.90.x. --- @@ -19,11 +24,11 @@ - [Found a bug?](#bug) - [New cool idea or feature](#feature) - [Terminal theme user?](#terminal-theme-user) -- [Licence](#licence) +- [License](#license) ## Features -- **5 duotone themes**, depending on your preferences (orange is default, red, blue, green, pink) +- 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 @@ -99,7 +104,7 @@ You can also choose **one of the 3 possibilities** to install the theme: # you fetch the theme module. # # hugo mod init [your website/module name] -hugo mod get github.com/panr/hugo-theme-terminal/v3 +hugo mod get github.com/panr/hugo-theme-terminal/v4 ``` and in your config file add: @@ -107,9 +112,9 @@ 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/v3' + path = 'github.com/panr/hugo-theme-terminal/v4' ``` Keep in mind that the theme by default won't show up in the `themes` directory. This means that you are using the theme as it was on the repository at the moment you fetched it. Your local `go.sum` file keeps all the references. Read more about Hugo Modules in the [official documentation](https://gohugo.io/hugo-modules/). @@ -163,9 +168,6 @@ paginate = 5 # the list of set content will show up on your index page (baseurl). contentTypeName = "posts" - # ["orange", "blue", "red", "green", "pink"] - themeColor = "orange" - # if you set this to 0, only submenu trigger will be visible showMenuItems = 2 @@ -187,15 +189,9 @@ paginate = 5 # If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated showLastUpdated = false - # set a custom favicon (default is a `themeColor` square) - # favicon = "favicon.ico" - # Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author # updatedDatePrefix = "Updated" - # set all headings to their default size (depending on browser settings) - # oneHeadingSize = true # default - # whether to show a page's estimated reading time # readingTime = false # default @@ -207,6 +203,20 @@ paginate = 5 # can be overridden in a page's front-matter # TocTitle = "Table of Contents" # default + # Set date/time format for posts + # This will impact the date/time displayed on + # index.html, the posts list page, and on posts themselves + # This value can also be configured per-post on front matter + # If you have any issues with the timezone rendering differently + # than you expected, please ensure your timezone is correctly set + # on your server. + # This value can be customized according to Hugo documentation: + # https://gohugo.io/functions/time/format/ + # Default value (no changes needed): + # dateFormat = "2006-01-02" + # Example format, with date, time, and timezone abbreviation: + # dateFormat = "2006-01-02 3:04:06 PM MST" + [params.twitter] # set Twitter handles for Twitter cards @@ -219,45 +229,45 @@ paginate = 5 [languages.en] languageName = "English" title = "Terminal" - subtitle = "A simple, retro theme for Hugo" - owner = "" - keywords = "" - copyright = "" - menuMore = "Show more" - readMore = "Read more" - readOtherPosts = "Read other posts" - newerPosts = "Newer posts" - olderPosts = "Older posts" - missingContentMessage = "Page not found..." - missingBackButtonLabel = "Back to home page" - minuteReadingTime = "min read" - words = "words" - [languages.en.params.logo] - logoText = "Terminal" - logoHomeLink = "/" + [languages.en.params] + subtitle = "A simple, retro theme for Hugo" + owner = "" + keywords = "" + copyright = "" + menuMore = "Show more" + readMore = "Read more" + readOtherPosts = "Read other posts" + newerPosts = "Newer posts" + olderPosts = "Older posts" + missingContentMessage = "Page not found..." + missingBackButtonLabel = "Back to home page" + minuteReadingTime = "min read" + words = "words" - [languages.en.menu] - [[languages.en.menu.main]] - identifier = "about" - name = "About" - url = "/about" - [[languages.en.menu.main]] - identifier = "showcase" - name = "Showcase" - url = "/showcase" + [languages.en.params.logo] + logoText = "Terminal" + logoHomeLink = "/" + + [languages.en.menu] + [[languages.en.menu.main]] + identifier = "about" + name = "About" + url = "/about" + [[languages.en.menu.main]] + identifier = "showcase" + name = "Showcase" + url = "/showcase" [module] # In case you would like to make changes to the theme and keep it locally in you repository, # uncomment the line below (and correct the local path if necessary). # -- - # replacements = "github.com/panr/hugo-theme-terminal -> themes/terminal" + # replacements = "github.com/panr/hugo-theme-terminal/v4 -> themes/terminal" [[module.imports]] - path = 'github.com/panr/hugo-theme-terminal' + path = 'github.com/panr/hugo-theme-terminal/v4' ``` -to `config.toml` file in your Hugo root directory and change params fields. In case you need, here's [a YAML version](https://gist.github.com/panr/9eeea6f595c257febdadc11763e3a6d1). - **NOTE:** Please keep in mind that currently `main menu` doesn't support nesting. ## Post archetype @@ -304,6 +314,6 @@ I'd be happy to know more about you and what you are doing. If you want to share ## License -Copyright © 2019-2022 Radosław Kozieł ([@panr](https://twitter.com/panr)) +Copyright © 2019-2024 Radosław Kozieł ([@panr](https://twitter.com/panr)) The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information. diff --git a/themes/hugo-theme-terminal/USERS.md b/themes/terminal/USERS.md similarity index 75% rename from themes/hugo-theme-terminal/USERS.md rename to themes/terminal/USERS.md index a77d8b9..9fc91b9 100644 --- a/themes/hugo-theme-terminal/USERS.md +++ b/themes/terminal/USERS.md @@ -1,27 +1,20 @@ # Meet the users of Terminal theme! + - https://xicode.se **magistern** (Teacher) - https://devmaster64.com **devmaster64** (Software Developer) -- https://mickie1.gitlab.io/blog/ **mickie** (Engineer) - https://calloc.net **Vaibhav Yenamandra** (Software Engineer) - https://potatofrom.space **Kevin Liu** (Software) - https://horochx.org **horochx** (Software Developer) - https://feng.si **Si Feng** (Software Engineer) - https://ben-on-vms.com **Benedikt Frenzel** (Technical Support Engineer) - https://johngazzini.com **John Gazzini** (Software Engineer) -- https://geekx.tech/ **Sagar Ladla** (Student Developer & Cyber Security Specialist) - https://tears.io/ **Alex** (SRE) - https://ayushkarn.me/ **Ayush Karn** (Student Developer) -- https://ssgram.dev **Ramaseshan Parthasarathy** (Software Developer) - https://zaine.me **Amine Zaine** (Cloud Engineer) - https://notes.dmaitre.phyip3.dur.ac.uk/computing-club/ **Ryan Moodie** (Physics PhD student) -- https://thecodecousins.com **Stanley Nguyen** (Software Engineer) & **Hoang Do** (Software & IoT Engineer) -- https://schacherbauer.dev **Markus Schacherbauer** (Student Developer) -- https://rinma.dev **Marvin Dalheimer** (Software Developer) - https://lunar.computer **Lunar Computer** (DevOps Engineer) - https://naxxfish.net **Chris Roberts** (Broadcast Systems Engineer) -- https://security.jtang.dev **Jonathan Tang** (Student & Software Engineer) - https://andreacaravano.net **Andrea Caravano** (Student) -- https://dawsonverboven.com/ **Dawson Verboven** (Student & Software Developer) - https://qbunt.com **Jeremy Bunting** (Software Engineer) - https://smeik.org **Smeik** (Embedded Developer) - https://code.willstocks.co.uk **Will Stocks** (Blogger & Developer) @@ -30,13 +23,9 @@ - https://bgameiro.me/ **Bernardo Gameiro** (Engineer Physicist student) - https://return-to-libc.com/ **elraro** (Cyber Security Specialist) - https://pablart.com/ **Pablo Diaz-Gutierrez** (Software Engineer, General Tinkerer) -- https://waterloos.niflheimr.blue/ **cindrmon** (Student and Aspiring Software Engineer) - https://monocle.rpod.club/ **classx** (DevOps Engineer) -- https://wjdevschool.com/ **Wojciech Bogócki** (Making Things & Teaching / W&J Dev School) - https://erisianrite.com/ **ErisianRite** (Coding, Engineering, Tools for Thought) -- https://dongzhi.me **Joe** (Software Developer) - https://isaes.com.tr/ **Isa Es** (Software Engineer) -- https://conight.com **Conight Wang** (Software Engineer) - https://blog.m5e.de/ **Christoph Miksche** (Software Developer) - https://mpostument.com/ **Maksym Postument** (DevOps Engineer) - https://mathiejosh.xyz **Josh Mathie** (Electrical Engineering Technology Student/Sales and Engineering Tech) @@ -44,8 +33,6 @@ - https://blog.puvvadi.me **KD Puvvadi** (Software Dev & Cloud Orchestrator) - https://hidden.land/ **Louisload** (Game Developer & Musician) - https://linuxbase.nl **Michael Trip** (DevOps Engineer) -- https://markopolo123.github.io **Markopolo** (DevOps Engineer) -- https://openfoxblog.leven.dev/ **Damon Leven** (Student & Software Developer) - https://blog.sethforprivacy.com **Seth For Privacy** (Security, privacy, and cryptocurrency writer, podcaster) - https://thesprawl.city **crish** (Software and stuff) - https://justinnuwin.com **Justin Nguyen** (Software & Hardware Developer) @@ -55,17 +42,27 @@ - https://biplav.xyz **Biplav's Blog** (Student) - https://santiago.wtf **Nicholas Santiago** (DevOps Engineer) - https://2200g.github.io/ **2200g** (Blogger/Student) -- https://cristiioan.me **Cristian Margine** (Student) - https://they.mint.lgbt **Joey Aliaga** (Software Developer & Student) - https://tatewilhelm.me **Tate Wilhelm** (Student, Programmer & Tinkerer) - https://mikefoden.com **Mike Foden** (Software Developer) - https://undemalum.github.io/portfolio/ **Mateusz Konat** (Student) - https://ku0hn.radio **Ben Kuhn** (Ham Radio Operator, InfoSec Engineer, Tinkerer) -- https://bg117.xyz/projects **bg117** (Student and Hobby Programmer) - https://www.grumpymetalguy.com **GrumpyMetalGuy** (General Grumper and Developer) - https://blog.jontes.page **Jonte** (general tech geek) - https://nazdarthegame.com/ **Michal Skoula** (Software Developer) - https://1mup.myorange.house **Antonio Garosi** (Street art gallery) +- https://kitchvx.github.io **Nathan Kitching** (IT Student) +- https://dgood.win **Dom Goodwin** (Platform Engineer) +- https://sir-photch.xyz **Sir-Photch** (ComSci-student. German Blog) +- https://drewmorris.info **Drew Morris** (Mathematician && Computer Scientist) +- https://blog.darkiiiiiice.com **MarioMang** (Software Developer) +- https://www.sagbot.com **E. HADDAG** (Computer Scientist) +- https://adamperkowski.dev **Adam Perkowski** (A Random Developer) +- https://imortio.github.io **Azrul** (CompSci Student) +- https://carmar.is **Carmaris** (Amateur Hacker) +- https://ragonneau.github.io **Tom Ragonneau** (Engineer) +- https://katiethe.dev **KatieTheDev** (Amateur porgrammer and tinkerer) +- https://stefka.eu **Jiří Štefka** (Software Developer) + + diff --git a/themes/hugo-theme-terminal/archetypes/posts.md b/themes/terminal/archetypes/posts.md similarity index 75% rename from themes/hugo-theme-terminal/archetypes/posts.md rename to themes/terminal/archetypes/posts.md index af38c55..7064550 100644 --- a/themes/hugo-theme-terminal/archetypes/posts.md +++ b/themes/terminal/archetypes/posts.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" date = "{{ .Date }}" +#dateFormat = "2006-01-02" # This value can be configured for per-post date formatting author = "" authorTwitter = "" #do not include @ cover = "" @@ -10,5 +11,4 @@ description = "" showFullContent = false readingTime = false hideComments = false -color = "" #color from the theme settings +++ diff --git a/themes/terminal/assets/css/buttons.css b/themes/terminal/assets/css/buttons.css new file mode 100644 index 0000000..fdf10c7 --- /dev/null +++ b/themes/terminal/assets/css/buttons.css @@ -0,0 +1,123 @@ +.button-container { + display: table; + margin-left: auto; + margin-right: auto; +} + +button, +.button, +a.button { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 8px 18px; + text-decoration: none; + text-align: center; + border-radius: 8; + font: inherit; + font-weight: bold; + appearance: none; + cursor: pointer; + outline: none; +} + +button.outline, +.button.outline, +a.button.outline { + background: transparent; + box-shadow: none; + padding: 8px 18px; +} + +button.outline :hover, +.button.outline :hover, +a.button.outline :hover { + transform: none; + box-shadow: none; +} + +button.link, +.button.link, +a.button.link { + background: none; + font-size: 1rem; +} + +button.small, +.button.small, +a.button.small { + font-size: 0.8rem; +} + +button.wide, +.button.wide, +a.button.wide { + min-width: 200px; + padding: 14px 24px; +} + +a.button.inline { + background: none; + color: var(--accent); + padding: initial; + margin: initial; + border: initial; + font-weight: initial; + text-decoration: none; +} + +a.button.inline:active, +a.button.inline:hover { + background: none; +} + +a.button.inline::before { + content: "[" +} + +a.button.inline::after { + content: "]" +} + +a.button.inline.prev::before { + content: "← [" +} + +a.button.inline.next::after { + content: "] →" +} + +a.read-more, +a.read-more:hover, +a.read-more:active { + display: inline-flex; + border: none; + background: none; + box-shadow: none; + padding: 0; + max-width: 100%; + text-decoration: none; +} + +.code-toolbar { + margin-bottom: 20px; +} + +.code-toolbar .toolbar-item a { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 3px 8px; + margin-bottom: 5px; + text-decoration: none; + text-align: center; + font-size: 13px; + font-weight: 500; + border-radius: 8px; + border: 1px solid transparent; + appearance: none; + cursor: pointer; + outline: none; +} diff --git a/themes/terminal/assets/css/code.css b/themes/terminal/assets/css/code.css new file mode 100644 index 0000000..b2ebea5 --- /dev/null +++ b/themes/terminal/assets/css/code.css @@ -0,0 +1,117 @@ +pre { + margin: 20px 0; +} + +.code-toolbar { + position: relative; + margin: 20px 0; + border: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); +} + +.code-toolbar + .code-toolbar, +.code-toolbar + .highlight, +.code-toolbar + .highlight .code-toolbar { + border-top: 0; + margin-top: -20px; +} + +.code-toolbar pre, .code-toolbar code { + border: none; +} + +.code-toolbar code { + display: block; + color: color-mix(in srgb, var(--accent) 50%, var(--foreground)); +} + +.code-toolbar > .toolbar button { + font-size: 0.8em !important; + font-weight: bold !important; + background: var(--accent) !important; + color: var(--background) !important; + border-radius: var(--radius) !important; + box-shadow: none !important; + border: 1px solid var(--background) !important; + margin: 6px !important; + padding: 10px !important; + user-select: none; +} + +.collapsable-code { + position: relative; + width: 100%; + margin: 40px 0; +} + +.collapsable-code input[type=checkbox] { + position: absolute; + visibility: hidden; +} + +.collapsable-code input[type=checkbox]:checked ~ pre, +.collapsable-code input[type=checkbox]:checked ~ .code-toolbar pre { + display: none; +} + +.collapsable-code input[type=checkbox]:checked ~ .code-toolbar { + padding: 0; + border-top: none; +} + +.collapsable-code input[type=checkbox]:checked ~ .code-toolbar .toolbar { + display: none; +} + +.collapsable-code input[type=checkbox]:checked ~ label .collapsable-code__toggle::after { + content: attr(data-label-expand); +} + +.collapsable-code label { + position: relative; + display: flex; + justify-content: space-between; + min-width: 30px; + min-height: 30px; + margin: 0; + border-bottom: 1px solid var(--accent); + cursor: pointer; +} + +.collapsable-code__title { + flex: 1; + color: var(--accent); + padding: 3px 10px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.collapsable-code__language { + color: var(--accent); + border: 1px solid var(--accent); + border-bottom: none; + text-transform: uppercase; + padding: 3px 10px; +} + +.collapsable-code__toggle { + color: var(--accent); + font-size: 16px; + padding: 3px 10px; +} + +.collapsable-code__toggle::after { + content: attr(data-label-collapse); +} + +.collapsable-code pre { + margin-top: 0; +} + +.collapsable-code pre::first-line { + line-height: 0; +} + +.collapsable-code .code-toolbar { + margin: 0; +} diff --git a/themes/terminal/assets/css/fonts.css b/themes/terminal/assets/css/fonts.css new file mode 100644 index 0000000..7ce3fd1 --- /dev/null +++ b/themes/terminal/assets/css/fonts.css @@ -0,0 +1,19 @@ +@font-face { + font-display: swap; + font-family: "Fira Code"; + font-style: normal; + font-weight: 400; + src: url("../fonts/FiraCode-Regular.woff") format("woff"); + font-feature-settings: "liga", "tnum", "ss01", "locl"; + font-variant-ligatures: contextual; +} + +@font-face { + font-display: swap; + font-family: "Fira Code"; + font-style: normal; + font-weight: 800; + src: url("../fonts/FiraCode-Bold.woff") format("woff"); + font-feature-settings: "liga", "tnum", "ss01", "locl"; + font-variant-ligatures: contextual; +} diff --git a/themes/terminal/assets/css/footer.css b/themes/terminal/assets/css/footer.css new file mode 100644 index 0000000..12e32de --- /dev/null +++ b/themes/terminal/assets/css/footer.css @@ -0,0 +1,46 @@ +.footer { + padding: 40px 0; + flex-grow: 0; + opacity: 0.5; +} + +.footer__inner { + display: flex; + align-items: center; + justify-content: space-between; + margin: 0; + width: 760px; + max-width: 100%; +} + +.footer a { + color: inherit; +} + +.footer .copyright { + display: flex; + flex-flow: row wrap; + flex: 1; + align-items: center; + font-size: 1rem; + justify-content: center; +} + +.footer .copyright--user { + margin: auto; + text-align: center; +} + +.footer .copyright > *:first-child:not(:only-child) { + margin-right: 10px; +} + +.footer .copyright span { + white-space: nowrap; +} + +@media (max-width: 900px) { + .footer__inner { + flex-direction: column; + } +} diff --git a/themes/terminal/assets/css/gist.css b/themes/terminal/assets/css/gist.css new file mode 100644 index 0000000..f4d2a51 --- /dev/null +++ b/themes/terminal/assets/css/gist.css @@ -0,0 +1,4 @@ +body .gist .blob-num, +body .gist .blob-code-inner { + border: none; +} diff --git a/themes/terminal/assets/css/header.css b/themes/terminal/assets/css/header.css new file mode 100644 index 0000000..120dd1c --- /dev/null +++ b/themes/terminal/assets/css/header.css @@ -0,0 +1,45 @@ +.header { + display: flex; + flex-direction: column; + position: relative; +} + +.header__inner { + display: flex; + align-items: center; + justify-content: space-between; +} + +.header__logo { + display: flex; + flex: 1; +} + +.header__logo::after { + content: ""; + background: repeating-linear-gradient(90deg, var(--accent), var(--accent) 2px, transparent 0, transparent 10px); + display: block; + width: 100%; + right: 10px; +} + +.header__logo a { + flex: 0 0 auto; + max-width: 100%; + text-decoration: none; +} + +.logo { + display: flex; + align-items: center; + text-decoration: none; + background: var(--accent); + color: var(--background); + padding: 5px 10px; +} + +@media print { + .header { + display: none; + } +} diff --git a/themes/terminal/assets/css/main.css b/themes/terminal/assets/css/main.css new file mode 100644 index 0000000..b771deb --- /dev/null +++ b/themes/terminal/assets/css/main.css @@ -0,0 +1,167 @@ +html { + box-sizing: border-box; +} + +*, +*::before, +*::after { + box-sizing: inherit; +} + +body { + margin: 0; + padding: 0; + font-family: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace; + font-size: 1rem; + line-height: 1.54; + letter-spacing: -0.02em; + background-color: var(--background); + color: var(--foreground); + text-rendering: optimizelegibility; + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + text-size-adjust: 100%; +} + +.headings--one-size h1, +.headings--one-size h2, +.headings--one-size h3, +.headings--one-size h4, +.headings--one-size h5, +.headings--one-size h6 { + font-size: 1.4rem; + line-height: 1.3; + margin: 20px 0; +} + +.headings--one-size ~ h1:first-child, +.headings--one-size ~ h2:first-child, +.headings--one-size ~ h3:first-child, +.headings--one-size ~ h4:first-child, +.headings--one-size ~ h5:first-child, +.headings--one-size ~ h6:first-child { + margin-top: 20px; +} + +img.left { + margin-right: auto; +} + +img.center { + margin-left: auto; + margin-right: auto; +} + +img.right { + margin-left: auto; +} + +figure.left { + margin-right: auto; +} + +figure.center { + margin-left: auto; + margin-right: auto; +} + +figure.right { + margin-left: auto; +} + +figure figcaption.left { + text-align: left; +} + +figure figcaption.center { + text-align: center; +} + +figure figcaption.right { + text-align: right; +} + +blockquote.twitter-tweet { + position: relative; + background: var(--background); + font: inherit; + color: inherit; + border: 1px solid var(--accent); + padding-top: 60px; +} + +blockquote.twitter-tweet a { + color: var(--accent); + text-decoration: underline; +} + +blockquote.twitter-tweet::before { + content: "> From X:"; + position: absolute; + top: 20px; + left: 20px; + color: var(--accent); + font-weight: bold; +} + +.container { + display: flex; + flex-direction: column; + padding: 40px; + max-width: 864px; + min-height: 100vh; + border-right: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); +} + +.container.full, .container.center { + border: none; + margin: 0 auto; +} + +.container.full { + max-width: 100%; +} + +.content { + display: flex; + flex-direction: column; +} + +.hidden { + display: none; +} + +.__h_video { + padding-bottom: 58.23% !important; + overflow: visible !important; +} + +iframe[src*="youtube.com"] { + border: 8px solid var(--accent) !important; + padding: 8px !important; +} + +@media (max-width: 684px) { + body { + font-size: 1rem; + } + + .container { + padding: 20px; + } + + ul, + ol { + margin-left: 20px; + } +} + +@media print { + .container { + display: initial; + } + + .content { + display: initial; + } +} diff --git a/themes/terminal/assets/css/menu.css b/themes/terminal/assets/css/menu.css new file mode 100644 index 0000000..f9e77c9 --- /dev/null +++ b/themes/terminal/assets/css/menu.css @@ -0,0 +1,148 @@ +.navigation-menu { + display: flex; + align-items: flex-start; + justify-content: space-between; + margin: 20px 1px; +} + +.navigation-menu__inner { + display: flex; + flex: 1; + flex-wrap: wrap; + list-style: none; + margin: 0; + padding: 0; +} + +.navigation-menu__inner > li { + flex: 0 0 auto; + margin-bottom: 10px; + white-space: nowrap; +} + +.navigation-menu__inner > li:not(:last-of-type) { + margin-right: 20px; +} + +.navigation-menu .spacer { + flex-grow: 1 !important; +} + +.menu { + display: flex; + flex-direction: column; + position: relative; + list-style: none; + padding: 0; + margin: 0; +} + +.menu__trigger { + margin-right: 0 !important; + color: var(--accent); + user-select: none; + cursor: pointer; +} + +.menu__dropdown { + display: none; + flex-direction: column; + position: absolute; + background: var(--background); + box-shadow: 0 10px var(--background), -10px 10px var(--background), 10px 10px var(--background); + color: var(--accent); + border: 2px solid var(--accent); + margin: 0; + padding: 10px; + top: 10px; + left: 0; + list-style: none; + z-index: 99; +} + +.open .menu__dropdown { + display: flex; +} + +.menu__dropdown > li { + flex: 0 0 auto; +} + +.menu__dropdown > li:not(:last-of-type) { + margin-bottom: 10px; +} + +.menu__dropdown > li a { + display: flex; + padding: 5px; +} + +.menu--mobile .menu__trigger { + color: var(--accent); + border: 2px solid; + margin-left: 10px; + height: 100%; + padding: 3px 8px; + margin-bottom: 0 !important; + position: relative; + cursor: pointer; + display: none; +} + +.menu--mobile li { + flex: 0 0 auto; +} + +.menu--mobile li:not(:last-of-type) { + margin-bottom: 10px; +} + +.menu--language-selector .menu__trigger { + color: var(--accent); + border: 2px solid; + margin-left: 10px; + height: 100%; + padding: 3px 8px; + margin-bottom: 0 !important; + position: relative; + cursor: pointer; +} + +.menu--language-selector .menu__dropdown { + left: auto; + right: 0; +} + +@media (max-width: 684px) { + .navigation-menu { + margin: 0; + } + + .navigation-menu__inner { + flex-direction: column; + align-items: flex-start; + padding: 0; + } + + .navigation-menu__inner li { + margin: 0; + padding: 5px; + } + + .menu--desktop { + display: none; + } + + .menu--mobile .menu__trigger { + display: block; + } + + .menu--mobile .menu__dropdown { + left: auto; + right: 0; + } + + .menu--language-selector .menu__trigger { + display: none; + } +} diff --git a/themes/terminal/assets/css/pagination.css b/themes/terminal/assets/css/pagination.css new file mode 100644 index 0000000..8198ddd --- /dev/null +++ b/themes/terminal/assets/css/pagination.css @@ -0,0 +1,96 @@ +.pagination { + margin-top: 50px; +} + +.pagination__title { + display: flex; + text-align: center; + position: relative; + margin: 100px 0 20px; +} + +.pagination__title-h { + text-align: center; + margin: 0 auto; + padding: 5px 10px; + background: var(--background); + color: color-mix(in srgb var(--foreground) 30%, transparent); + font-size: 0.8rem; + text-transform: uppercase; + text-decoration: none; + letter-spacing: 0.1em; + z-index: 1; +} + +.pagination__title hr { + position: absolute; + left: 0; + right: 0; + width: 100%; + margin-top: 15px; + z-index: 0; +} + +.pagination__buttons { + display: flex; + align-items: center; + justify-content: center; + flex-flow: row wrap; + gap: 10px; +} + +.pagination__buttons a { + display: inline-flex; + max-width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + text-decoration: none; +} + +.button { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 1rem; + padding: 0; + appearance: none; +} + +.button a { + display: flex; + justify-content: center; + flex: 1; + padding: 8px 16px; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.button__text { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.next .button__icon { + margin-left: 8px; +} + +.prev .button__icon { + margin-right: 8px; +} + +@media (max-width: 684px) { + .button { + flex: 1; + } +} + +@media print { + .pagination { + display: none; + } +} diff --git a/themes/terminal/assets/css/post.css b/themes/terminal/assets/css/post.css new file mode 100644 index 0000000..7f2bda6 --- /dev/null +++ b/themes/terminal/assets/css/post.css @@ -0,0 +1,141 @@ +.index-content { + margin-top: 20px; +} + +.framed { + border: 1px solid var(--accent); + padding: 20px; +} + +.framed *:first-child { + margin-top: 0; +} + +.framed *:last-child { + margin-bottom: 0; +} + +.posts { + width: 100%; +} + +.post { + width: 100%; + text-align: left; + padding: 40px 0; +} + +.post:not(:last-of-type) { + border-bottom: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent); +} + +.post-meta { + font-size: 1rem; + margin-bottom: 10px; + color: color-mix(in srgb, var(--foreground) 50%, transparent); +} + +.post-meta > *:not(:first-child)::before { + content: "::"; + display: inline-block; + margin: 0 8px; +} + +.post-title { + position: relative; + color: var(--accent); + margin-top: 0 !important; + margin-bottom: 15px !important; + padding-bottom: 15px; + border-bottom: 3px dotted var(--accent); + text-decoration: none !important; +} + +.post-title::after { + content: ""; + position: absolute; + bottom: 2px; + display: block; + width: 100%; + border-bottom: 3px dotted var(--accent); +} + +.post-title a { + text-decoration: none; +} + +.post-tags { + display: block; + margin-bottom: 20px; + font-size: 1rem; + color: var(--accent); +} + +.table-of-contents { + margin: 40px 0; +} + +.post-content { + margin-top: 30px; +} + +.post-cover { + margin: 40px 0; +} + +.post ul { + list-style: none; +} + +.post ul li:not(:empty)::before { + content: "-"; + position: absolute; + left: -20px; + color: var(--accent); +} + +.post--regulation h1 { + justify-content: center; +} + +.post--regulation h2 { + justify-content: center; + margin-bottom: 10px; +} + +.post--regulation h2 + h2 { + margin-top: -10px; + margin-bottom: 20px; +} + +.hanchor { + position: absolute; + color: var(--accent); + text-decoration: none; + margin-left: 10px; + visibility: hidden; +} + +h1:hover .hanchor, +h2:hover .hanchor, +h3:hover .hanchor, +h4:hover .hanchor, +h5:hover .hanchor, +h6:hover .hanchor { + visibility: visible; +} + +.footnotes { + color: color-mix(in srgb, var(--foreground) 50%, transparent); +} + +.footnotes hr { + background: color-mix(in srgb, var(--foreground) 50%, transparent); +} + +@media (max-width: 684px) { + .post-cover { + padding: 10px; + border-width: 10px; + } +} diff --git a/themes/terminal/assets/css/prism.css b/themes/terminal/assets/css/prism.css new file mode 100644 index 0000000..3f5aa47 --- /dev/null +++ b/themes/terminal/assets/css/prism.css @@ -0,0 +1,322 @@ +/* PrismJS 1.24.1 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+actionscript+apacheconf+applescript+bash+c+csharp+cpp+cmake+coffeescript+csp+css-extras+diff+django+docker+elixir+elm+erlang+fsharp+flow+git+go+graphql+haml+handlebars+haskell+http+java+json+kotlin+latex+less+llvm+makefile+markdown+markup-templating+nasm+objectivec+ocaml+perl+php+php-extras+powershell+processing+pug+python+r+jsx+tsx+reason+ruby+rust+sass+scss+scala+scheme+sql+stylus+swift+textile+toml+twig+typescript+vim+visual-basic+wasm+yaml&plugins=line-highlight+line-numbers+jsonp-highlight+highlight-keywords+command-line+toolbar+copy-to-clipboard */ + +/** + * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML + * Based on https://github.com/chriskempson/tomorrow-theme + * @author Rose Pritchard + */ +code[class*=language-], +pre[class*=language-] { + color: #ccc; + background: none; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + tab-size: 4; + hyphens: none; +} + +/* Code blocks */ +pre[class*=language-] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +:not(pre) > code[class*=language-], +pre[class*=language-] { + background: #2d2d2d; +} + +/* Inline code */ +:not(pre) > code[class*=language-] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #999; +} + +.token.punctuation { + color: #ccc; +} + +.token.tag, +.token.attr-name, +.token.namespace, +.token.deleted { + color: #e2777a; +} + +.token.function-name { + color: #6196cc; +} + +.token.boolean, +.token.number, +.token.function { + color: #f08d49; +} + +.token.property, +.token.class-name, +.token.constant, +.token.symbol { + color: #f8c555; +} + +.token.selector, +.token.important, +.token.atrule, +.token.keyword, +.token.builtin { + color: #cc99cd; +} + +.token.string, +.token.char, +.token.attr-value, +.token.regex, +.token.variable { + color: #7ec699; +} + +.token.operator, +.token.entity, +.token.url { + color: #67cdcc; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.inserted { + color: green; +} + +pre[data-line] { + position: relative; + padding: 1em 0 1em 3em; +} + +.line-highlight { + position: absolute; + left: 0; + right: 0; + padding: inherit 0; + margin-top: 1em; + + /* Same as .prism’s padding-top */ + background: hsla(24deg, 20%, 50%, 8%); + background: linear-gradient(to right, hsla(24deg, 20%, 50%, 10%) 70%, hsla(24deg, 20%, 50%, 0%)); + pointer-events: none; + line-height: inherit; + white-space: pre; +} + +@media print { + .line-highlight { + /* + * This will prevent browsers from replacing the background color with white. + * It's necessary because the element is layered on top of the displayed code. + */ + -webkit-print-color-adjust: exact; + color-adjust: exact; + } +} + +.line-highlight::before, +.line-highlight[data-end]::after { + content: attr(data-start); + position: absolute; + top: 0.4em; + left: 0.6em; + min-width: 1em; + padding: 0 0.5em; + background-color: hsla(24deg, 20%, 50%, 40%); + color: hsl(24deg, 20%, 95%); + font: bold 65%/1.5 sans-serif; + text-align: center; + vertical-align: 0.3em; + border-radius: 999px; + text-shadow: none; + box-shadow: 0 1px white; +} + +.line-highlight[data-end]::after { + content: attr(data-end); + top: auto; + bottom: 0.4em; +} + +.line-numbers .line-highlight::before, +.line-numbers .line-highlight::after { + content: none; +} + +pre[id].linkable-line-numbers span.line-numbers-rows { + pointer-events: all; +} + +pre[id].linkable-line-numbers span.line-numbers-rows > span::before { + cursor: pointer; +} + +pre[id].linkable-line-numbers span.line-numbers-rows > span:hover::before { + background-color: rgba(128, 128, 128, 20%); +} + +pre[class*=language-].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; +} + +pre[class*=language-].line-numbers > code { + position: relative; + white-space: inherit; +} + +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; + + /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid #999; + user-select: none; +} + +.line-numbers-rows > span { + display: block; + counter-increment: linenumber; +} + +.line-numbers-rows > span::before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; +} + +.command-line-prompt { + border-right: 1px solid #999; + display: block; + float: left; + font-size: 100%; + letter-spacing: -1px; + margin-right: 1em; + pointer-events: none; + user-select: none; +} + +.command-line-prompt > span::before { + color: #999; + content: " "; + display: block; + padding-right: 0.8em; +} + +.command-line-prompt > span[data-user]::before { + content: "["attr(data-user) "@"attr(data-host) "] $"; +} + +.command-line-prompt > span[data-user=root]::before { + content: "["attr(data-user) "@"attr(data-host) "] #"; +} + +.command-line-prompt > span[data-prompt]::before { + content: attr(data-prompt); +} + +div.code-toolbar { + position: relative; +} + +div.code-toolbar > .toolbar { + position: absolute; + top: 0.3em; + right: 0.2em; + transition: opacity 0.3s ease-in-out; + opacity: 0; +} + +div.code-toolbar:hover > .toolbar { + opacity: 1; +} + +/* Separate line b/c rules are thrown out if selector is invalid. + IE11 and old Edge versions don't support :focus-within. */ +div.code-toolbar:focus-within > .toolbar { + opacity: 1; +} + +div.code-toolbar > .toolbar > .toolbar-item { + display: inline-block; +} + +div.code-toolbar > .toolbar > .toolbar-item > a { + cursor: pointer; +} + +div.code-toolbar > .toolbar > .toolbar-item > button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + + /* for button */ + user-select: none; +} + +div.code-toolbar > .toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar > .toolbar-item > span { + color: #bbb; + font-size: 0.8em; + padding: 0 0.5em; + background: #f5f2f0; + background: rgba(224, 224, 224, 20%); + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 20%); + border-radius: 0.5em; +} + +div.code-toolbar > .toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar > .toolbar-item > span:focus { + color: inherit; + text-decoration: none; +} diff --git a/themes/terminal/assets/css/syntax.css b/themes/terminal/assets/css/syntax.css new file mode 100644 index 0000000..6c3383d --- /dev/null +++ b/themes/terminal/assets/css/syntax.css @@ -0,0 +1,115 @@ +code.language-css, +code.language-scss, +.token.boolean, +.token.string, +.token.entity, +.token.url, +.language-css .token.string, +.language-scss .token.string, +.style .token.string, +.token.attr-value, +.token.keyword, +.token.control, +.token.directive, +.token.statement, +.token.regex, +.token.atrule, +.token.number, +.token.inserted, +.token.important { + color: var(--accent) !important; +} + +.token.tag-id, +.token.atrule-id, +.token.operator, +.token.unit, +.token.placeholder, +.token.variable, +.token.attr-name, +.token.namespace, +.token.deleted, +.token.property, +.token.class-name, +.token.constant, +.token.symbol { + color: color-mix(in srgb, var(--accent) 70%, transparent) !important; +} + +.token.property, +.token.function, +.token.function-name, +.token.deleted, +code.language-javascript, +code.language-html, +.command-line-prompt > span::before { + color: var(--accent) !important; +} + +.token.selector, +.token.tag, +.token.punctuation { + color: color-mix(in srgb, var(--accent) 50%, var(--foreground)) !important; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: color-mix(in srgb, var(--foreground) 30%, transparent) !important; +} + +.token.namespace { + opacity: 0.7 !important; +} + +pre[data-line] { + position: relative; +} + +pre[class*=language-] { + margin: 0; + overflow: auto; +} + +.line-highlight { + position: absolute; + left: 0; + right: 0; + padding: 0; + margin: 0; + background: color-mix(in srgb, var(--foreground) 7%, transparent); + pointer-events: none; + line-height: inherit; + white-space: pre; +} + +.line-highlight::before, +.line-highlight[data-end]::after { + content: attr(data-start); + position: absolute; + + /* top: .4em; */ + left: 0.6em; + min-width: 1em; + padding: 0 0.5em; + background-color: color-mix(in srgb, var(--foreground) 40%, transparent); + color: var(--foreground); + font: bold 65%/1.5 sans-serif; + text-align: center; + vertical-align: 0.3em; + border-radius: 999px; + text-shadow: none; + box-shadow: 0 1px var(--foreground); +} + +.line-highlight[data-end]::after { + content: attr(data-end); + top: auto; + bottom: 0.4em; +} + +.line-numbers .line-highlight::before, +.line-numbers .line-highlight::after { + content: none; +} diff --git a/themes/terminal/assets/css/terminal.css b/themes/terminal/assets/css/terminal.css new file mode 100644 index 0000000..7994bd7 --- /dev/null +++ b/themes/terminal/assets/css/terminal.css @@ -0,0 +1,373 @@ +:root { + --background: #1a170f; + --foreground: #eceae5; + --accent: #eec35e; + --font-size: 1rem; + --line-height: 1.54rem; + --radius: 0; +} + +html { + box-sizing: border-box; +} + +*, +*::before, +*::after { + box-sizing: inherit; + margin: 0; + padding: 0; +} + +body { + margin: 0; + padding: 0; + font-family: + "Fira Code", + Monaco, + Consolas, + "Ubuntu Mono", + monospace; + font-size: 1rem; + font-weight: 400; + line-height: var(--line-height); + letter-spacing: -0.02em; + background-color: var(--background); + color: var(--foreground); + text-rendering: optimizelegibility; + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + 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 { + position: relative; + font: inherit; + font-weight: bold; + text-decoration: none; + text-align: center; + background: transparent; + color: var(--accent); + padding: 5px 18px; + border: 4px solid var(--accent); + border-radius: var(--radius); + transition: background 0.15s linear; + appearance: none; + cursor: pointer; + outline: none; +} + +button:hover { + background: color-mix(in srgb, var(--accent) 15%, transparent); +} + +button:focus-visible, +a:focus-visible { + outline: 1px solid var(--accent); + outline-offset: 2px; +} + +fieldset { + display: inline-block; + 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 { + background: transparent; + color: var(--foreground); + border: 1px solid var(--foreground); + border-radius: var(--radius); + padding: 10px; + font: inherit; + appearance: none; +} + +input[type="checkbox"] { + width: auto; +} + +input:focus-visible, +input:active, +textarea:focus-visible, +textarea:active, +select:focus-visible, +select:active { + border-color: var(--accent); + outline: 1px solid var(--accent); + outline-offset: 2px; +} + +input:active, +textarea:active, +select:active { + box-shadow: none; +} + +select { + background-image: linear-gradient( + 45deg, + transparent 50%, + var(--foreground) 50% + ), + linear-gradient(135deg, var(--foreground) 50%, transparent 50%); + background-position: calc(100% - 20px), calc(100% - 1em); + background-size: + 5px 5px, + 5px 5px; + 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%; + border: 8px solid var(--accent); + border-radius: var(--radius); + padding: 8px; + overflow: hidden; +} + +figure img, +figure video { + margin-bottom: 0; +} + +figure figcaption { + background: var(--accent); + color: var(--background); + text-align: center; + font-size: 1rem; + font-weight: normal; + margin-top: -8px; + border-radius: 0 0 var(--radius) var(--radius); +} + +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: + "Fira Code", + Monaco, + Consolas, + "Ubuntu Mono", + monospace !important; + font-feature-settings: normal; + 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); + border-right: 1px solid var(--accent); + 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(--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(--foreground) 10%, transparent); +} + +pre code { + background: none !important; + margin: 0; + padding: 0; + font-size: inherit; + border: none; +} + +sup { + line-height: 0; +} + +abbr { + position: relative; + text-decoration-style: wavy; + text-decoration-color: var(--accent); + cursor: help; +} + +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); + border-bottom: 1px solid var(--accent); + margin: 0; + padding: 25px; +} + +blockquote::before { + content: ">"; + display: block; + position: absolute; + 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: 2px solid var(--foreground); + padding: 10px; +} + +th { + border-style: solid; + color: var(--foreground); + text-align: left; + text-transform: uppercase; + letter-spacing: 0.04em; +} + +hr { + width: 100%; + border: none; + background: var(--accent); + height: 2px; +} diff --git a/themes/terminal/assets/css/terms.css b/themes/terminal/assets/css/terms.css new file mode 100644 index 0000000..4524f74 --- /dev/null +++ b/themes/terminal/assets/css/terms.css @@ -0,0 +1,18 @@ +.terms h3 { + font-size: initial; +} + +.terms ul { + list-style: none; +} + +.terms ul li a { + color: var(--accent); +} + +.terms ul li:not(:empty)::before { + content: "-"; + position: absolute; + left: -20px; + color: var(--accent); +} diff --git a/themes/hugo-theme-terminal/assets/js/menu.js b/themes/terminal/assets/js/menu.js similarity index 100% rename from themes/hugo-theme-terminal/assets/js/menu.js rename to themes/terminal/assets/js/menu.js diff --git a/themes/hugo-theme-terminal/assets/js/prism.js b/themes/terminal/assets/js/prism.js similarity index 100% rename from themes/hugo-theme-terminal/assets/js/prism.js rename to themes/terminal/assets/js/prism.js diff --git a/themes/hugo-theme-terminal/babel.config.js b/themes/terminal/babel.config.js similarity index 100% rename from themes/hugo-theme-terminal/babel.config.js rename to themes/terminal/babel.config.js diff --git a/themes/hugo-theme-terminal/config.toml b/themes/terminal/config.toml similarity index 100% rename from themes/hugo-theme-terminal/config.toml rename to themes/terminal/config.toml diff --git a/themes/hugo-theme-terminal/exampleSite/config.toml b/themes/terminal/exampleSite/config.toml similarity index 94% rename from themes/hugo-theme-terminal/exampleSite/config.toml rename to themes/terminal/exampleSite/config.toml index a06270a..cb78253 100644 --- a/themes/hugo-theme-terminal/exampleSite/config.toml +++ b/themes/terminal/exampleSite/config.toml @@ -3,9 +3,11 @@ languageCode = "en-us" theme = "hugo-theme-terminal" paginate = 5 +[markup.goldmark.renderer] + unsafe = true + [params] contentTypeName = "posts" - themeColor = "orange" showMenuItems = 2 fullWidthTheme = false centerTheme = false diff --git a/themes/hugo-theme-terminal/exampleSite/content/about.md b/themes/terminal/exampleSite/content/about.md similarity index 62% rename from themes/hugo-theme-terminal/exampleSite/content/about.md rename to themes/terminal/exampleSite/content/about.md index 8944da1..e957768 100644 --- a/themes/hugo-theme-terminal/exampleSite/content/about.md +++ b/themes/terminal/exampleSite/content/about.md @@ -14,9 +14,8 @@ This theme is pretty basic and covers all of the essentials. All you have to do The theme includes: -- **5 duotone themes**, depending on your preferences (orange, red, blue, green, pink) -- [**Fira Code**](https://github.com/tonsky/FiraCode) as default monospaced font. It's gorgeous! -- **really nice, custom duotone** syntax highlighting based on [**PrismJS**](https://prismjs.com) -- mobile friendly layout +- fully customizable color schemes generated by [**terminal.css**](https://panr.github.io/terminal-css/). +- great reading experience thanks to [**Fira Code**](https://github.com/tonsky/FiraCode). +- nice code highlighting thanks to [**PrismJS**](https://prismjs.com) that matches the theme's color scheme. So, there you have it... enjoy! diff --git a/themes/hugo-theme-terminal/exampleSite/content/posts/hello.md b/themes/terminal/exampleSite/content/posts/hello.md similarity index 100% rename from themes/hugo-theme-terminal/exampleSite/content/posts/hello.md rename to themes/terminal/exampleSite/content/posts/hello.md diff --git a/themes/terminal/exampleSite/content/showcase.md b/themes/terminal/exampleSite/content/showcase.md new file mode 100644 index 0000000..bf6a26e --- /dev/null +++ b/themes/terminal/exampleSite/content/showcase.md @@ -0,0 +1,192 @@ ++++ +author = "Hugo Authors & Radek" +title = "Showcase" +date = "2019-03-11" +description = "Sample article showcasing basic styling and formatting for HTML elements." ++++ + +This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. + + +## Headings + +The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. + +# H1 +## H2 +### H3 +### H4 +#### H5 +##### H6 + +## Paragraph + +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. + +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. + +## Images + +![Terminal Theme Preview](/img/terminal-theme.png) + +### Figure with a caption + +{{< figure src="/img/terminal-theme.png" alt="Terminal Theme Preview" position="center" caption="Terminal Theme Preview" captionPosition="center" >}} + +## Blockquotes + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +### Blockquote without attribution + +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. +> **Note** that you can use *Markdown syntax* within a blockquote. + +### Blockquote with attribution + +> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1] + +[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. + +## Buttons and links + + +Link +Link + +## Tables + +Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. + + Name | Age +--------|------ + Bob | 27 + Alice | 23 + +### Inline Markdown within tables + +| Italics | Bold | Code | +| -------- | -------- | ------ | +| *italics* | **bold** | `code` | + +## Forms + +
+
+
+
+
+
+ I understand
+ +
+ +## Code Blocks + +### Code block with backticks + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +### Code block indented with four spaces + + + + + + Example HTML5 Document + + +

Test

+ + + +### Code block with Hugo's internal highlight shortcode + +{{< highlight html >}} + + + + + Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + +### Code block with custom built-in `{{ < code > }}` shortcode + +{{< code title="Hey, this is a code block title" language="css" >}} +pre { + background: #1a1a1d; + padding: 20px; + border-radius: 8px; + font-size: 1rem; + overflow: auto; + + @media (--phone) { + white-space: pre-wrap; + word-wrap: break-word; + } + + code { + background: none !important; + color: #ccc; + padding: 0; + font-size: inherit; + } +} +{{< /code >}} + +## List Types + +### Ordered List + +1. First item +2. Second item +3. Third item + +### Unordered List + +* List item +* Another item +* And another item + +### Nested list + +* Fruit + * Apple + * Orange + * Banana +* Dairy + * Milk + * Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/themes/hugo-theme-terminal/exampleSite/static/img/hello.jpg b/themes/terminal/exampleSite/static/img/hello.jpg similarity index 100% rename from themes/hugo-theme-terminal/exampleSite/static/img/hello.jpg rename to themes/terminal/exampleSite/static/img/hello.jpg diff --git a/themes/terminal/go.mod b/themes/terminal/go.mod new file mode 100644 index 0000000..9c958ae --- /dev/null +++ b/themes/terminal/go.mod @@ -0,0 +1,3 @@ +module github.com/panr/hugo-theme-terminal/v4 + +go 1.19 diff --git a/themes/terminal/images/screenshot.png b/themes/terminal/images/screenshot.png new file mode 100644 index 0000000..4229b13 Binary files /dev/null and b/themes/terminal/images/screenshot.png differ diff --git a/themes/terminal/images/terminal-css.png b/themes/terminal/images/terminal-css.png new file mode 100644 index 0000000..78f7d1d Binary files /dev/null and b/themes/terminal/images/terminal-css.png differ diff --git a/themes/hugo-theme-terminal/images/screenshot.png b/themes/terminal/images/terminal-theme-old.png similarity index 100% rename from themes/hugo-theme-terminal/images/screenshot.png rename to themes/terminal/images/terminal-theme-old.png diff --git a/themes/terminal/images/terminal-theme.png b/themes/terminal/images/terminal-theme.png new file mode 100644 index 0000000..8bd688d Binary files /dev/null and b/themes/terminal/images/terminal-theme.png differ diff --git a/themes/terminal/images/tn.png b/themes/terminal/images/tn.png new file mode 100644 index 0000000..db6449d Binary files /dev/null and b/themes/terminal/images/tn.png differ diff --git a/themes/hugo-theme-terminal/layouts/404.html b/themes/terminal/layouts/404.html similarity index 100% rename from themes/hugo-theme-terminal/layouts/404.html rename to themes/terminal/layouts/404.html diff --git a/themes/hugo-theme-terminal/layouts/_default/baseof.html b/themes/terminal/layouts/_default/baseof.html similarity index 84% rename from themes/hugo-theme-terminal/layouts/_default/baseof.html rename to themes/terminal/layouts/_default/baseof.html index ae3b9cc..a467db2 100644 --- a/themes/hugo-theme-terminal/layouts/_default/baseof.html +++ b/themes/terminal/layouts/_default/baseof.html @@ -6,10 +6,10 @@ {{ end }} {{ partial "head.html" . }} - + {{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }} -
+
{{ partial "header.html" . }} diff --git a/themes/hugo-theme-terminal/layouts/_default/index.html b/themes/terminal/layouts/_default/index.html similarity index 82% rename from themes/hugo-theme-terminal/layouts/_default/index.html rename to themes/terminal/layouts/_default/index.html index 62bbf0e..06dc5a5 100644 --- a/themes/hugo-theme-terminal/layouts/_default/index.html +++ b/themes/terminal/layouts/_default/index.html @@ -16,19 +16,19 @@ {{ range $paginator.Pages }}
- {{ if .Date }} + {{- if .Date -}} - {{ end }} - {{ with .Params.Author }} + {{- end -}} + {{- with .Params.Author -}} {{ . }} - {{ end }} + {{- end -}}
{{ if .Params.tags }} @@ -47,7 +47,7 @@ {{ if .Params.showFullContent }} {{ .Content }} {{ else if .Description }} - {{ .Description | markdownify }} +

{{ .Description | markdownify }}

{{ else }} {{ .Summary }} {{ end }} @@ -55,7 +55,7 @@ {{ if not .Params.showFullContent }}
- {{ $.Site.Params.ReadMore }} → + {{ $.Site.Params.ReadMore }}
{{ end }} diff --git a/themes/hugo-theme-terminal/layouts/_default/list.html b/themes/terminal/layouts/_default/list.html similarity index 71% rename from themes/hugo-theme-terminal/layouts/_default/list.html rename to themes/terminal/layouts/_default/list.html index 6a469bd..7ff9350 100644 --- a/themes/hugo-theme-terminal/layouts/_default/list.html +++ b/themes/terminal/layouts/_default/list.html @@ -7,18 +7,18 @@
{{ range .Paginator.Pages }}
-

+

{{ .Title | markdownify }} -

+ {{ if .Params.tags }} @@ -37,15 +37,15 @@ {{ if .Params.showFullContent }} {{ .Content }} {{ else if .Description }} - {{ .Description | markdownify }} +

{{ .Description | markdownify }}

{{ else }} {{ .Summary }} {{ end }}
{{ if not .Params.showFullContent }} -
- {{ $.Site.Params.ReadMore }} → +
+ {{ $.Site.Params.ReadMore }}
{{ end }} diff --git a/themes/hugo-theme-terminal/layouts/_default/rss.xml b/themes/terminal/layouts/_default/rss.xml similarity index 100% rename from themes/hugo-theme-terminal/layouts/_default/rss.xml rename to themes/terminal/layouts/_default/rss.xml diff --git a/themes/hugo-theme-terminal/layouts/_default/single.html b/themes/terminal/layouts/_default/single.html similarity index 64% rename from themes/hugo-theme-terminal/layouts/_default/single.html rename to themes/terminal/layouts/_default/single.html index f85fc5d..2ee0854 100644 --- a/themes/hugo-theme-terminal/layouts/_default/single.html +++ b/themes/terminal/layouts/_default/single.html @@ -4,20 +4,20 @@ {{ .Title | markdownify }}
- {{ if .Date }} + {{- if .Date -}} - {{ end }} - {{ with .Params.Author }} + {{- end -}} + {{- with .Params.Author -}} - {{ end }} - {{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }} - :: {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }}) - {{ end }} + {{- end -}} + {{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}} + {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }}) + {{- end -}}
{{ if .Params.tags }} @@ -41,7 +41,7 @@
{{- with .Content -}}
- {{ . | replaceRE "()" `${1} ${3}` | safeHTML }} + {{ . | replaceRE "()" `${1}# ${3}` | safeHTML }}
{{- end -}}
diff --git a/themes/terminal/layouts/_default/term.html b/themes/terminal/layouts/_default/term.html new file mode 100644 index 0000000..2ed7a75 --- /dev/null +++ b/themes/terminal/layouts/_default/term.html @@ -0,0 +1,57 @@ +{{ define "main" }} +

Posts for: #{{ .Title }}

+ {{ with .Content }} +
+ {{ . }} +
+ {{ end }} +
+ {{ range .Paginator.Pages }} +
+

+ {{ .Title | markdownify }} +

+ + + {{ if .Params.tags }} + + {{ end }} + + {{ partial "cover.html" . }} + +
+ {{ if .Params.showFullContent }} + {{ .Content }} + {{ else if .Description }} +

{{ .Description | markdownify }}

+ {{ else }} + {{ .Summary }} + {{ end }} +
+ + {{ if not .Params.showFullContent }} +
+ {{ $.Site.Params.ReadMore }} +
+ {{ end }} +
+ {{ end }} + + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/themes/terminal/layouts/_default/terms.html b/themes/terminal/layouts/_default/terms.html new file mode 100644 index 0000000..9ac27fe --- /dev/null +++ b/themes/terminal/layouts/_default/terms.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+

{{ .Title }}

+ {{ with .Content }} +
+ {{ . }} +
+ {{ end }} + +
+{{ end }} diff --git a/themes/hugo-theme-terminal/layouts/partials/comments.html b/themes/terminal/layouts/partials/comments.html similarity index 100% rename from themes/hugo-theme-terminal/layouts/partials/comments.html rename to themes/terminal/layouts/partials/comments.html diff --git a/themes/hugo-theme-terminal/layouts/partials/cover.html b/themes/terminal/layouts/partials/cover.html similarity index 100% rename from themes/hugo-theme-terminal/layouts/partials/cover.html rename to themes/terminal/layouts/partials/cover.html diff --git a/themes/hugo-theme-terminal/layouts/partials/extended_footer.html b/themes/terminal/layouts/partials/extended_footer.html similarity index 100% rename from themes/hugo-theme-terminal/layouts/partials/extended_footer.html rename to themes/terminal/layouts/partials/extended_footer.html diff --git a/themes/hugo-theme-terminal/layouts/partials/extended_head.html b/themes/terminal/layouts/partials/extended_head.html similarity index 100% rename from themes/hugo-theme-terminal/layouts/partials/extended_head.html rename to themes/terminal/layouts/partials/extended_head.html diff --git a/themes/terminal/layouts/partials/footer.html b/themes/terminal/layouts/partials/footer.html new file mode 100644 index 0000000..07a06cd --- /dev/null +++ b/themes/terminal/layouts/partials/footer.html @@ -0,0 +1,25 @@ + + +{{ $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 }} + + + + +{{ partial "extended_footer.html" . }} diff --git a/themes/hugo-theme-terminal/layouts/partials/head.html b/themes/terminal/layouts/partials/head.html similarity index 63% rename from themes/hugo-theme-terminal/layouts/partials/head.html rename to themes/terminal/layouts/partials/head.html index 5a4f31e..c77ac7a 100644 --- a/themes/hugo-theme-terminal/layouts/partials/head.html +++ b/themes/terminal/layouts/partials/head.html @@ -2,44 +2,34 @@ - {{ if .Params.noindex }} {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }} - + {{ end }} +{{ else }} + {{ end }} {{ template "_internal/google_analytics.html" . }} -{{ $defaultStyles := resources.Get "css/style.scss" }} - -{{ 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 }} - -{{ else }} - - {{ $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" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} - {{ $styles := $css | resources.ToCSS $options }} +{{ $css := resources.Match "css/*.css" }} +{{ range $css }} + {{ $styles := . | minify | fingerprint }} {{ end }} - + +{{ if (fileExists "static/terminal.css") -}} + +{{- end }} {{ if (fileExists "static/style.css") -}} {{- end }} -{{ if isset $.Site.Params "favicon" }} - -{{ else }} - - -{{ end }} + + @@ -64,11 +54,7 @@ {{ end }} {{ else }} - {{ if isset $.Site.Params "favicon" }} - - {{ else }} - - {{ end }} + {{ end }} diff --git a/themes/hugo-theme-terminal/layouts/partials/header.html b/themes/terminal/layouts/partials/header.html similarity index 67% rename from themes/hugo-theme-terminal/layouts/partials/header.html rename to themes/terminal/layouts/partials/header.html index b385c83..b43e320 100644 --- a/themes/hugo-theme-terminal/layouts/partials/header.html +++ b/themes/terminal/layouts/partials/header.html @@ -1,12 +1,4 @@
-