Extract website theme into its own repository
This commit is contained in:
12
layouts/partials/geturl.html
Normal file
12
layouts/partials/geturl.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ $scratch := .scratch }}
|
||||
{{ $scratch.Set "bestLength" -1 }}
|
||||
{{ $scratch.Set "bestUrl" (printf "https://dev.danilafe.com/Web-Projects/blog-static/src/branch/master/code/%s" .path) }}
|
||||
{{ $filePath := .path }}
|
||||
{{ range $module, $props := .submoduleLinks }}
|
||||
{{ $path := index $props "path" }}
|
||||
{{ $bestLength := $scratch.Get "bestLength" }}
|
||||
{{ if and (le $bestLength (len $path)) (hasPrefix $filePath $path) }}
|
||||
{{ $scratch.Set "bestLength" (len $path) }}
|
||||
{{ $scratch.Set "bestUrl" (printf "%s%s" (index $props "url") (strings.TrimPrefix $path $filePath)) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
3
layouts/partials/group.html
Normal file
3
layouts/partials/group.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="highlight-group">
|
||||
<div class="highlight-label">From <a href="{{ .url }}">{{ path.Base .path }}</a>{{ .comment }}</div>{{ .content }}
|
||||
</div>
|
||||
24
layouts/partials/head.html
Normal file
24
layouts/partials/head.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#1dc868">
|
||||
{{ if .Description }}
|
||||
<meta name="description" content="{{ .Description }}">
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&family=Raleway&family=Lora&display=block" media="screen">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" media="screen">
|
||||
{{ $style := resources.Get "scss/style.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $sidenotes := resources.Get "scss/sidenotes.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $code := resources.Get "scss/code.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $icon := resources.Get "img/favicon.png" }}
|
||||
<style>.sidenote-checkbox { display: none; }</style>
|
||||
<style>.feather { width: 1rem; height: 1rem; }</style>
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $sidenotes.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $code.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous" media="screen">
|
||||
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}">
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
</head>
|
||||
15
layouts/partials/header.html
Normal file
15
layouts/partials/header.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="container">
|
||||
<h1>Daniel's Blog</h1>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="container">
|
||||
<a href="/">Home</a>
|
||||
<a href="/about">About</a>
|
||||
<a href="https://github.com/DanilaFe">GitHub</a>
|
||||
<a href="/Resume-Danila-Fedorin.pdf">Resume</a>
|
||||
<a href="/tags">Tags</a>
|
||||
<a href="/favorites">Favorites</a>
|
||||
<a href="/search">Search</a>
|
||||
<a href="/blog">All Posts</a>
|
||||
</div>
|
||||
</nav>
|
||||
1
layouts/partials/highlightgroup.html
Normal file
1
layouts/partials/highlightgroup.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts)) }}
|
||||
3
layouts/partials/icon.html
Normal file
3
layouts/partials/icon.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg class="feather">
|
||||
<use xlink:href="/feather-sprite.svg#{{ . }}"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 81 B |
5
layouts/partials/post.html
Normal file
5
layouts/partials/post.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<li>
|
||||
<a href="{{ .Permalink }}" class="post-title">{{ if .Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .Title }}</a>
|
||||
<p class="post-wordcount">{{ .WordCount }} words, about {{ .ReadingTime }} minutes to read.</p>
|
||||
<p class="post-preview">{{ .Summary }} . . .</p>
|
||||
</li>
|
||||
Reference in New Issue
Block a user