Compare commits
364 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
34ce1500ec | ||
![]() |
d9d893ff0e | ||
![]() |
2ecdda62ef | ||
![]() |
fa808517f2 | ||
![]() |
df780f1256 | ||
![]() |
7f39a46444 | ||
![]() |
8e5ef7b6d0 | ||
![]() |
16775f2fb5 | ||
![]() |
011734fc83 | ||
![]() |
dccdef9d77 | ||
![]() |
5adf3db0f1 | ||
![]() |
14da438553 | ||
![]() |
0e757204b0 | ||
![]() |
6e9829feeb | ||
![]() |
e8b9b478ed | ||
![]() |
ef78736003 | ||
![]() |
6fece0ab15 | ||
![]() |
803d667fcd | ||
![]() |
e6504a8bd7 | ||
![]() |
074b49d296 | ||
![]() |
4988517bcd | ||
![]() |
e0e014eaff | ||
![]() |
4e534dd5a1 | ||
![]() |
98ec613bd8 | ||
![]() |
e6685730d3 | ||
![]() |
b5cff7a503 | ||
![]() |
15b173ead8 | ||
![]() |
de5d80ad37 | ||
![]() |
c5b71eddba | ||
![]() |
b5b8d2931a | ||
![]() |
a76c819912 | ||
![]() |
c833622a64 | ||
![]() |
9642203bea | ||
![]() |
c7bf511567 | ||
![]() |
84bd33a038 | ||
![]() |
a9a3e1a8f4 | ||
![]() |
3e62106bc9 | ||
![]() |
5d778ddcfc | ||
![]() |
c8dcbbf027 | ||
![]() |
a91bfdc1a5 | ||
![]() |
4db9c50f41 | ||
![]() |
2861dc8fb3 | ||
![]() |
89fb283d4c | ||
![]() |
1c66842e67 | ||
![]() |
249a41befd | ||
![]() |
432303d6df | ||
![]() |
2357702601 | ||
![]() |
c04fdb34e0 | ||
![]() |
1b4905cc03 | ||
![]() |
60109622e9 | ||
![]() |
d863b57792 | ||
![]() |
44c977c9fa | ||
![]() |
8c2303431d | ||
![]() |
ccbc6e1aa2 | ||
![]() |
a5782cca4e | ||
![]() |
5fa8e2fb05 | ||
![]() |
48d9246368 | ||
![]() |
6f42c9ba30 | ||
![]() |
02105f748b | ||
![]() |
ec7bdec6ac | ||
![]() |
8741141c9f | ||
![]() |
2c2588d1c6 | ||
![]() |
8540a1ee0e | ||
![]() |
881c972d56 | ||
![]() |
5fbdfbc9bf | ||
![]() |
f2190ca758 | ||
![]() |
d82855b227 | ||
![]() |
3c32c8648a | ||
![]() |
7ce166690f | ||
![]() |
c9cc01c603 | ||
![]() |
83c6d7a5e6 | ||
![]() |
785e09c45d | ||
![]() |
2e9d54fb77 | ||
![]() |
4c9276c71d | ||
![]() |
c9e482ffe3 | ||
![]() |
a121f15d9b | ||
![]() |
ea9fa9c43d | ||
![]() |
f566a7b101 | ||
![]() |
ca2c51710a | ||
![]() |
de73b74c4b | ||
![]() |
cab65cfcf3 | ||
![]() |
2382c7531b | ||
![]() |
46a294805b | ||
![]() |
2a2122f81c | ||
![]() |
246ec48738 | ||
![]() |
124f3464ac | ||
![]() |
75f212bf2d | ||
![]() |
12cdcc58ad | ||
![]() |
0be313316f | ||
![]() |
71fe8a8c39 | ||
![]() |
005e78d86c | ||
![]() |
9c13d2a216 | ||
![]() |
0ec84e0005 | ||
![]() |
e79acb96e0 | ||
![]() |
e58ccef1f2 | ||
![]() |
fe75305436 | ||
![]() |
68cabcbb44 | ||
![]() |
69b41ab230 | ||
![]() |
89662e440d | ||
![]() |
efb93ebda6 | ||
![]() |
a25b208daa | ||
![]() |
4c4eb24f15 | ||
![]() |
961b323fec | ||
![]() |
ced6be1505 | ||
![]() |
c08fe10125 | ||
![]() |
d4d477e3b6 | ||
![]() |
e34720eb12 | ||
![]() |
149fb37220 | ||
![]() |
409741f42c | ||
![]() |
d5b7eefa20 | ||
![]() |
1524ba90ff | ||
![]() |
0d80e241f7 | ||
![]() |
125d85cfbb | ||
![]() |
746a015088 | ||
![]() |
b8e2f47429 | ||
![]() |
8f7ced3470 | ||
![]() |
670dc85b07 | ||
![]() |
d72593b1b1 | ||
![]() |
ee2a55ad0b | ||
![]() |
6c1dc81be4 | ||
![]() |
479935e602 | ||
![]() |
ecf77d7031 | ||
![]() |
0aad509a70 | ||
![]() |
b1305f42fa | ||
![]() |
005e9fca71 | ||
![]() |
5fa9d1589f | ||
![]() |
4083e16784 | ||
![]() |
8b08502c29 | ||
![]() |
c046067538 | ||
![]() |
6ce7aed131 | ||
![]() |
f7e0d53340 | ||
![]() |
82db432dbc | ||
![]() |
f35a6c88a1 | ||
![]() |
b4504b35b2 | ||
![]() |
2be3c241d5 | ||
![]() |
c964eb8ea7 | ||
![]() |
05c034a966 | ||
![]() |
043852e387 | ||
![]() |
f62c476876 | ||
![]() |
9cce3e783e | ||
![]() |
2583a1c4bf | ||
![]() |
b52428a2cf | ||
![]() |
cf5e597491 | ||
![]() |
f45b762566 | ||
![]() |
5cf4ca6c2d | ||
![]() |
251e3c8eda | ||
![]() |
4086baba28 | ||
![]() |
dab37f7e53 | ||
![]() |
f9e72c9d4c | ||
![]() |
fa979be419 | ||
![]() |
4be09e7180 | ||
![]() |
9b5783aa11 | ||
![]() |
1717d887b6 | ||
![]() |
9598012a77 | ||
![]() |
184a74ceb2 | ||
![]() |
b61855c3e8 | ||
![]() |
b7a187917b | ||
![]() |
7a69ffcdf8 | ||
![]() |
853c16dac3 | ||
![]() |
a50ce744bd | ||
![]() |
9ace883447 | ||
![]() |
ca1dde6a92 | ||
![]() |
6029625356 | ||
![]() |
51d17bbce6 | ||
![]() |
4c0832e2df | ||
![]() |
42fc5564ca | ||
![]() |
9cea1423cf | ||
![]() |
5b4c773554 | ||
![]() |
28b6f11618 | ||
![]() |
d9ade4410a | ||
![]() |
91ca408bdd | ||
![]() |
95906d6405 | ||
![]() |
b3f87e60ce | ||
![]() |
ef213c620d | ||
![]() |
285e9e879a | ||
![]() |
779d78a810 | ||
![]() |
4fce64d2b5 | ||
![]() |
211e002ab6 | ||
![]() |
3b9ad17e22 | ||
![]() |
3b3903afd3 | ||
![]() |
59634fd0d3 | ||
![]() |
b56e0d5640 | ||
![]() |
cbbacd5b5e | ||
![]() |
0a4824c145 | ||
![]() |
559766c143 | ||
![]() |
c19a664063 | ||
![]() |
723aed210d | ||
![]() |
4cfe93ec29 | ||
![]() |
dfbb8dab18 | ||
![]() |
348fcf849c | ||
![]() |
fb3a5f08db | ||
![]() |
73b4c48dcc | ||
![]() |
d12d24411e | ||
![]() |
1dd80e76b5 | ||
![]() |
45740f99c1 | ||
![]() |
a8037bfbe8 | ||
![]() |
8759dd6b38 | ||
![]() |
0713ca3910 | ||
![]() |
ca2e314c6e | ||
![]() |
19482cc3d9 | ||
![]() |
edf40ac5db | ||
![]() |
e5ff39d0de | ||
![]() |
b03f844e1c | ||
![]() |
588036687e | ||
![]() |
654bee2f24 | ||
![]() |
96f355cb9a | ||
![]() |
6924c1ce4a | ||
![]() |
0c75155aac | ||
![]() |
945ff66e80 | ||
![]() |
03d4390fa9 | ||
![]() |
d85cdb04b3 | ||
![]() |
55b907163d | ||
![]() |
bc27213999 | ||
![]() |
47cf967ba8 | ||
![]() |
40b5b2b887 | ||
![]() |
819b0dc373 | ||
![]() |
7427cfa3b4 | ||
![]() |
840dbe0dc4 | ||
![]() |
715c7e5c5a | ||
![]() |
fa853b1c68 | ||
![]() |
e23decb32a | ||
![]() |
221bd8cc96 | ||
![]() |
88b0b179a0 | ||
![]() |
5c33ea94d9 | ||
![]() |
e96a627082 | ||
![]() |
6dd879a781 | ||
![]() |
d633533752 | ||
![]() |
286af113f0 | ||
![]() |
f0064cbc70 | ||
![]() |
f83581dfb9 | ||
![]() |
5f61f576b9 | ||
![]() |
a42348d2cf | ||
![]() |
3ce5930fb0 | ||
![]() |
8c9ecd8268 | ||
![]() |
d199520f88 | ||
![]() |
23233fd39b | ||
![]() |
025069ab90 | ||
![]() |
2f1f2d3f23 | ||
![]() |
f8f2c3492b | ||
![]() |
864ec100d5 | ||
![]() |
7950dc9c4a | ||
![]() |
8af25b8493 | ||
![]() |
a6910271e6 | ||
![]() |
4a1b70019b | ||
![]() |
3eb56a3ce0 | ||
![]() |
37fa3de4e3 | ||
![]() |
82073aa51b | ||
![]() |
6378c52822 | ||
![]() |
df46099968 | ||
![]() |
aec82d2a96 | ||
![]() |
e689746014 | ||
![]() |
da04d638f9 | ||
![]() |
23249f1d6d | ||
![]() |
c46c903fd1 | ||
![]() |
0e3ddeee54 | ||
![]() |
1590dac974 | ||
![]() |
7d0c88abd5 | ||
![]() |
9940c34fba | ||
![]() |
e0c1777296 | ||
![]() |
b25bff002f | ||
![]() |
bad287c4be | ||
![]() |
e6e72ae4a9 | ||
![]() |
b0de125a1a | ||
![]() |
b1ad8e92ea | ||
![]() |
2eed6cf192 | ||
![]() |
71907ce12d | ||
![]() |
73cae8888e | ||
![]() |
5a7c7bf0a3 | ||
![]() |
a9bdc4def1 | ||
![]() |
fa532c6bfb | ||
![]() |
1306fcbcaf | ||
![]() |
017f61b323 | ||
![]() |
d38b1d9e97 | ||
![]() |
c8c495d003 | ||
![]() |
af6f549dd9 | ||
![]() |
e03d210eb9 | ||
![]() |
915a0acadf | ||
![]() |
e9aae285a6 | ||
![]() |
7bf862d9d3 | ||
![]() |
eefc6368dc | ||
![]() |
608fe3bbe9 | ||
![]() |
fdd6736e1d | ||
![]() |
0c812c9fa1 | ||
![]() |
2acd964d45 | ||
![]() |
1cfec04653 | ||
![]() |
ab1714b799 | ||
![]() |
d7b27c55c2 | ||
![]() |
740dfa22ab | ||
![]() |
be730d5c28 | ||
![]() |
f7e16f680f | ||
![]() |
ca807c2ad6 | ||
![]() |
f234269325 | ||
![]() |
ace5be049f | ||
![]() |
32ea5dc5cf | ||
![]() |
7d484b27a2 | ||
![]() |
abdf01a5c9 | ||
![]() |
e1b01b9b24 | ||
![]() |
e2039dc8e1 | ||
![]() |
b295b14830 | ||
![]() |
32409a7012 | ||
![]() |
8d86361f8c | ||
![]() |
1cf1b67856 | ||
![]() |
25ec8673b2 | ||
![]() |
a0d73cd693 | ||
![]() |
d2c8066861 | ||
![]() |
ff891dad96 | ||
![]() |
0162c21fb3 | ||
![]() |
20599a8119 | ||
![]() |
ab9bb3b3fb | ||
![]() |
8402237a8d | ||
![]() |
ebceb6857c | ||
![]() |
d398ce4163 | ||
![]() |
c88ad052ac | ||
![]() |
2f7bdc728c | ||
![]() |
08f0f2fb0a | ||
![]() |
15dbbc51ee | ||
![]() |
a98590b0ba | ||
![]() |
f5a9f16a98 | ||
![]() |
9de4dfd60e | ||
![]() |
018f087a1f | ||
![]() |
1f6bc9afc3 | ||
![]() |
18cb6103bb | ||
![]() |
80b1f0ddeb | ||
![]() |
d9db5c5b8e | ||
![]() |
7794814b45 | ||
![]() |
f48f16c850 | ||
![]() |
c8e49f331f | ||
![]() |
bf0f5f5bce | ||
![]() |
6be1e1f8b1 | ||
![]() |
bb6fdc2493 | ||
![]() |
72e85173cf | ||
![]() |
5cfc6e4f29 | ||
![]() |
b0dfb769d1 | ||
![]() |
27a013b809 | ||
![]() |
e0787f1e1d | ||
![]() |
62709b7219 | ||
![]() |
fbeb2cdb8d | ||
![]() |
8a8961d965 | ||
![]() |
2f3956252a | ||
![]() |
6768efe286 | ||
![]() |
4a173c6320 | ||
![]() |
2ff92d6fdf | ||
![]() |
563972fe5f | ||
![]() |
4e00c93b25 | ||
![]() |
0be2ed1438 | ||
![]() |
9532cb8285 | ||
![]() |
1974d30be0 | ||
![]() |
aa1abb8fcd | ||
![]() |
4845a3db96 | ||
![]() |
0a4730452c | ||
![]() |
7a9b33a9b1 | ||
![]() |
e0238c2510 | ||
![]() |
afea4aa256 | ||
![]() |
ac82c83a64 | ||
![]() |
781a8f21d6 | ||
![]() |
1f96e0f3d9 | ||
![]() |
6a65821ab8 | ||
![]() |
12684791f8 | ||
![]() |
839f1ded1c | ||
![]() |
37e6fba1bd | ||
![]() |
c974919076 | ||
![]() |
f9f276852e | ||
![]() |
3864783204 | ||
![]() |
327234163d |
|
@ -44,12 +44,6 @@ rules:
|
|||
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
|
||||
|
|
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
public
|
||||
|
|
1
.husky/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
_
|
4
.husky/pre-push
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn build && git add . && git commit --amend --no-edit
|
10
.prettierrc
|
@ -1,5 +1,11 @@
|
|||
{
|
||||
"parser": "babylon",
|
||||
"parser": "babel",
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all"
|
||||
"trailingComma": "all",
|
||||
"overrides": [{
|
||||
"files": ["*.html"],
|
||||
"options": {
|
||||
"parser": "go-template"
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
|
17
COMMUNITY-FEATURES.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 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.
|
||||
-->
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 panr
|
||||
Copyright (c) 2019 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
|
||||
|
|
307
README.md
|
@ -2,98 +2,295 @@
|
|||
|
||||

|
||||
|
||||
This theme was made 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.
|
||||
### DEMO - https://hugo-hello-friend.now.sh/ <a id="demo" />
|
||||
|
||||
This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
|
||||
<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>
|
||||
|
||||
---
|
||||
|
||||
- [Hello Friend](#hello-friend)
|
||||
- [DEMO - https://hugo-hello-friend.now.sh/](#demo)
|
||||
- [Features](#features)
|
||||
- [Built-in shortcodes](#built-in-shortcodes)
|
||||
- [Code highlighting](#code-highlighting)
|
||||
- [Improved RSS Feed](#improved-rss-feed)
|
||||
- [How to start](#how-to-start)
|
||||
- [How to run your site](#how-to-run-your-site)
|
||||
- [How to configure](#how-to-configure)
|
||||
- [How to add a cover image to your posts](#how-to-add-a-cover-image-to-your-posts)
|
||||
- [How to display the Last Modified Date in your posts](#how-to-display-the-last-modified-date-in-your-posts)
|
||||
- [How to hide "Read more" button](#how-to-hide-read-more-button)
|
||||
- [Add-ons](#add-ons)
|
||||
- [How to (safely) edit the theme](#how-to-edit)
|
||||
- [Found a bug?](#bug)
|
||||
- [New cool idea or feature](#feature)
|
||||
- [`Hello Friend` theme user?](#hello-friend-theme-user)
|
||||
- [Sponsoring](#sponsoring)
|
||||
- [License](#license)
|
||||
|
||||
## Features
|
||||
|
||||
- **light/dark mode**, depending on your preferences
|
||||
- great reading experience thanks to [**Inter UI font**](https://rsms.me/inter/), made by [Rasmus Andersson](https://rsms.me/about/)
|
||||
- **dark/light mode**, depending on your preferences (dark is default, but you can change it)
|
||||
- great reading experience thanks to [**Inter font**](https://rsms.me/inter/), made by [Rasmus Andersson](https://rsms.me/about/)
|
||||
- nice code highlighting thanks to [**PrismJS**](https://prismjs.com)
|
||||
- an easy way to modify the theme (**Webpack, NodeJS, PostCSS** — initial setup created by [Marcin Dziewulski](http://www.mobily.pl))
|
||||
- fully responsive
|
||||
|
||||
#### Built-in shortcodes
|
||||
|
||||
- **`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`**
|
||||
- eg: `{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}`
|
||||
- **`imgproc`** Hugo shortcode for image processing, plus additional **`position`** param [ left | center | right ] (optional).
|
||||
- eg: `{{< imgproc "img/hello.png" Resize "250x" center />}}`
|
||||
- More detailed info on processing commands at [https://gohugo.io/content-management/image-processing/](https://gohugo.io/content-management/image-processing/)
|
||||
- **`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
|
||||
|
||||
By default the theme is using PrismJS to color your code syntax. 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.
|
||||
|
||||
#### Improved RSS Feed
|
||||
|
||||
Some enhancements have been made to Hugo's [internal RSS](https://github.com/gohugoio/hugo/blob/25a6b33693992e8c6d9c35bc1e781ce3e2bca4be/tpl/tplimpl/embedded/templates/_default/rss.xml) generation code.
|
||||
|
||||
**A page's cover image now appears at the top of its feed display**. This image is set manually using [the cover params](#how-to-add-a-cover-image-to-your-posts). If unset, the RSS generator searches for the first image file in the page bundle whose name includes 'featured', 'cover', or 'thumbnail'.
|
||||
|
||||
**You can optionally display the full page content in your RSS feed** (default is Description or Summary data from Front Matter). Set `rssFullText = true` in your `config.toml` file to enable this option.
|
||||
|
||||
**You can choose a site image to be displayed when searching for your RSS feed.** Set `rssImage = "image/url/here"` in your `config.toml` file to enable this option.
|
||||
|
||||
## How to start
|
||||
|
||||
You can download the theme manually by going to [https://github.com/panr/hugo-theme-hello-friend.git](https://github.com/panr/hugo-theme-hello-friend.git) and pasting it to `themes/hello-friend` in your root directory.
|
||||
|
||||
You can also clone it directly to your Hugo folder:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend
|
||||
```bash
|
||||
git clone https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend
|
||||
```
|
||||
|
||||
If you don't want to make any radical changes, it's the best option, because you can get new updates when they are available. To do so, include it as a git submodule:
|
||||
|
||||
```
|
||||
$ git submodule add https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend
|
||||
```bash
|
||||
git submodule add -f https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend
|
||||
```
|
||||
|
||||
## How to configure
|
||||
|
||||
The theme doesn't require any advanced configuration. Just copy:
|
||||
|
||||
```
|
||||
baseUrl = "https://example.com/"
|
||||
languageCode = "en-us"
|
||||
title = "Your site title"
|
||||
theme = "hello-friend"
|
||||
copyright = ""
|
||||
paginate = 5
|
||||
|
||||
[params]
|
||||
subtitle = "Your site subtitle"
|
||||
|
||||
# [params.logo]
|
||||
# path = "/img/your-example-logo.svg"
|
||||
# alt = "Your example logo alt text"
|
||||
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
[[menu.main]]
|
||||
identifier = "contact"
|
||||
name = "Contact"
|
||||
url = "/contact"
|
||||
```
|
||||
|
||||
to `config.toml` file in your Hugo root directory and change params fields.
|
||||
⚠️ **The theme needs at least Hugo version 0.74.x**.
|
||||
|
||||
## How to run your site
|
||||
|
||||
From your Hugo root directory run:
|
||||
|
||||
```
|
||||
$ hugo server -t hello-friend
|
||||
hugo server -t hello-friend
|
||||
```
|
||||
|
||||
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 edit the theme
|
||||
## How to configure
|
||||
|
||||
If you really want to edit the theme, you need to install Node dependencies. To do this, go to the theme directory (from your Hugo root directory):
|
||||
The theme doesn't require any advanced configuration. Just copy:
|
||||
|
||||
```
|
||||
$ cd themes/hello-friend
|
||||
```toml
|
||||
baseurl = "/"
|
||||
languageCode = "en-us"
|
||||
theme = "hello-friend"
|
||||
paginate = 5
|
||||
|
||||
[params]
|
||||
# dir name of your blog content (default is `content/posts`).
|
||||
# the list of set content will show up on your index page (baseurl).
|
||||
contentTypeName = "posts"
|
||||
|
||||
# "light" or "dark"
|
||||
defaultTheme = "dark"
|
||||
|
||||
# if you set this to 0, only submenu trigger will be visible
|
||||
showMenuItems = 2
|
||||
|
||||
# Show reading time in minutes for posts
|
||||
showReadingTime = false
|
||||
|
||||
# Show table of contents at the top of your posts (defaults to false)
|
||||
# Alternatively, add this param to post front matter for specific posts
|
||||
# toc = true
|
||||
|
||||
# Show full page content in RSS feed items
|
||||
#(default is Description or Summary metadata in the front matter)
|
||||
# rssFullText = true
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
title = "Hello Friend"
|
||||
subtitle = "A simple theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
writtenBy = "Written by"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
minuteReadingTime = "min read"
|
||||
dateFormatSingle = "2006-01-02"
|
||||
dateFormatList = "2006-01-02"
|
||||
# leave empty to disable, enter display text to enable
|
||||
# lastModDisplay = ""
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
logoHomeLink = "/"
|
||||
# or
|
||||
#
|
||||
# path = "/img/your-example-logo.svg"
|
||||
# alt = "Your example logo alt text"
|
||||
|
||||
[languages.en.menu]
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "showcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
```
|
||||
|
||||
and then run:
|
||||
to `config.toml` file in your Hugo root directory and change params fields. In case you need, here's [a YAML version](https://gist.github.com/panr/8f9b363e358aaa33f6d353c77feee959).
|
||||
|
||||
```
|
||||
$ npm install
|
||||
$ npm i yarn
|
||||
$ yarn
|
||||
**NOTE:** Please keep in mind that currently main menu doesn't support nesting.
|
||||
|
||||
## How to add a cover image to your posts
|
||||
|
||||
Adding a cover image to your post is simple and there are two options when you edit your `index.md` file in `content/posts/blog-entry-xy/index.md`:
|
||||
|
||||
* Use `cover = "/path/to/absolute/img.jpg"` to link an absolute image
|
||||
* Resulting in `https://www.yourpage.com/path/to/absolute/img.jpg`
|
||||
* Use `cover = "img.jpg"` and `useRelativeCover = true` to link the image relative to the blog post folder
|
||||
* Resulting in `https://www.yourpage.com/posts/blog-entry-xy/img.jpg`
|
||||
* Use `coverAlt = "description of image"` to add custom alt text to the cover image (defaults to post or page title as alt text)
|
||||
* Use `coverCaption = "Image Credit to [Barry Bluejeans](https://unsplash.com/)"` to add a caption for the cover image.
|
||||
|
||||
## How to display the Last Modified Date in your posts
|
||||
|
||||
Add `lastModDisplay = "[your display text]"` to `config.toml` to enable last modified date on your posts. Note - an empty string value `""` does not display anything.
|
||||
|
||||
Example: `lastModDisplay = "Modified:"` --> "Modified: Jan 01, 0001"
|
||||
|
||||
:octocat: Hugo's `enableGitInfo` option is a nice complement to this feature.
|
||||
|
||||
## How to hide "Read more" button
|
||||
|
||||
In a post's front matter you have to add `hideReadMore` param set to `true`. This will result in that the post won't have "Read more" button in the list view.
|
||||
|
||||
## Add-ons
|
||||
|
||||
- **Archive** — Theme has built-in `archive` page for main content (see `contentTypeName` variable in config). If you need archive on your blog just copy https://github.com/panr/hugo-theme-hello-friend/blob/master/exampleSite/content/archive.md to your `content` dir. If you need multilangual archives, duplicate `content/archive.md` and add `.Lang` variable, eg: `content/archive.pl.md` (remember to change `url` in duplicated file).
|
||||
- **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.
|
||||
- **Prepended `<head>`** — if you need to add something inside `<head>` element, and before any of the theme's `<script>` and `<link>` tags are declared, please take a look at `layouts/partial/prepended_head.html` https://github.com/panr/hugo-theme-hello-friend/blob/master/layouts/partials/prepended_head.html
|
||||
- **Extended `<head>`** — if you need to add something inside `<head>` element, after all of all of the theme's `<script>` and `<link>` tags are declared, please take a look at `layouts/partial/extended_head.html` https://github.com/panr/hugo-theme-hello-friend/blob/master/layouts/partials/extended_head.html
|
||||
- **Extended `<footer>`** — if you need to add something before end of `<body>` element, please take a look at `layouts/partial/extended_footer.html` https://github.com/panr/hugo-theme-hello-friend/blob/master/layouts/partials/extended_footer.html
|
||||
|
||||
## How to (safely) edit the theme <a id="how-to-edit" />
|
||||
|
||||
If 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.
|
||||
|
||||
To change something directly in the theme, you have to go to `themes/hello-friend` and modify the files.
|
||||
|
||||
First, you need to install Node dependencies. To do so, go to the theme directory (from your Hugo root directory):
|
||||
|
||||
```bash
|
||||
cd themes/hello-friend
|
||||
```
|
||||
|
||||
## How to contribute
|
||||
then run:
|
||||
|
||||
If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-hello-friend/issues) or if you want to add a new feature directly please create a new [Pull Request](https://github.com/panr/hugo-theme-hello-friend/pulls).
|
||||
```bash
|
||||
npm install
|
||||
npm i yarn
|
||||
yarn
|
||||
```
|
||||
|
||||
## Licence
|
||||
After you modified the files you can run webpack in watch mode:
|
||||
|
||||
Copyright © 2018 Radosław Kozieł ([@panr](https://twitter.com/panr))
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-hello-friend.git/blob/master/LICENSE.md) for additional licensing information.
|
||||
or rebuild theme
|
||||
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
|
||||
To see the changes (remember to restart `hugo server`).
|
||||
|
||||
## Found a bug? <a id="bug" />
|
||||
|
||||
If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-hello-friend/issues) or create a new [Pull Request](https://github.com/panr/hugo-theme-hello-friend/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! 🤘
|
||||
|
||||
## `Hello Friend` 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-hello-friend/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-hello-friend/blob/master/LICENSE.md) for additional licensing information.
|
||||
|
|
44
USERS.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Meet the users of Hello Friend theme!
|
||||
|
||||
<!--
|
||||
TEMPLATE:
|
||||
|
||||
- https://radoslawkoziel.pl — **Radek Kozieł** (Software designer and developer)
|
||||
|
||||
-->
|
||||
|
||||
- https://0x44.pw — **Ian Pringle** (System Admin and developer)
|
||||
- https://adamormsby.com - **Adam Ormsby** (Generalist Programmer - Web, Mobile, Games)
|
||||
- https://arubacao.com **Christopher Lass** (Software Engineer and DevOps)
|
||||
- https://blog.agate.pw/ - **Marco Agate** (System Engineer, DevOps)
|
||||
- https://blog.agung.io - **Agung Pratama** (Software Engineer and DevOps)
|
||||
- https://blog.jyny.dev/ - **Jyny Chen** (Software Engineer)
|
||||
- https://blog.lepape.me/ - **François Le Pape** (Student & developer freelance)
|
||||
- https://blog.toluwalemi.com/ - **Toluwalemi Oluwadare** (Software Engineer and Content Writer)
|
||||
- https://cobalto.net/ - **Daniel Pessoa** (Sofware Developer and BI Analyst)
|
||||
- https://eallion.com/ - **大大的小蜗牛** (E-commerce operator)
|
||||
- https://etra0.github.io/ - **Sebastián Aedo** (Computer Science student, interested in Game Hacking)
|
||||
- https://fazi1058.github.io **Faezeh Roeinfard** (Student)
|
||||
- https://felixleger.com/ - **Félix Léger** (Sofware Developer and DevOps)
|
||||
- https://gabrielacaesar.com/ - **Gabriela Caesar** (Data journalist)
|
||||
- https://guilhermesteves.dev/ - **Guilherme Esteves** (Software Engineer, Writer, Speaker)
|
||||
- https://hesec.de - **Patrick Hener** (Security Researcher, Pentester and Coder)
|
||||
- https://ilya-lesikov.com - **Ilya Lesikov** (DevOps, SRE)
|
||||
- https://imgalone.com/ - **Iancu makes games alone** (Indie Game Dev)
|
||||
- https://jonathan.rico.live/ - **Jonathan Rico** (Electronics Engineer)
|
||||
- https://kartiniteknologi.id/ - **Kartini Teknologi team** (Tech podcast)
|
||||
- https://mfaishal.com **Faishal Irawan** (Student)
|
||||
- https://mritd.com/ - **漠然** (Software Engineer and DevOps)
|
||||
- https://musq.github.io — **Ashish Ranjan** (Software Engineer)
|
||||
- https://protocod.gitlab.io/blog/ **protocod** (Web Developer)
|
||||
- https://shinytoyrobots.com - **shinytoyrobots** (Eclectic journaling and essays)
|
||||
- https://simeononsecurity.ch/ - **SimeonOnSecurity** (Security and Automation Blog)
|
||||
- https://verso.re/ - **Joan Calabrés** (Security Engineer)
|
||||
- https://atticuslab.com/ - **Atticus** (Game Server Engineer)
|
||||
- https://gregbair.dev/ - **Greg Bair** (Developer and App Architect)
|
||||
- https://www.miroslavbucek.cz - **Miroslav Buček** (Product Manager, Smart Home company owner)
|
||||
- https://farhamdani.com/ - **Farhamdani** (Freelancer & Nganggur Productive)
|
||||
- https://fmg3d.com/ - **Finn M Glas** (Aspiring Physicist, Software Developer)
|
||||
- https://nali.org/ - **Nick Ali** (Marketer)
|
||||
- https://abhinav031.github.io - **Abhinav Sriram** (Digital Artist, Hobbyist)
|
||||
- https://schnerring.net/ - **Michael Schnerring** (Software Engineer)
|
72
assets/css/archive.css
Normal file
|
@ -0,0 +1,72 @@
|
|||
.archive {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
text-align: left;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
|
||||
&__group {
|
||||
&-month {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 10px 0;
|
||||
|
||||
@media (--phone) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-year {
|
||||
margin-top: 40px;
|
||||
|
||||
@media (--phone) {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
&-header {
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-month {
|
||||
&-header {
|
||||
margin: 25px 0;
|
||||
width: 200px;
|
||||
opacity: .5;
|
||||
|
||||
@media (--phone) {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-posts {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&__post {
|
||||
padding: 20px 0;
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
&-title {
|
||||
margin: 5px 0;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ a.button {
|
|||
justify-content: center;
|
||||
padding: 8px 18px;
|
||||
margin-bottom: 5px;
|
||||
background: var(--light-background-secondary);
|
||||
background: var(--background-secondary);
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
|
@ -23,24 +23,14 @@ a.button {
|
|||
cursor: pointer;
|
||||
outline: none;
|
||||
|
||||
.dark-theme & {
|
||||
background: var(--dark-background-secondary);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* variants */
|
||||
|
||||
&.outline {
|
||||
background: transparent;
|
||||
border-color: var(--light-background-secondary);
|
||||
border-color: var(--background-secondary);
|
||||
box-shadow: none;
|
||||
padding: 8px 18px;
|
||||
|
||||
.dark-theme & {
|
||||
border-color: var(--dark-background-secondary);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
:hover {
|
||||
transform: none;
|
||||
box-shadow: none;
|
||||
|
@ -82,8 +72,27 @@ a.read-more:active {
|
|||
padding: 0;
|
||||
margin: 20px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dark-theme & {
|
||||
background: none;
|
||||
.code-toolbar {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.toolbar-item a {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3px 8px;
|
||||
margin-bottom: 5px;
|
||||
background: var(--background-secondary);
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
}
|
96
assets/css/code.css
Normal file
|
@ -0,0 +1,96 @@
|
|||
.collapsable-code {
|
||||
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 {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
~ label .collapsable-code__toggle:after {
|
||||
content: attr(data-label-expand);
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: var(--background-secondary);
|
||||
padding: 10px;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&__title {
|
||||
flex: 1;
|
||||
color: var(--color);
|
||||
padding: 3px 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__language {
|
||||
background: var(--background);
|
||||
color: var(--color);
|
||||
border-radius: 10px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
&__toggle {
|
||||
color: var(--color);
|
||||
font-size: 16px;
|
||||
padding: 3px 10px;
|
||||
|
||||
&:after {
|
||||
content: attr(data-label-collapse);
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
|
||||
&::first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
&::first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.code-toolbar {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
50
assets/css/fonts.css
Normal file
|
@ -0,0 +1,50 @@
|
|||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-Regular.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-Italic.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-Medium.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-MediumItalic.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-Bold.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 800;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
src: url("../fonts/Inter-BoldItalic.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
.footer {
|
||||
padding: 40px 20px;
|
||||
flex-grow: 0;
|
||||
color: var(--light-color-secondary);
|
||||
color: var(--color-secondary);
|
||||
|
||||
&__inner {
|
||||
display: flex;
|
||||
|
@ -25,7 +25,6 @@
|
|||
flex-direction: row;
|
||||
align-items: center;
|
||||
font-size: 1rem;
|
||||
color: var(--light-color-secondary);
|
||||
|
||||
&--user {
|
||||
margin: auto;
|
||||
|
@ -50,4 +49,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +1,11 @@
|
|||
.header {
|
||||
background: #fafafa;
|
||||
background: var(--header);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
|
||||
.dark-theme & {
|
||||
background: #252627;
|
||||
}
|
||||
|
||||
.bulb {
|
||||
&-on {
|
||||
display: none;
|
||||
|
||||
.dark-theme & {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&-off {
|
||||
display: block;
|
||||
|
||||
.dark-theme & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__right {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
@ -47,3 +25,15 @@
|
|||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.theme-toggler {
|
||||
fill: currentColor;
|
||||
}
|
|
@ -1,23 +1,33 @@
|
|||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 0 0 auto;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
|
||||
img {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
&__mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-right: 5px;
|
||||
|
||||
@mixin greater-icon 8px;
|
||||
}
|
||||
|
||||
&__text {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
&__cursor {
|
||||
display: inline-block;
|
||||
width: 2px;
|
||||
width: 10px;
|
||||
height: 1rem;
|
||||
background: #fe5186;
|
||||
margin-left: 5px;
|
||||
border-radius: 2px;
|
||||
border-radius: 1px;
|
||||
animation: cursor 1s infinite;
|
||||
}
|
||||
}
|
|
@ -11,30 +11,24 @@ html {
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Inter UI', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
line-height: 1.54;
|
||||
background-color: var(--light-background);
|
||||
color: var(--light-color);
|
||||
background-color: var(--background);
|
||||
color: var(--color);
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
|
||||
@media (--phone) {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
&.dark-theme {
|
||||
background-color: var(--dark-background);
|
||||
color: var(--dark-color);
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
|
@ -79,26 +73,81 @@ a {
|
|||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
|
||||
&.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
figure {
|
||||
display: table;
|
||||
max-width: 100%;
|
||||
margin: 25px 0;
|
||||
|
||||
&.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-size: .9rem;
|
||||
margin-top: 5px;
|
||||
opacity: .8;
|
||||
|
||||
&.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
&.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
code, kbd {
|
||||
font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
|
||||
background: var(--light-background-secondary);
|
||||
background: var(--background-secondary);
|
||||
padding: 1px 6px;
|
||||
margin: 0 2px;
|
||||
border-radius: 5px;
|
||||
font-size: .95rem;
|
||||
font-size: .9rem;
|
||||
font-weight: normal;
|
||||
font-feature-settings: normal;
|
||||
|
||||
.dark-theme & {
|
||||
background: var(--dark-background-secondary);
|
||||
code, kbd {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #1a1a1d;
|
||||
font-feature-settings: normal;
|
||||
background: #212020;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-size: .9rem;
|
||||
overflow: auto;
|
||||
|
||||
@media (--phone) {
|
||||
|
@ -107,6 +156,7 @@ pre {
|
|||
}
|
||||
|
||||
code {
|
||||
font-feature-settings: normal;
|
||||
background: none !important;
|
||||
color: #ccc;
|
||||
margin: 0;
|
||||
|
@ -143,6 +193,25 @@ blockquote {
|
|||
}
|
||||
}
|
||||
|
||||
/* Fix for gist integration */
|
||||
table:not(.js-file-line-container) {
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 40px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* Fix for gist integration */
|
||||
table, th, td:not(.js-line-number) {
|
||||
border: 1px solid;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: var(--background-secondary);
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin-left: 40px;
|
||||
padding: 0;
|
||||
|
@ -179,14 +248,27 @@ ol ol {
|
|||
hr {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: var(--light-border-color);
|
||||
background: var(--border-color);
|
||||
height: 1px;
|
||||
|
||||
.dark-theme & {
|
||||
background: var(--dark-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.framed {
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border-color);
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
blockquote.twitter-tweet {
|
||||
background: hsl(206deg 62% 45% / 10%);
|
||||
border: none;
|
||||
padding: 30px;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
border-radius: 8px;
|
||||
}
|
136
assets/css/menu.css
Normal file
|
@ -0,0 +1,136 @@
|
|||
@define-mixin menu {
|
||||
position: absolute;
|
||||
background: var(--header);
|
||||
box-shadow: var(--shadow);
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
list-style: none;
|
||||
border-radius: 5px;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.menu {
|
||||
--color: rgba(0, 0, 0, .12);
|
||||
--shadow: 0 8px 20px var(--color);
|
||||
|
||||
border-right: 1px solid;
|
||||
margin-right: 18px;
|
||||
padding-right: 24px;
|
||||
font-weight: 500;
|
||||
|
||||
@media (--phone) {
|
||||
@mixin menu;
|
||||
border: none;
|
||||
top: 50px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&--desktop {
|
||||
@media (--phone) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&--mobile {
|
||||
display: none;
|
||||
|
||||
@media (--phone) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
text-align: left;
|
||||
flex: 0 0 auto;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (--phone) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
margin-left: 0 !important;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__sub-inner {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
&:not(:only-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
&-more {
|
||||
@mixin menu;
|
||||
top: 35px;
|
||||
left: 0;
|
||||
|
||||
&-trigger {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
|
||||
&-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: 3px;
|
||||
transform: rotate(90deg);
|
||||
line-height: 1;
|
||||
|
||||
@mixin greater-icon 5px;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
.menu__inner & {
|
||||
margin-left: 0;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li a {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-trigger {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
fill: currentColor;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
85
assets/css/pagination.css
Normal file
|
@ -0,0 +1,85 @@
|
|||
.pagination {
|
||||
margin-top: 50px;
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin: 100px 0 20px;
|
||||
|
||||
&-h {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
background: var(--background);
|
||||
color: var(--color-secondary);
|
||||
font-size: .8rem;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
letter-spacing: .1em;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
hr {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
margin-top: 15px;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--background-secondary);
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
border-radius: 8px;
|
||||
max-width: 40%;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
|
||||
+ .button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
padding: 8px 16px;
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__text {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.next .button__icon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&.previous .button__icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
|
@ -10,11 +10,7 @@
|
|||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--light-border-color);
|
||||
|
||||
.dark-theme & {
|
||||
border-color: var(--dark-border-color);
|
||||
}
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
&-meta {
|
||||
|
@ -26,12 +22,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
&-date {
|
||||
&:after {
|
||||
content: '—';
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 2.625rem;
|
||||
margin: 0 0 20px;
|
||||
|
@ -61,11 +51,16 @@
|
|||
}
|
||||
|
||||
&-cover {
|
||||
border-radius: 8px;
|
||||
margin: 40px -50px;
|
||||
width: 860px;
|
||||
max-width: 860px;
|
||||
|
||||
img {
|
||||
margin: 0 auto;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
@media (--tablet) {
|
||||
margin: 20px 0;
|
||||
width: 100%;
|
259
assets/css/prism.css
Normal file
|
@ -0,0 +1,259 @@
|
|||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+actionscript+apacheconf+applescript+c+csharp+bash+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+sql+processing+scss+python+jsx+typescript+reason+textile+rust+sass+stylus+scheme+pug+swift+yaml+haml+toml+twig+tsx+vim+visual-basic+wasm&plugins=line-numbers+toolbar+jsonp-highlight+command-line+copy-to-clipboard */
|
||||
/**
|
||||
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
|
||||
* Based on https://github.com/chriskempson/tomorrow-theme
|
||||
* @author Rose Pritchard
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
/* line-height: 1.5; */
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #212020 !important;
|
||||
color: inherit !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.block-comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: rgba(255, 255, 255, .4);
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #a9a9b3;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.attr-name,
|
||||
.token.namespace,
|
||||
.token.deleted {
|
||||
color: #e2777a;
|
||||
}
|
||||
|
||||
.token.function-name {
|
||||
color: #6196cc;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.function {
|
||||
color: #f08d49;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.class-name,
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #f8c555;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.builtin {
|
||||
color: #cc99cd;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.attr-value,
|
||||
.token.regex,
|
||||
.token.variable {
|
||||
color: #7ec699;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url {
|
||||
color: #67cdcc;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: green;
|
||||
}
|
||||
|
||||
pre[class*="language-"].line-numbers {
|
||||
position: relative;
|
||||
padding-left: 3.8em;
|
||||
counter-reset: linenumber;
|
||||
}
|
||||
|
||||
pre[class*="language-"].line-numbers > code {
|
||||
position: relative;
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
.line-numbers .line-numbers-rows {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
font-size: 100%;
|
||||
left: -3.8em;
|
||||
width: 3em; /* works for line-numbers below 1000 lines */
|
||||
letter-spacing: -1px;
|
||||
border-right: 1px solid #999;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
|
||||
.line-numbers-rows > span {
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
counter-increment: linenumber;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span:before {
|
||||
content: counter(linenumber);
|
||||
color: #999;
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.code-toolbar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar {
|
||||
position: absolute;
|
||||
top: .3em;
|
||||
right: .2em;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.code-toolbar:hover > .toolbar {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar .toolbar-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar button {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
line-height: normal;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
-webkit-user-select: none; /* for button */
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a,
|
||||
div.code-toolbar > .toolbar button,
|
||||
div.code-toolbar > .toolbar span {
|
||||
color: #bbb;
|
||||
font-size: .8em;
|
||||
padding: 0 .5em;
|
||||
background: #f5f2f0;
|
||||
background: rgba(224, 224, 224, 0.2);
|
||||
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
|
||||
border-radius: .5em;
|
||||
}
|
||||
|
||||
div.code-toolbar > .toolbar a:hover,
|
||||
div.code-toolbar > .toolbar a:focus,
|
||||
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;
|
||||
}
|
||||
|
||||
.command-line-prompt {
|
||||
border-right: 1px solid #999;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 100%;
|
||||
letter-spacing: -1px;
|
||||
margin-right: 1em;
|
||||
pointer-events: none;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.command-line-prompt > span:before {
|
||||
color: #999;
|
||||
content: ' ';
|
||||
display: block;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-user]:before {
|
||||
content: "[" attr(data-user) "@" attr(data-host) "] $";
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-user="root"]:before {
|
||||
content: "[" attr(data-user) "@" attr(data-host) "] #";
|
||||
}
|
||||
|
||||
.command-line-prompt > span[data-prompt]:before {
|
||||
content: attr(data-prompt);
|
||||
}
|
18
assets/css/style.css
Normal file
|
@ -0,0 +1,18 @@
|
|||
@import 'variables.css';
|
||||
|
||||
@import 'fonts.css';
|
||||
@import 'buttons.css';
|
||||
|
||||
@import 'header.css';
|
||||
@import 'logo.css';
|
||||
@import 'menu.css';
|
||||
@import 'main.css';
|
||||
@import 'post.css';
|
||||
@import 'pagination.css';
|
||||
@import 'footer.css';
|
||||
|
||||
@import 'terms.css';
|
||||
@import 'archive.css';
|
||||
|
||||
@import 'prism.css';
|
||||
@import 'code.css';
|
30
assets/css/terms.css
Normal file
|
@ -0,0 +1,30 @@
|
|||
.terms {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
text-align: left;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
|
||||
&__list {
|
||||
padding: 0;
|
||||
padding-left: 20px;
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__term {
|
||||
margin-bottom: 15px;
|
||||
|
||||
&-count {
|
||||
background: var(--background-secondary);
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
44
assets/css/variables.css
Normal file
|
@ -0,0 +1,44 @@
|
|||
:root {
|
||||
/* light theme color */
|
||||
--background: #fff;
|
||||
--background-secondary: #eaeaea;
|
||||
--header: #fafafa;
|
||||
--color: #222;
|
||||
--color-secondary: #999;
|
||||
--border-color: #dcdcdc;
|
||||
|
||||
/* variables for js, must be the same as these in @custom-media queries */
|
||||
--phoneWidth: (max-width: 684px);
|
||||
--tabletWidth: (max-width: 900px);
|
||||
}
|
||||
|
||||
body.dark-theme {
|
||||
/* dark theme colors */
|
||||
--background: #292a2d;
|
||||
--background-secondary: #3b3d42;
|
||||
--header: #252627;
|
||||
--color: #a9a9b3;
|
||||
--color-secondary: #73747b;
|
||||
--border-color: #4a4b50;
|
||||
}
|
||||
|
||||
@custom-media --phone (width < 684px);
|
||||
@custom-media --tablet (width < 900px);
|
||||
|
||||
@define-mixin greater-icon $stroke-width: 3px, $width: .95rem, $height: 100% {
|
||||
.greater-icon {
|
||||
width: $width;
|
||||
height: $height;
|
||||
|
||||
path {
|
||||
stroke: currentColor;
|
||||
stroke-width: $stroke-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* HOW TO USE */
|
||||
|
||||
/*@media (--phone) {*/
|
||||
/*margin-top: 0;*/
|
||||
/*}*/
|
BIN
assets/fonts/Inter-Bold.woff2
Normal file
BIN
assets/fonts/Inter-BoldItalic.woff2
Normal file
BIN
assets/fonts/Inter-Italic.woff2
Normal file
BIN
assets/fonts/Inter-Medium.woff2
Normal file
BIN
assets/fonts/Inter-MediumItalic.woff2
Normal file
BIN
assets/fonts/Inter-Regular.woff2
Normal file
54
assets/js/menu.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
const container = document.querySelector(".container");
|
||||
const menu = document.querySelector(".menu");
|
||||
const mobileMenuTrigger = document.querySelector(".menu-trigger");
|
||||
const desktopMenu = document.querySelector(".menu__inner--desktop");
|
||||
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 = () => {
|
||||
mobileMenuTrigger && mobileMenuTrigger.classList.toggle("hidden", !isMobile());
|
||||
menu && menu.classList.toggle("hidden", isMobile());
|
||||
menuMore && menuMore.classList.toggle("hidden", !isMobile());
|
||||
};
|
||||
|
||||
// Common
|
||||
|
||||
menu && menu.addEventListener("click", e => e.stopPropagation());
|
||||
menuMore && menuMore.addEventListener("click", e => e.stopPropagation());
|
||||
|
||||
isMobileMenu();
|
||||
|
||||
document.body.addEventListener("click", () => {
|
||||
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);
|
||||
|
||||
// Mobile menu
|
||||
|
||||
mobileMenuTrigger &&
|
||||
mobileMenuTrigger.addEventListener("click", e => {
|
||||
e.stopPropagation();
|
||||
menu && menu.classList.toggle("hidden");
|
||||
});
|
||||
|
||||
// Desktop menu
|
||||
|
||||
desktopMenuTrigger &&
|
||||
desktopMenuTrigger.addEventListener("click", e => {
|
||||
e.stopPropagation();
|
||||
menuMore && menuMore.classList.toggle("hidden");
|
||||
|
||||
if (
|
||||
menuMore &&
|
||||
menuMore.getBoundingClientRect().right > container.getBoundingClientRect().right
|
||||
) {
|
||||
menuMore.style.left = "auto";
|
||||
menuMore.style.right = 0;
|
||||
}
|
||||
});
|
73
assets/js/prism.js
Normal file
18
assets/js/theme.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Toggle theme
|
||||
|
||||
const getTheme = window.localStorage && window.localStorage.getItem("theme");
|
||||
const themeToggle = document.querySelector(".theme-toggle");
|
||||
const isDark = getTheme === "dark";
|
||||
|
||||
if (getTheme !== null) {
|
||||
document.body.classList.toggle("dark-theme", isDark);
|
||||
}
|
||||
|
||||
themeToggle.addEventListener("click", () => {
|
||||
document.body.classList.toggle("dark-theme");
|
||||
window.localStorage &&
|
||||
window.localStorage.setItem(
|
||||
"theme",
|
||||
document.body.classList.contains("dark-theme") ? "dark" : "light",
|
||||
);
|
||||
});
|
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,
|
||||
};
|
||||
};
|
|
@ -1,19 +1,48 @@
|
|||
baseurl = "https://example.org/"
|
||||
baseurl = "/"
|
||||
languageCode = "en-us"
|
||||
title = "Hello Friend"
|
||||
theme = "hugo-theme-hello-friend"
|
||||
copyright = ""
|
||||
paginate = 5
|
||||
|
||||
[params]
|
||||
subtitle = "A simple theme for Hugo"
|
||||
# dir name of your blog content (default is `content/posts`)
|
||||
contentTypeName = "post"
|
||||
# "light" or "dark"
|
||||
defaultTheme = "dark"
|
||||
# if you set this to 0, only submenu trigger will be visible
|
||||
showMenuItems = 2
|
||||
# Enable to show reading time in minutes for posts
|
||||
showReadingTime = false
|
||||
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
[languages]
|
||||
[languages.en]
|
||||
title = "Hello Friend"
|
||||
subtitle = "A simple theme for Hugo"
|
||||
keywords = ""
|
||||
copyright = ""
|
||||
menuMore = "Show more"
|
||||
writtenBy = "Written by"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
minuteReadingTime = "min read"
|
||||
dateFormatSingle = "2006-01-02"
|
||||
dateFormatList = "2006-01-02"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
logoHomeLink = "/"
|
||||
# or
|
||||
#
|
||||
# path = "/img/your-example-logo.svg"
|
||||
# alt = "Your example logo alt text"
|
||||
|
||||
[languages.en.menu]
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "about"
|
||||
name = "About"
|
||||
url = "/about"
|
||||
[[menu.main]]
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "showcase"
|
||||
name = "Showcase"
|
||||
url = "/showcase"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
+++
|
||||
title = "About"
|
||||
date = "2018-07-18"
|
||||
date = "2019-01-25"
|
||||
author = "Radek"
|
||||
+++
|
||||
|
||||
<h2>> Hi there<span class="logo__cursor" style="width: 3px; height: 1.625rem;"></span></h2>
|
||||
# Hi there
|
||||
|
||||
My name is Radek and I'm the author of this theme. I made it to help you present your ideas easier.
|
||||
|
||||
|
@ -17,6 +17,5 @@ The theme includes:
|
|||
- **light/dark mode**, depending on your preferences
|
||||
- great reading experience thanks to [**Inter UI font**](https://rsms.me/inter/), made by [Rasmus Andersson](https://rsms.me/about/)
|
||||
- nice code highlighting thanks to [**PrismJS**](https://prismjs.com)
|
||||
- an easy way to modify the theme (**Webpack, NodeJS, PostCSS** — initial setup created by [Marcin Dziewulski](http://www.mobily.pl))
|
||||
|
||||
So, there you have it... enjoy!
|
6
exampleSite/content/archive.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
+++
|
||||
title = "Archive"
|
||||
layout = "list"
|
||||
url = "/archive"
|
||||
type = "archive"
|
||||
+++
|
|
@ -2,7 +2,7 @@
|
|||
title = "Hello Friend"
|
||||
date = "1986-09-17"
|
||||
author = "Elliot"
|
||||
cover = "hello.jpg"
|
||||
cover = "img/hello.jpg"
|
||||
description = "\"Hello, friend?\" That's lame. Maybe I should give you a name?"
|
||||
+++
|
||||
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
+++
|
||||
title = "Showcase"
|
||||
date = "2018-07-18"
|
||||
author = "Hello Robot"
|
||||
+++
|
||||
---
|
||||
title: "Showcase"
|
||||
date: "2019-01-18"
|
||||
author: "Lorem Ipsum"
|
||||
---
|
||||
|
||||
## Header 2
|
||||
|
||||
Backup two-step verification breach, anonymous terminal traffic worm virus reboot fsociety dat file. Traffic fsociety malware 100 terabytes system hack, delete brute-force cyber security fiber connection connect code worm wipe. Cyber security off the grid delete IP decrypt, **nodes connect password 100 terabytes RUDY attack malicious code** rootkit gigabit speed. Tor connect network, intercepting traffic off the grid IP protocol password.
|
||||
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.
|
||||
|
||||
> Backup DDoS attack rootkit nodes disconnect website. Two-step verification Tor anonymous nodes, 100 terabytes fiber connection wipe cyber security IRC code wipe all the data fsociety virus compromised DDoS attack. Sys admin data center gigabit speed breach, worm DDoS attack AFK nodes.
|
||||
> Fusce pharetra suscipit orci nec tempor. Quisque vitae sem sit amet sem mollis consequat. Sed at imperdiet lorem. Vestibulum pharetra faucibus odio, ac feugiat tellus sollicitudin at. Pellentesque varius tristique mi imperdiet dapibus. Duis orci odio, sodales lacinia venenatis sit amet, feugiat et diam.
|
||||
|
||||
### Header 3
|
||||
|
||||
Brute-force intercepting traffic fiber connection system boot up fsociety reboot AFK sys admin. Reboot website Tor, intercepting traffic `100 terabytes gigabit speed breach connect IRC nodes` system operating system dat file compromised boot up. Data center decrypt password network disconnect. Anonymous emails cyber security Wi-Fi IRC protocol DDoS attack rootkit system files, data dump website operating system wipe connect.
|
||||
Nulla libero turpis, lacinia vitae cursus ut, auctor dictum nisl. Fusce varius felis nec sem ullamcorper, at convallis nisi vestibulum. Duis risus odio, porta sit amet placerat mollis, tincidunt non mauris. Suspendisse fringilla, `odio a dignissim pharetra`, est urna sollicitudin urna, eu scelerisque magna ex vitae tellus.
|
||||
|
||||
<pre>
|
||||
<code class="language-css">
|
||||
/* PostCSS code by PrismJS */
|
||||
```css
|
||||
/* PostCSS code */
|
||||
|
||||
pre {
|
||||
pre {
|
||||
background: #1a1a1d;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
|
@ -35,38 +34,31 @@ Brute-force intercepting traffic fiber connection system boot up fsociety reboot
|
|||
color: #ccc;
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
|
||||
.dark-theme & {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
}
|
||||
```
|
||||
|
||||
<pre>
|
||||
<code class="language-js">
|
||||
// JS code by PrismJS
|
||||
```js
|
||||
// JS code
|
||||
|
||||
const menuTrigger = document.querySelector('.menu-trigger')
|
||||
const menu = document.querySelector('.menu')
|
||||
const mobileQuery = getComputedStyle(document.body).getPropertyValue('--phoneWidth')
|
||||
const isMobile = () => window.matchMedia(mobileQuery).matches
|
||||
const isMobileMenu = () => {
|
||||
const menuTrigger = document.querySelector('.menu-trigger')
|
||||
const menu = document.querySelector('.menu')
|
||||
const mobileQuery = getComputedStyle(document.body).getPropertyValue('--phoneWidth')
|
||||
const isMobile = () => window.matchMedia(mobileQuery).matches
|
||||
const isMobileMenu = () => {
|
||||
menuTrigger.classList.toggle('hidden', !isMobile())
|
||||
menu.classList.toggle('hidden', isMobile())
|
||||
}
|
||||
}
|
||||
|
||||
isMobileMenu()
|
||||
isMobileMenu()
|
||||
|
||||
menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden'))
|
||||
menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden'))
|
||||
|
||||
window.addEventListener('resize', isMobileMenu)
|
||||
</code>
|
||||
</pre>
|
||||
window.addEventListener('resize', isMobileMenu)
|
||||
```
|
||||
|
||||
{{< highlight html >}}
|
||||
<!-- HTML code by Chroma (built-in highlighter in Hugo ) -->
|
||||
```html
|
||||
<!-- HTML code -->
|
||||
|
||||
<section id="main">
|
||||
<div>
|
||||
|
@ -76,19 +68,17 @@ Brute-force intercepting traffic fiber connection system boot up fsociety reboot
|
|||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
#### Header 4
|
||||
|
||||
Traffic RUDY attack nodes anonymous IP network code two-step verification system files data center bonsoir terminal. Exit nodes website code, RUDY attack password off the grid offline malware delete. Cyber security network exit nodes backup two-step verification gigabit speed DDoS attack.
|
||||
Curabitur scelerisque felis viverra varius scelerisque. Ut enim libero, molestie gravida blandit at, mollis ornare tellus. Cras arcu mi, ultrices vel pulvinar vel, volutpat eu tortor. Nullam nec eros quis massa ultrices iaculis sed in metus. Praesent sollicitudin sem sit amet orci tempor gravida.
|
||||
|
||||
- Fsociety delete malicious code nodes.
|
||||
- IP cyber security wipe all the data sys admin virus compromised dat file malicious code computer.
|
||||
- Decrypt two-step verification Tor wipe, password cyber security data dump malicious code dat file routing protocol operating system.
|
||||
- Anonymous boot up website AFK.
|
||||
- Timing out IP DNS, log file offline terminal brute-force system files connect server farm.
|
||||
- Reboot sys admin worm log file wipe.
|
||||
- Maecenas elementum vitae nibh vitae porttitor.
|
||||
- Aenean consequat, risus ut cursus placerat, arcu nulla sodales risus, ut molestie tellus tellus et dui.
|
||||
- Integer imperdiet turpis vitae lacus imperdiet, ut ornare ligula auctor. Integer in mi eu velit vehicula suscipit eget vulputate nulla.
|
||||
- Etiam vitae enim quis velit lobortis placerat a ut sem.
|
||||
- Curabitur lobortis ante sit amet orci pulvinar, sollicitudin viverra nunc accumsan.
|
||||
- Praesent fermentum orci quis leo facilisis posuere.
|
||||
|
||||
{{< youtube id="xIBiJ_SzJTA" >}}
|
||||
|
||||
Tor boot up backup anonymous bonsoir IRC website. Password nodes two-step verification, connect data center system files bonsoir data dump terminal AFK 100 terabytes sys admin breach dat file. Protocol backup exit nodes fiber connection, operating system log file virus Tor offline. Password data center two-step verification disconnect IRC terminal. Tor IRC cyber security AFK protocol traffic disconnect. Code exit nodes IRC cyber security nodes worm.
|
||||
Aliquam erat volutpat. In hac habitasse platea dictumst. Nunc ut tincidunt mauris. Sed at gravida risus, id semper magna. Nullam vitae enim mattis, sodales neque non, pharetra elit. Cras sit amet sagittis augue, et finibus turpis. Ut tempus tincidunt diam vel pharetra. Nulla porttitor odio sit amet nulla scelerisque, quis aliquam mi imperdiet. Sed tincidunt dui vel tellus vestibulum rhoncus. Donec tempus ultrices velit.
|
||||
|
|
BIN
exampleSite/static/img/hello.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 399 KiB After Width: | Height: | Size: 242 KiB |
BIN
images/tn.png
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 224 KiB |
29
layouts/404.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{ define "main" }}
|
||||
<div class="post">
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h1>
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{ "Hmm... Sorry, this page seems to be missing." | markdownify }}
|
||||
</p>
|
||||
|
||||
{{ if .Site.Taxonomies.tags }}
|
||||
<p>
|
||||
{{ "Maybe these tags will help you find what you're looking for. :smile:" | markdownify | emojify }}
|
||||
</p>
|
||||
<h2>Tags</h2>
|
||||
<div class="terms">
|
||||
<ul class="terms__list">
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<li class="terms__term">
|
||||
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a
|
||||
><span class="terms__term-count">{{ .Count }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,24 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<head>
|
||||
<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 }}{{ with $.Site.Params.Subtitle }} —
|
||||
{{ . }}{{ end }}{{ else }}{{ .Title }} ::
|
||||
{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}
|
||||
</title>
|
||||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="dark-theme">
|
||||
<div class="container">
|
||||
</head>
|
||||
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
|
||||
<div class="container">
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="content">
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
{{ block "main" . }} {{ end }}
|
||||
</div>
|
||||
|
||||
{{ block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
{{ if $.Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
69
layouts/_default/index.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
{{ define "main" }}
|
||||
{{ $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) }}
|
||||
|
||||
{{ if .Content }}
|
||||
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="posts">
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
|
||||
{{ if $.Site.Params.LastModDisplay }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</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 }}
|
||||
{{ partial "postcover.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ with .Description }}
|
||||
{{ . | markdownify }}
|
||||
{{ else }}
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if not .Params.hideReadMore }}
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore | default "Read more" }} →</a></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,26 +1,41 @@
|
|||
{{ define "main" }}
|
||||
<div class="posts">
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ range .Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
<span class="post-author">Written by {{ .Params.Author }}</span>
|
||||
|
||||
{{ if $.Site.Params.LastModDisplay }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author"
|
||||
>— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span
|
||||
>{{ end }}
|
||||
|
||||
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="post-read-time"
|
||||
>— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||
<a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="/img/{{ . }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
{{ partial "postcover.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
|
@ -28,11 +43,17 @@
|
|||
{{ . | markdownify }}
|
||||
{{ else }}
|
||||
{{ if .Truncated }}
|
||||
{{ .Summary | markdownify }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">Read more →</a></div>
|
||||
{{ if not .Params.hideReadMore }}
|
||||
<div>
|
||||
<a class="read-more button" href="{{ .RelPermalink }}"
|
||||
>{{ $.Site.Params.ReadMore | default "Read more" }} →</a
|
||||
>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
|
|
64
layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,64 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
|
||||
{{ if .Site.Params.RssImage }}<image>
|
||||
<url>{{ printf "%s%s" .Permalink .Site.Params.RssImage }}</url>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
</image>
|
||||
{{ end }}
|
||||
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>
|
||||
{{ if .Params.Cover }}
|
||||
{{ if .Params.UseRelativeCover }}{{ printf "<img src=\"%s%s\"/>" .Permalink .Params.Cover }}
|
||||
{{ else }}{{ printf "<img src=\"%s\"/>" (.Params.Cover | absURL) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $images := .Resources.ByType "image" }}
|
||||
{{ $featured := $images.GetMatch "{*featured*,*cover*,*thumbnail*}" }}
|
||||
{{ with $featured }}{{ printf "<img src=\"%s\"/>" $featured.Permalink }}{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.RssFullText }}{{ .Content | html }}
|
||||
{{ else }}
|
||||
{{ with .Description }}{{ . | html }}
|
||||
{{ else }}{{ .Summary | html }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,43 +1,91 @@
|
|||
{{ define "main" }}
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
<div class="post">
|
||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||
<h1 class="post-title">{{ .Title | markdownify }}</h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Date | default nil }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ .Date.Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
<span class="post-author">Written by {{ .Params.Author }}</span>
|
||||
|
||||
{{ if eq .Type $contentTypeName }}
|
||||
{{ if $.Site.Params.LastModDisplay }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author"
|
||||
>— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span
|
||||
>{{ end }}
|
||||
|
||||
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="post-read-time"
|
||||
>— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||
<a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
<img src="/img/{{ . }}" class="post-cover" />
|
||||
{{ if .Params.Cover }}
|
||||
{{ partial "postcover.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ if or .Params.Toc $.Site.Params.Toc }}
|
||||
{{ if ne .Params.Toc false }}
|
||||
<h2>Table of Contents</h2>
|
||||
<aside class="table-of-contents">{{ .TableOfContents }}</aside>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">Read other posts</span>
|
||||
<span class="pagination__title-h"
|
||||
>{{ $.Site.Params.ReadOtherPosts | default "Read other posts" }}</span
|
||||
>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<a class="btn next" href="{{ .NextInSection.Permalink }}">← {{ .NextInSection.Title }}</a>
|
||||
<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 }}
|
||||
<a class="btn previous" href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }} →</a>
|
||||
<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 }}
|
||||
{{ end }}
|
||||
|
||||
{{ if not (eq .Params.Comments "false") }}
|
||||
{{ if or (eq .Type $.Site.Params.contentTypeName) (.Params.Comments) }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
19
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" }}
|
||||
<div class="terms">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="terms__list">
|
||||
{{ $type := .Type }}
|
||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{ $name := .Name }}
|
||||
{{ $count := .Count }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<li class="terms__term">
|
||||
<a href="{{ .Permalink }}"
|
||||
>#{{ .Name }} <span class="terms__term-count">{{ $count }}</span></a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
49
layouts/archive/list.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
{{ define "main" }}
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
<div class="archive">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ range .Site.RegularPages.GroupByPublishDate "2006" }}
|
||||
{{ if ne .Key "0001" }}
|
||||
<div class="archive__group-year">
|
||||
<h2 class="archive__group-year-header">{{ replace .Key "0001" "" }}</h2>
|
||||
{{ range .Pages.GroupByDate "January" }}
|
||||
<div class="archive__group-month">
|
||||
<h3 class="archive__group-month-header">{{ .Key }}</h3>
|
||||
<div class="archive__group-posts">
|
||||
{{ range where .Pages "Type" $contentTypeName }}
|
||||
{{ if eq .Kind "page" }}
|
||||
<div class="archive__post">
|
||||
<h3 class="archive__post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</h3>
|
||||
<div class="archive__post-meta">
|
||||
<span class="archive__post-date">
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ with .Params.Author }}
|
||||
<span class="archive__post-author"
|
||||
>—
|
||||
{{ $.Site.Params.WrittenBy | default "Written by" }}
|
||||
{{ . }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="archive__post-read-time"
|
||||
>— {{ .ReadingTime }}
|
||||
{{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
|
||||
>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -4,7 +4,7 @@
|
|||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{.}}', 'auto');
|
||||
ga('create', '{{ . }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<svg class="bulb-off" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="24" height="24"/>
|
||||
<path d="M4 19C4 19.55 4.45 20 5 20H9C9.55 20 10 19.55 10 19V18H4V19ZM7 0C3.14 0 0 3.14 0 7C0 9.38 1.19 11.47 3 12.74V15C3 15.55 3.45 16 4 16H10C10.55 16 11 15.55 11 15V12.74C12.81 11.47 14 9.38 14 7C14 3.14 10.86 0 7 0ZM9.85 11.1L9 11.7V14H5V11.7L4.15 11.1C2.8 10.16 2 8.63 2 7C2 4.24 4.24 2 7 2C9.76 2 12 4.24 12 7C12 8.63 11.2 10.16 9.85 11.1Z" transform="translate(5 2)" fill="black"/>
|
||||
</svg>
|
||||
|
||||
<svg class="bulb-on" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="24" height="24"/>
|
||||
<path class="bulb-on__base" d="M4 19C4 19.55 4.45 20 5 20H9C9.55 20 10 19.55 10 19V18H4V19Z" transform="translate(5 2)" fill="#a9a9b3" />
|
||||
<path class="bulb-on__glass" d="M0 7C0 3.14 3.14 0 7 0C10.86 0 14 3.14 14 7C14 9.38 12.81 11.47 11 12.74V15C11 15.55 10.55 16 10 16H4C3.45 16 3 15.55 3 15V12.74C1.19 11.47 0 9.38 0 7Z" transform="translate(5 2)" fill="#a9a9b3" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1 KiB |
7
layouts/partials/comments.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!--
|
||||
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
|
@ -0,0 +1,4 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </body>, put it in /layouts/partials/extended_footer.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/extended_footer.html doesn't exist.
|
||||
-->
|
4
layouts/partials/extended_head.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!--
|
||||
If you want to include any custom html just before </head>, put it in /layouts/partials/extended_head.html
|
||||
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/extended_head.html doesn't exist.
|
||||
-->
|
|
@ -1,15 +1,24 @@
|
|||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if .Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ .Site.Copyright| safeHTML }}</div>
|
||||
{{else}}
|
||||
{{ if $.Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div>
|
||||
{{ else }}
|
||||
{{ partial "logo.html" . }}
|
||||
<div class="copyright">
|
||||
<span>Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||
<span>Theme created by <a href="https://twitter.com/panr">panr</a> 2018</span>
|
||||
<span
|
||||
>© {{ now.Year }} Powered by
|
||||
<a href="https://gohugo.io" target="_blank" rel="noopener">Hugo</a></span
|
||||
>
|
||||
<span
|
||||
>Theme created by
|
||||
<a href="https://twitter.com/panr" target="_blank" rel="noopener">panr</a></span
|
||||
>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ partial "inject.script.html" . }}
|
||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||
|
||||
{{- partial "extended_footer.html" . }}
|
||||
|
|
3
layouts/partials/greater-icon.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="greater-icon" viewBox="0 0 44 44">
|
||||
<path fill="none" d="M15 8l14.729 14.382L15 35.367" />
|
||||
</svg>
|
After Width: | Height: | Size: 146 B |
|
@ -1,46 +1,50 @@
|
|||
<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 or (.IsHome) (.IsPage) }}{{ .Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
|
||||
<meta name="robots" content="noodp"/>
|
||||
<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 }}{{ .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 }}" />
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro' rel='stylesheet' type='text/css'>
|
||||
{{ partial "inject.stylesheet.html" . }}
|
||||
<!-- head custom -->
|
||||
{{- partial "prepended_head.html" . }}
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}" />
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}" />
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="shortcut icon" href="img/favicon.png">
|
||||
<link
|
||||
rel="apple-touch-icon-precomposed"
|
||||
sizes="144x144"
|
||||
href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}"
|
||||
/>
|
||||
<link rel="shortcut icon" href="{{ "img/favicon.png" | absURL }}" />
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="{{ "assets/fonts/Inter-Italic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Regular.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Medium.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-MediumItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Bold.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-BoldItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
|
||||
<!-- 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 or (.IsHome) }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="twitter:site" content="{{ $.Site.Params.twitter }}" />
|
||||
<meta name="twitter:creator" content="{{ $.Site.Params.twitter }}" />
|
||||
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
<!-- 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 or (.IsHome) (.IsPage) }}{{ $.Site.Params.tagline }}{{ 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 }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ 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 }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
<!-- RSS | JSON -->
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ if .OutputFormats.Get "json" }}
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
<!-- head custom -->
|
||||
{{- partial "extended_head.html" . }}
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
<span class="header__inner">
|
||||
{{ partial "logo.html" . }}
|
||||
<span class="header__right">
|
||||
{{ if len .Site.Menus }}
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
|
||||
</svg>
|
||||
</span>
|
||||
{{ end }}
|
||||
<span class="theme-toggle">
|
||||
{{ partial "bulb-icon.html" . }}
|
||||
{{ partial "theme-icon.html" . }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
<script src="/assets/main.js"></script>
|
||||
|
||||
<script src="/assets/prism.js"></script>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
|
10
layouts/partials/lastmod.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ $hourInSec := 3600 }}
|
||||
|
||||
{{ if gt .Lastmod (add (time .Date).Unix $hourInSec) }}
|
||||
{{ with .Lastmod }}
|
||||
<span class="post-moddate">
|
||||
({{ $.Site.Params.LastModDisplay }}
|
||||
{{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,11 +1,15 @@
|
|||
<a href="{{ .Site.BaseURL }}" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
{{ if .Site.Params.Logo }}
|
||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
||||
<a
|
||||
href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{ else }}{{ $.Site.BaseURL }}{{ end }}"
|
||||
class="logo"
|
||||
style="text-decoration: none;"
|
||||
>
|
||||
{{ if $.Site.Params.Logo.path }}
|
||||
<img src="{{ $.Site.Params.Logo.path }}" alt="{{ $.Site.Params.Logo.alt }}" />
|
||||
{{ else }}
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text">hello friend</span>
|
||||
<span class="logo__mark">{{ partial "greater-icon.html" . }}</span>
|
||||
<span class="logo__text"
|
||||
>{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span
|
||||
>
|
||||
<span class="logo__cursor"></span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</a>
|
|
@ -1,7 +1,42 @@
|
|||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
{{ range .Site.Menus.main }}
|
||||
<ul class="menu__inner menu__inner--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 }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
||||
<ul class="menu__sub-inner">
|
||||
<li class="menu__sub-inner-more-trigger">
|
||||
{{ $.Site.Params.MenuMore | default "Show more" }}
|
||||
<span class="menu__sub-inner-more-trigger-icon"
|
||||
>{{ partial "greater-icon.html" . }}</span
|
||||
>
|
||||
</li>
|
||||
<ul class="menu__sub-inner-more hidden">
|
||||
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<ul class="menu__inner menu__inner--mobile">
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
|
@ -1,10 +1,20 @@
|
|||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="button next" href="{{ .Paginator.Prev.URL }}"><span class="button__icon">←</span></a>
|
||||
<span class="button previous">
|
||||
<a href="{{ .Paginator.Prev.URL }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ $.Site.Params.NewerPosts | default "Newer posts" }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a class="button previous" href="{{ .Paginator.Next.URL }}"><span class="button__icon">→</span></a>
|
||||
<span class="button next">
|
||||
<a href="{{ .Paginator.Next.URL }}">
|
||||
<span class="button__text">{{ $.Site.Params.OlderPosts | default "Older posts" }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
11
layouts/partials/postcover.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<figure class="post-cover">
|
||||
{{ if .Params.UseRelativeCover }}
|
||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" alt="{{ .Params.CoverAlt | plainify | default .Title }}"/>
|
||||
{{ else }}
|
||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Params.CoverAlt | plainify | default .Title }}"/>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.CoverCaption }}
|
||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
4
layouts/partials/prepended_head.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!--
|
||||
If you want to include any custom html at the beginning of </head> before scripts or links are declared,
|
||||
put it in /layouts/partials/prepended_head.html. Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/prepended_head.html doesn't exist.
|
||||
-->
|
14
layouts/partials/theme-icon.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<svg
|
||||
class="theme-toggler"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 48 48"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M22 41C32.4934 41 41 32.4934 41 22C41 11.5066 32.4934 3 22
|
||||
3C11.5066 3 3 11.5066 3 22C3 32.4934 11.5066 41 22 41ZM7 22C7
|
||||
13.7157 13.7157 7 22 7V37C13.7157 37 7 30.2843 7 22Z"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 337 B |
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 }}
|
8
layouts/shortcodes/figure.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ if .Get "src" }}
|
||||
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
|
||||
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
|
||||
{{ if .Get "caption" }}
|
||||
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
3
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 }} />
|
||||
{{ end }}
|
30
layouts/shortcodes/imgproc.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
|
||||
{{ $command := .Get 1 }}
|
||||
{{ $options := .Get 2 }}
|
||||
{{ $position := .Get 3 }}
|
||||
|
||||
{{ if eq $command "Fit" }}
|
||||
{{ .Scratch.Set "image" ($original.Fit $options) }}
|
||||
{{ else if eq $command "Resize" }}
|
||||
{{ .Scratch.Set "image" ($original.Resize $options) }}
|
||||
{{ else if eq $command "Fill" }}
|
||||
{{ .Scratch.Set "image" ($original.Fill $options) }}
|
||||
{{ else }}
|
||||
{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize." }}
|
||||
{{ end }}
|
||||
|
||||
{{ $image := .Scratch.Get "image" }}
|
||||
|
||||
<figure class="{{ with $position }}{{ . }}{{ else -}} left {{- end }}">
|
||||
<img
|
||||
style="max-width: 100%; width: auto; height: auto; border-radius: 8px;"
|
||||
src="{{ $image.RelPermalink }}"
|
||||
width="{{ $image.Width }}"
|
||||
height="{{ $image.Height }}"
|
||||
/>
|
||||
{{ with .Inner }}
|
||||
<figcaption>
|
||||
{{ . }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
10251
package-lock.json
generated
81
package.json
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"name": "hello-friend",
|
||||
"version": "1.0.0",
|
||||
"version": "2.1.0",
|
||||
"main": "index.js",
|
||||
"author": "panr & mobily",
|
||||
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "webpack --mode=development --watch",
|
||||
"build": "webpack --mode=production"
|
||||
"build": "webpack --mode=production",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
|
@ -14,38 +15,48 @@
|
|||
"not dead"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0-beta.54",
|
||||
"@babel/core": "^7.0.0-beta.54",
|
||||
"@babel/plugin-transform-runtime": "^7.0.0-beta.54",
|
||||
"@babel/preset-env": "^7.0.0-beta.54",
|
||||
"@babel/preset-stage-2": "^7.0.0-beta.54",
|
||||
"babel-eslint": "8.2.1",
|
||||
"babel-loader": "^8.0.0-beta.0",
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/preset-stage-2": "^7.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"browserslist": "^4.0.1",
|
||||
"clean-webpack-plugin": "^0.1.16",
|
||||
"css-loader": "^1.0.0",
|
||||
"cssnano": "^4.0.3",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.1.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.0.0",
|
||||
"postcss-import": "^11.1.0",
|
||||
"postcss-loader": "^2.0.5",
|
||||
"postcss-nested": "^3.0.0",
|
||||
"postcss-preset-env": "^5.2.2",
|
||||
"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.2.7",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.16.1",
|
||||
"webpack-cli": "^3.1.0"
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"clipboard": "^2.0.4",
|
||||
"css-loader": "^6.5.1",
|
||||
"cssnano": "^5.0.8",
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"file-loader": "^6.1.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"husky": "^7.0.4",
|
||||
"mini-css-extract-plugin": "^2.4.3",
|
||||
"postcss": "^8.2.10",
|
||||
"postcss-browser-reporter": "^0.6.0",
|
||||
"postcss-cli": "^9.0.1",
|
||||
"postcss-color-function": "^4.0.1",
|
||||
"postcss-color-mod-function": "^3.0.3",
|
||||
"postcss-import": "^14.0.0",
|
||||
"postcss-loader": "^6.2.0",
|
||||
"postcss-mixins": "^8.1.0",
|
||||
"postcss-nested": "^5.0.5",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"postcss-reporter": "^7.0.2",
|
||||
"postcss-url": "^10.1.3",
|
||||
"prettier-eslint-cli": "^5.0.0",
|
||||
"ramda": "^0.27.1",
|
||||
"style-loader": "^3.3.1",
|
||||
"terser-webpack-plugin": "^5.2.4",
|
||||
"url-loader": "^4.1.0",
|
||||
"webpack": "^5.27.1",
|
||||
"webpack-cli": "^4.5.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-push": "yarn build && git add . && git commit --amend --no-edit"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@ const nested = require("postcss-nested");
|
|||
const postCSSPresetEnv = require("postcss-preset-env");
|
||||
const browsers = require("browserslist");
|
||||
const cssnano = require("cssnano");
|
||||
const mixins = require("postcss-mixins");
|
||||
|
||||
module.exports = () => ({
|
||||
plugins: [
|
||||
url,
|
||||
imports,
|
||||
mixins,
|
||||
nested,
|
||||
postCSSPresetEnv({
|
||||
stage: 1,
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("../fonts/Inter-UI-Regular.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-Regular.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url("../fonts/Inter-UI-Italic.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-Italic.woff") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url("../fonts/Inter-UI-Medium.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-Medium.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
src: url("../fonts/Inter-UI-MediumItalic.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-MediumItalic.woff") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url("../fonts/Inter-UI-Bold.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-Bold.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: url("../fonts/Inter-UI-BoldItalic.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-BoldItalic.woff") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url("../fonts/Inter-UI-Black.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-Black.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter UI';
|
||||
font-style: italic;
|
||||
font-weight: 900;
|
||||
src: url("../fonts/Inter-UI-BlackItalic.woff2") format("woff2"),
|
||||
url("../fonts/Inter-UI-BlackItalic.woff") format("woff");
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
.menu {
|
||||
background: #fafafa;
|
||||
border-right: 1px solid;
|
||||
margin-right: 10px;
|
||||
|
||||
.dark-theme & {
|
||||
background: #252627;
|
||||
}
|
||||
|
||||
@media (--phone) {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
&__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 15px;
|
||||
font-size: 1rem;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
margin: 0 20px;
|
||||
|
||||
&:last-of-type {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (--phone) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-trigger {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
fill: currentColor;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
.pagination {
|
||||
margin-top: 50px;
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin: 100px 0 20px;
|
||||
|
||||
&-h {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
background: var(--light-background);
|
||||
color: var(--light-color-secondary);
|
||||
font-size: .8rem;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
letter-spacing: .1em;
|
||||
z-index: 1;
|
||||
|
||||
.dark-theme & {
|
||||
background: var(--dark-background);
|
||||
color: var(--dark-color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
margin-top: 15px;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__buttons {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+markup-templating+go+handlebars+json+markdown+ocaml+pug+python+jsx+rust+scss */
|
||||
/**
|
||||
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
|
||||
* Based on https://github.com/chriskempson/tomorrow-theme
|
||||
* @author Rose Pritchard
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #a9a9b3;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #1a1a1d !important;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.block-comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: var(--light-color-secondary);
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #a9a9b3;
|
||||
}
|
||||
|
||||
.token.tag,
|
||||
.token.attr-name,
|
||||
.token.namespace,
|
||||
.token.deleted {
|
||||
color: #e2777a;
|
||||
}
|
||||
|
||||
.token.function-name {
|
||||
color: #6196cc;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.function {
|
||||
color: #f08d49;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.class-name,
|
||||
.token.constant,
|
||||
.token.symbol {
|
||||
color: #f8c555;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.important,
|
||||
.token.atrule,
|
||||
.token.keyword,
|
||||
.token.builtin {
|
||||
color: #cc99cd;
|
||||
}
|
||||
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.attr-value,
|
||||
.token.regex,
|
||||
.token.variable {
|
||||
color: #7ec699;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url {
|
||||
color: #67cdcc;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.token.inserted {
|
||||
color: green;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
@import 'variables';
|
||||
@import 'inter-ui';
|
||||
@import 'buttons';
|
||||
|
||||
@import 'header';
|
||||
@import 'logo';
|
||||
@import 'menu';
|
||||
@import 'main';
|
||||
@import 'list';
|
||||
@import 'pagination';
|
||||
@import 'footer';
|
||||
|
||||
@import 'prism';
|
|
@ -1,28 +0,0 @@
|
|||
:root {
|
||||
/* light theme color */
|
||||
--light-background: #fff;
|
||||
--light-background-secondary: #eaeaea;
|
||||
--light-color: #222;
|
||||
--light-color-secondary: #999;
|
||||
--light-border-color: #dcdcdc;
|
||||
|
||||
/* dark theme colors */
|
||||
--dark-background: #292a2d;
|
||||
--dark-background-secondary: #3b3d42;
|
||||
--dark-color: #a9a9b3;
|
||||
--dark-color-secondary: #73747b;
|
||||
--dark-border-color: #4a4b50;
|
||||
|
||||
/* variables for js, must be the same as these in @custom-media queries */
|
||||
--phoneWidth: (max-width: 684px);
|
||||
--tabletWidth: (max-width: 900px);
|
||||
}
|
||||
|
||||
@custom-media --phone (width < 684px);
|
||||
@custom-media --tablet (width < 900px);
|
||||
|
||||
/* HOW TO USE */
|
||||
|
||||
/*@media (--phone) {*/
|
||||
/*margin-top: 0;*/
|
||||
/*}*/
|
|
@ -1,3 +0,0 @@
|
|||
<% htmlWebpackPlugin.files.js.filter(function(js){ return !/\.css$/.test(js) }).forEach(function(js){ %>
|
||||
<script src="/assets/<%= js %>"></script>
|
||||
<% }) %>
|
|
@ -1,3 +0,0 @@
|
|||
<% htmlWebpackPlugin.files.css.forEach(function(css){ %>
|
||||
<link rel="stylesheet" href="/assets/<%= css %>">
|
||||
<% }) %>
|
|
@ -1 +0,0 @@
|
|||
// Add your script here
|