First commit for the website
7
themes/terminal/.babelrc
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": "last 2 versions, >1%, not dead"
|
||||
}],
|
||||
],
|
||||
}
|
||||
9
themes/terminal/.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
60
themes/terminal/.eslintrc.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
|
||||
env:
|
||||
es6: true
|
||||
|
||||
extends:
|
||||
# https://github.com/airbnb/javascript
|
||||
- airbnb
|
||||
- eslint:recommended
|
||||
- prettier
|
||||
|
||||
parser: babel-eslint
|
||||
|
||||
rules:
|
||||
# best practices
|
||||
arrow-parens:
|
||||
- 2
|
||||
- as-needed
|
||||
semi:
|
||||
- 2
|
||||
- always
|
||||
class-methods-use-this: 0
|
||||
comma-dangle:
|
||||
- 2
|
||||
- always-multiline
|
||||
no-console:
|
||||
- 2
|
||||
no-unused-expressions: 0
|
||||
no-param-reassign:
|
||||
- 2
|
||||
- props: false
|
||||
no-useless-escape: 0
|
||||
func-names: 0
|
||||
quotes:
|
||||
- 2
|
||||
- double
|
||||
- allowTemplateLiterals: true
|
||||
no-underscore-dangle: 0
|
||||
object-curly-newline: 0
|
||||
function-paren-newline: 0
|
||||
operator-linebreak:
|
||||
- 2
|
||||
- after
|
||||
no-unused-vars:
|
||||
- 2
|
||||
- argsIgnorePattern: "^_"
|
||||
# jsx a11y
|
||||
jsx-a11y/no-static-element-interactions: 0
|
||||
jsx-a11y/anchor-is-valid:
|
||||
- 2
|
||||
- specialLink:
|
||||
- to
|
||||
|
||||
globals:
|
||||
document: true
|
||||
requestAnimationFrame: true
|
||||
window: true
|
||||
self: true
|
||||
fetch: true
|
||||
Headers: true
|
||||
93
themes/terminal/.gitignore
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
# Created by https://www.gitignore.io/api/node
|
||||
# Edit at https://www.gitignore.io/?templates=node
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# End of https://www.gitignore.io/api/node
|
||||
public
|
||||
resources
|
||||
.hugo_build.lock
|
||||
1
themes/terminal/.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
themes/terminal/.husky/pre-push
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn build && git add . && git commit --amend --no-edit
|
||||
12
themes/terminal/.prettierrc
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"parser": "babel",
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all",
|
||||
"arrowParens": "avoid",
|
||||
"overrides": [{
|
||||
"files": ".html",
|
||||
"options": {
|
||||
"parser": "html"
|
||||
}
|
||||
}]
|
||||
}
|
||||
12
themes/terminal/.stylelintrc.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
34
themes/terminal/COMMUNITY-FEATURES.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Community features
|
||||
|
||||
<!--
|
||||
Did a cool thing with the theme and want to share it with rest of the Hello Friend theme users? Jump in!
|
||||
|
||||
Please follow the template:
|
||||
|
||||
- **NAME_OF_THE_FEATURE** (LINK TO YOUR FORK)
|
||||
- SHORT DESCRIPTION
|
||||
- SOMETHING ABOUT YOU (name and who you are / what you do / etc.)
|
||||
|
||||
eg:
|
||||
|
||||
- **Social media icons** (https://github.com/...)
|
||||
- This was a big missing feature of the theme. It will help your audience reach you over the internet.
|
||||
- John, a javascript developer.
|
||||
-->
|
||||
|
||||
- **Portfolio** (https://github.com/Louisload/hugo-theme-terminal-portfolio)
|
||||
- Allows you to create a portfolio page (or several). Supports icons and subsections.
|
||||
- Luís Rodrigues Alves (Louisload), a game dev and musician.
|
||||
|
||||
- **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))
|
||||
20
themes/terminal/LICENSE.md
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
319
themes/terminal/README.md
Normal file
@@ -0,0 +1,319 @@
|
||||
# Terminal
|
||||
|
||||
**Demo: https://panr.github.io/hugo-theme-terminal-demo/**
|
||||
|
||||
**Create your own color scheme: https://panr.github.io/terminal-css/**
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
⚠️ The theme needs at least Hugo **Extended** v0.90.x.
|
||||
|
||||
---
|
||||
|
||||
- [Features](#features)
|
||||
- [Built-in shortcodes](#built-in-shortcodes)
|
||||
- [Code highlighting](#code-highlighting)
|
||||
- [How to start](#how-to-start)
|
||||
- [How to run your site](#how-to-run-your-site)
|
||||
- [How to configure](#how-to-configure)
|
||||
- [Post archetype](#post-archetype)
|
||||
- [Add-ons](#add-ons)
|
||||
- [How to edit the theme](#how-to-edit)
|
||||
- [Found a bug?](#bug)
|
||||
- [New cool idea or feature](#feature)
|
||||
- [Support](#support)
|
||||
- [License](#license)
|
||||
|
||||
## Features
|
||||
|
||||
- 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 [**Chroma**](https://github.com/alecthomas/chroma) (fast, built-in Hugo syntax highlighter)
|
||||
- fully responsive
|
||||
- fully based on Hugo ecosystem (Pipes and Modules)
|
||||
|
||||
#### Built-in shortcodes
|
||||
|
||||
- **`image`** (props required: **`src`**; props optional: **`alt`**, **`position`** (**left** is default | center | right), **`style`**)
|
||||
- e.g.
|
||||
```go
|
||||
{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}
|
||||
```
|
||||
- **`code`** (props required: **`language`**; props optional: **`title`**, **`open`**)
|
||||
- e.g.
|
||||
```go
|
||||
{{< code language="css" title="Really cool snippet" open="true" >}}
|
||||
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 >}}
|
||||
```
|
||||
|
||||
#### Code highlighting
|
||||
|
||||
A custom syntax highlighting based on Chroma. All you need to do is to wrap you code like this:
|
||||
|
||||
````
|
||||
```html
|
||||
// your code here
|
||||
```
|
||||
````
|
||||
|
||||
You can find more here in the official Hugo [documentation](https://gohugo.io/content-management/syntax-highlighting/).
|
||||
|
||||
**Supported languages**: https://github.com/alecthomas/chroma?tab=readme-ov-file#supported-languages
|
||||
|
||||
## How to start
|
||||
|
||||
You can download the theme manually by going to [https://github.com/panr/hugo-theme-terminal.git](https://github.com/panr/hugo-theme-terminal.git) and pasting it to `themes/terminal` in your root directory.
|
||||
|
||||
You can also choose **one of the 3 possibilities** to install the theme:
|
||||
|
||||
1. as Hugo Module
|
||||
2. as a standalone local directory
|
||||
3. as a git submodule
|
||||
|
||||
⚠️ The theme needs at least Hugo **Extended** v0.90.x.
|
||||
|
||||
### Install theme as Hugo Module
|
||||
|
||||
```bash
|
||||
# If this is the first time you're using Hugo Modules
|
||||
# in your project. You have to initiate your own module before
|
||||
# you fetch the theme module.
|
||||
#
|
||||
# hugo mod init [your website/module name]
|
||||
hugo mod get github.com/panr/hugo-theme-terminal/v4
|
||||
```
|
||||
|
||||
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/4 -> themes/terminal"
|
||||
[[module.imports]]
|
||||
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/).
|
||||
|
||||
### Install theme locally
|
||||
|
||||
```bash
|
||||
git clone https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```
|
||||
|
||||
This will clone the repository directly to the `themes/terminal` directory.
|
||||
|
||||
### Install theme as a submodule
|
||||
|
||||
```bash
|
||||
git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```
|
||||
|
||||
This will install the repository as a submodule in the `themes/terminal` directory.
|
||||
|
||||
⚠️ If you encounter any issues with:
|
||||
|
||||
```bash
|
||||
Error: module "terminal" not found; either add it as a Hugo Module or store it in "[...your custom path]/themes".: module does not exist
|
||||
```
|
||||
|
||||
then please try to remove `theme = "terminal"` from your config file.
|
||||
|
||||
## How to run your site
|
||||
|
||||
```bash
|
||||
hugo server -t terminal
|
||||
```
|
||||
|
||||
and go to `localhost:1313` in your browser. From now on all the changes you make will go live, so you don't need to refresh your browser every single time.
|
||||
|
||||
## How to configure
|
||||
|
||||
The theme doesn't require any advanced configuration. Just copy:
|
||||
|
||||
```toml
|
||||
baseurl = "/"
|
||||
languageCode = "en-us"
|
||||
# Add it only if you keep the theme in the `themes` directory.
|
||||
# Remove it if you use the theme as a remote Hugo Module.
|
||||
theme = "terminal"
|
||||
pagination.pagerSize = 5
|
||||
|
||||
# Required for Chroma and the custom syntax highlighting.
|
||||
[markup.highlight]
|
||||
noClasses = false
|
||||
|
||||
[params]
|
||||
# dir name of your main content (default is `content/posts`).
|
||||
# the list of set content will show up on your index page (baseurl).
|
||||
contentTypeName = "posts"
|
||||
|
||||
# if you set this to 0, only submenu trigger will be visible
|
||||
showMenuItems = 2
|
||||
|
||||
# show selector to switch language
|
||||
showLanguageSelector = false
|
||||
|
||||
# set theme to full screen width
|
||||
fullWidthTheme = false
|
||||
|
||||
# center theme with default width
|
||||
centerTheme = false
|
||||
|
||||
# if your resource directory contains an image called `cover.(jpg|png|webp)`,
|
||||
# then the file will be used as a cover automatically.
|
||||
# With this option you don't have to put the `cover` param in a front-matter.
|
||||
autoCover = true
|
||||
|
||||
# set post to show the last updated
|
||||
# If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated
|
||||
showLastUpdated = false
|
||||
|
||||
# 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"
|
||||
|
||||
# whether to show a page's estimated reading time
|
||||
# readingTime = false # default
|
||||
|
||||
# whether to show a table of contents
|
||||
# can be overridden in a page's front-matter
|
||||
# Toc = false # default
|
||||
|
||||
# set title for the table of contents
|
||||
# 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
|
||||
# see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution
|
||||
# do not include @
|
||||
creator = ""
|
||||
site = ""
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
languageName = "English"
|
||||
title = "Terminal"
|
||||
|
||||
[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.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/v4 -> themes/terminal"
|
||||
[[module.imports]]
|
||||
path = 'github.com/panr/hugo-theme-terminal/v4'
|
||||
```
|
||||
|
||||
**NOTE:** Please keep in mind that currently `main menu` doesn't support nesting.
|
||||
|
||||
## Post archetype
|
||||
|
||||
See the default `post` file params supported by the theme — https://github.com/panr/hugo-theme-terminal/blob/master/archetypes/posts.md
|
||||
|
||||
## Add-ons
|
||||
|
||||
- **Comments** — for adding comments to your blog posts please take a look at `layouts/partials/comments.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/comments.html.
|
||||
- **Extended Head** — please take a look at `layouts/partials/extended_head.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_head.html
|
||||
- **Extended Footer** — please take a look at `layouts/partials/extended_footer.html` https://github.com/panr/hugo-theme-terminal/blob/master/layouts/partials/extended_footer.html
|
||||
|
||||
## How to edit the theme <a id="how-to-edit" />
|
||||
|
||||
If you are using as a remote Hugo Module (you don't have the theme files in the `theme/terminal`) and you have to override only some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change.
|
||||
|
||||
If you have the theme files in the theme directory, then you can directly edit anything in the theme, you just have to go to `themes/terminal` and modify the files. No compilation step needed.
|
||||
|
||||
## Found a bug? <a id="bug" />
|
||||
|
||||
If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-terminal/issues) or create a new [Pull Request](https://github.com/panr/hugo-theme-terminal/pulls) to fix the issue.
|
||||
|
||||
## New cool idea or feature? <a id="feature" />
|
||||
|
||||
The theme is in constant development since 2019 and has got many cool features that helped many of you and made the theme better. But there were also many features that I wasn't sure about because I want to keep the theme as simple as possible.
|
||||
|
||||
So, let's say you have an idea of how to extend the theme. That's cool and you're welcome to do that, just follow these steps:
|
||||
|
||||
- fork the theme
|
||||
- implement the feature
|
||||
- write an instruction how to use the feature
|
||||
- give a working example of the implementation for other users
|
||||
- add info about your work to `COMMUNITY-FEATURES.md`
|
||||
- make a PR with edited `COMMUNITY-FEATURES.md`
|
||||
|
||||
This will help keeping the theme close to its roots, and also allow anyone who wishes to improve it and match their needs, to do whatever they want.
|
||||
|
||||
Sounds OK? Cool, let's rock! 🤘
|
||||
|
||||
## Support
|
||||
|
||||
If you like what I'm doing and want to support my work. You can do it [here](https://ko-fi.com/pan_r). Thank you! ♥️
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2019-2025 Radek Kozieł ([@panr](https://rkoziel.com/))
|
||||
|
||||
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.
|
||||
14
themes/terminal/archetypes/posts.md
Normal file
@@ -0,0 +1,14 @@
|
||||
+++
|
||||
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 = ""
|
||||
tags = ["", ""]
|
||||
keywords = ["", ""]
|
||||
description = ""
|
||||
showFullContent = false
|
||||
readingTime = false
|
||||
hideComments = false
|
||||
+++
|
||||
84
themes/terminal/assets/css/buttons.css
Normal file
@@ -0,0 +1,84 @@
|
||||
.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;
|
||||
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: var(--font-size);
|
||||
}
|
||||
|
||||
button.small,
|
||||
.button.small,
|
||||
a.button.small {
|
||||
font-size: calc(var(--font-size) * 0.8);
|
||||
}
|
||||
|
||||
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.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;
|
||||
}
|
||||
127
themes/terminal/assets/css/code.css
Normal file
@@ -0,0 +1,127 @@
|
||||
:root {
|
||||
--code-border: color-mix(in srgb, var(--foreground) 10%, transparent);
|
||||
}
|
||||
|
||||
pre:not(.chroma) {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
pre.chroma {
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
pre code {
|
||||
color: var(--foreground);
|
||||
border: none;
|
||||
}
|
||||
|
||||
code {
|
||||
color: var(--accent);
|
||||
text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-moz-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
position: relative;
|
||||
margin: 20px 0;
|
||||
border: 1px solid var(--code-border);
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.code-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, transparent);
|
||||
border-bottom: 1px solid var(--code-border);
|
||||
color: var(--comment);
|
||||
text-transform:uppercase;
|
||||
font-size: calc(var(--font-size) * 0.8);
|
||||
padding: 6px 10px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3px 8px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.code-title .copy-button {
|
||||
z-index: 1;
|
||||
background: color-mix(in srgb, var(--foreground) 5%, var(--background));
|
||||
}
|
||||
|
||||
.code-title:hover .copy-button {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.code-title .copy-button:hover {
|
||||
background: color-mix(in srgb, var(--accent) 10%, var(--background));
|
||||
}
|
||||
|
||||
.collapsable-code {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 20px 0;
|
||||
border: 1px solid var(--accent);
|
||||
|
||||
.highlight {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsable-code__title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
color: var(--accent);
|
||||
padding: 3px 10px;
|
||||
font-size: calc(var(--font-size) * 0.9);
|
||||
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 summary {
|
||||
color: var(--accent);
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collapsable-code summary:hover {
|
||||
background: color-mix(in srgb, var(--accent) 10%, transparent);
|
||||
}
|
||||
|
||||
.collapsable-code pre {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.collapsable-code pre::first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
18
themes/terminal/assets/css/fonts.css
Normal file
@@ -0,0 +1,18 @@
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Fira Code';
|
||||
font-style: normal;
|
||||
font-weight: 300 700;
|
||||
font-display: swap;
|
||||
src: url("../fonts/FiraCode-LatinExt.woff2") format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Fira Code';
|
||||
font-style: normal;
|
||||
font-weight: 300 700;
|
||||
font-display: swap;
|
||||
src: url("../fonts/FiraCode-Latin.woff2") format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
44
themes/terminal/assets/css/footer.css
Normal file
@@ -0,0 +1,44 @@
|
||||
.footer {
|
||||
padding: 40px 0;
|
||||
flex-grow: 0;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.footer__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.footer .copyright {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
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;
|
||||
}
|
||||
}
|
||||
4
themes/terminal/assets/css/gist.css
Normal file
@@ -0,0 +1,4 @@
|
||||
body .gist .blob-num,
|
||||
body .gist .blob-code-inner {
|
||||
border: none;
|
||||
}
|
||||
46
themes/terminal/assets/css/header.css
Normal file
@@ -0,0 +1,46 @@
|
||||
.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);
|
||||
font-weight: bold;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
520
themes/terminal/assets/css/main.css
Normal file
@@ -0,0 +1,520 @@
|
||||
:root {
|
||||
--background: #1a170f;
|
||||
--foreground: #eceae5;
|
||||
--accent: #eec35e;
|
||||
--font-size: 1rem;
|
||||
--line-height: 1.54em;
|
||||
--radius: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace;
|
||||
font-size: var(--font-size);
|
||||
line-height: var(--line-height);
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
text-rendering: optimizelegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(var(--font-size) * 1.45);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(var(--font-size) * 1.35);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(var(--font-size) * 1.15);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: calc(var(--font-size) * 1);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
img,
|
||||
figure,
|
||||
video,
|
||||
table {
|
||||
margin: 25px 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;
|
||||
}
|
||||
|
||||
img.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
figure.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
figure.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figure img,
|
||||
figure video {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
figure figcaption {
|
||||
background: var(--accent);
|
||||
color: var(--background);
|
||||
text-align: center;
|
||||
font-size: var(--font-size);
|
||||
font-weight: normal;
|
||||
margin-top: -8px;
|
||||
padding: 0 8px;
|
||||
border-radius: 0 0 var(--radius) var(--radius);
|
||||
}
|
||||
|
||||
figure figcaption p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
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);
|
||||
border: 1px solid var(--code-border);
|
||||
padding: 1px 6px;
|
||||
margin: 0 2px;
|
||||
font-size: calc(var(--font-size) * 0.95);
|
||||
}
|
||||
|
||||
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: calc(var(--font-size) * 0.95) !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;
|
||||
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;
|
||||
}
|
||||
|
||||
/* One Heading Size */
|
||||
.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;
|
||||
}
|
||||
|
||||
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 {
|
||||
position: relative;
|
||||
overflow: visible !important;
|
||||
height: auto !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.__h_video a {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.__h_video a img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.__h_video a .play {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
iframe[src*="youtube.com"] {
|
||||
border: 8px solid var(--accent) !important;
|
||||
padding: 8px !important;
|
||||
}
|
||||
|
||||
@media (max-width: 684px) {
|
||||
:root {
|
||||
--font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.container {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
148
themes/terminal/assets/css/menu.css
Normal file
@@ -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: 5px;
|
||||
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;
|
||||
}
|
||||
}
|
||||
86
themes/terminal/assets/css/pagination.css
Normal file
@@ -0,0 +1,86 @@
|
||||
.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: calc(var(--font-size) * 0.8);
|
||||
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: inherit;
|
||||
padding: 0;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.button a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.button__text {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.next .button__icon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.prev .button__icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.pagination {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
141
themes/terminal/assets/css/post.css
Normal file
@@ -0,0 +1,141 @@
|
||||
.index-content {
|
||||
margin: 25px 0;
|
||||
}
|
||||
|
||||
.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: 30px 0;
|
||||
}
|
||||
|
||||
.post:not(:last-of-type) {
|
||||
border-bottom: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
font-size: inherit;
|
||||
margin-bottom: 10px;
|
||||
color: color-mix(in srgb, var(--foreground) 65%, 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: inherit;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.table-of-contents {
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
||||
.post-content {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.post-cover {
|
||||
margin: 25px 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;
|
||||
}
|
||||
}
|
||||
97
themes/terminal/assets/css/syntax.css
Normal file
@@ -0,0 +1,97 @@
|
||||
:root {
|
||||
--first-tone: var(--accent);
|
||||
--second-tone: color-mix(in srgb, var(--accent) 70%, transparent);
|
||||
--comment: color-mix(in srgb, var(--foreground) 50%, transparent);
|
||||
}
|
||||
|
||||
/* Background */ .bg { }
|
||||
/* PreWrapper */ .chroma { overflow:auto; }
|
||||
/* Other */ .chroma .x { }
|
||||
/* Error */ .chroma .err { }
|
||||
/* CodeLine */ .chroma .cl { }
|
||||
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit }
|
||||
/* LineTableTD */ .chroma .lntd { width:100%;vertical-align:top;padding:0;margin:0;border:0; }
|
||||
/* LineTableTDNumbers */ .chroma .lntd:first-child { width: auto; }
|
||||
/* Custom */ .chroma .lntd code { display:grid; }
|
||||
/* LineTable */ .chroma .lntable { width:100%;border-spacing:0;padding:0;margin:0;border:0; }
|
||||
/* LineHighlight */ .chroma .hl { background-color:color-mix(in srgb, var(--foreground) 5%, transparent) !important}
|
||||
/* LineNumbersTable */ .chroma .lnt { color:var(--comment);white-space:pre;-webkit-user-select:none;user-select:none;padding:0 10px; }
|
||||
/* LineNumbers */ .chroma .ln { color:var(--comment);white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.8em;padding:0 0.4em 0 0; }
|
||||
/* Line */ .chroma .line { display:flex;padding:0 10px; }
|
||||
/* Keyword */ .chroma .k { color:var(--second-tone) }
|
||||
/* KeywordConstant */ .chroma .kc { color:var(--second-tone) }
|
||||
/* KeywordDeclaration */ .chroma .kd { color:var(--second-tone) }
|
||||
/* KeywordNamespace */ .chroma .kn { color:var(--second-tone) }
|
||||
/* KeywordPseudo */ .chroma .kp { color:var(--second-tone) }
|
||||
/* KeywordReserved */ .chroma .kr { color:var(--second-tone) }
|
||||
/* KeywordType */ .chroma .kt { color:var(--second-tone) }
|
||||
/* Name */ .chroma .n { color:var(--first-tone) }
|
||||
/* NameAttribute */ .chroma .na { color:var(--second-tone) }
|
||||
/* NameBuiltin */ .chroma .nb { color:var(--first-tone) }
|
||||
/* NameBuiltinPseudo */ .chroma .bp { color:var(--first-tone) }
|
||||
/* NameClass */ .chroma .nc { color:var(--foreground) }
|
||||
/* NameConstant */ .chroma .no { color:var(--first-tone) }
|
||||
/* NameDecorator */ .chroma .nd { color:var(--first-tone) }
|
||||
/* NameEntity */ .chroma .ni { color:var(--first-tone) }
|
||||
/* NameException */ .chroma .ne { color:var(--first-tone) }
|
||||
/* NameFunction */ .chroma .nf { color:var(--first-tone); }
|
||||
/* NameFunctionMagic */ .chroma .fm { color:var(--first-tone); }
|
||||
/* NameLabel */ .chroma .nl { color:var(--first-tone) }
|
||||
/* NameNamespace */ .chroma .nn { color:var(--first-tone) }
|
||||
/* NameOther */ .chroma .nx { color:var(--first-tone) }
|
||||
/* NameProperty */ .chroma .py { color:var(--first-tone) }
|
||||
/* NameTag */ .chroma .nt { color:var(--first-tone) }
|
||||
/* NameVariable */ .chroma .nv { color:var(--first-tone) }
|
||||
/* NameVariableClass */ .chroma .vc { color:var(--first-tone) }
|
||||
/* NameVariableGlobal */ .chroma .vg { color:var(--first-tone) }
|
||||
/* NameVariableInstance */ .chroma .vi { color:var(--first-tone) }
|
||||
/* NameVariableMagic */ .chroma .vm { color:var(--first-tone) }
|
||||
/* Literal */ .chroma .l { }
|
||||
/* LiteralDate */ .chroma .ld { }
|
||||
/* LiteralString */ .chroma .s { color:var(--foreground) }
|
||||
/* LiteralStringAffix */ .chroma .sa { color:var(--foreground) }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color:var(--foreground) }
|
||||
/* LiteralStringChar */ .chroma .sc { color:var(--foreground) }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color:var(--foreground) }
|
||||
/* LiteralStringDoc */ .chroma .sd { color:var(--foreground) }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color:var(--foreground) }
|
||||
/* LiteralStringEscape */ .chroma .se { color:var(--foreground) }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color:var(--foreground) }
|
||||
/* LiteralStringInterpol */ .chroma .si { color:var(--foreground) }
|
||||
/* LiteralStringOther */ .chroma .sx { color:var(--foreground) }
|
||||
/* LiteralStringRegex */ .chroma .sr { color:var(--foreground) }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color:var(--foreground) }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color:var(--foreground) }
|
||||
/* LiteralNumber */ .chroma .m { color:var(--first-tone) }
|
||||
/* LiteralNumberBin */ .chroma .mb { color:var(--first-tone) }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color:var(--first-tone) }
|
||||
/* LiteralNumberHex */ .chroma .mh { color:var(--first-tone) }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color:var(--first-tone) }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color:var(--first-tone) }
|
||||
/* LiteralNumberOct */ .chroma .mo { color:var(--first-tone) }
|
||||
/* Operator */ .chroma .o { color:var(--foreground) }
|
||||
/* OperatorWord */ .chroma .ow { color:var(--foreground) }
|
||||
/* Punctuation */ .chroma .p { color:var(--foreground) }
|
||||
/* Comment */ .chroma .c { color:var(--comment) }
|
||||
/* CommentHashbang */ .chroma .ch { color:var(--comment) }
|
||||
/* CommentMultiline */ .chroma .cm { color:var(--comment) }
|
||||
/* CommentSingle */ .chroma .c1 { color:var(--comment) }
|
||||
/* CommentSpecial */ .chroma .cs { color:var(--comment) }
|
||||
/* CommentPreproc */ .chroma .cp { color:var(--comment) }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color:var(--comment) }
|
||||
/* Generic */ .chroma .g { }
|
||||
/* GenericDeleted */ .chroma .gd { color:var(--first-tone) }
|
||||
/* GenericEmph */ .chroma .ge { }
|
||||
/* GenericError */ .chroma .gr { }
|
||||
/* GenericHeading */ .chroma .gh { }
|
||||
/* GenericInserted */ .chroma .gi { color:var(--second-tone); }
|
||||
/* GenericOutput */ .chroma .go { }
|
||||
/* GenericPrompt */ .chroma .gp { }
|
||||
/* GenericStrong */ .chroma .gs { }
|
||||
/* GenericSubheading */ .chroma .gu { }
|
||||
/* GenericTraceback */ .chroma .gt { }
|
||||
/* GenericUnderline */ .chroma .gl { }
|
||||
/* TextWhitespace */ .chroma .w { }
|
||||
|
||||
/* LANGUAGE FIXES */
|
||||
/* PHP CommentPreproc */ .chroma .language-php .cp { color:var(--foreground) }
|
||||
2
themes/terminal/assets/css/terminal.css
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Placeholder file for your custom settings. */
|
||||
/* You can get the color scheme variables from https://panr.github.io/terminal-css/ */
|
||||
18
themes/terminal/assets/css/terms.css
Normal file
@@ -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);
|
||||
}
|
||||
32
themes/terminal/assets/js/code.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const blockcodes = document.querySelectorAll(".chroma code[data-lang]");
|
||||
|
||||
for (const bc of blockcodes) {
|
||||
const parent = bc.parentElement;
|
||||
const content = bc.innerText.split("\n").filter(Boolean).join("\n");
|
||||
|
||||
// Code title
|
||||
const title = document.createElement("div");
|
||||
const lang = bc.dataset.lang;
|
||||
title.classList.add("code-title");
|
||||
title.innerText = lang;
|
||||
|
||||
// Copy to clipboard
|
||||
if (navigator.clipboard !== undefined) {
|
||||
const cpbutton = document.createElement("button");
|
||||
cpbutton.classList.add("copy-button");
|
||||
cpbutton.innerText = "Copy";
|
||||
|
||||
cpbutton.addEventListener("click", () => {
|
||||
cpbutton.innerText = "Copied";
|
||||
setTimeout(() => {
|
||||
cpbutton.innerText = "Copy";
|
||||
}, 1000);
|
||||
|
||||
navigator.clipboard.writeText(content);
|
||||
});
|
||||
|
||||
title.append(cpbutton);
|
||||
}
|
||||
|
||||
parent.closest(".highlight").prepend(title);
|
||||
}
|
||||
44
themes/terminal/assets/js/menu.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const container = document.querySelector(".container");
|
||||
const allMenus = document.querySelectorAll(".menu");
|
||||
|
||||
// Hide menus on body click
|
||||
document.body.addEventListener("click", () => {
|
||||
allMenus.forEach(menu => {
|
||||
if (menu.classList.contains("open")) {
|
||||
menu.classList.remove("open");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Reset menus on resize
|
||||
window.addEventListener("resize", () => {
|
||||
allMenus.forEach(menu => {
|
||||
menu.classList.remove("open");
|
||||
});
|
||||
});
|
||||
|
||||
// Handle desktop menu
|
||||
allMenus.forEach(menu => {
|
||||
const trigger = menu.querySelector(".menu__trigger");
|
||||
const dropdown = menu.querySelector(".menu__dropdown");
|
||||
|
||||
trigger.addEventListener("click", e => {
|
||||
e.stopPropagation();
|
||||
|
||||
if (menu.classList.contains("open")) {
|
||||
menu.classList.remove("open");
|
||||
} else {
|
||||
// Close all menus...
|
||||
allMenus.forEach(m => m.classList.remove("open"));
|
||||
// ...before opening the current one
|
||||
menu.classList.add("open");
|
||||
}
|
||||
|
||||
if (dropdown.getBoundingClientRect().right > container.getBoundingClientRect().right) {
|
||||
dropdown.style.left = "auto";
|
||||
dropdown.style.right = 0;
|
||||
}
|
||||
});
|
||||
|
||||
dropdown.addEventListener("click", e => e.stopPropagation());
|
||||
});
|
||||
18
themes/terminal/babel.config.js
Normal file
@@ -0,0 +1,18 @@
|
||||
module.exports = function(api) {
|
||||
api.cache(true);
|
||||
|
||||
const presets = [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
targets: "last 2 versions, >1%, not dead",
|
||||
},
|
||||
],
|
||||
];
|
||||
const plugins = [];
|
||||
|
||||
return {
|
||||
presets,
|
||||
plugins,
|
||||
};
|
||||
};
|
||||
4
themes/terminal/config.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = '0.90.0'
|
||||
37
themes/terminal/exampleSite/config.toml
Normal file
@@ -0,0 +1,37 @@
|
||||
baseurl = "https://example.com/"
|
||||
languageCode = "en-us"
|
||||
theme = "hugo-theme-terminal"
|
||||
pagination.pagerSize = 5
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[params]
|
||||
contentTypeName = "posts"
|
||||
showMenuItems = 2
|
||||
fullWidthTheme = false
|
||||
centerTheme = false
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
title = "Terminal"
|
||||
subtitle = "A simple, retro theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "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"
|
||||
21
themes/terminal/exampleSite/content/about.md
Normal file
@@ -0,0 +1,21 @@
|
||||
+++
|
||||
title = "About"
|
||||
date = "2019-01-25"
|
||||
author = "Radek"
|
||||
+++
|
||||
|
||||
# Hi there
|
||||
|
||||
My name is Radek and I'm the author of this theme. I made it to help you present your ideas easier.
|
||||
|
||||
We all know how hard is to start something on the web, especially these days. You need to prepare a bunch of stuff, configure them and when that’s done — create the content.
|
||||
|
||||
This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
|
||||
|
||||
The theme includes:
|
||||
|
||||
- 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!
|
||||
18
themes/terminal/exampleSite/content/posts/hello.md
Normal file
@@ -0,0 +1,18 @@
|
||||
+++
|
||||
title = "Hello Friend"
|
||||
date = "2019-01-25"
|
||||
author = "Lorem Ipsum"
|
||||
cover = "hello.jpg"
|
||||
description = "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."
|
||||
+++
|
||||
|
||||
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.
|
||||
|
||||
Sed a leo id risus venenatis vulputate non quis nulla. Aenean nisl quam, lacinia pulvinar orci sit amet, eleifend eleifend dui. Nulla tempor ligula leo, eu vehicula quam condimentum a. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla gravida tristique nunc sed semper. Morbi nec felis odio.
|
||||
|
||||
- Sed efficitur, lacus ac scelerisque pellentesque, lectus risus dignissim nisl, fermentum semper lectus diam eget lacus.
|
||||
- Nunc ornare purus enim, id eleifend mauris vestibulum volutpat.
|
||||
- Aenean facilisis ut ipsum condimentum ultrices.
|
||||
- Fusce sed metus vulputate, lobortis purus et, finibus purus. Suspendisse quis posuere lorem. Vivamus vulputate nec risus in pulvinar.
|
||||
192
themes/terminal/exampleSite/content/showcase.md
Normal file
@@ -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.
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` 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
|
||||
|
||||

|
||||
|
||||
### 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.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^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
|
||||
|
||||
<button>Button</button>
|
||||
<a href="">Link</a>
|
||||
<a href="" class="button inline">Link</a>
|
||||
|
||||
## 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
|
||||
|
||||
<fieldset>
|
||||
<input type="text" placeholder="Type something" /><br />
|
||||
<input type="number" placeholder="Insert number" /><br />
|
||||
<input type="text" value="Input value" /><br />
|
||||
<select>
|
||||
<option value="1">Option 1</option>
|
||||
<option value="2">Option 2</option>
|
||||
<option value="3">Option 3</option>
|
||||
</select><br />
|
||||
<textarea placeholder="Insert a comment..."></textarea><br />
|
||||
<input type="checkbox" /> I understand<br />
|
||||
<button type="submi">Submit</button>
|
||||
</fieldset>
|
||||
|
||||
## Code Blocks
|
||||
|
||||
### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
### Code block with Hugo's internal highlight shortcode
|
||||
|
||||
{{< highlight html >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /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
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
BIN
themes/terminal/exampleSite/static/img/hello.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
3
themes/terminal/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/panr/hugo-theme-terminal/v4
|
||||
|
||||
go 1.19
|
||||
BIN
themes/terminal/images/screenshot.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
themes/terminal/images/terminal-css.png
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
themes/terminal/images/terminal-theme-old.png
Normal file
|
After Width: | Height: | Size: 438 KiB |
BIN
themes/terminal/images/terminal-theme.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
themes/terminal/images/tn.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
10
themes/terminal/layouts/404.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<div class="post">
|
||||
<h1 class="post-title">404 — {{ $.Site.Params.missingContentMessage | default "Page not found..." }}</h1>
|
||||
|
||||
<div class="post-content">
|
||||
<a href="{{ "/" | absURL }}">{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }} →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
27
themes/terminal/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ $.Site.Language }}">
|
||||
<head>
|
||||
{{ block "title" . }}
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }}</title>
|
||||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }}
|
||||
|
||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default false) " headings--one-size" "" }}">
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="content">
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
66
themes/terminal/layouts/_default/index.html
Normal file
@@ -0,0 +1,66 @@
|
||||
{{ define "main" }}
|
||||
{{ if .Content }}
|
||||
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
{{ $PageContext := . }}
|
||||
{{ if .IsHome }}
|
||||
{{ $PageContext = .Site }}
|
||||
{{ end }}
|
||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
<article class="post on-list">
|
||||
<h2 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-meta">
|
||||
{{- if .Date -}}
|
||||
<time class="post-date">
|
||||
{{- partial "post-date" . -}}
|
||||
</time>
|
||||
{{- end -}}
|
||||
{{- with .Params.Author -}}
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||
{{- . -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
{{ else if .Description }}
|
||||
<p>{{ .Description | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
56
themes/terminal/layouts/_default/list.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
<div class="index-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ range .Paginator.Pages }}
|
||||
<article class="post on-list">
|
||||
<h2 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h2>
|
||||
<div class="post-meta">
|
||||
{{- if .Date -}}
|
||||
<time class="post-date">
|
||||
{{- partial "post-date" . -}}
|
||||
</time>
|
||||
{{- end -}}
|
||||
{{- with .Params.Author -}}
|
||||
<span class="post-author">{{- . -}}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||
{{- . -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
{{ else if .Description }}
|
||||
<p>{{ .Description | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
57
themes/terminal/layouts/_default/single.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{{ define "main" }}
|
||||
<article class="post">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
{{- if .Date -}}
|
||||
<time class="post-date">
|
||||
{{- partial "post-date" . -}}
|
||||
{{- if and $.Site.Params.showLastUpdated .Lastmod -}}
|
||||
{{- partial "post-lastmod" . -}}
|
||||
{{- end -}}
|
||||
</time>
|
||||
{{- end -}}
|
||||
{{- with .Params.Author -}}
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{- end -}}
|
||||
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||
<div class="table-of-contents">
|
||||
<h2>
|
||||
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
|
||||
</h2>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">#</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
{{ partial "posts_pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (.Params.hideComments | default false) }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
57
themes/terminal/layouts/_default/term.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{{ define "main" }}
|
||||
<h1>Posts for: #{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="index-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
{{ range .Paginator.Pages }}
|
||||
<article class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
{{- if .Date -}}
|
||||
<time class="post-date">
|
||||
{{- .Date.Format "2006-01-02" -}}
|
||||
</time>
|
||||
{{- end -}}
|
||||
{{- with .Params.Author -}}
|
||||
<span class="post-author">{{- . -}}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||
{{- . -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "cover.html" . }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content }}
|
||||
{{ else if .Description }}
|
||||
<p>{{ .Description | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
22
themes/terminal/layouts/_default/terms.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ define "main" }}
|
||||
<div class="terms">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="index-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<ul>
|
||||
{{ $type := .Type }}
|
||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{ $name := .Name }}
|
||||
{{ $count := .Count }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li>
|
||||
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
8
themes/terminal/layouts/partials/comments.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--
|
||||
To add comments section, please create `layouts/partials/comments.html` in your
|
||||
Hugo directory and insert:
|
||||
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
||||
or whatever comment engine you want -> https://gohugo.io/content-management/comments/#readout
|
||||
-->
|
||||
24
themes/terminal/layouts/partials/cover.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{- $cover := false -}}
|
||||
{{- $autoCover := default $.Site.Params.autoCover false }}
|
||||
|
||||
{{- if index .Params "cover" -}}
|
||||
{{- if .Resources.GetMatch .Params.Cover }}
|
||||
{{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- $cover = absURL .Params.Cover -}}
|
||||
{{- end -}}
|
||||
{{- else if $.Site.Params.AutoCover -}}
|
||||
{{- if (not .Params.Cover) -}}
|
||||
{{- if .Resources.GetMatch "cover.*" -}}
|
||||
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{if $cover -}}
|
||||
<!-- Cover image found -->
|
||||
<img src="{{ $cover }}"
|
||||
class="post-cover"
|
||||
alt="{{ .Title | plainify | default " " }}"
|
||||
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" />
|
||||
{{- end }}
|
||||
4
themes/terminal/layouts/partials/extended_footer.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--
|
||||
To add an extended footer section, please create
|
||||
`layouts/partials/extended_footer.html` in your Hugo directory.
|
||||
-->
|
||||
4
themes/terminal/layouts/partials/extended_head.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--
|
||||
To add an extended head section, please create
|
||||
`layouts/partials/extended_head.html` in your Hugo directory.
|
||||
-->
|
||||
23
themes/terminal/layouts/partials/footer.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if $.Site.Copyright }}
|
||||
<div class="copyright copyright--user">
|
||||
<span>{{ $.Site.Copyright | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
|
||||
{{ end }}
|
||||
<span>:: <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">Theme</a> made by <a href="https://github.com/panr" target="_blank">panr</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build }}
|
||||
{{ $cp := resources.Get "js/code.js" | js.Build }}
|
||||
|
||||
{{ $bundle := slice $menu $cp | resources.Concat "bundle.js" | resources.Minify }}
|
||||
|
||||
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
79
themes/terminal/layouts/partials/head.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
|
||||
{{ if .Params.noindex }}
|
||||
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
|
||||
<meta name="robots" content="noindex" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<meta name="robots" content="noodp" />
|
||||
{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
{{ $css := resources.Match "css/*.css" }}
|
||||
{{ range $css }}
|
||||
{{ $styles := . | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}">
|
||||
{{ end }}
|
||||
<!-- Custom Terminal.css styles -->
|
||||
{{ if (fileExists "static/terminal.css") -}}
|
||||
<link rel="stylesheet" href="{{ "terminal.css" | absURL }}">
|
||||
{{- end }}
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
{{ if (fileExists "static/style.css") -}}
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="shortcut icon" href="{{ "favicon.png" | absURL }}">
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{{ if (isset $.Site.Params "twitter") }}
|
||||
{{ if (isset $.Site.Params.Twitter "site") }}
|
||||
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
|
||||
{{ end }}
|
||||
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- OG data -->
|
||||
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:site_name" content="{{ $.Site.Title }}" />
|
||||
{{ if (isset .Params "cover") }}
|
||||
{{ $pageCover := .Param "cover" }}
|
||||
{{ with (.Resources.GetMatch (.Param "cover")) }}
|
||||
{{ $pageCover = .RelPermalink }}
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ $pageCover | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ "og-image.png" | absURL }}">
|
||||
{{ end }}
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="627">
|
||||
{{ range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ with .OutputFormats.Get "json" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Extended head section-->
|
||||
{{ partial "extended_head.html" . }}
|
||||
16
themes/terminal/layouts/partials/header.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<header class="header">
|
||||
<div class="header__inner">
|
||||
<div class="header__logo">
|
||||
{{ partial "logo.html" . }}
|
||||
</div>
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "mobile-menu.html" . }}
|
||||
{{ end }}
|
||||
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
||||
{{ partial "language-menu.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
{{ end }}
|
||||
</header>
|
||||
10
themes/terminal/layouts/partials/language-menu.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<ul class="menu menu--desktop menu--language-selector">
|
||||
<li class="menu__trigger">{{ .Language.LanguageName }} ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
5
themes/terminal/layouts/partials/logo.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
|
||||
<div class="logo">
|
||||
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}Terminal{{ end }}
|
||||
</div>
|
||||
</a>
|
||||
33
themes/terminal/layouts/partials/menu.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<nav class="navigation-menu">
|
||||
<ul class="navigation-menu__inner menu--desktop">
|
||||
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
|
||||
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
||||
<li>
|
||||
<ul class="menu">
|
||||
<li class="menu__trigger">{{ $.Site.Params.menuMore }} ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
20
themes/terminal/layouts/partials/mobile-menu.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<ul class="menu menu--mobile">
|
||||
<li class="menu__trigger">Menu ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
||||
<hr />
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
17
themes/terminal/layouts/partials/pagination.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" class="button inline prev">
|
||||
< [<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>]
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .Paginator.HasPrev .Paginator.HasNext }}
|
||||
::
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}" class="button inline next">
|
||||
[<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>] >
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
10
themes/terminal/layouts/partials/post-date.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{- $date := .Date -}}
|
||||
{{- with .Params.dateFormat -}}
|
||||
{{- $date | time.Format . -}}
|
||||
{{- else -}}
|
||||
{{- with .Site.Params.dateFormat -}}
|
||||
{{- $date | time.Format . -}}
|
||||
{{- else -}}
|
||||
{{- $date | time.Format "2006-01-02" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
10
themes/terminal/layouts/partials/post-lastmod.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{- $date := .Lastmod -}}
|
||||
{{- with .Params.dateFormat -}}
|
||||
{{- $date | time.Format . -}}
|
||||
{{- else -}}
|
||||
{{- with .Site.Params.dateFormat -}}
|
||||
[{{- or $.Site.Params.updatedDatePrefix "Updated: " }} {{ $date | time.Format . -}}]
|
||||
{{- else -}}
|
||||
[{{- or $.Site.Params.updatedDatePrefix "Updated: " }} {{ $date | time.Format "2006-01-02" -}}]
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
23
themes/terminal/layouts/partials/posts_pagination.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}" class="button inline prev">
|
||||
< [<span class="button__text">{{ .NextInSection.Title }}</span>]
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .NextInSection .PrevInSection }}
|
||||
::
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{ .PrevInSection.Permalink }}" class="button inline next">
|
||||
[<span class="button__text">{{ .PrevInSection.Title }}</span>] >
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
16
themes/terminal/layouts/shortcodes/code.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
||||
{{ $open := .Get "open" }}
|
||||
{{ $lang := .Get "language" }}
|
||||
{{ $opts := .Get "opts" }}
|
||||
|
||||
{{- if $lang -}}
|
||||
<details class="collapsable-code" {{ if eq $open "true" -}} open {{- end }}>
|
||||
<summary title="Click to interact">
|
||||
{{- if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end -}}
|
||||
</summary>
|
||||
{{ $trInner := trim .Inner "\n" }}
|
||||
{{- transform.Highlight $trInner $lang $opts -}}
|
||||
</details>
|
||||
{{ else }}
|
||||
{{ errorf "If you want to use the \"collapsable code\" shortcode, you need to pass a mandatory \"language\" param. The issue occured in %q (%q)" .Page.File .Page.Permalink }}
|
||||
{{- end -}}
|
||||
3
themes/terminal/layouts/shortcodes/image.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ if .Get "src" }}
|
||||
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} {{ with .Get "width" }} width="{{ . | plainify }}" {{ end }} {{ with .Get "height" }} height="{{ . | plainify }}" {{ end }} />
|
||||
{{ end }}
|
||||
4992
themes/terminal/package-lock.json
generated
Normal file
39
themes/terminal/package.hugo.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
">1%",
|
||||
"not dead"
|
||||
],
|
||||
"comments": {
|
||||
"dependencies": {
|
||||
"yarn": "project"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserslist": "project",
|
||||
"clipboard": "project",
|
||||
"eslint-config-airbnb": "project",
|
||||
"eslint-config-prettier": "project",
|
||||
"eslint-plugin-jsx-a11y": "project",
|
||||
"husky": "project"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"yarn": "^1.22.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserslist": "^4.16.5",
|
||||
"clipboard": "^2.0.4",
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"husky": "^5.1.3"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "terminal",
|
||||
"scripts": {
|
||||
"test": "echo 'Test'"
|
||||
},
|
||||
"version": "4.2.0"
|
||||
}
|
||||
43
themes/terminal/package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "terminal",
|
||||
"version": "4.2.0",
|
||||
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "echo 'Test'"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
">1%",
|
||||
"not dead"
|
||||
],
|
||||
"comments": {
|
||||
"dependencies": {
|
||||
"yarn": "project"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserslist": "project",
|
||||
"clipboard": "project",
|
||||
"eslint-config-airbnb": "project",
|
||||
"eslint-config-prettier": "project",
|
||||
"eslint-plugin-jsx-a11y": "project",
|
||||
"husky": "project"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"yarn": "^1.22.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserslist": "^4.16.5",
|
||||
"clipboard": "^2.0.4",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"husky": "^5.1.3",
|
||||
"stylelint": "^14.14.1",
|
||||
"stylelint-config-prettier-scss": "^0.0.1",
|
||||
"stylelint-config-standard-scss": "^6.1.0"
|
||||
}
|
||||
}
|
||||
BIN
themes/terminal/static/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
themes/terminal/static/favicon.png
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
themes/terminal/static/fonts/FiraCode-Latin.woff2
Normal file
BIN
themes/terminal/static/fonts/FiraCode-LatinExt.woff2
Normal file
BIN
themes/terminal/static/og-image.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
13
themes/terminal/theme.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
name = "Terminal"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md"
|
||||
description = "A simple, retro theme for Hugo."
|
||||
homepage = "https://github.com/panr/hugo-theme-terminal/"
|
||||
demosite = "https://panr.github.io/hugo-theme-terminal-demo/"
|
||||
tags = ["blog", "clean", "customizable", "dark", "highlighting", "minimal", "monotone", "multilingual", "personal", "responsive", "simple", "technical", "retro"]
|
||||
features = ["blog", "shortcode", "syntax highlighting"]
|
||||
min_version = 0.90
|
||||
|
||||
[author]
|
||||
name = "panr"
|
||||
homepage = "https://rkoziel.com"
|
||||