mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-14 12:25:07 +01:00
Init 1
This commit is contained in:
commit
4e67004628
20
LICENSE.md
Normal file
20
LICENSE.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 panr
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
73
README.md
Normal file
73
README.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Hello Friend
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
|
||||||
|
|
||||||
|
## 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/)
|
||||||
|
- 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
|
||||||
|
|
||||||
|
## How to start
|
||||||
|
|
||||||
|
You can download the theme manually by going to [https://gitlab.com/panr/hugo-theme-hello-friend](https://gitlab.com/panr/hugo-theme-hello-friend) and pasting it to `themes/hello-friend` in your root directory.
|
||||||
|
|
||||||
|
You can also clone it directly to your Hugo folder:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git clone https://gitlab.com/panr/hugo-theme-hello-friend 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://gitlab.com/panr/hugo-theme-hello-friend themes/hello-friend
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to configure
|
||||||
|
|
||||||
|
The theme doesn't require any advanced configuration. Just copy `config.toml` file from `exampleSite` directory to your Hugo root directory and change params fields.
|
||||||
|
|
||||||
|
## How to run your site
|
||||||
|
|
||||||
|
From your Hugo root directory run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ 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
|
||||||
|
|
||||||
|
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):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd themes/hello-friend
|
||||||
|
```
|
||||||
|
|
||||||
|
and then run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install
|
||||||
|
$ npm i yarn
|
||||||
|
$ yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to contribute
|
||||||
|
|
||||||
|
If you spot any bugs, please use [Issue Tracker](https://gitlab.com/panr/hugo-theme-hello-friend/issues) or if you want to add a new feature directly please create a new [Pull/Merge Request](https://gitlab.com/panr/hugo-theme-hello-friend/merge_requests).
|
||||||
|
|
||||||
|
## Licence
|
||||||
|
|
||||||
|
Copyright © 2018 Radosław Kozieł ([@panr](https://twitter.com/panr))
|
||||||
|
|
||||||
|
The theme is released under the MIT License. Check the [original theme license](https://gitlab.com/panr/hugo-theme-hello-friend/blob/master/LICENSE.md) for additional licensing information.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
19
exampleSite/config.toml
Normal file
19
exampleSite/config.toml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
baseurl = "https://example.org/"
|
||||||
|
languageCode = "en-us"
|
||||||
|
title = "Hello Friend"
|
||||||
|
theme = "hello-friend"
|
||||||
|
copyright = ""
|
||||||
|
paginate = 5
|
||||||
|
|
||||||
|
[params]
|
||||||
|
subtitle = "A simple theme for Hugo"
|
||||||
|
|
||||||
|
[menu]
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "about"
|
||||||
|
name = "About"
|
||||||
|
url = "/about"
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "showcase"
|
||||||
|
name = "Showcase"
|
||||||
|
url = "/showcase"
|
22
exampleSite/content/about.md
Normal file
22
exampleSite/content/about.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
+++
|
||||||
|
title = "About"
|
||||||
|
date = "2018-07-18"
|
||||||
|
author = "Radek"
|
||||||
|
+++
|
||||||
|
|
||||||
|
<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.
|
||||||
|
|
||||||
|
We all know how hard is to start something on the web, especially these days. You need to prepare a bunch of stuff, configure them and when that’s done — create the content.
|
||||||
|
|
||||||
|
This theme is pretty basic and covers all of the essentials. All you have to do is start typing!
|
||||||
|
|
||||||
|
The theme includes:
|
||||||
|
|
||||||
|
- **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!
|
21
exampleSite/content/post/hello.md
Normal file
21
exampleSite/content/post/hello.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
+++
|
||||||
|
title = "Hello Friend"
|
||||||
|
date = "1986-09-17"
|
||||||
|
author = "Elliot"
|
||||||
|
cover = "hello.jpg"
|
||||||
|
description = "\"Hello, friend?\" That's lame. Maybe I should give you a name?"
|
||||||
|
+++
|
||||||
|
|
||||||
|
> "Hello, friend?" That's lame.
|
||||||
|
> Maybe I should give you a name...
|
||||||
|
> But that's a slippery slope.
|
||||||
|
> You're only in my head.
|
||||||
|
> We have to remember that...
|
||||||
|
> Shit.
|
||||||
|
> It's actually happened.
|
||||||
|
> I'm talking to an imaginary person.
|
||||||
|
>
|
||||||
|
> **— Mr. Robot S01E01**
|
||||||
|
|
||||||
|
|
||||||
|
|
94
exampleSite/content/showcase.md
Normal file
94
exampleSite/content/showcase.md
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
+++
|
||||||
|
title = "Showcase"
|
||||||
|
date = "2018-07-18"
|
||||||
|
author = "Hello Robot"
|
||||||
|
+++
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
> 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
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<code class="language-css">
|
||||||
|
/* PostCSS code by PrismJS */
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
.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())
|
||||||
|
}
|
||||||
|
|
||||||
|
isMobileMenu()
|
||||||
|
|
||||||
|
menuTrigger.addEventListener('click', () => menu.classList.toggle('hidden'))
|
||||||
|
|
||||||
|
window.addEventListener('resize', isMobileMenu)
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
{{< highlight html >}}
|
||||||
|
<!-- HTML code by Chroma (built-in highlighter in Hugo ) -->
|
||||||
|
|
||||||
|
<section id="main">
|
||||||
|
<div>
|
||||||
|
<h1 id="title">{{ .Title }}</h1>
|
||||||
|
{{ range .Pages }}
|
||||||
|
{{ .Render "summary"}}
|
||||||
|
{{ 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.
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
{{< 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.
|
BIN
images/screenshot.png
Normal file
BIN
images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 399 KiB |
BIN
images/tn.png
Normal file
BIN
images/tn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 271 KiB |
24
layouts/_default/baseof.html
Normal file
24
layouts/_default/baseof.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<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>
|
||||||
|
{{ end }}
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
{{ block "main" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ block "footer" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
40
layouts/_default/list.html
Normal file
40
layouts/_default/list.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<div class="posts">
|
||||||
|
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||||
|
{{ range $paginator.Pages }}
|
||||||
|
<div class="post on-list">
|
||||||
|
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||||
|
<div class="post-meta">
|
||||||
|
<span class="post-date">
|
||||||
|
{{ .Date.Day }}/{{ sub .Date.Month 0 }}/{{ .Date.Year }}
|
||||||
|
</span>
|
||||||
|
<span class="post-author">Written by {{ .Params.Author }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<span class="post-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Params.Cover }}
|
||||||
|
<img src="/img/{{ . }}" class="post-cover" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="post-content">
|
||||||
|
{{ with .Description }}
|
||||||
|
{{ . | markdownify }}
|
||||||
|
{{ else }}
|
||||||
|
{{ if .Truncated }}
|
||||||
|
{{ .Summary | markdownify }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div><a class="read-more button" href="{{.RelPermalink}}">Read more →</a></div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
43
layouts/_default/single.html
Normal file
43
layouts/_default/single.html
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<div class="post">
|
||||||
|
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
|
<div class="post-meta">
|
||||||
|
<span class="post-date">
|
||||||
|
{{ .Date.Day }}/{{ sub .Date.Month 0 }}/{{ .Date.Year }}
|
||||||
|
</span>
|
||||||
|
<span class="post-author">Written by {{ .Params.Author }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<span class="post-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Params.Cover }}
|
||||||
|
<img src="/img/{{ . }}" class="post-cover" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="post-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
|
<div class="pagination">
|
||||||
|
<div class="pagination__title">
|
||||||
|
<span class="pagination__title-h">Read other posts</span>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
<div class="pagination__buttons">
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<a class="btn next" href="{{ .NextInSection.Permalink }}">← {{ .NextInSection.Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<a class="btn previous" href="{{ .PrevInSection.Permalink }}">{{ .PrevInSection.Title }} →</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
10
layouts/partials/analytics.html
Normal file
10
layouts/partials/analytics.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
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('send', 'pageview');
|
||||||
|
|
||||||
|
</script>
|
11
layouts/partials/bulb-icon.html
Normal file
11
layouts/partials/bulb-icon.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<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>
|
||||||
|
|
After Width: | Height: | Size: 1.0 KiB |
15
layouts/partials/footer.html
Normal file
15
layouts/partials/footer.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<footer class="footer">
|
||||||
|
<div class="footer__inner">
|
||||||
|
{{ 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>Created by <a href="https://twitter.com/panr">panr</a> 2018</span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{{ partial "inject.script.html" . }}
|
46
layouts/partials/head.html
Normal file
46
layouts/partials/head.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<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"/>
|
||||||
|
<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" . }}
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
|
||||||
|
<!-- 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 }}">
|
||||||
|
|
||||||
|
<!-- 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 }}
|
||||||
|
|
||||||
|
<!-- RSS -->
|
||||||
|
{{ if .RSSLink }}
|
||||||
|
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||||
|
{{ 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 }}
|
19
layouts/partials/header.html
Normal file
19
layouts/partials/header.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<header class="header">
|
||||||
|
<span class="header__inner">
|
||||||
|
{{ partial "logo.html" . }}
|
||||||
|
<span class="header__right">
|
||||||
|
{{ if len .Site.Menus }}
|
||||||
|
{{ partial "menu.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
<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"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="theme-toggle">
|
||||||
|
{{ partial "bulb-icon.html" . }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</header>
|
9
layouts/partials/inject.script.html
Normal file
9
layouts/partials/inject.script.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
<script src="/assets/main.js"></script>
|
||||||
|
|
||||||
|
<script src="/assets/menu.js"></script>
|
||||||
|
|
||||||
|
<script src="/assets/theme.js"></script>
|
||||||
|
|
||||||
|
<script src="/assets/prism.js"></script>
|
||||||
|
|
3
layouts/partials/inject.stylesheet.html
Normal file
3
layouts/partials/inject.stylesheet.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
<link rel="stylesheet" href="/assets/style.css">
|
||||||
|
|
7
layouts/partials/logo.html
Normal file
7
layouts/partials/logo.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<a href="{{ .Site.BaseURL }}" style="text-decoration: none;">
|
||||||
|
<div class="logo">
|
||||||
|
<span class="logo__mark">></span>
|
||||||
|
<span class="logo__text">hello friend</span>
|
||||||
|
<span class="logo__cursor"></span>
|
||||||
|
</div>
|
||||||
|
</a>
|
7
layouts/partials/menu.html
Normal file
7
layouts/partials/menu.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<nav class="menu">
|
||||||
|
<ul class="menu__inner">
|
||||||
|
{{ range .Site.Menus.main }}
|
||||||
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
10
layouts/partials/pagination.html
Normal file
10
layouts/partials/pagination.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<div class="pagination">
|
||||||
|
<div class="pagination__buttons">
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<a class="button next" href="{{ .Paginator.Prev.URL }}"><span class="button__icon">←</span></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<a class="button previous" href="{{ .Paginator.Next.URL }}"><span class="button__icon">→</span></a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
42
package.json
Normal file
42
package.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "hello-friend",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"author": "panr & mobily",
|
||||||
|
"license": "private",
|
||||||
|
"scripts": {
|
||||||
|
"start": "hugo server --buildDrafts",
|
||||||
|
"dev": "node node_modules/.bin/webpack"
|
||||||
|
},
|
||||||
|
"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-loader": "^8.0.0-beta.0",
|
||||||
|
"browserslist": "^4.0.1",
|
||||||
|
"clean-webpack-plugin": "^0.1.16",
|
||||||
|
"css-loader": "^1.0.0",
|
||||||
|
"eslint-config-prettier": "^2.9.0",
|
||||||
|
"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-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-strip-inline-comments": "^0.1.5",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
19
postcss.config.js
Normal file
19
postcss.config.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
const url = require('postcss-url')
|
||||||
|
const imports = require('postcss-import')
|
||||||
|
const nested = require('postcss-nested')
|
||||||
|
const stripComments = require('postcss-strip-inline-comments')
|
||||||
|
const postCSSPresetEnv = require('postcss-preset-env')
|
||||||
|
const browsers = require('browserslist')
|
||||||
|
|
||||||
|
module.exports = () => ({
|
||||||
|
plugins: [
|
||||||
|
stripComments,
|
||||||
|
url,
|
||||||
|
imports,
|
||||||
|
nested,
|
||||||
|
postCSSPresetEnv({
|
||||||
|
stage: 1,
|
||||||
|
browsers: 'last 2 versions',
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
82
source/css/buttons.css
Normal file
82
source/css/buttons.css
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
.button-container {
|
||||||
|
display: table;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button,
|
||||||
|
a.button {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 8px 18px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
background: var(--light-background-secondary);
|
||||||
|
text-decoration: none;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
appearance: none;
|
||||||
|
cursor: pointer;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: var(--dark-background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* variants */
|
||||||
|
|
||||||
|
&.outline {
|
||||||
|
background: transparent;
|
||||||
|
border-color: rgba(0, 0, 0, .2);
|
||||||
|
box-shadow: none;
|
||||||
|
padding: 8px 18px;
|
||||||
|
|
||||||
|
:hover {
|
||||||
|
transform: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.primary {
|
||||||
|
box-shadow: 0 4px 6px rgba(50, 50, 93, .11), 0 1px 3px rgba(0, 0, 0, .08);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 2px 6px rgba(50, 50, 93, .21), 0 1px 3px rgba(0, 0, 0, .08);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.link {
|
||||||
|
background: none;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* sizes */
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
font-size: .8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.wide {
|
||||||
|
min-width: 200px;
|
||||||
|
padding: 14px 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.read-more,
|
||||||
|
a.read-more:hover,
|
||||||
|
a.read-more:active {
|
||||||
|
display: inline-flex;
|
||||||
|
background: none;
|
||||||
|
box-shadow: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 20px 0;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
53
source/css/footer.css
Normal file
53
source/css/footer.css
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
.footer {
|
||||||
|
padding: 40px 20px;
|
||||||
|
flex-grow: 0;
|
||||||
|
color: var(--light-color-secondary);
|
||||||
|
|
||||||
|
&__inner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 760px;
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
|
@media (--tablet) {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: var(--light-color-secondary);
|
||||||
|
|
||||||
|
&--user {
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > *:first-child:not(:only-child) {
|
||||||
|
border-right: 1px solid;
|
||||||
|
padding-right: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
@media (--tablet) {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (--tablet) {
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
49
source/css/header.css
Normal file
49
source/css/header.css
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
.header {
|
||||||
|
background: #fafafa;
|
||||||
|
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;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__inner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 760px;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
59
source/css/inter-ui.css
Normal file
59
source/css/inter-ui.css
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
@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");
|
||||||
|
}
|
94
source/css/list.css
Normal file
94
source/css/list.css
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
.post {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 800px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 20px;
|
||||||
|
margin: 20px auto;
|
||||||
|
|
||||||
|
@media (--tablet) {
|
||||||
|
max-width: 660px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-of-type) {
|
||||||
|
border-bottom: 1px solid var(--light-border-color);
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
border-color: var(--dark-border-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
font-size: .85rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-date {
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: '—';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
font-size: 2.625rem;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-tags {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 1rem;
|
||||||
|
opacity: .5;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-content {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-cover {
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 40px -50px;
|
||||||
|
width: 860px;
|
||||||
|
max-width: 860px;
|
||||||
|
|
||||||
|
@media (--tablet) {
|
||||||
|
margin: 20px 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post--regulation {
|
||||||
|
h1 {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
&+ h2 {
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
25
source/css/logo.css
Normal file
25
source/css/logo.css
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&__mark {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__cursor {
|
||||||
|
display: inline-block;
|
||||||
|
width: 2px;
|
||||||
|
height: 1rem;
|
||||||
|
background: #fe5186;
|
||||||
|
margin-left: 5px;
|
||||||
|
border-radius: 2px;
|
||||||
|
animation: cursor 1s infinite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes cursor {
|
||||||
|
0% { opacity: 0; }
|
||||||
|
50% { opacity: 1; }
|
||||||
|
100% { opacity: 0; }
|
||||||
|
}
|
193
source/css/main.css
Normal file
193
source/css/main.css
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
html {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*:before,
|
||||||
|
*:after {
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Inter UI', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.54;
|
||||||
|
background-color: var(--light-background);
|
||||||
|
color: var(--light-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;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
|
||||||
|
background: var(--light-background-secondary);
|
||||||
|
padding: 1px 6px;
|
||||||
|
margin: 0 2px;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: .95rem;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: var(--dark-background-secondary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left: 2px solid;
|
||||||
|
margin: 40px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '”';
|
||||||
|
font-family: Georgia, serif;
|
||||||
|
font-size: 3.875rem;
|
||||||
|
position: absolute;
|
||||||
|
left: -40px;
|
||||||
|
top: -20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p:first-of-type {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin-left: 40px;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol {
|
||||||
|
list-style-type: lower-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1 auto;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 50px 0;
|
||||||
|
|
||||||
|
@media (--phone) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
background: var(--light-border-color);
|
||||||
|
height: 1px;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: var(--dark-border-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
69
source/css/menu.css
Normal file
69
source/css/menu.css
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
source/css/pagination.css
Normal file
47
source/css/pagination.css
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
125
source/css/prism.css
Normal file
125
source/css/prism.css
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
|
13
source/css/style.css
Normal file
13
source/css/style.css
Normal 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
28
source/css/variables.css
Normal 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;*/
|
||||||
|
/*}*/
|
BIN
source/fonts/Inter-UI-Black.woff
Normal file
BIN
source/fonts/Inter-UI-Black.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Black.woff2
Normal file
BIN
source/fonts/Inter-UI-Black.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-BlackItalic.woff
Normal file
BIN
source/fonts/Inter-UI-BlackItalic.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-BlackItalic.woff2
Normal file
BIN
source/fonts/Inter-UI-BlackItalic.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Bold.woff
Normal file
BIN
source/fonts/Inter-UI-Bold.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Bold.woff2
Normal file
BIN
source/fonts/Inter-UI-Bold.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-BoldItalic.woff
Normal file
BIN
source/fonts/Inter-UI-BoldItalic.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-BoldItalic.woff2
Normal file
BIN
source/fonts/Inter-UI-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Italic.woff
Normal file
BIN
source/fonts/Inter-UI-Italic.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Italic.woff2
Normal file
BIN
source/fonts/Inter-UI-Italic.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Medium.woff
Normal file
BIN
source/fonts/Inter-UI-Medium.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Medium.woff2
Normal file
BIN
source/fonts/Inter-UI-Medium.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-MediumItalic.woff
Normal file
BIN
source/fonts/Inter-UI-MediumItalic.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-MediumItalic.woff2
Normal file
BIN
source/fonts/Inter-UI-MediumItalic.woff2
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Regular.woff
Normal file
BIN
source/fonts/Inter-UI-Regular.woff
Normal file
Binary file not shown.
BIN
source/fonts/Inter-UI-Regular.woff2
Normal file
BIN
source/fonts/Inter-UI-Regular.woff2
Normal file
Binary file not shown.
3
source/html/inject.script.ejs
Normal file
3
source/html/inject.script.ejs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<% htmlWebpackPlugin.files.js.filter(function(js){ return !/\.css$/.test(js) }).forEach(function(js){ %>
|
||||||
|
<script src="/assets/<%= js %>"></script>
|
||||||
|
<% }) %>
|
3
source/html/inject.stylesheet.ejs
Normal file
3
source/html/inject.stylesheet.ejs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<% htmlWebpackPlugin.files.css.forEach(function(css){ %>
|
||||||
|
<link rel="stylesheet" href="/assets/<%= css %>">
|
||||||
|
<% }) %>
|
1
source/js/index.js
Normal file
1
source/js/index.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
// Add your script here
|
16
source/js/menu.js
Normal file
16
source/js/menu.js
Normal 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.addEventListener("click", () => menu && menu.classList.toggle("hidden"));
|
||||||
|
|
||||||
|
window.addEventListener("resize", isMobileMenu);
|
18
source/js/prism.js
Normal file
18
source/js/prism.js
Normal file
File diff suppressed because one or more lines are too long
12
source/js/theme.js
Normal file
12
source/js/theme.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Toggle theme
|
||||||
|
|
||||||
|
const getTheme = localStorage.getItem('theme')
|
||||||
|
const themeToggle = document.querySelector('.theme-toggle')
|
||||||
|
const isDark = getTheme === 'dark'
|
||||||
|
|
||||||
|
document.body.classList.toggle('dark-theme', isDark)
|
||||||
|
|
||||||
|
themeToggle.addEventListener('click', () => {
|
||||||
|
document.body.classList.toggle('dark-theme')
|
||||||
|
localStorage.setItem('theme', document.body.classList.contains('dark-theme') ? 'dark' : 'light')
|
||||||
|
})
|
BIN
static/assets/0a1242bedd6453e33ea8bfb1a7fb2af4.woff
Normal file
BIN
static/assets/0a1242bedd6453e33ea8bfb1a7fb2af4.woff
Normal file
Binary file not shown.
BIN
static/assets/28b144c25989d58d1efc682da3bbaafb.woff2
Normal file
BIN
static/assets/28b144c25989d58d1efc682da3bbaafb.woff2
Normal file
Binary file not shown.
BIN
static/assets/2b29c19f434999cda5a1cdc166684cb0.woff2
Normal file
BIN
static/assets/2b29c19f434999cda5a1cdc166684cb0.woff2
Normal file
Binary file not shown.
BIN
static/assets/3ca46ee35e2e0a102cb63a64629ff935.woff
Normal file
BIN
static/assets/3ca46ee35e2e0a102cb63a64629ff935.woff
Normal file
Binary file not shown.
BIN
static/assets/7719d61e224c7bfe4e45a2427f7c1dda.woff
Normal file
BIN
static/assets/7719d61e224c7bfe4e45a2427f7c1dda.woff
Normal file
Binary file not shown.
BIN
static/assets/8300e08855db2eb7f74402a173874e83.woff2
Normal file
BIN
static/assets/8300e08855db2eb7f74402a173874e83.woff2
Normal file
Binary file not shown.
BIN
static/assets/84c42c5d04986c70ad2fac54f3e00937.woff
Normal file
BIN
static/assets/84c42c5d04986c70ad2fac54f3e00937.woff
Normal file
Binary file not shown.
BIN
static/assets/8506a8d02c2e819508bc53d65de6795a.woff2
Normal file
BIN
static/assets/8506a8d02c2e819508bc53d65de6795a.woff2
Normal file
Binary file not shown.
BIN
static/assets/86c6d121f1d396c123e9f2b0b18040a0.woff
Normal file
BIN
static/assets/86c6d121f1d396c123e9f2b0b18040a0.woff
Normal file
Binary file not shown.
BIN
static/assets/8b0d16839ccd5eb17d2d2c57fc7b879c.woff
Normal file
BIN
static/assets/8b0d16839ccd5eb17d2d2c57fc7b879c.woff
Normal file
Binary file not shown.
BIN
static/assets/a4b302b56c07e87c3428227270d313fa.woff2
Normal file
BIN
static/assets/a4b302b56c07e87c3428227270d313fa.woff2
Normal file
Binary file not shown.
BIN
static/assets/ada67516bfcb321d3af9a10b5ac85969.woff2
Normal file
BIN
static/assets/ada67516bfcb321d3af9a10b5ac85969.woff2
Normal file
Binary file not shown.
BIN
static/assets/bc389a025ce24c8a922a75a14efb9849.woff2
Normal file
BIN
static/assets/bc389a025ce24c8a922a75a14efb9849.woff2
Normal file
Binary file not shown.
BIN
static/assets/da612650c903c13b297c827884dcb8db.woff2
Normal file
BIN
static/assets/da612650c903c13b297c827884dcb8db.woff2
Normal file
Binary file not shown.
BIN
static/assets/f0e3c382b00425de3b4ad83483ca72db.woff
Normal file
BIN
static/assets/f0e3c382b00425de3b4ad83483ca72db.woff
Normal file
Binary file not shown.
BIN
static/assets/f62e9538012bbc071a1c47254dcd6232.woff
Normal file
BIN
static/assets/f62e9538012bbc071a1c47254dcd6232.woff
Normal file
Binary file not shown.
1
static/assets/main.js
Normal file
1
static/assets/main.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){"use strict"}});
|
1
static/assets/menu.js
Normal file
1
static/assets/menu.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}({3:function(e,t,n){"use strict";var r=document.querySelector(".menu-trigger"),o=document.querySelector(".menu"),u=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),i=function(){return window.matchMedia(u).matches},c=function(){r&&r.classList.toggle("hidden",!i()),o&&o.classList.toggle("hidden",i())};c(),r.addEventListener("click",function(){return o&&o.classList.toggle("hidden")}),window.addEventListener("resize",c)}});
|
1
static/assets/prism.js
Normal file
1
static/assets/prism.js
Normal file
File diff suppressed because one or more lines are too long
1014
static/assets/style.css
Normal file
1014
static/assets/style.css
Normal file
File diff suppressed because it is too large
Load Diff
1
static/assets/theme.js
Normal file
1
static/assets/theme.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}({2:function(e,t,r){"use strict";var n=localStorage.getItem("theme"),o=document.querySelector(".theme-toggle"),u="dark"===n;document.body.classList.toggle("dark-theme",u),o.addEventListener("click",function(){document.body.classList.toggle("dark-theme"),localStorage.setItem("theme",document.body.classList.contains("dark-theme")?"dark":"light")})}});
|
BIN
static/img/hello.jpg
Normal file
BIN
static/img/hello.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 KiB |
13
theme.toml
Normal file
13
theme.toml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name = "hello-friend"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://gitlab.com/panr/hugo-theme-hello-friend/blob/master/LICENSE.md"
|
||||||
|
description = "A simple theme for Hugo. That's it."
|
||||||
|
tags = ["minimal", "clean", "monochromatic", "simple", "light", "dark", "blog", "personal site", "responsive", "highlighting"]
|
||||||
|
features = ["blog", "shortcode"]
|
||||||
|
min_version = 0.30
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "panr"
|
||||||
|
homepage = "http://radoslawkoziel.pl"
|
||||||
|
twitter = "https://twitter.com/panr"
|
||||||
|
|
122
webpack.config.js
Normal file
122
webpack.config.js
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
const Webpack = require('webpack')
|
||||||
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
|
const CleanPlugin = require('clean-webpack-plugin')
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||||
|
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const isProduction = process.env.NODE_ENV === 'production'
|
||||||
|
|
||||||
|
const join = (...paths) => path.join(__dirname, ...paths)
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
resolve: {
|
||||||
|
extensions: [
|
||||||
|
'.js',
|
||||||
|
'.css'
|
||||||
|
],
|
||||||
|
modules: [
|
||||||
|
'source',
|
||||||
|
'node_modules'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
watch: !isProduction,
|
||||||
|
entry: {
|
||||||
|
'main.js': join('source', 'js', 'index.js'),
|
||||||
|
'menu.js': join('source', 'js', 'menu.js'),
|
||||||
|
'theme.js': join('source', 'js', 'theme.js'),
|
||||||
|
'prism.js': join('source', 'js', 'prism.js'),
|
||||||
|
'style.css': join('source', 'css', 'style.css'),
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
filename: '[name]',
|
||||||
|
path: join('static/assets'),
|
||||||
|
publicPath: ''
|
||||||
|
},
|
||||||
|
performance: {
|
||||||
|
hints: false
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
presets: ['@babel/preset-env']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpg|woff|woff2|ttf|eot|svg)$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'url-loader',
|
||||||
|
options: {
|
||||||
|
limit: 8192
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.css$/,
|
||||||
|
use: ExtractTextPlugin.extract({
|
||||||
|
fallback: 'style-loader',
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'css-loader',
|
||||||
|
options: {
|
||||||
|
minimize: true,
|
||||||
|
modules: true,
|
||||||
|
importLoaders: 1,
|
||||||
|
localIdentName: '[local]'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: 'postcss-loader',
|
||||||
|
options: {
|
||||||
|
config: {
|
||||||
|
path: 'postcss.config.js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
name: 'vendor',
|
||||||
|
minChunks: 2
|
||||||
|
},
|
||||||
|
minimizer: [
|
||||||
|
new UglifyJsPlugin({
|
||||||
|
sourceMap: false,
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new CleanPlugin(join('static/assets')),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
template: join('source', 'html', 'inject.script.ejs'),
|
||||||
|
filename: join('layouts', 'partials', 'inject.script.html'),
|
||||||
|
inject: false
|
||||||
|
}),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
template: join('source', 'html', 'inject.stylesheet.ejs'),
|
||||||
|
filename: join('layouts', 'partials', 'inject.stylesheet.html'),
|
||||||
|
inject: false,
|
||||||
|
}),
|
||||||
|
new ExtractTextPlugin('[name]'),
|
||||||
|
new Webpack.LoaderOptionsPlugin({
|
||||||
|
minimize: true,
|
||||||
|
debug: true
|
||||||
|
}),
|
||||||
|
new Webpack.DefinePlugin({
|
||||||
|
'process.env.NODE_ENV': JSON.stringify('development')
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user