Compare commits

..

No commits in common. "master" and "1.0.8" have entirely different histories.

117 changed files with 15501 additions and 5880 deletions

View file

@ -44,6 +44,12 @@ rules:
no-unused-vars: no-unused-vars:
- 2 - 2
- argsIgnorePattern: "^_" - argsIgnorePattern: "^_"
# jsx a11y
jsx-a11y/no-static-element-interactions: 0
jsx-a11y/anchor-is-valid:
- 2
- specialLink:
- to
globals: globals:
document: true document: true

3
.gitignore vendored
View file

@ -1,2 +1 @@
node_modules node_modules
public

1
.husky/.gitignore vendored
View file

@ -1 +0,0 @@
_

View file

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn build && git add . && git commit --amend --no-edit

View file

@ -1,11 +1,5 @@
{ {
"parser": "babel", "parser": "babylon",
"printWidth": 100, "printWidth": 100,
"trailingComma": "all", "trailingComma": "all"
"overrides": [{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
}]
} }

View file

@ -1,17 +0,0 @@
# 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.
-->

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2019 panr Copyright (c) 2018 panr
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

297
README.md
View file

@ -2,37 +2,18 @@
![Hello Friend](https://github.com/panr/hugo-theme-hello-friend/blob/master/images/screenshot.png?raw=true) ![Hello Friend](https://github.com/panr/hugo-theme-hello-friend/blob/master/images/screenshot.png?raw=true)
### DEMO - https://hugo-hello-friend.now.sh/ <a id="demo" /> 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 thats done — create the content.
<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> This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
--- ### DEMO - https://hugo-hello-friend.now.sh/
- [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 ## Features
- **dark/light mode**, depending on your preferences (dark is default, but you can change it) - **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/) - 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) - nice code highlighting thanks to [**PrismJS**](https://prismjs.com)
- an easy way to modify the theme (**Webpack, NodeJS, PostCSS etc.**)
- fully responsive - fully responsive
#### Built-in shortcodes #### Built-in shortcodes
@ -41,34 +22,6 @@
- eg: `{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}` - eg: `{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}`
- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`** - **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**
- eg: `{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}` - 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 #### Code highlighting
@ -82,215 +35,97 @@ By default the theme is using PrismJS to color your code syntax. All you need to
**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. **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 ## 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 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: You can also clone it directly to your Hugo folder:
```bash ```
git clone https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend $ 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: 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:
```bash ```
git submodule add -f https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend $ git submodule add https://github.com/panr/hugo-theme-hello-friend.git themes/hello-friend
``` ```
⚠️ **The theme needs at least Hugo version 0.74.x**. ## How to configure
The theme doesn't require any advanced configuration. Just copy:
```
baseurl = "/"
languageCode = "en-us"
title = "Hello Friend"
theme = "hello-friend"
copyright = ""
paginate = 5
[params]
subtitle = "A simple theme for Hugo"
# "light" or "dark"
defaultTheme = "dark"
[params.logo]
logoText = "hello friend"
# or
#
# path = "/img/your-example-logo.svg"
# alt = "Your example logo alt text"
[menu]
[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
[[menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"
[languages]
[languages.en]
writtenBy = "Written by"
readMore = "Read more"
readOtherPosts = "Read other posts"
```
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).
## How to run your site ## How to run your site
From your Hugo root directory run: 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. and go to `localhost:1313` in your browser. From now on all the changes you make will go live, so you don't need to refresh your browser every single time.
## How to configure ## How to edit the theme
The theme doesn't require any advanced configuration. Just copy: 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):
```toml ```
baseurl = "/" $ cd themes/hello-friend
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"
``` ```
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). and then run:
**NOTE:** Please keep in mind that currently main menu doesn't support nesting. ```
$ npm install
## How to add a cover image to your posts $ npm i yarn
$ yarn
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
``` ```
then run: ## How to contribute
```bash 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).
npm install
npm i yarn
yarn
```
After you modified the files you can run webpack in watch mode: ## Licence
```bash Copyright © 2019 Radosław Kozieł ([@panr](https://twitter.com/panr))
yarn dev
```
or rebuild theme 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.
```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.

View file

@ -1,44 +0,0 @@
# 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)

View file

@ -1,72 +0,0 @@
.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;
}
}
}
}

View file

@ -1,96 +0,0 @@
.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;
}
}

View file

@ -1,50 +0,0 @@
@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;
}

View file

@ -1,136 +0,0 @@
@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;
}
}

View file

@ -1,18 +0,0 @@
@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';

View file

@ -1,30 +0,0 @@
.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;
}
}
}

View file

@ -1,44 +0,0 @@
: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;*/
/*}*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,54 +0,0 @@
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;
}
});

View file

@ -1,18 +0,0 @@
module.exports = function(api) {
api.cache(true);
const presets = [
[
"@babel/preset-env",
{
targets: "last 2 versions, >1%, not dead",
},
],
];
const plugins = [];
return {
presets,
plugins,
};
};

View file

@ -1,48 +1,34 @@
baseurl = "/" baseurl = "/"
languageCode = "en-us" languageCode = "en-us"
title = "Hello Friend"
theme = "hugo-theme-hello-friend" theme = "hugo-theme-hello-friend"
copyright = ""
paginate = 5 paginate = 5
[params] [params]
# dir name of your blog content (default is `content/posts`) subtitle = "A simple theme for Hugo"
contentTypeName = "post"
# "light" or "dark" # "light" or "dark"
defaultTheme = "dark" defaultTheme = "dark"
# if you set this to 0, only submenu trigger will be visible
showMenuItems = 2 [params.logo]
# Enable to show reading time in minutes for posts logoText = "hello friend"
showReadingTime = false # or
#
# path = "/img/your-example-logo.svg"
# alt = "Your example logo alt text"
[menu]
[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
[[menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"
[languages] [languages]
[languages.en] [languages.en]
title = "Hello Friend"
subtitle = "A simple theme for Hugo"
keywords = ""
copyright = ""
menuMore = "Show more"
writtenBy = "Written by" writtenBy = "Written by"
readMore = "Read more" readMore = "Read more"
readOtherPosts = "Read other posts" 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"
[[languages.en.menu.main]]
identifier = "showcase"
name = "Showcase"
url = "/showcase"

View file

@ -1,21 +1,22 @@
+++ +++
title = "About" title = "About"
date = "2019-01-25" date = "2018-07-18"
author = "Radek" author = "Radek"
+++ +++
# Hi there <h2>> Hi there<span class="logo__cursor" style="width: 3px; height: 1.625rem;"></span></h2>
My name is Radek and I'm the author of this theme. I made it to help you present your ideas easier. My name is Radek and I'm the author of this theme. I made it to help you present your ideas easier.
We all know how hard is to start something on the web, especially these days. You need to prepare a bunch of stuff, configure them and when thats done — create the content. 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 thats done — create the content.
This theme is pretty basic and covers all of the essentials. All you have to do is start typing! This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
The theme includes: The theme includes:
- **light/dark mode**, depending on your preferences - **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/) - 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) - 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!
So, there you have it... enjoy!

View file

@ -1,6 +0,0 @@
+++
title = "Archive"
layout = "list"
url = "/archive"
type = "archive"
+++

View file

@ -2,17 +2,17 @@
title = "Hello Friend" title = "Hello Friend"
date = "1986-09-17" date = "1986-09-17"
author = "Elliot" author = "Elliot"
cover = "img/hello.jpg" cover = "hello.jpg"
description = "\"Hello, friend?\" That's lame. Maybe I should give you a name?" description = "\"Hello, friend?\" That's lame. Maybe I should give you a name?"
+++ +++
> "Hello, friend?" That's lame. > "Hello, friend?" That's lame.
> Maybe I should give you a name... > Maybe I should give you a name...
> But that's a slippery slope. > But that's a slippery slope.
> You're only in my head. > You're only in my head.
> We have to remember that... > We have to remember that...
> Shit. > Shit.
> It's actually happened. > It's actually happened.
> I'm talking to an imaginary person. > I'm talking to an imaginary person.
> >
> **— Mr. Robot S01E01** > **— Mr. Robot S01E01**

View file

@ -1,84 +1,94 @@
--- +++
title: "Showcase" title = "Showcase"
date: "2019-01-18" date = "2018-07-18"
author: "Lorem Ipsum" author = "Hello Robot"
--- +++
## Header 2 ## Header 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec interdum metus. Aenean rutrum ligula sodales ex auctor, sed tempus dui mollis. Curabitur ipsum dui, aliquet nec commodo at, tristique eget ante. **Donec quis dolor nec nunc mollis interdum vel in purus**. Sed vitae leo scelerisque, sollicitudin elit sed, congue ante. In augue nisl, vestibulum commodo est a, tristique porttitor est. Proin laoreet iaculis ornare. Nullam ut neque quam. 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.
> 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. > 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.
### Header 3 ### Header 3
Nulla libero turpis, lacinia vitae cursus ut, auctor dictum nisl. Fusce varius felis nec sem ullamcorper, at convallis nisi vestibulum. Duis risus odio, porta sit amet placerat mollis, tincidunt non mauris. Suspendisse fringilla, `odio a dignissim pharetra`, est urna sollicitudin urna, eu scelerisque magna ex vitae tellus. 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.
```css <pre>
/* PostCSS code */ <code class="language-css">
/* PostCSS code by PrismJS */
pre { pre {
background: #1a1a1d; background: #1a1a1d;
padding: 20px; padding: 20px;
border-radius: 8px; border-radius: 8px;
font-size: 1rem; font-size: 1rem;
overflow: auto; overflow: auto;
@media (--phone) { @media (--phone) {
white-space: pre-wrap; white-space: pre-wrap;
word-wrap: break-word; word-wrap: break-word;
}
code {
background: none !important;
color: #ccc;
padding: 0;
font-size: inherit;
.dark-theme & {
color: inherit;
}
}
}
</code>
</pre>
<pre>
<code class="language-js">
// JS code by PrismJS
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())
} }
code { isMobileMenu()
background: none !important;
color: #ccc;
padding: 0;
font-size: inherit;
}
}
```
```js menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden'))
// JS code
const menuTrigger = document.querySelector('.menu-trigger') window.addEventListener('resize', isMobileMenu)
const menu = document.querySelector('.menu') </code>
const mobileQuery = getComputedStyle(document.body).getPropertyValue('--phoneWidth') </pre>
const isMobile = () => window.matchMedia(mobileQuery).matches
const isMobileMenu = () => {
menuTrigger.classList.toggle('hidden', !isMobile())
menu.classList.toggle('hidden', isMobile())
}
isMobileMenu() {{< highlight html >}}
<!-- HTML code by Chroma (built-in highlighter in Hugo ) -->
menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden'))
window.addEventListener('resize', isMobileMenu)
```
```html
<!-- HTML code -->
<section id="main"> <section id="main">
<div> <div>
<h1 id="title">{{ .Title }}</h1> <h1 id="title">{{ .Title }}</h1>
{{ range .Pages }} {{ range .Pages }}
{{ .Render "summary"}} {{ .Render "summary"}}
{{ end }} {{ end }}
</div> </div>
</section> </section>
``` {{< /highlight >}}
#### Header 4 #### Header 4
Curabitur scelerisque felis viverra varius scelerisque. Ut enim libero, molestie gravida blandit at, mollis ornare tellus. Cras arcu mi, ultrices vel pulvinar vel, volutpat eu tortor. Nullam nec eros quis massa ultrices iaculis sed in metus. Praesent sollicitudin sem sit amet orci tempor gravida. 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.
- Maecenas elementum vitae nibh vitae porttitor. - Fsociety delete malicious code nodes.
- Aenean consequat, risus ut cursus placerat, arcu nulla sodales risus, ut molestie tellus tellus et dui. - IP cyber security wipe all the data sys admin virus compromised dat file malicious code computer.
- Integer imperdiet turpis vitae lacus imperdiet, ut ornare ligula auctor. Integer in mi eu velit vehicula suscipit eget vulputate nulla. - Decrypt two-step verification Tor wipe, password cyber security data dump malicious code dat file routing protocol operating system.
- Etiam vitae enim quis velit lobortis placerat a ut sem. - Anonymous boot up website AFK.
- Curabitur lobortis ante sit amet orci pulvinar, sollicitudin viverra nunc accumsan. - Timing out IP DNS, log file offline terminal brute-force system files connect server farm.
- Praesent fermentum orci quis leo facilisis posuere. - Reboot sys admin worm log file wipe.
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. {{< 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View file

@ -1,29 +0,0 @@
{{ 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 }}

View file

@ -1,30 +1,24 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ $.Site.Language }}"> <html lang="{{ .Site.Language }}">
<head> <head>
{{ block "title" . }} {{ block "title" . }}
<title> <title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ end }}
{{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ partial "head.html" . }}
{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }} </head>
</title> <body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
<div class="container">
{{ partial "header.html" . }}
<div class="content">
{{ block "main" . }}
{{ end }} {{ end }}
{{ partial "head.html" . }} </div>
</head>
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
<div class="container">
{{ partial "header.html" . }}
<div class="content"> {{ block "footer" . }}
{{ block "main" . }} {{ end }} {{ partial "footer.html" . }}
</div> {{ end }}
</div>
{{ block "footer" . }} </body>
{{ partial "footer.html" . }}
{{ end }}
</div>
{{ if $.Site.GoogleAnalytics }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
</body>
</html> </html>

View file

@ -1,69 +0,0 @@
{{ 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>&nbsp;
{{ 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 }}

View file

@ -1,60 +1,39 @@
{{ define "main" }} {{ define "main" }}
<div class="posts"> <div class="posts">
{{ range .Pages }} {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
<div class="post on-list"> {{ range $paginator.Pages }}
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1> <div class="post on-list">
<div class="post-meta"> <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
{{ if .Date }} <div class="post-meta">
<span class="post-date"> <span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }} {{ .Date.Format "2006-01-02" }}
</span> </span>
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
</div>
{{ if $.Site.Params.LastModDisplay }} {{ if .Params.tags }}
{{ partial "lastmod.html" . }} <span class="post-tags">
{{ end }} {{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }} {{ end }}
{{ with .Params.Author }} </span>
<span class="post-author" {{ end }}
>— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span
>{{ end }}
{{ with .Params.Cover }}
<img src="/img/{{ . }}" class="post-cover" />
{{ end }}
{{ if $.Site.Params.ShowReadingTime }} <div class="post-content">
<span class="post-read-time" {{ with .Description }}
>— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span {{ . | markdownify }}
> {{ else }}
{{ if .Truncated }}
{{ .Summary | markdownify }}
{{ end }} {{ end }}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>&nbsp;
{{ 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 }} {{ end }}
</div> </div>
<div><a class="read-more button" href="{{.RelPermalink}}">{{ .Site.Params.ReadMore }} →</a></div>
</div>
{{ end }} {{ end }}
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</div> </div>

View file

@ -1,64 +0,0 @@
{{- $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>

View file

@ -1,91 +1,53 @@
{{ define "main" }} {{ 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"> <div class="post">
<h1 class="post-title">{{ .Title | markdownify }}</h1> <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<div class="post-meta"> <div class="post-meta">
{{ if .Date | default nil }} <span class="post-date">
<span class="post-date"> {{ .Date.Format "2006-01-02" }}
{{ .Date.Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }} </span>
</span> <span class="post-author">{{ .Site.Params.WrittenBy }} {{ .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> </div>
{{ if .Params.tags }} {{ if .Params.tags }}
<span class="post-tags"> <span class="post-tags">
{{ range .Params.tags }} {{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>&nbsp; #<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }} {{ end }}
</span> </span>
{{ end }} {{ end }}
{{ if .Params.Cover }} {{ with .Params.Cover }}
{{ partial "postcover.html" . }} <img src="/img/{{ . }}" class="post-cover" />
{{ end }} {{ end }}
<div class="post-content"> <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 }} {{ .Content }}
</div> </div>
{{ if eq .Type $.Site.Params.contentTypeName }} {{ if or .NextInSection .PrevInSection }}
{{ if or .NextInSection .PrevInSection }} <div class="pagination">
<div class="pagination"> <div class="pagination__title">
<div class="pagination__title"> <span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
<span class="pagination__title-h" <hr />
>{{ $.Site.Params.ReadOtherPosts | default "Read other posts" }}</span
>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon"></span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div> </div>
{{ end }} <div class="pagination__buttons">
{{ end }} {{ if .NextInSection }}
<span class="button previous">
{{ if not (eq .Params.Comments "false") }} <a href="{{ .NextInSection.Permalink }}">
{{ if or (eq .Type $.Site.Params.contentTypeName) (.Params.Comments) }} <span class="button__icon"></span>
{{ partial "comments.html" . }} <span class="button__text">{{ .NextInSection.Title }}</span>
{{ end }} </a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}

View file

@ -1,19 +0,0 @@
{{ 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 }}

View file

@ -1,49 +0,0 @@
{{ 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 }}

View file

@ -4,7 +4,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 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'); })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ . }}', 'auto'); ga('create', '{{.}}', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>

View file

@ -1,7 +0,0 @@
<!--
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 -->

View file

@ -1,4 +0,0 @@
<!--
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.
-->

View file

@ -1,4 +0,0 @@
<!--
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.
-->

View file

@ -1,24 +1,15 @@
<footer class="footer"> <footer class="footer">
<div class="footer__inner"> <div class="footer__inner">
{{ if $.Site.Copyright }} {{ if .Site.Copyright }}
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div> <div class="copyright copyright--user">{{ .Site.Copyright| safeHTML }}</div>
{{ else }} {{else}}
{{ partial "logo.html" . }} {{ partial "logo.html" . }}
<div class="copyright"> <div class="copyright">
<span <span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
>© {{ now.Year }} Powered by <span>Theme created by <a href="https://twitter.com/panr">panr</a></span>
<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> </div>
{{ end }} {{end}}
</div> </div>
</footer> </footer>
<script src="{{ "assets/main.js" | absURL }}"></script> {{ partial "inject.script.html" . }}
<script src="{{ "assets/prism.js" | absURL }}"></script>
{{- partial "extended_footer.html" . }}

View file

@ -1,3 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 146 B

View file

@ -1,50 +1,46 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta <meta name="description" content="{{ if or (.IsHome) (.IsPage) }}{{ .Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
name="description" <meta name="keywords" content="{{ .Site.Params.keywords }}"/>
content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" <meta name="robots" content="noodp"/>
/>
<meta
name="keywords"
content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}"
/>
<meta name="robots" content="noodp" />
<link rel="canonical" href="{{ .Permalink }}" /> <link rel="canonical" href="{{ .Permalink }}" />
<!-- head custom --> <!-- CSS -->
{{- partial "prepended_head.html" . }} <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'>
<!-- Theme CSS --> {{ partial "inject.stylesheet.html" . }}
<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 --> <!-- Icons -->
<link <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/apple-touch-icon-144-precomposed.png">
rel="apple-touch-icon-precomposed" <link rel="shortcut icon" href="/img/favicon.png">
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 --> <!-- Twitter Card -->
{{ template "_internal/twitter_cards.html" . }} <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 }}">
<!-- OG data --> <!-- OG data -->
{{ template "_internal/opengraph.html" . }} <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 }}
<!-- RSS | JSON --> <!-- RSS -->
{{ range .AlternativeOutputFormats -}} {{ if .RSSLink }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} <link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end -}} {{ end }}
<!-- head custom --> <!-- JSON Feed -->
{{- partial "extended_head.html" . }} {{ if .OutputFormats.Get "json" }}
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
{{ end }}

View file

@ -2,12 +2,12 @@
<span class="header__inner"> <span class="header__inner">
{{ partial "logo.html" . }} {{ partial "logo.html" . }}
<span class="header__right"> <span class="header__right">
{{ if len $.Site.Menus }} {{ if len .Site.Menus }}
{{ partial "menu.html" . }} {{ partial "menu.html" . }}
<span class="menu-trigger"> <span class="menu-trigger">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" /> <path d="M0 0h24v24H0z" fill="none"/>
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" /> <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
</svg> </svg>
</span> </span>
{{ end }} {{ end }}

View file

@ -0,0 +1,5 @@
<script src="/assets/main.js"></script>
<script src="/assets/prism.js"></script>

View file

@ -0,0 +1,3 @@
<link rel="stylesheet" href="/assets/style.css">

View file

@ -1,10 +0,0 @@
{{ $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 }}

View file

@ -1,15 +1,11 @@
<a <a href="{{ .Site.BaseURL }}" style="text-decoration: none;">
href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{ else }}{{ $.Site.BaseURL }}{{ end }}" <div class="logo">
class="logo" {{ if .Site.Params.Logo.path }}
style="text-decoration: none;" <img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
>
{{ if $.Site.Params.Logo.path }}
<img src="{{ $.Site.Params.Logo.path }}" alt="{{ $.Site.Params.Logo.alt }}" />
{{ else }} {{ else }}
<span class="logo__mark">{{ partial "greater-icon.html" . }}</span> <span class="logo__mark">></span>
<span class="logo__text" <span class="logo__text">{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span>
>{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}hello friend{{ end }}</span <span class="logo__cursor"></span>
> {{ end }}
<span class="logo__cursor"></span> </div>
{{ end }}
</a> </a>

View file

@ -1,42 +1,7 @@
<nav class="menu"> <nav class="menu">
<ul class="menu__inner menu__inner--desktop"> <ul class="menu__inner">
{{ if or $.Site.Params.showMenuItems (eq $.Site.Params.showMenuItems 0) }} {{ range .Site.Menus.main }}
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }} <li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ 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 }} {{ end }}
</ul> </ul>
</nav>
<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>

View file

@ -4,14 +4,14 @@
<span class="button previous"> <span class="button previous">
<a href="{{ .Paginator.Prev.URL }}"> <a href="{{ .Paginator.Prev.URL }}">
<span class="button__icon"></span> <span class="button__icon"></span>
<span class="button__text">{{ $.Site.Params.NewerPosts | default "Newer posts" }}</span> <span class="button__text">Newer posts</span>
</a> </a>
</span> </span>
{{ end }} {{ end }}
{{ if .Paginator.HasNext }} {{ if .Paginator.HasNext }}
<span class="button next"> <span class="button next">
<a href="{{ .Paginator.Next.URL }}"> <a href="{{ .Paginator.Next.URL }}">
<span class="button__text">{{ $.Site.Params.OlderPosts | default "Older posts" }}</span> <span class="button__text">Older posts</span>
<span class="button__icon"></span> <span class="button__icon"></span>
</a> </a>
</span> </span>

View file

@ -1,11 +0,0 @@
<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>

View file

@ -1,4 +0,0 @@
<!--
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.
-->

View file

@ -1,14 +1,5 @@
<svg <svg class="theme-toggler" width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
class="theme-toggler" <path d="M22 41C32.4934 41 41 32.4934 41 22C41 11.5066 32.4934 3 22
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 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" 13.7157 13.7157 7 22 7V37C13.7157 37 7 30.2843 7 22Z"/>
/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 317 B

View file

@ -1,15 +0,0 @@
{{ $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 }}

View file

@ -2,7 +2,7 @@
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" > <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 }} /> <img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
{{ if .Get "caption" }} {{ if .Get "caption" }}
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" | markdownify }}</figcaption> <figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" }}</figcaption>
{{ end }} {{ end }}
</figure> </figure>
{{ end }} {{ end }}

View file

@ -1,30 +0,0 @@
{{ $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 Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,12 @@
{ {
"name": "hello-friend", "name": "hello-friend",
"version": "2.1.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>", "author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "webpack --mode=development --watch", "dev": "webpack --mode=development --watch",
"build": "webpack --mode=production", "build": "webpack --mode=production"
"prepare": "husky install"
}, },
"browserslist": [ "browserslist": [
"last 2 versions", "last 2 versions",
@ -15,48 +14,39 @@
"not dead" "not dead"
], ],
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.2.3", "@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.2.2", "@babel/core": "^7.0.0-beta.54",
"@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-runtime": "^7.0.0-beta.54",
"@babel/preset-env": "^7.3.1", "@babel/preset-env": "^7.0.0-beta.54",
"@babel/preset-stage-2": "^7.0.0", "@babel/preset-stage-2": "^7.0.0-beta.54",
"babel-eslint": "^10.1.0", "babel-eslint": "8.2.1",
"babel-loader": "^8.0.5", "babel-loader": "^8.0.0-beta.0",
"browserslist": "^4.0.1", "browserslist": "^4.0.1",
"clean-webpack-plugin": "^4.0.0", "clean-webpack-plugin": "^0.1.16",
"clipboard": "^2.0.4", "clipboard": "^2.0.1",
"css-loader": "^6.5.1", "css-loader": "^1.0.0",
"cssnano": "^5.0.8", "cssnano": "^4.0.3",
"eslint-config-airbnb": "^18.2.0", "eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^2.9.0",
"eslint-plugin-jsx-a11y": "^6.2.1", "eslint-plugin-jsx-a11y": "^6.1.1",
"file-loader": "^6.1.0", "extract-text-webpack-plugin": "^4.0.0-beta.0",
"html-webpack-plugin": "^5.5.0", "file-loader": "^1.1.11",
"husky": "^7.0.4", "html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^2.4.3", "postcss": "^7.0.0",
"postcss": "^8.2.10", "postcss-browser-reporter": "^0.5.0",
"postcss-browser-reporter": "^0.6.0", "postcss-cli": "^6.0.0",
"postcss-cli": "^9.0.1", "postcss-import": "^11.1.0",
"postcss-color-function": "^4.0.1", "postcss-loader": "^2.0.5",
"postcss-color-mod-function": "^3.0.3", "postcss-nested": "^3.0.0",
"postcss-import": "^14.0.0", "postcss-preset-env": "^5.2.2",
"postcss-loader": "^6.2.0", "postcss-reporter": "^5.0.0",
"postcss-mixins": "^8.1.0", "postcss-url": "^7.3.2",
"postcss-nested": "^5.0.5", "prettier-eslint-cli": "^4.7.1",
"postcss-preset-env": "^6.7.0", "ramda": "^0.25.0",
"postcss-reporter": "^7.0.2", "style-loader": "^0.21.0",
"postcss-url": "^10.1.3", "uglifyjs-webpack-plugin": "^1.2.7",
"prettier-eslint-cli": "^5.0.0", "url-loader": "^1.0.1",
"ramda": "^0.27.1", "webpack": "^4.16.1",
"style-loader": "^3.3.1", "webpack-cli": "^3.1.0"
"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"
}
} }
} }

View file

@ -4,13 +4,11 @@ const nested = require("postcss-nested");
const postCSSPresetEnv = require("postcss-preset-env"); const postCSSPresetEnv = require("postcss-preset-env");
const browsers = require("browserslist"); const browsers = require("browserslist");
const cssnano = require("cssnano"); const cssnano = require("cssnano");
const mixins = require("postcss-mixins");
module.exports = () => ({ module.exports = () => ({
plugins: [ plugins: [
url, url,
imports, imports,
mixins,
nested, nested,
postCSSPresetEnv({ postCSSPresetEnv({
stage: 1, stage: 1,

View file

@ -13,7 +13,7 @@ a.button {
justify-content: center; justify-content: center;
padding: 8px 18px; padding: 8px 18px;
margin-bottom: 5px; margin-bottom: 5px;
background: var(--background-secondary); background: var(--light-background-secondary);
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
@ -23,14 +23,24 @@ a.button {
cursor: pointer; cursor: pointer;
outline: none; outline: none;
.dark-theme & {
background: var(--dark-background-secondary);
color: inherit;
}
/* variants */ /* variants */
&.outline { &.outline {
background: transparent; background: transparent;
border-color: var(--background-secondary); border-color: var(--light-background-secondary);
box-shadow: none; box-shadow: none;
padding: 8px 18px; padding: 8px 18px;
.dark-theme & {
border-color: var(--dark-background-secondary);
color: inherit;
}
:hover { :hover {
transform: none; transform: none;
box-shadow: none; box-shadow: none;
@ -72,6 +82,10 @@ a.read-more:active {
padding: 0; padding: 0;
margin: 20px 0; margin: 20px 0;
font-weight: bold; font-weight: bold;
.dark-theme & {
background: none;
}
} }
.code-toolbar { .code-toolbar {
@ -84,7 +98,7 @@ a.read-more:active {
justify-content: center; justify-content: center;
padding: 3px 8px; padding: 3px 8px;
margin-bottom: 5px; margin-bottom: 5px;
background: var(--background-secondary); background: var(--light-background-secondary);
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
font-size: 13px; font-size: 13px;
@ -94,5 +108,10 @@ a.read-more:active {
appearance: none; appearance: none;
cursor: pointer; cursor: pointer;
outline: none; outline: none;
.dark-theme & {
background: var(--dark-background-secondary);
color: inherit;
}
} }
} }

View file

@ -1,7 +1,7 @@
.footer { .footer {
padding: 40px 20px; padding: 40px 20px;
flex-grow: 0; flex-grow: 0;
color: var(--color-secondary); color: var(--light-color-secondary);
&__inner { &__inner {
display: flex; display: flex;
@ -25,6 +25,7 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
font-size: 1rem; font-size: 1rem;
color: var(--light-color-secondary);
&--user { &--user {
margin: auto; margin: auto;
@ -49,3 +50,4 @@
} }
} }
} }

View file

@ -1,11 +1,15 @@
.header { .header {
background: var(--header); background: #fafafa;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
padding: 20px; padding: 20px;
.dark-theme & {
background: #252627;
}
&__right { &__right {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

44
source/css/inter-ui.css Normal file
View file

@ -0,0 +1,44 @@
@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: 600;
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: 600;
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: 800;
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: 800;
src: url("../fonts/Inter-UI-BoldItalic.woff2") format("woff2"),
url("../fonts/Inter-UI-BoldItalic.woff") format("woff");
}

View file

@ -10,7 +10,11 @@
} }
&:not(:last-of-type) { &:not(:last-of-type) {
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--light-border-color);
.dark-theme & {
border-color: var(--dark-border-color);
}
} }
&-meta { &-meta {
@ -22,6 +26,12 @@
} }
} }
&-date {
&:after {
content: '—';
}
}
&-title { &-title {
font-size: 2.625rem; font-size: 2.625rem;
margin: 0 0 20px; margin: 0 0 20px;
@ -51,16 +61,11 @@
} }
&-cover { &-cover {
border-radius: 8px;
margin: 40px -50px; margin: 40px -50px;
width: 860px; width: 860px;
max-width: 860px; max-width: 860px;
img {
margin: 0 auto;
border-radius: 8px;
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
}
@media (--tablet) { @media (--tablet) {
margin: 20px 0; margin: 20px 0;
width: 100%; width: 100%;

View file

@ -1,7 +1,6 @@
.logo { .logo {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 0 0 auto;
text-decoration: none; text-decoration: none;
font-weight: bold; font-weight: bold;
@ -10,11 +9,7 @@
} }
&__mark { &__mark {
display: inline-flex;
align-items: center;
margin-right: 5px; margin-right: 5px;
@mixin greater-icon 8px;
} }
&__text { &__text {

View file

@ -11,24 +11,30 @@ html {
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif; font-family: 'Inter UI', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1rem; font-size: 1rem;
font-weight: 500;
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
line-height: 1.54; line-height: 1.54;
background-color: var(--background); background-color: var(--light-background);
color: var(--color); color: var(--light-color);
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
@media (--phone) { @media (--phone) {
font-size: 1rem; font-size: 1rem;
} }
&.dark-theme {
background-color: var(--dark-background);
color: var(--dark-color);
}
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
display: flex;
align-items: center;
line-height: 1.3; line-height: 1.3;
} }
@ -107,7 +113,7 @@ figure {
} }
figcaption { figcaption {
font-size: .9rem; font-size: 14px;
margin-top: 5px; margin-top: 5px;
opacity: .8; opacity: .8;
@ -125,29 +131,25 @@ figure {
} }
} }
code, kbd { code {
font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace; font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
background: var(--background-secondary); font-feature-settings: normal;
background: var(--light-background-secondary);
padding: 1px 6px; padding: 1px 6px;
margin: 0 2px; margin: 0 2px;
border-radius: 5px; border-radius: 5px;
font-size: .9rem; font-size: .95rem;
font-weight: normal;
font-feature-settings: normal;
code, kbd { .dark-theme & {
background: transparent; background: var(--dark-background-secondary);
padding: 0;
margin: 0;
} }
} }
pre { pre {
font-feature-settings: normal;
background: #212020; background: #212020;
padding: 20px; padding: 20px;
border-radius: 8px; border-radius: 8px;
font-size: .9rem; font-size: .95rem;
overflow: auto; overflow: auto;
@media (--phone) { @media (--phone) {
@ -156,12 +158,15 @@ pre {
} }
code { code {
font-feature-settings: normal;
background: none !important; background: none !important;
color: #ccc; color: #ccc;
margin: 0; margin: 0;
padding: 0; padding: 0;
font-size: inherit; font-size: inherit;
.dark-theme & {
color: inherit;
}
} }
} }
@ -193,25 +198,6 @@ 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 { ul, ol {
margin-left: 40px; margin-left: 40px;
padding: 0; padding: 0;
@ -248,27 +234,14 @@ ol ol {
hr { hr {
width: 100%; width: 100%;
border: none; border: none;
background: var(--border-color); background: var(--light-border-color);
height: 1px; height: 1px;
.dark-theme & {
background: var(--dark-border-color);
}
} }
.hidden { .hidden {
display: none; 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;
}

66
source/css/menu.css Normal file
View file

@ -0,0 +1,66 @@
.menu {
background: #fafafa;
border-right: 1px solid;
margin-right: 18px;
.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 12px;
}
@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;
}
}
}

View file

@ -11,13 +11,18 @@
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
padding: 5px 10px; padding: 5px 10px;
background: var(--background); background: var(--light-background);
color: var(--color-secondary); color: var(--light-color-secondary);
font-size: .8rem; font-size: .8rem;
text-transform: uppercase; text-transform: uppercase;
text-decoration: none; text-decoration: none;
letter-spacing: .1em; letter-spacing: .1em;
z-index: 1; z-index: 1;
.dark-theme & {
background: var(--dark-background);
color: var(--dark-color-secondary);
}
} }
hr { hr {
@ -47,15 +52,19 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: var(--background-secondary); background: var(--light-background-secondary);
font-size: 1rem; font-size: 1rem;
font-weight: 500; font-weight: 600;
border-radius: 8px; border-radius: 8px;
max-width: 40%; max-width: 40%;
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
appearance: none; appearance: none;
.dark-theme & {
background: var(--dark-background-secondary);
}
+ .button { + .button {
margin-left: 10px; margin-left: 10px;
} }

View file

@ -15,7 +15,7 @@ pre[class*="language-"] {
word-spacing: normal; word-spacing: normal;
word-break: normal; word-break: normal;
word-wrap: normal; word-wrap: normal;
/* line-height: 1.5; */ line-height: 1.5;
-moz-tab-size: 4; -moz-tab-size: 4;
-o-tab-size: 4; -o-tab-size: 4;

13
source/css/style.css Normal file
View file

@ -0,0 +1,13 @@
@import 'variables';
@import 'inter-ui';
@import 'buttons';
@import 'header';
@import 'logo';
@import 'menu';
@import 'main';
@import 'list';
@import 'pagination';
@import 'footer';
@import 'prism';

28
source/css/variables.css Normal file
View file

@ -0,0 +1,28 @@
: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;*/
/*}*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,3 @@
<% htmlWebpackPlugin.files.js.filter(function(js){ return !/\.css$/.test(js) }).forEach(function(js){ %>
<script src="/assets/<%= js %>"></script>
<% }) %>

View file

@ -0,0 +1,3 @@
<% htmlWebpackPlugin.files.css.forEach(function(css){ %>
<link rel="stylesheet" href="/assets/<%= css %>">
<% }) %>

1
source/js/index.js Normal file
View file

@ -0,0 +1 @@
// Add your script here

16
source/js/menu.js Normal file
View file

@ -0,0 +1,16 @@
// Mobile menu
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 && menuTrigger.classList.toggle("hidden", !isMobile());
menu && menu.classList.toggle("hidden", isMobile());
};
isMobileMenu();
menuTrigger && menuTrigger.addEventListener("click", () => menu && menu.classList.toggle("hidden"));
window.addEventListener("resize", isMobileMenu);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more