The graat customizing ...

This commit is contained in:
Djordje Atlialp 2019-01-27 23:02:55 +01:00
parent 89e144b4e8
commit 7aad132ff7
56 changed files with 8724 additions and 8482 deletions

8
archetypes/default.md Normal file
View File

@ -0,0 +1,8 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
comments: false
images:
---

10
archetypes/posts.md Normal file
View File

@ -0,0 +1,10 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
toc: false
images:
tags:
- untagged
---

21
i18n/en.toml Normal file
View File

@ -0,0 +1,21 @@
# Translations for English
# https://gohugo.io/content-management/multilingual/#translation-of-strings
# 404.html
#
[notFound]
other = "Oops, page not found…"
[home]
other = "Home"
[archives]
other = "Archives"
# posts/single.html
#
[wordCount]
other = "{{ .WordCount }} Words"
[tableOfContents]
other = "Table of Contents"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

15
layouts/404.html Normal file
View File

@ -0,0 +1,15 @@
{{ define "main" }}
<div id="spotlight" class="error-404 animated fadeIn">
<p class="img-404">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-cloud-drizzle"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>
</p>
<div class="banner-404">
<h1>404</h1>
<p>{{ i18n "notFound" }}</p>
<p class="btn-404">
<a href="{{.Site.BaseURL}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>{{ i18n "home" }}</a>
<a href="{{ "posts" | absURL }}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-archive"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>{{ i18n "archives" }}</a>
</p>
</div>
</div>
{{ end }}

View File

@ -1,24 +1,20 @@
<!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 class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
<div class="container">
{{ partial "header.html" . }}
<head>
{{ partial "head.html" . }}
</head>
<div class="content">
{{ block "main" . }}
{{ end }}
</div>
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
<div class="container">
{{ partial "header.html" . }}
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</div>
<div class="content">
{{ block "main" . }}{{ end }}
</div>
</body>
{{ block "footer" . }}
{{ partial "footer.html" . }}
{{ end }}
</div>
</body>
</html>

View File

@ -1,43 +1,26 @@
{{ define "main" }}
<div class="posts">
{{ $isntDefault := not (or (eq (trim .Site.Params.contentTypeName " ") "posts") (eq (trim .Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string .Site.Params.contentTypeName) "posts" }}
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
<main class="posts">
<h1>{{ .Title }}</h1>
{{ range $paginator.Pages }}
<div class="post on-list">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
</span>
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
</div>
{{- if .Content }}
<div class="content">{{ .Content }}</div>
{{- end }}
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{- range .Data.Pages.GroupByDate "2006" }}
<div class="posts-group">
<div class="post-year">{{ .Key }}</div>
{{ 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}}">{{ .Site.Params.ReadMore }} →</a></div>
</div>
{{ end }}
{{ partial "pagination.html" . }}
</div>
<ul class="posts-list">
{{- range .Pages }}
<li class="post-item">
<a href="{{.Permalink}}">
<span class="post-title">{{.Title}}</span>
<span class="post-day">{{ .Date.Format .Site.Params.dateformShort }}</span>
</a>
</li>
{{- end }}
</ul>
</div>
{{- end }}
</main>
{{ end }}

View File

@ -1,53 +1,79 @@
{{ 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.Format "2006-01-02" }}
</span>
<span class="post-author">{{ .Site.Params.WrittenBy }} {{ .Params.Author }}</span>
</div>
<main class="post">
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
<article>
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
{{- if .Params.toc }}
<hr />
<aside id="toc">
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
{{ .TableOfContents }}
</aside>
<hr />
{{- end }}
{{ with .Params.Cover }}
<img src="/img/{{ . }}" class="post-cover" />
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
</article>
<hr />
<div class="post-info">
{{- with .Params.tags }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg>
{{- range . -}}
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{.}}</a></span>
{{- end }}
</p>
{{- end }}
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>{{ i18n "wordCount" . }}</p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}</p>
{{- if .GitInfo }}
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}</p>
{{- end }}
</div>
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon"></span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div>
{{ end }}
</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">{{ .Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon"></span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div>
{{ end }}
</div>
<div id="comments" class="thin">
{{- partial "comments.html" . -}}
</div>
</main>
{{ end }}

15
layouts/index.html Normal file
View File

@ -0,0 +1,15 @@
{{ define "main" }}
<div id="home-center">
<h1 id="home-title">{{ .Site.Title }}</h1>
{{- with .Site.Params.homeSubtitle }}
<p id="home-subtitle">{{.}}</p>
{{- end }}
{{- with .Site.Params.social }}
<div id="home-social">
{{ partialCached "social-icons.html" . }}
</div>
{{- end }}
</div>
{{ end }}

View File

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

View File

@ -0,0 +1,3 @@
{{- if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }}
{{- end }}

View File

@ -0,0 +1,6 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{"apple-touch-icon.png" | relURL}}">
<link rel="icon" type="image/png" sizes="32x32" href="{{"favicon-32x32.png" | relURL}}">
<link rel="icon" type="image/png" sizes="16x16" href="{{"favicon-16x16.png" | relURL}}">
<link rel="manifest" href="{{"site.webmanifest" | relURL}}">
<link rel="mask-icon" href="{{"safari-pinned-tab.svg" | relURL}}" color="{{.Site.Params.themeColor}}">
<link rel="shortcut icon" href="{{"favicon.ico" | relURL}}">

View File

@ -1,15 +1,38 @@
<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>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
<span>Theme created by <a href="https://twitter.com/panr">panr</a></span>
</div>
{{end}}
</div>
<div class="footer__inner">
<div class="footer__content">
<span>&copy; {{ now.Format "2006" }}</span>
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>
<span>{{ .Site.Copyright| safeHTML }}</span>
{{ range .Site.Menus.footer }}
<span><a href="{{ .URL }}">{{ .Name }}</a></span>
{{ end }}
<span>{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} <a href="{{ "posts/index.xml" | absURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a>{{ end }}</span>
</div>
</div>
<div class="footer__inner">
<div class="footer__content">
</div>
</div>
<div class="footer__inner">
<div class="footer__content">
<span>Powered by <a href="http://gohugo.io">Hugo</a></span>
<span>Made with &#10084; by <a href="https://github.com/rhazdon">rhazdon</a></span>
</div>
</div>
</footer>
{{ partial "inject.script.html" . }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.js"></script>
<script src="/assets/main.js"></script>
{{- if .Site.GoogleAnalytics }}
<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', '{{.Site.GoogleAnalytics}}', 'auto');
ga('send', 'pageview');
</script>
{{- end}}

View File

@ -1,46 +1,51 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
<meta name="robots" content="noodp"/>
<link rel="canonical" href="{{ .Permalink }}" />
{{ block "title" . }}
<title>
{{ if .IsHome }}
{{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
{{ else }}
{{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
{{ end }}
</title>
{{ end }}
<!-- CSS -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro" rel="stylesheet" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/themes/prism-tomorrow.min.css" rel="stylesheet" type="text/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" . }}
{{- range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}
<!-- 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">
{{- partial "favicons.html" }}
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="twitter:site" content="{{ .Site.BaseURL }}" />
<meta name="twitter:creator" content="{{ .Params.Author }}" />
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
{{- template "_internal/schema.html" . }}
{{- template "_internal/opengraph.html" . }}
{{- template "_internal/twitter_cards.html" . }}
<!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}">
<meta property="og:description" content="{{ if .IsHome }}{{ $.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 }}" />
<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 }}" />
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
{{ end }}
<!-- Custom head tags -->
{{- if templates.Exists "partials/extra-head.html" -}}
{{ partial "extra-head.html" . }}
{{- end }}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<nav class="menu">
<ul class="menu__inner">
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
<ul class="menu__inner">
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>

View File

@ -0,0 +1,3 @@
{{ range . -}}
&nbsp; <a href="{{ .url }}" target="_blank" rel="noopener" title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a> &nbsp;
{{- end -}}

23
layouts/partials/svg.html Normal file
View File

@ -0,0 +1,23 @@
{{- if (eq .name "codepen") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-codepen"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>
{{- else if (eq .name "facebook") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-facebook"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
{{- else if (eq .name "github") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>
{{- else if (eq .name "gitlab") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-gitlab"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>
{{- else if (eq .name "instagram") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-instagram"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.5" y2="6.5"></line></svg>
{{- else if (eq .name "linkedin") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
{{- else if (eq .name "slack") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-slack"><path d="M22.08 9C19.81 1.41 16.54-.35 9 1.92S-.35 7.46 1.92 15 7.46 24.35 15 22.08 24.35 16.54 22.08 9z"></path><line x1="12.57" y1="5.99" x2="16.15" y2="16.39"></line><line x1="7.85" y1="7.61" x2="11.43" y2="18.01"></line><line x1="16.39" y1="7.85" x2="5.99" y2="11.43"></line><line x1="18.01" y1="12.57" x2="7.61" y2="16.15"></line></svg>
{{- else if (eq .name "twitter") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-twitter"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
{{- else if (eq .name "youtube") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-youtube"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>
{{- else if (eq .name "email") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
{{- else -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
{{- end -}}

27
layouts/posts/rss.xml Normal file
View File

@ -0,0 +1,27 @@
<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>
<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>{{ .Summary | html }}</description>
<content type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content>
</item>
{{ end }}
</channel>
</rss>

View File

@ -1,8 +1,9 @@
{{ if .Get "src" }}
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
{{ if .Get "caption" }}
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" }}</figcaption>
{{ end }}
</figure>
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
{{ if .Get "caption" }}
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" }}</figcaption>
{{ end }}
</figure>
{{ end }}

View File

@ -1,3 +1,3 @@
{{ if .Get "src" }}
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
{{ end }}

8196
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
{
"name": "hello-friend",
"name": "hello-friend-ng",
"version": "1.0.0",
"main": "index.js",
"author": "Radosław Kozieł <@panr> <radoslaw.koziel@gmail.com>",
"author": "Djordje Atlialp <djordje@atlialp.com>",
"license": "MIT",
"scripts": {
"dev": "webpack --mode=development --watch",
@ -14,39 +14,47 @@
"not dead"
],
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"@babel/plugin-transform-runtime": "^7.0.0-beta.54",
"@babel/preset-env": "^7.0.0-beta.54",
"@babel/preset-stage-2": "^7.0.0-beta.54",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@babel/preset-stage-2": "^7.0.0",
"autoprefixer": "^9.4.6",
"babel-eslint": "8.2.1",
"babel-loader": "^8.0.0-beta.0",
"browserslist": "^4.0.1",
"babel-loader": "^8.0.5",
"browserslist": "^4.4.1",
"clean-webpack-plugin": "^0.1.16",
"clipboard": "^2.0.1",
"css-loader": "^1.0.0",
"cssnano": "^4.0.3",
"css-loader": "^1.0.1",
"cssnano": "^4.1.8",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"postcss": "^7.0.0",
"mini-css-extract-plugin": "^0.5.0",
"node-sass": "^4.11.0",
"postcss": "^7.0.14",
"postcss-browser-reporter": "^0.5.0",
"postcss-cli": "^6.0.0",
"postcss-cli": "^6.1.1",
"postcss-import": "^11.1.0",
"postcss-loader": "^2.0.5",
"postcss-loader": "^2.1.6",
"postcss-nested": "^3.0.0",
"postcss-preset-env": "^5.2.2",
"postcss-reporter": "^5.0.0",
"postcss-url": "^7.3.2",
"prettier-eslint-cli": "^4.7.1",
"ramda": "^0.25.0",
"sass-loader": "^7.1.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"
"url-loader": "^1.1.2",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1"
},
"dependencies": {
"npm": "^6.7.0",
"yarn": "^1.13.0"
}
}

View File

@ -1,20 +0,0 @@
const url = require("postcss-url");
const imports = require("postcss-import");
const nested = require("postcss-nested");
const postCSSPresetEnv = require("postcss-preset-env");
const browsers = require("browserslist");
const cssnano = require("cssnano");
module.exports = () => ({
plugins: [
url,
imports,
nested,
postCSSPresetEnv({
stage: 1,
}),
cssnano({
preset: "default",
}),
],
});

View File

@ -1,90 +0,0 @@
.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 {
font-size: 1rem;
margin-bottom: 10px;
@media (--phone) {
font-size: .85rem;
}
}
&-date {
&:after {
content: '—';
}
}
&-title {
font-size: 2.625rem;
margin: 0 0 20px;
@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;
}
}
}

View File

@ -1,94 +0,0 @@
.pagination {
margin-top: 50px;
&__title {
display: flex;
text-align: center;
position: relative;
margin: 100px 0 20px;
&-h {
text-align: center;
margin: 0 auto;
padding: 5px 10px;
background: var(--light-background);
color: var(--light-color-secondary);
font-size: .8rem;
text-transform: uppercase;
text-decoration: none;
letter-spacing: .1em;
z-index: 1;
.dark-theme & {
background: var(--dark-background);
color: var(--dark-color-secondary);
}
}
hr {
position: absolute;
left: 0;
right: 0;
width: 100%;
margin-top: 15px;
z-index: 0;
}
}
&__buttons {
display: flex;
align-items: center;
justify-content: center;
a {
text-decoration: none;
font-weight: bold;
}
}
}
.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--light-background-secondary);
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
max-width: 40%;
padding: 0;
cursor: pointer;
appearance: none;
.dark-theme & {
background: var(--dark-background-secondary);
}
+ .button {
margin-left: 10px;
}
a {
display: flex;
padding: 8px 16px;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&__text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&.next .button__icon {
margin-left: 8px;
}
&.previous .button__icon {
margin-right: 8px;
}
}

View File

@ -1,259 +0,0 @@
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+actionscript+apacheconf+applescript+c+csharp+bash+cpp+coffeescript+ruby+csp+css-extras+diff+django+docker+elixir+elm+markup-templating+erlang+fsharp+flow+git+go+graphql+less+handlebars+haskell+http+java+json+kotlin+latex+markdown+makefile+objectivec+ocaml+perl+php+php-extras+sql+processing+scss+python+jsx+typescript+reason+textile+rust+sass+stylus+scheme+pug+swift+yaml+haml+toml+twig+tsx+vim+visual-basic+wasm&plugins=line-numbers+toolbar+jsonp-highlight+command-line+copy-to-clipboard */
/**
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/chriskempson/tomorrow-theme
* @author Rose Pritchard
*/
code[class*="language-"],
pre[class*="language-"] {
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #212020 !important;
color: inherit !important;
border-radius: 8px;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: rgba(255, 255, 255, .4);
}
.token.punctuation {
color: #a9a9b3;
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: #e2777a;
}
.token.function-name {
color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
color: #f08d49;
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: #f8c555;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: #cc99cd;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
color: #7ec699;
}
.token.operator,
.token.entity,
.token.url {
color: #67cdcc;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.inserted {
color: green;
}
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
pointer-events: none;
display: block;
counter-increment: linenumber;
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
div.code-toolbar {
position: relative;
}
div.code-toolbar > .toolbar {
position: absolute;
top: .3em;
right: .2em;
transition: opacity 0.3s ease-in-out;
opacity: 0;
}
div.code-toolbar:hover > .toolbar {
opacity: 1;
}
div.code-toolbar > .toolbar .toolbar-item {
display: inline-block;
}
div.code-toolbar > .toolbar a {
cursor: pointer;
}
div.code-toolbar > .toolbar button {
background: none;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none; /* for button */
-moz-user-select: none;
-ms-user-select: none;
}
div.code-toolbar > .toolbar a,
div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
color: #bbb;
font-size: .8em;
padding: 0 .5em;
background: #f5f2f0;
background: rgba(224, 224, 224, 0.2);
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
border-radius: .5em;
}
div.code-toolbar > .toolbar a:hover,
div.code-toolbar > .toolbar a:focus,
div.code-toolbar > .toolbar button:hover,
div.code-toolbar > .toolbar button:focus,
div.code-toolbar > .toolbar span:hover,
div.code-toolbar > .toolbar span:focus {
color: inherit;
text-decoration: none;
}
.command-line-prompt {
border-right: 1px solid #999;
display: block;
float: left;
font-size: 100%;
letter-spacing: -1px;
margin-right: 1em;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.command-line-prompt > span:before {
color: #999;
content: ' ';
display: block;
padding-right: 0.8em;
}
.command-line-prompt > span[data-user]:before {
content: "[" attr(data-user) "@" attr(data-host) "] $";
}
.command-line-prompt > span[data-user="root"]:before {
content: "[" attr(data-user) "@" attr(data-host) "] #";
}
.command-line-prompt > span[data-prompt]:before {
content: attr(data-prompt);
}

View File

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

View File

@ -1,28 +0,0 @@
:root {
/* light theme color */
--light-background: #fff;
--light-background-secondary: #eaeaea;
--light-color: #222;
--light-color-secondary: #999;
--light-border-color: #dcdcdc;
/* dark theme colors */
--dark-background: #292a2d;
--dark-background-secondary: #3b3d42;
--dark-color: #a9a9b3;
--dark-color-secondary: #73747b;
--dark-border-color: #4a4b50;
/* variables for js, must be the same as these in @custom-media queries */
--phoneWidth: (max-width: 684px);
--tabletWidth: (max-width: 900px);
}
@custom-media --phone (width < 684px);
@custom-media --tablet (width < 900px);
/* HOW TO USE */
/*@media (--phone) {*/
/*margin-top: 0;*/
/*}*/

View File

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

View File

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

1
source/js/app.js Normal file
View File

@ -0,0 +1 @@
// Some code could be here ...

View File

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

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ a.button {
justify-content: center;
padding: 8px 18px;
margin-bottom: 5px;
background: var(--light-background-secondary);
background: $light-background-secondary;
text-decoration: none;
text-align: center;
font-weight: 500;
@ -24,7 +24,7 @@ a.button {
outline: none;
.dark-theme & {
background: var(--dark-background-secondary);
background: $dark-background-secondary;
color: inherit;
}
@ -32,12 +32,12 @@ a.button {
&.outline {
background: transparent;
border-color: var(--light-background-secondary);
border-color: $light-background-secondary;
box-shadow: none;
padding: 8px 18px;
.dark-theme & {
border-color: var(--dark-background-secondary);
border-color: $dark-background-secondary;
color: inherit;
}
@ -60,9 +60,6 @@ a.button {
font-size: 1rem;
}
/* sizes */
&.small {
font-size: .8rem;
}
@ -73,21 +70,6 @@ a.button {
}
}
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;
}
}
.code-toolbar {
margin-bottom: 20px;
@ -98,7 +80,7 @@ a.read-more:active {
justify-content: center;
padding: 3px 8px;
margin-bottom: 5px;
background: var(--light-background-secondary);
background: $light-background-secondary;
text-decoration: none;
text-align: center;
font-size: 13px;
@ -110,7 +92,7 @@ a.read-more:active {
outline: none;
.dark-theme & {
background: var(--dark-background-secondary);
background: $dark-background-secondary;
color: inherit;
}
}

View File

@ -1,53 +1,44 @@
.footer {
padding: 40px 20px;
flex-grow: 0;
color: var(--light-color-secondary);
color: $light-color-secondary;
&__inner {
display: flex;
align-items: center;
justify-content: space-between;
justify-content: center;
margin: 0 auto;
width: 760px;
max-width: 100%;
@media (--tablet) {
@media #{$media-size-tablet} {
flex-direction: column;
}
}
a {
color: inherit;
}
.copyright {
&__content {
display: flex;
flex-direction: row;
align-items: center;
font-size: 1rem;
color: var(--light-color-secondary);
color: $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) {
@media #{$media-size-tablet} {
flex-direction: column;
margin-top: 10px;
}
& > *:not(:last-child) {
border-right: 1px solid;
padding: 0 15px;
@media #{$media-size-tablet} {
border: none;
}
}
& > *:last-child {
padding: 0 15px;
}
}
}

View File

@ -15,7 +15,7 @@
flex-direction: row;
align-items: center;
@media (--phone) {
@media #{$media-size-phone} {
flex-direction: row-reverse;
}
}

72
source/scss/_list.scss Normal file
View File

@ -0,0 +1,72 @@
.posts {
width: 100%;
max-width: 800px;
text-align: left;
padding: 20px;
margin: 20px auto;
@media #{$media-size-tablet} {
max-width: 660px;
}
&:not(:last-of-type) {
border-bottom: 1px solid $light-border-color;
.dark-theme & {
border-color: $dark-border-color;
}
}
&-group {
display: flex;
margin-bottom: 1.9em;
line-height: normal;
@media #{$media-size-tablet} {
display: block;
}
}
&-list {
flex-grow: 1;
margin: 0;
padding: 0;
list-style: none;
}
.post {
&-title {
font-size: 1rem;
margin: 5px 0 5px 0;
}
&-year {
padding-top: 6px;
margin-right: 1.8em;
font-size: 1.6em;
@include dimmed;
@media #{$media-size-tablet} {
margin: -6px 0 4px;
}
}
&-item {
border-bottom: 1px grey dashed;
a {
display: flex;
justify-content: space-between;
align-items: baseline;
padding: 12px 0;
text-decoration: none;
}
}
&-day {
flex-shrink: 0;
margin-left: 1em;
@include dimmed;
}
}
}

View File

@ -1,5 +1,8 @@
html {
box-sizing: border-box;
line-height: 1.6;
letter-spacing: .06em;
scroll-behavior: smooth;
}
*,
@ -14,21 +17,25 @@ body {
font-family: 'Inter UI', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1rem;
line-height: 1.54;
background-color: var(--light-background);
color: var(--light-color);
background-color: $light-background;
color: $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) {
display: flex;
min-height: 100vh;
flex-direction: column;
@media #{$media-size-phone} {
font-size: 1rem;
}
&.dark-theme {
background-color: var(--dark-background);
color: var(--dark-color);
background-color: $dark-background;
color: $dark-color;
}
}
@ -54,7 +61,7 @@ h4 {
font-size: 1.125rem;
}
@media (--phone) {
@media #{$media-size-phone} {
h1 {
font-size: 2rem;
}
@ -134,14 +141,14 @@ figure {
code {
font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
font-feature-settings: normal;
background: var(--light-background-secondary);
background: $light-background-secondary;
padding: 1px 6px;
margin: 0 2px;
border-radius: 5px;
font-size: .95rem;
.dark-theme & {
background: var(--dark-background-secondary);
background: $dark-background-secondary;
}
}
@ -152,7 +159,7 @@ pre {
font-size: .95rem;
overflow: auto;
@media (--phone) {
@media #{$media-size-phone} {
white-space: pre-wrap;
word-wrap: break-word;
}
@ -175,7 +182,7 @@ blockquote {
margin: 40px;
padding: 10px 20px;
@media (--phone) {
@media #{$media-size-phone} {
margin: 10px;
padding: 10px;
}
@ -202,7 +209,7 @@ ul, ol {
margin-left: 40px;
padding: 0;
@media (--phone) {
@media #{$media-size-phone} {
margin-left: 20px;
}
}
@ -212,6 +219,7 @@ ol ol {
}
.container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
@ -226,7 +234,7 @@ ol ol {
justify-content: center;
margin: 50px 0;
@media (--phone) {
@media #{$media-size-phone} {
margin-top: 0;
}
}
@ -234,14 +242,93 @@ ol ol {
hr {
width: 100%;
border: none;
background: var(--light-border-color);
background: $light-border-color;
height: 1px;
.dark-theme & {
background: var(--dark-border-color);
background: $dark-border-color;
}
}
.hidden {
display: none;
}
.hide-on-phone {
@media #{$media-size-phone} {
display: none;
}
}
.hide-on-tablet {
@media #{$media-size-tablet} {
display: none;
}
}
// Accessibility
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important;
}
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
clip: auto !important;
clip-path: none;
color: #21759b;
display: block;
font-size: 14px;
font-size: 0.875rem;
font-weight: bold;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000;
}
// #home-center {
// display: flex;
// flex-grow: 1;
// flex-direction: column;
// justify-content: center;
// }
//
// #home-title {
// margin: 0;
// text-align: center;
// }
//
// #home-subtitle {
// margin-top: 0;
// margin-bottom: 1.5em;
// text-align: center;
// line-height: normal;
// font-size: .7em;
// font-style: italic;
// opacity: .9;
// }
//
// #home-social {
// font-size: 1.4em;
// text-align: center;
// opacity: .8;
//
// a {
// margin: 0 .2em;
// }
// }

View File

@ -7,7 +7,7 @@
background: #252627;
}
@media (--phone) {
@media #{$media-size-phone} {
position: absolute;
top: 50px;
right: 0;
@ -30,7 +30,7 @@
margin: 0 12px;
}
@media (--phone) {
@media #{$media-size-phone} {
flex-direction: column;
align-items: flex-start;
padding: 0;

3
source/scss/_mixins.scss Normal file
View File

@ -0,0 +1,3 @@
@mixin dimmed {
opacity: .6;
}

349
source/scss/_normalize.scss Normal file
View File

@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

186
source/scss/_single.scss Normal file
View File

@ -0,0 +1,186 @@
.post {
width: 100%;
max-width: 800px;
text-align: left;
padding: 20px;
margin: 20px auto;
@media #{$media-size-tablet} {
max-width: 600px;
}
&-date {
&:after {
content: '';
}
}
&-title {
font-size: 2.625rem;
margin: 0 0 20px;
@media #{$media-size-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 #{$media-size-tablet} {
margin: 20px 0;
width: 100%;
}
}
&-info {
margin-top: 30px;
font-size: .8rem;
line-height: normal;
@include dimmed;
p {
margin: .8em 0;
}
a:hover {
border-bottom: 1px solid white;
}
svg {
margin-right: .8em;
}
.tag {
margin-right: .5em;
&::before {
content: "#"
}
}
.feather {
display: inline-block;
vertical-align: -.125em;
width: 1em;
height: 1em;
}
}
}
.pagination {
margin-top: 20px;
&__title {
display: flex;
text-align: center;
position: relative;
margin: 30px 0 20px;
&-h {
text-align: center;
margin: 0 auto;
padding: 5px 10px;
background: $light-background;
color: $light-color-secondary;
font-size: .8rem;
text-transform: uppercase;
text-decoration: none;
letter-spacing: .1em;
z-index: 1;
.dark-theme & {
background: $dark-background;
color: $dark-color-secondary;
}
}
hr {
position: absolute;
left: 0;
right: 0;
width: 100%;
margin-top: 15px;
z-index: 0;
}
}
&__buttons {
display: flex;
align-items: center;
justify-content: center;
a {
text-decoration: none;
font-weight: bold;
}
}
}
.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
background: $light-background-secondary;
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
max-width: 40%;
padding: 0;
cursor: pointer;
appearance: none;
.dark-theme & {
background: $dark-background-secondary;
}
+ .button {
margin-left: 10px;
}
a {
display: flex;
padding: 8px 16px;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&__text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&.next .button__icon {
margin-left: 8px;
}
&.previous .button__icon {
margin-right: 8px;
}
}

View File

@ -0,0 +1,24 @@
@charset "UTF-8";
/* 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;
$media-size-phone: "(max-width: 684px)";
$media-size-tablet: "(max-width: 900px)";
/* variables for js, must be the same as these in @custom-media queries */
:root {
--phoneWidth: (max-width: 684px);
--tabletWidth: (max-width: 900px);
}

14
source/scss/style.scss Normal file
View File

@ -0,0 +1,14 @@
@import "normalize";
@import "variables";
@import "mixins";
@import "fonts";
@import "buttons";
@import "header";
@import "logo";
@import "menu";
@import "main";
@import "list";
@import "single";
@import "footer";

View File

@ -1 +1,133 @@
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),n(2),e.exports=n(3)},function(e,t,n){"use strict"},function(e,t,n){"use strict";var o=document.querySelector(".menu-trigger"),r=document.querySelector(".menu"),i=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),u=function(){return window.matchMedia(i).matches},c=function(){o&&o.classList.toggle("hidden",!u()),r&&r.classList.toggle("hidden",u())};c(),o&&o.addEventListener("click",function(){return r&&r.classList.toggle("hidden")}),window.addEventListener("resize",c)},function(e,t,n){"use strict";var o=window.localStorage&&window.localStorage.getItem("theme"),r=document.querySelector(".theme-toggle"),i="dark"===o;null!==o&&document.body.classList.toggle("dark-theme",i),r.addEventListener("click",function(){document.body.classList.toggle("dark-theme"),window.localStorage&&window.localStorage.setItem("theme",document.body.classList.contains("dark-theme")?"dark":"light")})}]);
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./source/js/app.js":
/*!**************************!*\
!*** ./source/js/app.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// Some code could be here ...\n\n//# sourceURL=webpack:///./source/js/app.js?");
/***/ }),
/***/ "./source/js/menu.js":
/*!***************************!*\
!*** ./source/js/menu.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// Mobile menu\nvar menuTrigger = document.querySelector(\".menu-trigger\");\nvar menu = document.querySelector(\".menu\");\nvar mobileQuery = getComputedStyle(document.body).getPropertyValue(\"--phoneWidth\");\n\nvar isMobile = function isMobile() {\n return window.matchMedia(mobileQuery).matches;\n};\n\nvar isMobileMenu = function isMobileMenu() {\n menuTrigger && menuTrigger.classList.toggle(\"hidden\", !isMobile());\n menu && menu.classList.toggle(\"hidden\", isMobile());\n};\n\nisMobileMenu();\nmenuTrigger && menuTrigger.addEventListener(\"click\", function () {\n return menu && menu.classList.toggle(\"hidden\");\n});\nwindow.addEventListener(\"resize\", isMobileMenu);\n\n//# sourceURL=webpack:///./source/js/menu.js?");
/***/ }),
/***/ "./source/js/theme.js":
/*!****************************!*\
!*** ./source/js/theme.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// Toggle theme\nvar getTheme = window.localStorage && window.localStorage.getItem(\"theme\");\nvar themeToggle = document.querySelector(\".theme-toggle\");\nvar isDark = getTheme === \"dark\";\n\nif (getTheme !== null) {\n document.body.classList.toggle(\"dark-theme\", isDark);\n}\n\nthemeToggle.addEventListener(\"click\", function () {\n document.body.classList.toggle(\"dark-theme\");\n window.localStorage && window.localStorage.setItem(\"theme\", document.body.classList.contains(\"dark-theme\") ? \"dark\" : \"light\");\n});\n\n//# sourceURL=webpack:///./source/js/theme.js?");
/***/ }),
/***/ 0:
/*!*************************************************************************!*\
!*** multi ./source/js/app.js ./source/js/menu.js ./source/js/theme.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("__webpack_require__(/*! /Users/djordje/Git/github.com/rhazdon/blog/themes/hello/source/js/app.js */\"./source/js/app.js\");\n__webpack_require__(/*! /Users/djordje/Git/github.com/rhazdon/blog/themes/hello/source/js/menu.js */\"./source/js/menu.js\");\nmodule.exports = __webpack_require__(/*! /Users/djordje/Git/github.com/rhazdon/blog/themes/hello/source/js/theme.js */\"./source/js/theme.js\");\n\n\n//# sourceURL=webpack:///multi_./source/js/app.js_./source/js/menu.js_./source/js/theme.js?");
/***/ })
/******/ });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,35 +1,33 @@
const Webpack = require("webpack");
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 autoprefixer = require('autoprefixer');
const path = require("path");
const join = (...paths) => path.join(__dirname, ...paths);
const isDevelopment = process.env.NODE_ENV !== "production";
module.exports = {
resolve: {
extensions: [".js", ".css"],
extensions: [".js", ".scss"],
modules: ["source", "node_modules"],
},
entry: {
"main.js": [
join("source", "js", "index.js"),
join("source", "js", "app.js"),
join("source", "js", "menu.js"),
join("source", "js", "theme.js"),
],
"prism.js": join("source", "js", "prism.js"),
"style.css": join("source", "css", "style.css"),
"style.css": join("source", "scss", "style.scss")
},
output: {
filename: "[name]",
path: join("static/assets"),
publicPath: "",
},
performance: {
hints: false,
},
module: {
rules: [
{
@ -54,28 +52,34 @@ module.exports = {
],
},
{
test: /\.css$/,
test: /\.(scss|css)$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: "css-loader",
options: {
minimize: true,
modules: true,
importLoaders: 1,
localIdentName: "[local]",
sourceMap: isDevelopment
},
},
{
loader: "postcss-loader",
options: {
config: {
path: "postcss.config.js",
autoprefixer: {
browsers: ["last 2 versions"]
},
},
plugins: () => [
autoprefixer
]
}
},
],
{
loader: "sass-loader",
options: {
sourceMap: isDevelopment
}
}
]
}),
},
],
@ -93,16 +97,6 @@ module.exports = {
},
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]"),
],
};

5801
yarn.lock

File diff suppressed because it is too large Load Diff