mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-04 07:40:09 +05:30
remove submodule and apply theme
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Pavel Sapezhka
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}" style="font-size: {{ .Site.Params.rootFontSize | default " 100%" }}">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- author -->
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
|
||||
<!-- description -->
|
||||
{{ if .Description }}
|
||||
<meta name="description" content="{{ .Description }}">
|
||||
{{ else if and .IsPage .Summary }}
|
||||
<meta name="description" content="{{ .Summary }}">
|
||||
{{ else }}
|
||||
<meta name="description" content="{{ .Site.Params.description }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- favicon -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://avinal.space/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="https://avinal.space/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="https://avinal.space/favicon-16x16.png">
|
||||
|
||||
<!-- keywords -->
|
||||
{{ if .Keywords }}
|
||||
<meta name="keywords" content="{{ delimit .Keywords " " }} {{ delimit .Params.tags " " }}">
|
||||
{{ else }}
|
||||
<meta name="keywords" content="{{ delimit .Site.Params.keywords " ," }}">
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- opengraph -->
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
<meta property="og:image" content="https://avinal.space{{ .Params.image }}" />
|
||||
<meta itemprop="image" content="https://avinal.space{{ .Params.image }}">
|
||||
<!-- permalink -->
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<!-- rss -->
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `
|
||||
<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
<!-- schema -->
|
||||
{{ template "_internal/schema.html" . }}
|
||||
|
||||
<!-- style -->
|
||||
<!-- <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> -->
|
||||
<link media="screen" rel="stylesheet" href='{{ "css/common.css" | relURL }}'>
|
||||
<link media="screen" rel="stylesheet" href='{{ "css/content.css" | relURL }}'>
|
||||
|
||||
<!-- title -->
|
||||
{{ if .IsHome }}
|
||||
<title>{{ .Site.Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{ .Title }} | {{ .Site.Title }}</title>
|
||||
{{ end }}
|
||||
|
||||
{{ block "head" . }}{{ end }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
{{ partial "header.html" . }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
|
||||
<!-- custom css -->
|
||||
{{ range .Site.Params.customCSS }}
|
||||
<link media="screen" rel="stylesheet" href="{{ . | absURL }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- custom js -->
|
||||
{{ range .Site.Params.customJS }}
|
||||
<script src="{{ . | absURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
{{ define "head" }}
|
||||
<link rel="stylesheet" href='{{ "css/list.css" | absURL }}'>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main id="main" class="archive">
|
||||
{{ $pages := where .Data.Pages "Type" "post" }}
|
||||
{{ range $pages.GroupByDate "2006-01" }}
|
||||
<div class="post-group">
|
||||
<h2>{{ dateFormat "January 2006" (printf "%s-01" .Key) }}</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a class="link" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<time>{{ .PublishDate.Format .Site.Params.dateFormat }}</time>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="post-group">
|
||||
<h2>...</h2>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{ define "head" }}
|
||||
<link rel="stylesheet" href='{{ "css/single.css" | relURL }}'>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main id="main" class="post">
|
||||
|
||||
{{ if cond (ne .Params.toc nil) .Params.toc .Site.Params.toc }}
|
||||
{{ if ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" }}
|
||||
<details>
|
||||
<summary>
|
||||
<b>Table of Contents</b>
|
||||
</summary>
|
||||
<div class="toc {{ if .Site.Params.numberedSubtitles }}numbered-subtitles{{ end }}">{{ .TableOfContents }}</div>
|
||||
</details>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<article class="content {{ if .Site.Params.numberedSubtitles }}numbered-subtitles{{ end }}">
|
||||
{{ if .Site.Params.emphasisWithDots }}
|
||||
{{ .Content | replaceRE "<strong>(\\p{Han}+?)</strong>" "<strong class=chinese>$1</strong>" | safeHTML }}
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}
|
||||
{{- if .Permalink -}}
|
||||
<url>
|
||||
<loc>https://null.avinal.space{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
|
||||
<image:image>
|
||||
<image:loc>https://null.avinal.space{{ .Params.image }}</image:loc>
|
||||
</image:image>
|
||||
</url>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
</urlset>
|
||||
@@ -0,0 +1,60 @@
|
||||
{{ define "head" }}
|
||||
<link rel="stylesheet" href='{{ "css/index.css" | absURL }}'>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main id="main" class="index">
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "==" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post">
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<div>
|
||||
{{ if .Site.Params.showWordCount }}
|
||||
<span>{{ .WordCount }} words</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if gt .ReadingTime 1 }}
|
||||
{{ .Scratch.Set "timeUnit" "mins" }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Set "timeUnit" "min" }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.showReadingTime }}
|
||||
<span>~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
|
||||
{{ end }}
|
||||
|
||||
<time>{{ .PublishDate.Format .Site.Params.dateFormat }}</time>
|
||||
</div>
|
||||
</h2>
|
||||
{{ if ne .Params.tags nil }}
|
||||
<div>
|
||||
{{ range .Params.tags }}
|
||||
<a class="link" href='{{ "tags" | absURL }}/{{ . | urlize }}'>#{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="content">
|
||||
{{ if .Site.Params.emphasisWithDots }}
|
||||
{{ .Summary | replaceRE "<strong>(\\p{Han}+?)</strong>" "<strong class=chinese>$1</strong>" | safeHTML }}
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if or $paginator.HasPrev $paginator.HasNext}}
|
||||
<div class="paginator">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="link" href="{{ $paginator.Prev.URL }}">← prev</a>
|
||||
{{ else }}
|
||||
<a></a>
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<a class="link" href="{{ $paginator.Next.URL }}">next →</a>
|
||||
{{ else }}
|
||||
<a></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
<footer id="footer">
|
||||
|
||||
<nav>
|
||||
{{ range .Site.Params.navs }}
|
||||
<span class="nav-bar-item">
|
||||
<a class="link" href="{{ .link | safeURL }}">{{ .name }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</nav>
|
||||
<div class="footnote">
|
||||
<span>{{ .Site.Params.footnote | safeHTML }}</span>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ $parsedUrl := urls.Parse .Site.BaseURL }}
|
||||
{{ $domain := $parsedUrl.Host }}
|
||||
{{ $domainWithoutWWW := replace $domain "www." "" }}
|
||||
<header id="header">
|
||||
<div>
|
||||
<p>
|
||||
This page is terminal friendly, try browsing with <a href="https://lynx.invisible-island.net/"
|
||||
class="link">lynx</a>.
|
||||
Or <a href="https://avinal.space{{ .Page.RelPermalink }}" class="link">click here</a> for modern version of this page with rich ui, comments and dark
|
||||
mode.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{ if .Params.image }}
|
||||
<nav>
|
||||
<span class="nav-bar-item">
|
||||
<img src="{{ .Params.image | absURL }}" alt="{{ .Title }}">
|
||||
</span>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
<h1>
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
<h2>
|
||||
<div>
|
||||
<span><a href="{{ .Site.Params.self.link }}" class="link">{{ .Site.Params.self.name }}</a></span>
|
||||
<time>| {{ .PublishDate.Format .Site.Params.dateFormat }}</time>
|
||||
<span>| <a href="https://avinal.space/posts/{{ .Params.category }}" class="link">{{ .Params.category }}</a>
|
||||
</span>
|
||||
{{ if .Site.Params.showWordCount }}
|
||||
<span>| {{ .WordCount }} words</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if gt .ReadingTime 1 }}
|
||||
{{ .Scratch.Set "timeUnit" "mins" }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Set "timeUnit" "min" }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.showReadingTime }}
|
||||
<span>| ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Sitemap: {{ "sitemap.xml" | absURL }}
|
||||
Reference in New Issue
Block a user