forked from mirrors/hugo-theme-terminal
Compare commits
294 Commits
Author | SHA1 | Date | |
---|---|---|---|
fdd39516c3 | |||
b0e10e1dca | |||
e475eb88ef | |||
d644337551 | |||
c12cc903bd | |||
9c6d80f31f | |||
0759309c59 | |||
73373847d8 | |||
a4a96bea35 | |||
33966cdf64 | |||
6eca4d4826 | |||
2d26fb1cf0 | |||
c80302a67d | |||
087d77a0e6 | |||
de6feb37b8 | |||
8404f40c2c | |||
1703c16b7f | |||
6404a48fe3 | |||
c5e838481d | |||
bc29541514 | |||
a020860014 | |||
5a0af3384d | |||
04d9175af8 | |||
d450f681f0 | |||
0925abe5d8 | |||
b19e56a9d8 | |||
ebbeedc014 | |||
9cbc71f5c3 | |||
cf59a36030 | |||
e7fd995590 | |||
0a9b08f405 | |||
3ade628cfc | |||
8ace31592e | |||
7c77a416df | |||
abab5c6dcd | |||
e2bb4583b1 | |||
2d0de8e812 | |||
72bdbc99ce | |||
3ef14f49b2 | |||
9271d6ebf9 | |||
bcd630ad2e | |||
ca115e308e | |||
4ef42a15b2 | |||
a52bef65ce | |||
583d6c51c3 | |||
0570ab80bb | |||
71618345a6 | |||
a53fe97fa1 | |||
c6a38c4b85 | |||
76f28fb7ba | |||
3d067dea1b | |||
8b51d587d8 | |||
b9cfb8d360 | |||
87d7bf9ca1 | |||
639fd7f5b1 | |||
1dcf383f7d | |||
aaada1ee03 | |||
f2fd8fbc63 | |||
1d47e2102a | |||
d8c6eca445 | |||
6a6a3ae75c | |||
d498a48f49 | |||
11074eeb07 | |||
1a47dec920 | |||
bb19133255 | |||
460409971b | |||
67a5a0c82c | |||
cf990015dd | |||
72840fc527 | |||
565186853e | |||
58ba445c9f | |||
7c754f2db2 | |||
d62c409035 | |||
0afe80acc8 | |||
25b1edd1db | |||
ca56210123 | |||
c5ee41ddae | |||
f5ef1950c8 | |||
e877df5bae | |||
1a181e05ae | |||
10351a6b9d | |||
0efdbb73f4 | |||
3a0f200a91 | |||
d56bb5398e | |||
e70a99243e | |||
cd5a89ba3a | |||
f8ce76b7de | |||
944b03d983 | |||
f8eb2e304f | |||
c21569654e | |||
ce71263767 | |||
5f72bf78e9 | |||
9143918f5a | |||
faf59f6d5d | |||
18af67974a | |||
bd1f2c75d0 | |||
801db391a8 | |||
9d64a69092 | |||
5ede34df2c | |||
6f5e42002e | |||
b39a2e93b7 | |||
22098b16d9 | |||
a89e972309 | |||
a6ae1efab1 | |||
1b00e7e317 | |||
7f0bda3358 | |||
0b0c32c626 | |||
145a758159 | |||
a3f51f61c7 | |||
6ed6715b5b | |||
b226e1dc8c | |||
6ef1bb1686 | |||
0dc364f3e2 | |||
0b541b6f54 | |||
6c186bd043 | |||
8ac2551ee2 | |||
172708334f | |||
a1c203cb17 | |||
92cc5bcd23 | |||
7c5c62e630 | |||
49c8679b6c | |||
ff3aa2316b | |||
e8fdb4e084 | |||
2ab90a708e | |||
0ff712efdb | |||
98ab575126 | |||
e61ad0ef07 | |||
4d7a3c2db3 | |||
b6a5436f40 | |||
4f23e52472 | |||
d30e8a50b0 | |||
62531797e7 | |||
20ce063397 | |||
2fcbefa09f | |||
2bb3d3d49b | |||
3f6db97f02 | |||
c567dd61f9 | |||
c6c3eb8d54 | |||
6c467105a2 | |||
3aeb73a422 | |||
4b05a64b5a | |||
fa95894458 | |||
9e38f9ec99 | |||
ce97879d6c | |||
48233660d8 | |||
d2dc6b7bb9 | |||
ec262730ac | |||
7ac0deff87 | |||
ee93a3dcd5 | |||
8d2bb3cda7 | |||
10eae069d0 | |||
2a34760541 | |||
791799e1d6 | |||
f4be21a1c3 | |||
ec1af25439 | |||
5786d01c09 | |||
c297ba66fc | |||
ddd24c6c98 | |||
5d4b70d3a7 | |||
2ea0eeeb7a | |||
fe147db973 | |||
69bf17a9ad | |||
b9c70a23ac | |||
0d3e1e62ab | |||
7b5dfbae03 | |||
e687203739 | |||
64dea526de | |||
1c40487df6 | |||
dc93a293fd | |||
cedfaf6c5c | |||
f8fa62605d | |||
53c70531d5 | |||
9d8b8d51fa | |||
213a39bcad | |||
5f9bb738cd | |||
9a41d82cb8 | |||
a81cf2dc29 | |||
fa71c00418 | |||
e40996148a | |||
c3ea6296af | |||
7652ceaa86 | |||
2805450761 | |||
5057fd5521 | |||
99513dfa64 | |||
1d9856db28 | |||
fbcf98ae95 | |||
060587ba38 | |||
8d8e93fa8d | |||
4a4a820997 | |||
f06332421c | |||
3d20322e3a | |||
06b8259668 | |||
2307f19909 | |||
63b2c69f85 | |||
28dd0fadf9 | |||
270a135fca | |||
d2a00d0517 | |||
2bb48d5952 | |||
24e901f460 | |||
9c25182806 | |||
209f36287f | |||
05da53db3a | |||
4739739afc | |||
a13e8a1a7e | |||
974dec46bb | |||
c4086a4f14 | |||
924a8c48a5 | |||
eb2d4eacff | |||
f027e3ff0d | |||
52c6c4c7a8 | |||
35da736903 | |||
86bfa30e14 | |||
056f7665d7 | |||
6c2ad3a669 | |||
950e9a63e4 | |||
0514e772ac | |||
016f54c162 | |||
c2e83bf417 | |||
4b147d17d3 | |||
899bc2ab47 | |||
eb8cd5216e | |||
e59e0170c3 | |||
85f01b1cc2 | |||
02238f6e0f | |||
79b040a3ec | |||
30410267ec | |||
786243dc1d | |||
fda8cb9d20 | |||
ae19c84baf | |||
83381f44e1 | |||
5091a93ea2 | |||
f7b4d6c934 | |||
64b59a4e59 | |||
2781f35b83 | |||
26c5ebfc20 | |||
39407e9dc1 | |||
46645d2782 | |||
a69547e06e | |||
f1ff5d0c66 | |||
4c9b24ea14 | |||
57ab52dd84 | |||
bc9b801e5f | |||
a28c65d411 | |||
f901435935 | |||
108a966b12 | |||
10b545bb86 | |||
3f58f9834f | |||
c2c43bb34a | |||
dbeb0f7c98 | |||
bacfb1a95a | |||
6bf52c0f77 | |||
bccf419102 | |||
e938e972b6 | |||
13e0079b23 | |||
50e36736c6 | |||
034efcb463 | |||
5efec67714 | |||
5987519fd6 | |||
3cf9638af1 | |||
bca791fe8c | |||
54e5006109 | |||
27462e1893 | |||
9928ada9ad | |||
ba816147f5 | |||
e55014bdbc | |||
b484629dc5 | |||
0d246fc9f1 | |||
efad1bff26 | |||
00296f07b4 | |||
c375d4ce5d | |||
880c995489 | |||
4eedc6a39a | |||
c8f251ce9c | |||
7ad1783021 | |||
70cf7406fd | |||
8fe7d51b94 | |||
4b959d0aa6 | |||
1cf2b933a3 | |||
88ed5a0bef | |||
487876daf1 | |||
20b48f398e | |||
077fade121 | |||
bb7ad5779f | |||
7cb7fc284c | |||
d005155fa5 | |||
51d1b12820 | |||
d4f8fea87c | |||
b746766d0e | |||
4e7ac981d2 | |||
7a5bad13b3 | |||
ec98c7bc11 | |||
4f399128b2 | |||
db29d33536 | |||
0d2a41242a |
91
.gitignore
vendored
91
.gitignore
vendored
@ -1 +1,90 @@
|
||||
node_modules
|
||||
# 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
|
||||
|
10
.prettierrc
10
.prettierrc
@ -1,5 +1,11 @@
|
||||
{
|
||||
"parser": "babylon",
|
||||
"parser": "babel",
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all"
|
||||
"trailingComma": "all",
|
||||
"overrides": [{
|
||||
"files": ".html",
|
||||
"options": {
|
||||
"parser": "html"
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
21
COMMUNITY-FEATURES.md
Normal file
21
COMMUNITY-FEATURES.md
Normal file
@ -0,0 +1,21 @@
|
||||
# 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.
|
||||
-->
|
||||
|
||||
- **Social media icons** (https://github.com/...)
|
||||
- This is the biggest missing feature of the theme. But now it will help your audience reach you over the internet.
|
||||
- John, a javascript developer.
|
165
README.md
165
README.md
@ -4,6 +4,25 @@
|
||||
|
||||
### DEMO - https://hugo-terminal.now.sh/
|
||||
|
||||
<a href="https://www.buymeacoffee.com/panr" target="_blank"><img src="https://res.cloudinary.com/panr/image/upload/v1579374705/buymeacoffee_y6yvov.svg" alt="Buy Me A Coffee" ></a>
|
||||
|
||||
---
|
||||
|
||||
- [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 (safely) edit the theme](#how-to-edit)
|
||||
- [Found a bug?](#bug)
|
||||
- [New cool idea or feature](#feature)
|
||||
- [Terminal theme user?](#terminal-theme-user)
|
||||
- [Sponsoring](#sponsoring)
|
||||
- [Licence](#licence)
|
||||
|
||||
## Features
|
||||
|
||||
- **5 duetone themes**, depending on your preferences (orange is default, red, blue, green, pink)
|
||||
@ -15,18 +34,43 @@
|
||||
|
||||
- **`image`** (prop required: **`src`**; props optional: **`alt`**, **`position`** (**left** is default | center | right), **`style`**)
|
||||
- eg: `{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}`
|
||||
- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**
|
||||
- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**)
|
||||
- eg: `{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}`
|
||||
- **`code`** (prop required: **`language`**; props optional: **`title`**, **`id`**, **`expand`** (default "△"), **`collapse`** (default "▽"), **`isCollapsed`**)
|
||||
- eg:
|
||||
```go
|
||||
{{< code language="css" title="Really cool snippet" id="1" expand="Show" collapse="Hide" isCollapsed="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 PrismJS. All you need to do is to wrap you code like this:
|
||||
|
||||
<pre>
|
||||
````
|
||||
```html
|
||||
// your code here
|
||||
```
|
||||
</pre>
|
||||
````
|
||||
|
||||
**Supported languages**: bash/shell, css, clike, javascript, apacheconf, actionscript, applescript, c, csharp, cpp, coffeescript, ruby, csp, css-extras, diff, django, docker, elixir, elm, markup-templating, erlang, fsharp, flow, git, go, graphql, less, handlebars, haskell, http, java, json, kotlin, latex, markdown, makefile, objectivec, ocaml, perl, php, php-extras, r, sql, processing, scss, python, jsx, typescript, toml, reason, textile, rust, sass, stylus, scheme, pug, swift, yaml, haml, twig, tsx, vim, visual-basic, wasm.
|
||||
|
||||
@ -46,33 +90,87 @@ If you don't want to make any radical changes, it's the best option, because you
|
||||
$ git submodule add https://github.com/panr/hugo-theme-terminal.git themes/terminal
|
||||
```
|
||||
|
||||
## How to run your site
|
||||
|
||||
The theme is using [Hugo Pipes](https://gohugo.io/hugo-pipes/) to handle Javascript and PostCSS files. This setup **requires** following npm packages:
|
||||
|
||||
```
|
||||
@babel/cli @babel/core @babel/preset-env browserslist clipboard cssnano postcss-cli postcss-import postcss-mixins postcss-nested postcss-preset-env postcss-url
|
||||
```
|
||||
|
||||
Before you start, you have to install them (globally or locally).
|
||||
|
||||
Then:
|
||||
|
||||
```
|
||||
$ 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"
|
||||
theme = "terminal"
|
||||
paginate = 5
|
||||
|
||||
[params]
|
||||
# dir name of your blog content (default is `content/posts`)
|
||||
# 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"
|
||||
|
||||
# ["orange", "blue", "red", "green", "pink"]
|
||||
themeColor = "orange"
|
||||
|
||||
# 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
|
||||
|
||||
# set a custom favicon (default is a `themeColor` square)
|
||||
# favicon = "favicon.ico"
|
||||
|
||||
# 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"
|
||||
|
||||
# set all headings to their default size (depending on browser settings)
|
||||
# it's set to `true` by default
|
||||
# oneHeadingSize = false
|
||||
|
||||
[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"
|
||||
subtitle = "A simple, retro theme for Hugo"
|
||||
owner = ""
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
missingContentMessage = "Page not found..."
|
||||
missingBackButtonLabel = "Back to home page"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "Terminal"
|
||||
@ -93,40 +191,53 @@ to `config.toml` file in your Hugo root directory and change params fields. In c
|
||||
|
||||
**NOTE:** Please keep in mind that currently `main menu` doesn't support nesting.
|
||||
|
||||
## How to run your site
|
||||
## Post archetype
|
||||
|
||||
From your Hugo root directory run:
|
||||
See the basic `post` file params supported by the theme — https://github.com/panr/hugo-theme-terminal/blob/master/archetypes/posts.md
|
||||
|
||||
```
|
||||
$ hugo server -t terminal
|
||||
```
|
||||
## Add-ons
|
||||
|
||||
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.
|
||||
- **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
|
||||
## How to (safely) edit the theme <a id="how-to-edit" />
|
||||
|
||||
If you have to override some of the styles, **you can do this easily** by adding `static/styles.css` in your root directory and point things you want to change.
|
||||
To change something in the theme, you have to go to `themes/terminal` and modify the files. You can also copy them (like `assets` folder) from the theme to your root directory and modify the files there (thanks to Hugo's lookup https://gohugo.io/templates/lookup-order). This will protect your changes from overriding when you update the theme.
|
||||
|
||||
Otherwise, if you really want to edit the theme, you need to install Node dependencies. To do so, go to the theme directory (from your Hugo root directory):
|
||||
## Found a bug? <a id="bug" />
|
||||
|
||||
```
|
||||
$ cd themes/terminal
|
||||
```
|
||||
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.
|
||||
|
||||
and then run:
|
||||
## New cool idea or feature? <a id="feature" />
|
||||
|
||||
```
|
||||
$ npm install
|
||||
$ npm i yarn
|
||||
$ yarn
|
||||
```
|
||||
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.
|
||||
|
||||
## How to contribute
|
||||
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:
|
||||
|
||||
If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-terminal/issues) or if you want to add a new feature directly please create a new [Pull Request](https://github.com/panr/hugo-theme-terminal/pulls).
|
||||
- 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`
|
||||
|
||||
## Licence
|
||||
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.
|
||||
|
||||
Copyright © 2019 Radosław Kozieł ([@panr](https://twitter.com/panr))
|
||||
Sounds OK? Cool, let's rock! 🤘
|
||||
|
||||
## Terminal theme user?
|
||||
|
||||
I'd be happy to know more about you and what you are doing. If you want to share it, please make a contribution and [add your site to the list](https://github.com/panr/hugo-theme-terminal/blob/master/USERS.md)! 🤗
|
||||
|
||||
## Sponsoring
|
||||
|
||||
If you like my work and want to support the development of the project, now you can! Just:
|
||||
|
||||
<a href="https://www.buymeacoffee.com/panr" target="_blank"><img src="https://res.cloudinary.com/panr/image/upload/v1579374705/buymeacoffee_y6yvov.svg" alt="Buy Me A Coffee" ></a>
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2019-2020 Radosław Kozieł ([@panr](https://twitter.com/panr))
|
||||
|
||||
The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information.
|
||||
|
43
USERS.md
Normal file
43
USERS.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Meet the users of Terminal theme!
|
||||
- https://xicode.se **magistern** (Teacher)
|
||||
- https://devmaster64.com **devmaster64** (Software Developer)
|
||||
- https://mickie1.gitlab.io/blog/ **mickie** (Engineer)
|
||||
- https://calloc.net **Vaibhav Yenamandra** (Software Engineer)
|
||||
- https://potatofrom.space **Kevin Liu** (Software)
|
||||
- https://horochx.org **horochx** (Software Developer)
|
||||
- https://feng.si **Si Feng** (Software Engineer)
|
||||
- https://ben-on-vms.com **Benedikt Frenzel** (Technical Support Engineer)
|
||||
- https://johngazzini.com **John Gazzini** (Software Engineer)
|
||||
- https://geekx.tech/ **Sagar Ladla** (Student Developer & Cyber Security Specialist)
|
||||
- https://tears.io/ **Alex** (SRE)
|
||||
- https://ayushkarn.me/ **Ayush Karn** (Student Developer)
|
||||
- https://ssgram.dev **Ramaseshan Parthasarathy** (Software Developer)
|
||||
- https://zaine.me **Amine Zaine** (Cloud Engineer)
|
||||
- https://notes.dmaitre.phyip3.dur.ac.uk/computing-club/ **Ryan Moodie** (Physics PhD student)
|
||||
- https://thecodecousins.com **Stanley Nguyen** (Software Engineer) & **Hoang Do** (Software & IoT Engineer)
|
||||
- https://schacherbauer.dev **Markus Schacherbauer** (Student Developer)
|
||||
- https://rinma.dev **Marvin Dalheimer** (Software Developer)
|
||||
- https://lunar.computer **Lunar Computer** (DevOps Engineer)
|
||||
- https://naxxfish.net **Chris Roberts** (Broadcast Systems Engineer)
|
||||
- https://security.jtang.dev **Jonathan Tang** (Student & Software Engineer)
|
||||
- https://andreacaravano.net **Andrea Caravano** (Student)
|
||||
- https://dawsonverboven.com/ **Dawson Verboven** (Student & Software Developer)
|
||||
- https://www.rockyourcode.com **Sophia Brandt** (tax officer and hobby coder)
|
||||
- https://qbunt.com **Jeremy Bunting** (Software Engineer)
|
||||
- https://smeik.org **Smeik** (Embedded Developer)
|
||||
- https://code.willstocks.co.uk **Will Stocks** (Blogger & Developer)
|
||||
- https://blog.vnandag.me **Nanda Gopal** (Student Developer)
|
||||
- https://m47r1x.github.io **Neo** (Citizen of Zion)
|
||||
- https://bgameiro.me/ **Bernardo Gameiro** (Engineer Physicist student)
|
||||
- https://return-to-libc.com/ **elraro** (Cyber Security Specialist)
|
||||
- https://waterloos.niflheimr.blue/ **niflheimr1011** (Aspiring Software Engineer)
|
||||
- https://monocle.rpod.club/ **classx** (DevOps Engineer)
|
||||
- https://wjdevschool.com/ **Wojciech Bogócki** (Making Things & Teaching / W&J Dev School)
|
||||
- https://waterloos.niflheimr.blue/ **cindrmon** (Aspiring Software Engineer and Student)
|
||||
|
||||
<!--
|
||||
TEMPLATE:
|
||||
|
||||
- https://radoslawkoziel.pl **Radek Kozieł** (Software Designer and Developer)
|
||||
|
||||
-->
|
11
archetypes/posts.md
Normal file
11
archetypes/posts.md
Normal file
@ -0,0 +1,11 @@
|
||||
+++
|
||||
title = ""
|
||||
date = ""
|
||||
author = ""
|
||||
authorTwitter = "" #do not include @
|
||||
cover = ""
|
||||
tags = ["", ""]
|
||||
keywords = ["", ""]
|
||||
description = ""
|
||||
showFullContent = false
|
||||
+++
|
84
assets/css/code.css
Normal file
84
assets/css/code.css
Normal file
@ -0,0 +1,84 @@
|
||||
.collapsable-code {
|
||||
--border-color: color-mod(var(--accent) blend(#999 90%));
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 40px 0;
|
||||
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked {
|
||||
~ pre,
|
||||
~ .code-toolbar pre {
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
~ .code-toolbar {
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
|
||||
.toolbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
~ label .collapsable-code__toggle:after {
|
||||
content: attr(data-label-expand);
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&__title {
|
||||
flex: 1;
|
||||
color: var(--accent);
|
||||
padding: 3px 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__language {
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--border-color);
|
||||
border-bottom: none;
|
||||
text-transform: uppercase;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
&__toggle {
|
||||
color: var(--accent);
|
||||
font-size: 16px;
|
||||
padding: 3px 10px;
|
||||
|
||||
&:after {
|
||||
content: attr(data-label-collapse);
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
|
||||
&::first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.code-toolbar {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
@ -15,6 +15,10 @@
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
@media print {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -36,6 +40,7 @@
|
||||
a {
|
||||
flex: 0 0 auto;
|
||||
max-width: 100%;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,6 +125,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.language-selector {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
||||
&-current {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&__more {
|
||||
@mixin menu;
|
||||
top: 35px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-trigger {
|
||||
color: var(--accent);
|
||||
border: 2px solid;
|
@ -14,6 +14,7 @@ body {
|
||||
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace;
|
||||
font-size: 1rem;
|
||||
line-height: 1.54;
|
||||
letter-spacing: -0.02em;
|
||||
background-color: color-mod(var(--accent) blend(#1D1E28 98%));
|
||||
color: var(--color);
|
||||
text-rendering: optimizeLegibility;
|
||||
@ -28,24 +29,40 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
.headings--one-size {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
line-height: 1.3;
|
||||
|
||||
&:not(first-child) {
|
||||
margin-top: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4, h5, h6 {
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
|
||||
/* Waiting for a better times... */
|
||||
/* &:has(code) {
|
||||
text-decoration-color: var(--accent);
|
||||
} */
|
||||
}
|
||||
|
||||
img {
|
||||
@ -110,7 +127,7 @@ figure {
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
code, kbd {
|
||||
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace;
|
||||
font-feature-settings: normal;
|
||||
background: color-mod(var(--accent) a(20%));
|
||||
@ -118,10 +135,16 @@ code {
|
||||
padding: 1px 6px;
|
||||
margin: 0 2px;
|
||||
font-size: .95rem;
|
||||
|
||||
code, kbd {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
background: transparent;
|
||||
background: transparent !important;
|
||||
padding: 20px 10px;
|
||||
margin: 40px 0;
|
||||
font-size: .95rem;
|
||||
@ -158,15 +181,6 @@ blockquote {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '”';
|
||||
font-family: Georgia, serif;
|
||||
font-size: 3.875rem;
|
||||
position: absolute;
|
||||
left: -40px;
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
p:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
@ -179,13 +193,38 @@ blockquote {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
p:before {
|
||||
p:first-of-type:before {
|
||||
content: '>';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -25px;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
&.twitter-tweet {
|
||||
position: relative;
|
||||
background: color-mod(var(--accent) a(10%));
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
border: 1px solid var(--accent);
|
||||
padding-top: 60px;
|
||||
|
||||
p:before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '> From Twitter:';
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
color: var(--accent);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
@ -195,7 +234,9 @@ table {
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px dashed var(--accent);
|
||||
padding: 10px;
|
||||
}
|
||||
@ -204,7 +245,8 @@ th {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
ul,
|
||||
ol {
|
||||
margin-left: 30px;
|
||||
padding: 0;
|
||||
|
||||
@ -215,9 +257,23 @@ ul, ol {
|
||||
@media (--phone) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin-top: 20px;
|
||||
ol {
|
||||
list-style: none;
|
||||
counter-reset: li;
|
||||
|
||||
li {
|
||||
counter-increment: li;
|
||||
}
|
||||
|
||||
li:before {
|
||||
content: counter(li);
|
||||
position: absolute;
|
||||
right: calc(100% + 10px);
|
||||
color: var(--accent);
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,21 +281,45 @@ ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
mark {
|
||||
background: var(--accent);
|
||||
color: var(--background);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 40px;
|
||||
border-right: 1px solid rgba(255, 255, 255, .1);
|
||||
max-width: 864px;
|
||||
min-height: 100vh;
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
||||
|
||||
&.full,
|
||||
&.center {
|
||||
border: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.full {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media (--phone) {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@media print {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
@ -1,6 +1,10 @@
|
||||
.pagination {
|
||||
margin-top: 50px;
|
||||
|
||||
@media print {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
@ -43,14 +47,15 @@
|
||||
.button {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1rem;
|
||||
border-radius: 8px;
|
||||
max-width: 40%;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
overflow: hidden;
|
||||
|
||||
+ .button {
|
||||
margin-left: 10px;
|
@ -1,3 +1,24 @@
|
||||
.index-content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.framed {
|
||||
border: 1px solid var(--accent);
|
||||
padding: 20px;
|
||||
|
||||
*:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
*:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.posts {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.post {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
@ -70,8 +91,8 @@
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
li:before {
|
||||
content: '►';
|
||||
li:not(:empty):before {
|
||||
content: '-';
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
color: var(--accent);
|
||||
@ -88,9 +109,24 @@
|
||||
justify-content: center;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&+ h2 {
|
||||
& + h2 {
|
||||
margin-top: -10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hanchor {
|
||||
color: color-mod(var(--accent) alpha(90%));
|
||||
text-decoration: none;
|
||||
margin-left: 10px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
h1:hover a, h2:hover a, h3:hover a, h4:hover a {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.footnotes {
|
||||
color: color-mod(var(--color) alpha(50%));
|
||||
}
|
@ -6,6 +6,10 @@ https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+cli
|
||||
* @author Rose Pritchard
|
||||
*/
|
||||
|
||||
:root {
|
||||
--code-margin: 40px;
|
||||
}
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: none;
|
||||
@ -17,13 +21,7 @@ pre[class*="language-"] {
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
|
||||
}
|
||||
@ -31,18 +29,19 @@ pre[class*="language-"] {
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
border-radius: 8px;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
border-radius: 0;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@ -77,44 +76,35 @@ pre[class*="language-"].line-numbers > code {
|
||||
left: -3.8em;
|
||||
width: 3em; /* works for line-numbers below 1000 lines */
|
||||
letter-spacing: -1px;
|
||||
border-right: 1px solid #999;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
border-right: 1px solid color-mod(var(--accent) blend(#999 90%) a(20%));
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
|
||||
.line-numbers-rows > span {
|
||||
.line-numbers-rows > span {
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
counter-increment: linenumber;
|
||||
}
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
.line-numbers-rows > span:before {
|
||||
content: counter(linenumber);
|
||||
color: #999;
|
||||
color: color-mod(var(--accent) blend(#999 90%) a(40%));
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.code-toolbar {
|
||||
position: relative;
|
||||
margin: 40px 0;
|
||||
padding: 20px 0;
|
||||
border-top: 1px solid rgba(255, 255, 255, .1);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
||||
|
||||
+ .code-toolbar {
|
||||
border-top: 0;
|
||||
margin-top: -40px;
|
||||
}
|
||||
margin: var(--code-margin) 0;
|
||||
padding: 20px;
|
||||
border: 1px solid rgba(255, 255, 255, .1);
|
||||
|
||||
+ .code-toolbar,
|
||||
+ .highlight,
|
||||
+ .highlight .code-toolbar {
|
||||
border-top: 0;
|
||||
margin-top: calc(-1 * var(--code-margin));
|
||||
}
|
||||
|
||||
pre, code {
|
||||
@ -122,14 +112,20 @@ pre[class*="language-"].line-numbers > code {
|
||||
}
|
||||
|
||||
code {
|
||||
display: block;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight + .highlight .code-toolbar {
|
||||
border-top: 0;
|
||||
margin-top: calc(-1 * var(--code-margin));
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar {
|
||||
position: absolute;
|
||||
top: .3em;
|
||||
right: .2em;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
opacity: 0;
|
||||
}
|
||||
@ -154,9 +150,7 @@ div.code-toolbar > .toolbar button {
|
||||
line-height: normal;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
-webkit-user-select: none; /* for button */
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a,
|
||||
@ -164,11 +158,11 @@ div.code-toolbar > .toolbar button,
|
||||
div.code-toolbar > .toolbar span {
|
||||
color: #bbb;
|
||||
font-size: .8em;
|
||||
padding: 0 .5em;
|
||||
padding: 10px;
|
||||
background: #f5f2f0;
|
||||
background: rgba(224, 224, 224, 0.2);
|
||||
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
|
||||
border-radius: .5em;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a:hover,
|
||||
@ -177,7 +171,6 @@ div.code-toolbar > .toolbar button:hover,
|
||||
div.code-toolbar > .toolbar button:focus,
|
||||
div.code-toolbar > .toolbar span:hover,
|
||||
div.code-toolbar > .toolbar span:focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@ -189,15 +182,10 @@ div.code-toolbar > .toolbar span:focus {
|
||||
letter-spacing: -1px;
|
||||
margin-right: 1em;
|
||||
pointer-events: none;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.command-line-prompt > span:before {
|
||||
color: #999;
|
||||
content: ' ';
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
16
assets/css/style.css
Normal file
16
assets/css/style.css
Normal file
@ -0,0 +1,16 @@
|
||||
@import 'variables.css';
|
||||
|
||||
@import 'font.css';
|
||||
@import 'buttons.css';
|
||||
|
||||
@import 'header.css';
|
||||
@import 'logo.css';
|
||||
@import 'main.css';
|
||||
@import 'post.css';
|
||||
@import 'pagination.css';
|
||||
@import 'footer.css';
|
||||
|
||||
@import 'prism.css';
|
||||
@import 'syntax.css';
|
||||
@import 'code.css';
|
||||
@import 'terms.css';
|
99
assets/css/syntax.css
Normal file
99
assets/css/syntax.css
Normal file
@ -0,0 +1,99 @@
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule,
|
||||
.token.number {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.atrule-id,
|
||||
.token.operator,
|
||||
.token.unit,
|
||||
.token.placeholder,
|
||||
.token.variable,
|
||||
.token.attr-name {
|
||||
color: color-mod(var(--accent) a(70%));
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function,
|
||||
code.language-javascript,
|
||||
code.language-html,
|
||||
.command-line-prompt > span:before {
|
||||
color: color-mod(var(--accent) blend(#999 90%));
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.tag,
|
||||
.token.punctuation {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: rgba(255, 255, 255, .3);
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
pre[data-line] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: color-mod(var(--accent) blend(#999 90%) a(8%));
|
||||
pointer-events: none;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.line-highlight:before,
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-start);
|
||||
position: absolute;
|
||||
/* top: .4em; */
|
||||
left: .6em;
|
||||
min-width: 1em;
|
||||
padding: 0 .5em;
|
||||
background-color: hsla(24, 20%, 50%, .4);
|
||||
color: hsl(24, 20%, 95%);
|
||||
font: bold 65%/1.5 sans-serif;
|
||||
text-align: center;
|
||||
vertical-align: .3em;
|
||||
border-radius: 999px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px white;
|
||||
}
|
||||
|
||||
.line-highlight[data-end]:after {
|
||||
content: attr(data-end);
|
||||
top: auto;
|
||||
bottom: .4em;
|
||||
}
|
||||
|
||||
.line-numbers .line-highlight:before,
|
||||
.line-numbers .line-highlight:after {
|
||||
content: none;
|
||||
}
|
9
assets/css/terms.css
Normal file
9
assets/css/terms.css
Normal file
@ -0,0 +1,9 @@
|
||||
.terms {
|
||||
h1 {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: initial;
|
||||
}
|
||||
}
|
18
assets/js/languageSelector.js
Normal file
18
assets/js/languageSelector.js
Normal file
@ -0,0 +1,18 @@
|
||||
const mobileQuery = getComputedStyle(document.body).getPropertyValue("--phoneWidth");
|
||||
const isMobile = () => window.matchMedia(mobileQuery).matches;
|
||||
|
||||
if(!isMobile()) {
|
||||
languageSelector = document.querySelector(".language-selector-current");
|
||||
moreLanguagesContainer = document.querySelector(".language-selector__more");
|
||||
|
||||
document.body.addEventListener("click", () => {
|
||||
if (moreLanguagesContainer && !moreLanguagesContainer.classList.contains("hidden")) {
|
||||
moreLanguagesContainer.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
languageSelector && languageSelector.addEventListener("click", e => {
|
||||
e.stopPropagation();
|
||||
moreLanguagesContainer.classList.toggle("hidden");
|
||||
});
|
||||
}
|
@ -6,7 +6,7 @@ const desktopMenuTrigger = document.querySelector(".menu__sub-inner-more-trigger
|
||||
const menuMore = document.querySelector(".menu__sub-inner-more");
|
||||
const mobileQuery = getComputedStyle(document.body).getPropertyValue("--phoneWidth");
|
||||
const isMobile = () => window.matchMedia(mobileQuery).matches;
|
||||
const isMobileMenu = () => {
|
||||
const handleMenuClasses = () => {
|
||||
mobileMenuTrigger && mobileMenuTrigger.classList.toggle("hidden", !isMobile());
|
||||
menu && menu.classList.toggle("hidden", isMobile());
|
||||
menuMore && menuMore.classList.toggle("hidden", !isMobile());
|
||||
@ -17,17 +17,17 @@ const isMobileMenu = () => {
|
||||
menu && menu.addEventListener("click", e => e.stopPropagation());
|
||||
menuMore && menuMore.addEventListener("click", e => e.stopPropagation());
|
||||
|
||||
isMobileMenu();
|
||||
handleMenuClasses();
|
||||
|
||||
document.body.addEventListener("click", () => {
|
||||
if (!isMobile() && !menuMore.classList.contains("hidden")) {
|
||||
if (!isMobile() && menuMore && !menuMore.classList.contains("hidden")) {
|
||||
menuMore.classList.add("hidden");
|
||||
} else if (isMobile() && !menu.classList.contains("hidden")) {
|
||||
menu.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener("resize", isMobileMenu);
|
||||
window.addEventListener("resize", handleMenuClasses);
|
||||
|
||||
// Mobile menu
|
||||
|
74
assets/js/prism.js
Normal file
74
assets/js/prism.js
Normal file
File diff suppressed because one or more lines are too long
18
babel.config.js
Normal file
18
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,
|
||||
};
|
||||
};
|
@ -7,6 +7,8 @@ paginate = 5
|
||||
contentTypeName = "post"
|
||||
themeColor = "orange"
|
||||
showMenuItems = 2
|
||||
fullWidthTheme = false
|
||||
centerTheme = false
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
|
@ -16,7 +16,7 @@ The theme includes:
|
||||
|
||||
- **5 duotone themes**, depending on your preferences (orange, red, blue, green, pink)
|
||||
- [**Fira Code**](https://github.com/tonsky/FiraCode) as default monospaced font. It's gorgeous!
|
||||
- **realy nice, custom duotone** syntax highlighting based on [**PrismJS**](https://prismjs.com)
|
||||
- **really nice, custom duotone** syntax highlighting based on [**PrismJS**](https://prismjs.com)
|
||||
- mobile friendly layout
|
||||
|
||||
So, there you have it... enjoy!
|
||||
|
10
layouts/404.html
Normal file
10
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 }}
|
@ -2,12 +2,15 @@
|
||||
<html lang="{{ $.Site.Language }}">
|
||||
<head>
|
||||
{{ block "title" . }}
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }}</title>
|
||||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="container">
|
||||
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}">
|
||||
{{ $container := cond $.Site.Params.FullWidthTheme "container full" (cond $.Site.Params.CenterTheme "container center" "container") }}
|
||||
|
||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="content">
|
||||
|
67
layouts/_default/index.html
Normal file
67
layouts/_default/index.html
Normal file
@ -0,0 +1,67 @@
|
||||
{{ 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 }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ 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 }}
|
||||
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content | markdownify }}
|
||||
{{ else if .Description }}
|
||||
{{ .Description | markdownify }}
|
||||
{{ else }}
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary | markdownify }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button"
|
||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
@ -1,41 +1,56 @@
|
||||
{{ define "main" }}
|
||||
{{ with .Content }}
|
||||
<div class="index-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" }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
{{ range .Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">:: {{ . }}</span>{{ 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" . )) | absURL }}">{{ . }}</a>
|
||||
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||
{{- . -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | absURL }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ with .Description }}
|
||||
{{ . | markdownify }}
|
||||
{{ if .Params.showFullContent }}
|
||||
{{ .Content | markdownify }}
|
||||
{{ else if .Description }}
|
||||
{{ .Description | markdownify }}
|
||||
{{ else }}
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary | markdownify }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a></div>
|
||||
|
||||
{{ if not .Params.showFullContent }}
|
||||
<div>
|
||||
<a class="read-more button"
|
||||
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
@ -1,53 +1,57 @@
|
||||
{{ define "main" }}
|
||||
<div class="post">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Params.Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ .Date.Format "2006-01-02" }} {{ if $.Site.Params.showLastUpdated }}[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]{{ end }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">:: {{ . }}</span>{{ end }}
|
||||
{{ 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" .)) | absURL }}">{{ . }}</a>
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="{{ . | absURL }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.Toc }}
|
||||
<div class="table-of-contents">
|
||||
<h2>
|
||||
{{ if .Params.TocTitle }}
|
||||
{{ .Params.TocTitle }}
|
||||
{{ else if $.Site.Params.TocTitle }}
|
||||
{{ $.Site.Params.TocTitle }}
|
||||
{{ else }}
|
||||
Table of Contents
|
||||
{{ end }}
|
||||
</h2>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<span class="button previous">
|
||||
<a href="{{ .NextInSection.Permalink }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
{{ partial "posts_pagination.html" . }}
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<span class="button next">
|
||||
<a href="{{ .PrevInSection.Permalink }}">
|
||||
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
17
layouts/_default/terms.html
Normal file
17
layouts/_default/terms.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{ define "main" }}
|
||||
<div class="terms">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<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
layouts/partials/comments.html
Normal file
8
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
|
||||
-->
|
4
layouts/partials/extended_footer.html
Normal file
4
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
layouts/partials/extended_head.html
Normal file
4
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.
|
||||
-->
|
@ -1,15 +1,24 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if $.Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div>
|
||||
<div class="copyright copyright--user">
|
||||
<span>{{ $.Site.Copyright | safeHTML }}</span>
|
||||
{{else}}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||
{{end}}
|
||||
<span>:: Theme made by <a href="https://twitter.com/panr">panr</a></span>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||
{{ $js := resources.Get "js/main.js" | js.Build }}
|
||||
{{ $js := resources.Get "js/prism.js" | js.Build }}
|
||||
{{ $opts := dict "noComments" true "minified" true "compact" true }}
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build | babel $opts }}
|
||||
{{ $prism := resources.Get "js/prism.js" | js.Build | babel $opts }}
|
||||
<script src="{{ $menu.Permalink }}"></script>
|
||||
<script src="{{ $prism.Permalink }}"></script>
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
|
@ -1,52 +1,78 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ $.Site.Params.keywords }}"/>
|
||||
<meta name="robots" content="noodp"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}">
|
||||
{{ if (ne $.Site.Params.ThemeColor "orange") }}
|
||||
<link rel="stylesheet" href="{{ (printf "assets/%s.css" $.Site.Params.ThemeColor) | absURL }}">
|
||||
{{ $css := resources.Get "css/style.css" }}
|
||||
{{ $opts := dict "inlineImports" true }}
|
||||
{{ $style := $css | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{ if (or (isset .Params "color") (ne $.Site.Params.ThemeColor "orange")) }}
|
||||
{{ $colorCss := resources.Get (printf "css/color/%s.css" (or .Params.color $.Site.Params.ThemeColor)) }}
|
||||
{{ $color := $colorCss | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $color.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
{{ if (fileExists "static/style.css") -}}
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}">
|
||||
{{ with $.Site.Params.ThemeColor }}
|
||||
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" . | absURL }}">
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
|
||||
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="twitter:site" content="{{ $.Site.BaseURL }}" />
|
||||
<meta name="twitter:creator" content="{{ .Params.Author }}" />
|
||||
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
|
||||
{{ 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 }}" />
|
||||
|
||||
<!-- 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 }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}">
|
||||
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.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="{{ .Title }}" />
|
||||
<meta property="og:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
|
||||
{{ if and (not .IsHome) (isset .Params "cover") }}
|
||||
<meta property="og:image" content="{{ .Param "cover" | absURL }}">
|
||||
{{ else }}
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta property="og:image:width" content="2048">
|
||||
<meta property="og:image:height" content="1024">
|
||||
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||
{{ if isset .Params "date" }}<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
|
||||
{{ range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ $.Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ if .OutputFormats.Get "json" }}
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ "feed.json" | absURL }}{{ end }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
|
||||
{{ with .OutputFormats.Get "json" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Extended head section-->
|
||||
{{ partial "extended_head.html" . }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}" style="text-decoration: none;">
|
||||
<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>
|
||||
|
@ -26,6 +26,20 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Site.Params.showLanguageSelector }}
|
||||
<div class="spacer"></div>
|
||||
<ul class="language-selector">
|
||||
<ul class="language-selector-current">
|
||||
<li>{{ .Language.LanguageName }} ▾</li>
|
||||
</ul>
|
||||
<ul class="language-selector__more hidden">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</ul>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<ul class="menu__inner menu__inner--mobile">
|
||||
@ -34,5 +48,13 @@
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $.Site.Params.showLanguageSelector }}
|
||||
<hr />
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
26
layouts/partials/posts_pagination.html
Normal file
26
layouts/partials/posts_pagination.html
Normal file
@ -0,0 +1,26 @@
|
||||
{{ 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 }}
|
||||
<span class="button previous">
|
||||
<a href="{{ .NextInSection.Permalink }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<span class="button next">
|
||||
<a href="{{ .PrevInSection.Permalink }}">
|
||||
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
15
layouts/shortcodes/code.html
Normal file
15
layouts/shortcodes/code.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
||||
|
||||
{{ if .Get "language" }}
|
||||
<div class="collapsable-code">
|
||||
<input id="{{ .Get "id" | default $id }}" type="checkbox" {{ if ( eq ( .Get "isCollapsed" ) "true" ) -}} checked {{- end }} />
|
||||
<label for="{{ .Get "id" | default $id }}">
|
||||
<span class="collapsable-code__language">{{ .Get "language" }}</span>
|
||||
{{ if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end }}
|
||||
<span class="collapsable-code__toggle" data-label-expand="{{ .Get "expand" | default "△" }}" data-label-collapse="{{ .Get "collapse" | default "▽" }}"></span>
|
||||
</label>
|
||||
<pre {{ if .Get "language" }}class="language-{{ .Get "language" }}" {{ end }}><code>{{ .Inner | string }}</code></pre>
|
||||
</div>
|
||||
{{ 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 }}
|
25
layouts/shortcodes/prismjs.html
Normal file
25
layouts/shortcodes/prismjs.html
Normal file
@ -0,0 +1,25 @@
|
||||
{{ $inner := replaceRE "^\n" "" .Inner | string }}
|
||||
{{ if len .Params | eq 0 }}
|
||||
<pre><code>{{ $inner }}</code></pre>
|
||||
{{ else }}
|
||||
{{ if .IsNamedParams }}
|
||||
<pre class="
|
||||
{{- if .Get "lang" }}language-{{ .Get "lang" }}{{ end }}
|
||||
{{- if .Get "line-numbers" }} line-numbers{{ end }}
|
||||
{{- if .Get "command-line" }} command-line{{ end }}"
|
||||
{{- /* line highlight plugin */ -}}
|
||||
{{- if .Get "line" }} data-line="{{ .Get "line" }}"{{ end }}
|
||||
{{- /* line number plugin */ -}}
|
||||
{{- if .Get "start" }} data-start="{{ .Get "start" }}"{{ end }}
|
||||
{{- /* command-line plugin */ -}}
|
||||
{{- if .Get "user" }} data-user="{{ .Get "user" }}"{{ end }}
|
||||
{{- if .Get "host" }} data-host="{{ .Get "host" }}"{{ end }}
|
||||
{{- if .Get "prompt" }} data-prompt="{{ .Get "prompt" }}"{{ end }}
|
||||
{{- if .Get "output" }} data-output="{{ .Get "output" }}"{{ end }}
|
||||
><code {{ if .Get "lang" }}class="language-{{ .Get "lang" }}"{{ end }}
|
||||
>{{ $inner }}</code></pre>
|
||||
{{ else }}
|
||||
<pre class="language-{{ .Get 0 }}">
|
||||
<code class="language-{{ .Get 0 }}">{{ $inner }}</code></pre>
|
||||
{{ end }}
|
||||
{{ end }}
|
44
package.json
44
package.json
@ -1,55 +1,37 @@
|
||||
{
|
||||
"name": "terminal",
|
||||
"version": "1.0.0",
|
||||
"version": "2.0.0",
|
||||
"main": "index.js",
|
||||
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "webpack --mode=development --watch",
|
||||
"build": "webpack --mode=production"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
">1%",
|
||||
"not dead"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/cli": "^7.10.5",
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/parser": "^7.4.2",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/preset-stage-2": "^7.0.0",
|
||||
"babel-eslint": "^8.2.1",
|
||||
"babel-loader": "^8.0.5",
|
||||
"browserslist": "^4.0.1",
|
||||
"clean-webpack-plugin": "^0.1.19",
|
||||
"clipboard": "^2.0.4",
|
||||
"css-loader": "^1.0.1",
|
||||
"cssnano": "^4.1.8",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-prettier": "^2.10.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"file-loader": "^1.1.11",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"postcss": "^7.0.0",
|
||||
"postcss-browser-reporter": "^0.5.0",
|
||||
"postcss-cli": "^6.1.1",
|
||||
"postcss-color-function": "^4.0.1",
|
||||
"postcss-cli": "^7.1.1",
|
||||
"postcss-color-mod-function": "^3.0.3",
|
||||
"postcss-import": "^11.1.0",
|
||||
"postcss-loader": "^2.1.6",
|
||||
"postcss-mixins": "^6.2.1",
|
||||
"postcss-nested": "^3.0.0",
|
||||
"postcss-preset-env": "^5.3.0",
|
||||
"postcss-reporter": "^5.0.0",
|
||||
"postcss-url": "^7.3.2",
|
||||
"prettier-eslint-cli": "^4.7.1",
|
||||
"ramda": "^0.25.0",
|
||||
"style-loader": "^0.21.0",
|
||||
"uglifyjs-webpack-plugin": "^1.3.0",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.29.3",
|
||||
"webpack-cli": "^3.2.3"
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-mixins": "^6.2.3",
|
||||
"postcss-nested": "^4.2.3",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"postcss-reporter": "^6.0.1",
|
||||
"postcss-url": "^8.0.0",
|
||||
"prettier-eslint-cli": "^4.7.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
@import 'variables';
|
||||
|
||||
@import 'font';
|
||||
@import 'buttons';
|
||||
|
||||
@import 'header';
|
||||
@import 'logo';
|
||||
@import 'main';
|
||||
@import 'post';
|
||||
@import 'pagination';
|
||||
@import 'footer';
|
||||
|
||||
@import 'prism';
|
||||
@import 'syntax';
|
@ -1,53 +0,0 @@
|
||||
code.language-css,
|
||||
code.language-scss,
|
||||
.token.boolean,
|
||||
.token.string,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.language-scss .token.string,
|
||||
.style .token.string,
|
||||
.token.attr-value,
|
||||
.token.keyword,
|
||||
.token.control,
|
||||
.token.directive,
|
||||
.token.statement,
|
||||
.token.regex,
|
||||
.token.atrule,
|
||||
.token.number {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.token.tag-id,
|
||||
.token.atrule-id,
|
||||
.token.operator,
|
||||
.token.unit,
|
||||
.token.placeholder,
|
||||
.token.variable,
|
||||
.token.attr-name {
|
||||
color: color-mod(var(--accent) a(70%));
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.function,
|
||||
code.language-javascript,
|
||||
code.language-html {
|
||||
color: color-mod(var(--accent) blend(#999 90%));
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.tag,
|
||||
.token.punctuation {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: rgba(255, 255, 255, .3);
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=document.querySelector(".container"),o=document.querySelector(".menu"),i=document.querySelector(".menu-trigger"),u=(document.querySelector(".menu__inner--desktop"),document.querySelector(".menu__sub-inner-more-trigger")),c=document.querySelector(".menu__sub-inner-more"),d=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),s=function(){return window.matchMedia(d).matches},l=function(){i&&i.classList.toggle("hidden",!s()),o&&o.classList.toggle("hidden",s()),c&&c.classList.toggle("hidden",!s())};o&&o.addEventListener("click",function(e){return e.stopPropagation()}),c&&c.addEventListener("click",function(e){return e.stopPropagation()}),l(),document.body.addEventListener("click",function(){s()||c.classList.contains("hidden")?s()&&!o.classList.contains("hidden")&&o.classList.add("hidden"):c.classList.add("hidden")}),window.addEventListener("resize",l),i&&i.addEventListener("click",function(e){e.stopPropagation(),o&&o.classList.toggle("hidden")}),u&&u.addEventListener("click",function(e){e.stopPropagation(),c&&c.classList.toggle("hidden"),c.getBoundingClientRect().right>r.getBoundingClientRect().right&&(c.style.left="auto",c.style.right=0)})}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ description = "A simple, retro theme for Hugo."
|
||||
homepage = "https://github.com/panr/hugo-theme-terminal/"
|
||||
tags = ["blog", "clean", "customizable", "dark", "highlighting", "minimal", "monotone", "multilingual", "personal", "responsive", "simple", "technical", "retro"]
|
||||
features = ["blog", "shortcode", "syntax highlighting"]
|
||||
min_version = 0.30
|
||||
min_version = 0.57
|
||||
|
||||
[author]
|
||||
name = "panr"
|
||||
|
@ -14,7 +14,11 @@ module.exports = {
|
||||
modules: ["source", "node_modules"],
|
||||
},
|
||||
entry: {
|
||||
"main.js": [join("source", "js", "main.js"), join("source", "js", "menu.js")],
|
||||
"main.js": [
|
||||
join("source", "js", "main.js"),
|
||||
join("source", "js", "menu.js"),
|
||||
join("source", "js", "languageSelector.js")
|
||||
],
|
||||
"prism.js": join("source", "js", "prism.js"),
|
||||
"style.css": join("source", "css", "style.css"),
|
||||
"red.css": join("source", "css", "color", "red.css"),
|
||||
|
Reference in New Issue
Block a user