Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/khata.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-07-03 06:07:42 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-07-03 06:07:42 +0300
commit4473c21b5a1d82acd8fb024d9e65208170a155df (patch)
treeabbfa4c7debc17b2b4adc275d45d2e47fc275146
Initial commit
-rw-r--r--LICENSE21
-rw-r--r--README.md1
-rw-r--r--archetypes/default.md8
-rw-r--r--images/.gitkeep0
-rw-r--r--layouts/404.html6
-rw-r--r--layouts/_default/baseof.html16
-rw-r--r--layouts/_default/list.html28
-rw-r--r--layouts/_default/single.html46
-rw-r--r--layouts/index.html23
-rw-r--r--layouts/listfiles/list.html6
-rw-r--r--layouts/partials/about.html28
-rw-r--r--layouts/partials/footer.html24
-rw-r--r--layouts/partials/head.html36
-rw-r--r--layouts/partials/header.html39
-rw-r--r--layouts/partials/indexContent.html29
-rw-r--r--layouts/partials/menu/menu_alltaxa.html3
-rw-r--r--layouts/partials/menu/menu_archives.html3
-rw-r--r--layouts/partials/menu/menu_home.html1
-rw-r--r--layouts/partials/menu/menu_sections.html23
-rw-r--r--layouts/partials/metadata/metadata-date.html5
-rw-r--r--layouts/partials/metadata/metadata-readingtime.html3
-rw-r--r--layouts/partials/metadata/metadata-section.html10
-rw-r--r--layouts/partials/metadata/metadata-taxonomy.html17
-rw-r--r--layouts/partials/prevNext.html33
-rw-r--r--layouts/partials/readingtime.html7
-rw-r--r--layouts/partials/social.html9
-rw-r--r--layouts/partials/taxa.html25
-rw-r--r--layouts/partials/toc.html5
-rw-r--r--layouts/section/archive.html30
-rw-r--r--static/css/khata.css204
-rw-r--r--static/js/khata.js30
-rw-r--r--theme.toml12
32 files changed, 731 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..4cb2f05
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Darshan Baral
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cc5f703
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# khata Theme \ No newline at end of file
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..7a5e10f
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,8 @@
+---
+title: "{{ replace .TranslationBaseName "-" " " | title }}"
+date: {{ .Date }}
+tags: []
+categories: []
+description: ""
+draft: false
+---
diff --git a/images/.gitkeep b/images/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/images/.gitkeep
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..c2e03db
--- /dev/null
+++ b/layouts/404.html
@@ -0,0 +1,6 @@
+{{ define "main"}}
+<div>
+ <h1>One would think...</h1>
+ <h2>Let's go <a href="{{ `/` | relURL }}">back to home page</a>.</h2>
+</div>
+{{ end }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..105fe0d
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+ {{ partial "head.html" . }}
+ <body class="bg-light">
+ <div class="wrapper">
+ {{ partial "header.html" . }}
+ <main>
+ {{ block "main" . }}
+ {{ end }}
+ </main>
+ </div>
+ <div class="footer">
+ {{ partial "footer.html" . }}
+ </div>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..4dcc191
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,28 @@
+{{ define "main" }}
+<h1 class="standard top-h1 mt-4 mb-4">
+ {{- .Title -}}
+</h1>
+<div class="standard grid-container">
+ {{ range (.Paginator 12).Pages }}
+ <div class="index-box p-3 shadow bg-white border rounded">
+ <a href="{{ .Permalink | relURL }}">
+ <h4>{{- .Title -}}</h4>
+ </a>
+ {{ if .Params.Description }}
+ <p style="font-size: 1.05em; font-style: italic;">{{ .Params.Description }}</p>
+ {{ end }}
+ <div class="ml-4 mt-3 metadata">
+ {{ partial "metadata/metadata-date" . }}
+ {{ partial "metadata/metadata-readingtime" . }}
+ {{ if ne $.Kind "section" }}
+ {{ partial "metadata/metadata-section" . }}
+ {{ end }}
+ {{ partial "metadata/metadata-taxonomy" . }}
+ </div>
+ </div>
+ {{ end }}
+</div>
+<div class="mt-4">
+ {{ template "_internal/pagination.html" . }}
+</div>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..f6e3fe2
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,46 @@
+{{ define "main" }}
+<div class="standard main rounded mt-4 mb-4" role="main">
+ <article class="shadow p-4 border border-secondary rounded position-relative">
+ <h1 class="top-h1">
+ {{- .Title -}}
+ </h1>
+ <div class="ml-3 metadata">
+ {{ partial "metadata/metadata-date" . }}
+ {{ partial "metadata/metadata-readingtime" . }}
+ {{ if ne $.Kind "section" }}
+ {{ partial "metadata/metadata-section" . }}
+ {{ end }}
+ {{ partial "metadata/metadata-taxonomy" . }}
+ </div>
+ <hr />
+
+ <ul class="list-unstyled">
+ {{ if .Params.location }}
+ <li>
+ <b>Location</b>:
+ <a
+ href="http://www.google.com/maps/search/?api=1&query={{ .Params.location }}"
+ >
+ {{- .Params.location -}}
+ </a>
+ </li>
+ {{ end }}
+
+ {{ if .Params.project }}
+ <li>
+ <b>Project</b>: <code class="text-dark">{{ .Params.project -}}</code>
+ </li>
+ {{ end }}
+
+ {{ if .Params.description }}
+ <li><b>Description</b>: {{ .Params.description -}}</li>
+ {{ end }}
+ </ul>
+
+ {{ if (gt (len (split .Content `</h`)) 2) }}
+ {{ partial "toc.html" . }}
+ {{ end }}
+ {{ .Content }}
+ </article>
+</div>
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..112542a
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,23 @@
+{{ define "main"}}
+{{ partial "about" . }}
+<div
+ id="recent"
+ class="bg-secondary2"
+ style="padding-top: 40px; padding-bottom: 30px;"
+>
+ <div class="standard">
+ <h1 class="top-h1 mt-4 mb-4 text-white">Recent</h1>
+ <div class="grid-container">
+ {{ partial "indexContent" . }}
+ </div>
+ </div>
+</div>
+<div id="alltaxa">
+ <div class="standard">
+ <h1 class="top-h1 mb-4">Taxa</h1>
+ <div class="p-3 bg-light shadow border rounded">
+ {{ partial "taxa" (dict "this" .Site.Taxonomies "showAll" true) }}
+ </div>
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/listfiles/list.html b/layouts/listfiles/list.html
new file mode 100644
index 0000000..4e2b5ba
--- /dev/null
+++ b/layouts/listfiles/list.html
@@ -0,0 +1,6 @@
+{{ define "main"}}
+<div class="standard">
+ {{ partial "filesFromFolder" (dict "Path" .Params.path "title" .Title "Homepage" false) }}
+</div>
+{{ end }}
+
diff --git a/layouts/partials/about.html b/layouts/partials/about.html
new file mode 100644
index 0000000..694d582
--- /dev/null
+++ b/layouts/partials/about.html
@@ -0,0 +1,28 @@
+<div class="about-container position-relative">
+ <div class="profile-info d-flex flex-row">
+ <div class="profile-photo" style="display: flex; align-items: flex-end;">
+ <img
+ src="{{ .Site.Params.author.profilephoto | relURL }}"
+ style="width: 200px; margin-right:20px; border-radius: 10%;"
+ />
+ </div>
+
+ <div class="d-flex flex-column">
+ <div>
+ <h1 style="font-size: calc(2em + 0.5vw);">
+ {{- .Site.Params.author.name -}}
+ </h1>
+ <h2 style="font-size: calc(1.7em + 0.5vw)">
+ {{- .Site.Params.author.title | markdownify -}}
+ </h2>
+ <h3 style="font-size: calc(1.4em + 0.5vw);">
+ {{- .Site.Params.author.subtitle | markdownify -}}
+ </h3>
+ {{ partial "social" . }}
+ </div>
+ <div style="font-size: 1.1em;">
+ {{ .Site.Params.author.about | markdownify }}
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..2457052
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,24 @@
+<div class="mb-4 d-flex flex-row justify-content-center">
+ {{ if eq .Kind "page" }}
+ {{ partial "prevNext" . }}
+ {{ end }}
+</div>
+<footer class="border-top border-primary2" style="height: 60px;">
+ <div class="p-3 d-flex flex-row flex-wrap justify-content-between">
+ <div class="copyright">
+ <small>
+ {{- .Site.Copyright | safeHTML -}}
+ </small>
+ </div>
+ <div>
+ <small>
+ khata by
+ <a href="https://www.darshanbaral.com/"> Darshan Baral</a>
+ &middot; powered by
+ <a href="https://gohugo.io/">
+ hugo
+ </a>
+ </small>
+ </div>
+ </div>
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..d0d2be7
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,36 @@
+<head>
+ <meta charset="UTF-8" />
+ <meta
+ name="viewport"
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
+ />
+ {{ if .IsHome }}
+ <title>{{ .Site.Title }}</title>
+ {{ else }}
+ <title>{{ .Title }} - {{ .Site.Title }}</title>
+ {{ end }}
+
+ <meta name="description" content="{{ .Description }}" />
+ <meta name="author" content="{{ .Site.Params.author.name }}" />
+
+ {{ range $key, $value := findRE "content=\"(.+)\"" hugo.Generator }}
+ <meta name="generator" content="khata theme by Darshan in {{ replaceRE `content=|\"` `` $value}}" />
+ {{ end }}
+
+ <link
+ rel="stylesheet"
+ href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
+ integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
+ crossorigin="anonymous"
+ />
+ <link
+ rel="stylesheet"
+ href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
+ integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
+ crossorigin="anonymous"
+ />
+ <link rel="stylesheet" href="{{ `css/khata.css` | relURL }}">
+ <link href="https://fonts.googleapis.com/css?family=Nunito|Open+Sans:400|Roboto+Mono&display=swap" rel="stylesheet">
+
+ <script src="{{ `js/khata.js` | relURL }}" /></script>
+</head> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..92c3f66
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,39 @@
+<div class="header">
+ <nav id="main-nav" class="standard">
+ <div>
+ <i
+ class="hamburger fas fa-bars"
+ onclick="toggleDisplay(this.parentNode.nextElementSibling)"
+ ></i>
+ </div>
+ <div class="all-menu expanded w-100">
+ {{ partial "menu/menu_home" . }}
+ {{ partial "menu/menu_sections" . }}
+ {{ partial "menu/menu_alltaxa" . }}
+ {{ partial "menu/menu_archives" . }}
+ </div>
+ </nav>
+</div>
+<script>
+ function smMenu(x) {
+ let allMenu = document.querySelector(".all-menu");
+ let dropDown = document.querySelector(".dropdown-content");
+ if (x.matches) {
+ allMenu.classList.add("d-none");
+ allMenu.style.flexDirection = "column";
+ dropDown.style.width = "calc(100% - 5px)";
+ dropDown.style.maxHeight = "0px";
+ dropDown.style.position = "static";
+ } else {
+ dropDown.style.width = "auto";
+ allMenu.classList.remove("d-none");
+ allMenu.style.flexDirection = "row";
+ dropDown.style.maxHeight = "0px";
+ dropDown.style.position = "absolute";
+ }
+ }
+
+ let x = window.matchMedia("(max-width: 750px)");
+ smMenu(x); // Call listener function at run time
+ x.addListener(smMenu); // Attach listener function on state changes
+</script>
diff --git a/layouts/partials/indexContent.html b/layouts/partials/indexContent.html
new file mode 100644
index 0000000..059e349
--- /dev/null
+++ b/layouts/partials/indexContent.html
@@ -0,0 +1,29 @@
+{{ range where .Site.Sections "Params.hidefrommenu" "!=" true }}
+<div class="p-3 bg-light shadow border rounded index-box">
+ <h2 class="pb-1">
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </h2>
+
+ <div class="d-flex flex-column">
+ {{ range first 6 .Pages }}
+ <div class="d-flex flex-row mb-2">
+ <div class="mr-1 date-short">
+ {{- .Date.Format (default "2006-01-02" "1/2/06") }} -
+ </div>
+ <div>
+ <a
+ href="{{ .Permalink }}"
+ title="{{- if .Params.description -}}
+ {{- .Params.description -}}
+ {{- else -}}
+ Description not available
+ {{- end -}}"
+ >
+ {{- .Title -}}
+ </a>
+ </div>
+ </div>
+ {{ end }}
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/partials/menu/menu_alltaxa.html b/layouts/partials/menu/menu_alltaxa.html
new file mode 100644
index 0000000..e14a3a5
--- /dev/null
+++ b/layouts/partials/menu/menu_alltaxa.html
@@ -0,0 +1,3 @@
+<div class="main-menu">
+ <a href="{{ `/` | relURL }}#alltaxa">Taxa</a>
+</div>
diff --git a/layouts/partials/menu/menu_archives.html b/layouts/partials/menu/menu_archives.html
new file mode 100644
index 0000000..279585f
--- /dev/null
+++ b/layouts/partials/menu/menu_archives.html
@@ -0,0 +1,3 @@
+<div class="main-menu">
+ <a href="{{ `/archive` | relURL }}">Archive</a>
+</div>
diff --git a/layouts/partials/menu/menu_home.html b/layouts/partials/menu/menu_home.html
new file mode 100644
index 0000000..e23df8e
--- /dev/null
+++ b/layouts/partials/menu/menu_home.html
@@ -0,0 +1 @@
+<div class="main-menu"><a href="{{ `/` | relURL }}">Home</a></div>
diff --git a/layouts/partials/menu/menu_sections.html b/layouts/partials/menu/menu_sections.html
new file mode 100644
index 0000000..a07c049
--- /dev/null
+++ b/layouts/partials/menu/menu_sections.html
@@ -0,0 +1,23 @@
+{{ if eq 1 (len .Site.Sections) }}
+<div class="main-menu">
+ <a href="{{ `/` | relURL }}">Home</a>
+</div>
+{{ else }}
+<div class="dropdown">
+ <span class="dropbtn main-menu" onclick="toggleHeight(this.nextElementSibling)">
+ Sections <i class="fas fa-chevron-down"></i>
+ </span>
+ <div class="dropdown-content">
+ <div class="rounded bg-light mt-2">
+ <ul class="list-unstyled m-0">
+ {{ range where .Site.Sections "Params.hidefrommenu" "!=" true }}
+ {{ $thisSection := replace .File.Dir "\\" "" }}
+ <li class="dropdown-link pl-3 pr-3 pt-1 pb-1 rounded">
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/partials/metadata/metadata-date.html b/layouts/partials/metadata/metadata-date.html
new file mode 100644
index 0000000..c21b1bb
--- /dev/null
+++ b/layouts/partials/metadata/metadata-date.html
@@ -0,0 +1,5 @@
+<div class="metadata-value mb-1">
+ Date: <time>
+ {{- .Date.Format (default "January 2, 2006" $.Site.Params.dateFormat) -}}
+ </time>
+</div>
diff --git a/layouts/partials/metadata/metadata-readingtime.html b/layouts/partials/metadata/metadata-readingtime.html
new file mode 100644
index 0000000..fea8834
--- /dev/null
+++ b/layouts/partials/metadata/metadata-readingtime.html
@@ -0,0 +1,3 @@
+<div class="metadata-value mb-1">
+ Reading Time: {{ partial "readingtime" . }}
+</div>
diff --git a/layouts/partials/metadata/metadata-section.html b/layouts/partials/metadata/metadata-section.html
new file mode 100644
index 0000000..08b8a4a
--- /dev/null
+++ b/layouts/partials/metadata/metadata-section.html
@@ -0,0 +1,10 @@
+<div class="metadata-value mb-1">
+ Section:
+ <a
+ class="pl-1 pr-1 rounded border border-secondary"
+ href="{{ .Section | relURL }}"
+ title="Section"
+ >
+ {{- (.Site.GetPage .Section).Title -}}
+ </a>
+</div>
diff --git a/layouts/partials/metadata/metadata-taxonomy.html b/layouts/partials/metadata/metadata-taxonomy.html
new file mode 100644
index 0000000..65574a5
--- /dev/null
+++ b/layouts/partials/metadata/metadata-taxonomy.html
@@ -0,0 +1,17 @@
+{{ $params := .Params }}
+{{ range $name, $value := .Site.Taxonomies }}
+{{ if index $params $name }}
+<div class="metadata-value mb-1">
+ {{ $name | humanize }}:
+ {{ range index $params $name }}
+ <a
+ class="pl-1 pr-1 rounded border border-secondary"
+ href="{{ $name | relURL }}/{{ . | urlize }}"
+ title="{{ $name }}: {{ . }}"
+ >
+ {{- . -}}
+ </a>
+ {{ end }}
+</div>
+{{ end }}
+{{ end }}
diff --git a/layouts/partials/prevNext.html b/layouts/partials/prevNext.html
new file mode 100644
index 0000000..4bb2fde
--- /dev/null
+++ b/layouts/partials/prevNext.html
@@ -0,0 +1,33 @@
+ <div class="mr-4">
+ {{- if .NextInSection }}
+ <a
+ href="{{ .NextInSection.Permalink | relURL }}"
+ data-toggle="tooltip"
+ data-placement="top"
+ title="{{ .NextInSection.Title }}"
+ ><i class="newer fas fa-chevron-left" style="font-size: 2em;"></i
+ ></a>
+ {{- else }}
+ <i
+ class="text-secondary fas fa-chevron-left"
+ style="font-size: 2em;"
+ ></i>
+ {{- end }}
+ </div>
+ <div class="ml-4">
+ {{- if .PrevInSection }}
+ <a
+ href="{{ .PrevInSection.Permalink | relURL }}"
+ data-toggle="tooltip"
+ data-placement="top"
+ title="{{ .PrevInSection.Title }}"
+ ><i class="older fas fa-chevron-right" style="font-size: 2em;"></i
+ ></a>
+ {{- else }}
+ <i
+ class="text-secondary fas fa-chevron-right"
+ style="font-size: 2em;"
+ ></i>
+ {{- end }}
+ </div>
+
diff --git a/layouts/partials/readingtime.html b/layouts/partials/readingtime.html
new file mode 100644
index 0000000..132f979
--- /dev/null
+++ b/layouts/partials/readingtime.html
@@ -0,0 +1,7 @@
+{{ if lt .ReadingTime 1 }}
+< 1 min
+{{ else if eq .ReadingTime 1 }}
+1 min
+{{ else }}
+{{ .ReadingTime }} mins
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
new file mode 100644
index 0000000..1963bd1
--- /dev/null
+++ b/layouts/partials/social.html
@@ -0,0 +1,9 @@
+<div class="d-flex flex-row flex-wrap social" style="margin-bottom: 40px;">
+ {{ range.Site.Params.social }}
+ <div class="text-center ml-1 mr-1" style="width: 35px; height: 35px;">
+ <a href="{{ .link }}" title="{{ .name }}"
+ ><i class="icon {{ .iconclass }}"></i
+ ></a>
+ </div>
+ {{ end }}
+</div>
diff --git a/layouts/partials/taxa.html b/layouts/partials/taxa.html
new file mode 100644
index 0000000..83cf655
--- /dev/null
+++ b/layouts/partials/taxa.html
@@ -0,0 +1,25 @@
+{{ $scratch := newScratch }}
+{{ $scratch.Delete "custom" }}
+{{ $flag := .showAll }}
+
+{{ range $name, $value := .this }}
+{{ $scratch.Add "custom" (slice (dict "Name" $name "Value" $value "Num" (len $value))) }}
+{{ end }}
+
+{{ range sort ($scratch.Get "custom") ".Num" "desc" }}
+{{ $taxaTypeName := .Name }}
+ <h2>
+ {{ $taxaTypeName | humanize }}{{if $flag }}<small class="badge" title="Number of unique {{ $taxaTypeName | humanize }}">({{ .Num }})</small
+ >{{ end }}
+ </h2>
+ {{ $n_taxa := cond $flag .Num 5 }}
+ {{ $this_taxa := index $.this .Name }}
+ <div class="d-flex flex-row flex-wrap ml-2 mb-4">
+ {{ range first $n_taxa $this_taxa.ByCount }}
+ <div class="m-1 p-1 btn btn-light border border-secondary">
+ <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a
+ > - <small title="Number of articles with {{ $taxaTypeName | singularize | humanize }} '{{ .Page.Title }}'">{{ .Count }}</small>
+ </div>
+ {{ end }}
+ </div>
+{{ end }}
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
new file mode 100644
index 0000000..432c382
--- /dev/null
+++ b/layouts/partials/toc.html
@@ -0,0 +1,5 @@
+
+<aside class="float-right rounded p-2 ml-2 mb-2" style="background-color: #dbdbdb;">
+ <h3>Contents</h3>
+ {{ .TableOfContents }}
+</aside> \ No newline at end of file
diff --git a/layouts/section/archive.html b/layouts/section/archive.html
new file mode 100644
index 0000000..148ddb3
--- /dev/null
+++ b/layouts/section/archive.html
@@ -0,0 +1,30 @@
+{{ define "main" }}
+{{- $paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 50 }}
+<h1 class="standard top-h1 mt-4 mb-4">{{ .Title }}</h1>
+<table class="standard table table-sm table-striped">
+ <thead>
+ <tr>
+ <th style="width: calc(100% - 100px);">Title</th>
+ <th class="text-right" style="width: 100px;">
+ Date
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ range $paginator.Pages }}
+ <tr>
+ <td class="p-2">
+ <a href="{{ .Permalink | relURL }}"> {{- .Title -}} </a>
+ {{- if .Params.description }}:
+ {{ .Params.description }}
+ {{ end }}
+ </td>
+ <td class="text-right" style="font-size: 0.9em;">
+ <time>{{- .Date.Format (default "January 2, 2006" $.Site.Params.dateFormat) -}}</time>
+ </td>
+ </tr>
+ {{ end }}
+ </tbody>
+</table>
+{{ template "_internal/pagination.html" . }}
+{{ end }}
diff --git a/static/css/khata.css b/static/css/khata.css
new file mode 100644
index 0000000..e9acc00
--- /dev/null
+++ b/static/css/khata.css
@@ -0,0 +1,204 @@
+.standard {
+ width: 90vw;
+ margin-left: auto;
+ margin-right: auto;
+}
+body {
+ font-family: "Nunito", sans-serif;
+ display: flex;
+ flex-direction: column;
+ min-height: calc(100vh - 20px);
+ overflow-y: scroll;
+ color: black;
+}
+.wrapper {
+ flex: 1;
+}
+code, pre {
+ font-family: "Roboto Mono", monospace;
+ background-color: #fff2ac;
+ color: black;
+}
+pre {
+ display: inline-block;
+ clear: both;
+ padding: 5px 15px 5px 15px;
+}
+h1,
+h2,
+h3,
+h4,
+h5 {
+ font-family: "Open Sans", sans-serif;
+}
+a,
+.more {
+ color: rgba(34, 8, 167, 0.94) !important;
+}
+.header {
+ background-color: #2f16ac;
+}
+#main-nav {
+ display: flex;
+ flex-direction: column;
+ min-height: 60px;
+ padding: 15px 0 15px 0px;
+}
+.all-menu {
+ display: flex;
+}
+.hamburger {
+ display: none;
+ cursor: pointer;
+ color: white !important;
+}
+.main-menu,
+.main-menu a {
+ font-variant: small-caps;
+ font-family: "Open Sans", sans-serif;
+ color: white !important;
+}
+.main-menu a:hover {
+ text-decoration: none;
+}
+.main-menu {
+ margin-right: 25px;
+}
+.social-icons {
+ display: flex;
+ flex-direction: row;
+ padding: 15px 0 15px 0px;
+}
+.about-container {
+ min-height: calc(100vh - 90px);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-bottom: 40px;
+}
+.profile-info {
+ width: 65vw;
+ max-width: 850px;
+ min-width: 650px;
+}
+.dropbtn {
+ color: white !important;
+}
+.dropbtn,
+.more {
+ cursor: pointer;
+}
+.dropdown {
+ position: relative !important;
+}
+.dropdown-content {
+ background-color: transparent;
+ display: inline-block;
+ position: absolute;
+ z-index: 1;
+ white-space: nowrap;
+ max-height: 0px;
+ overflow: hidden;
+ transition: all 0.25s;
+}
+.dropdown-content > div {
+ border: 1px solid #2f16ac !important;
+}
+.grid-container {
+ display: grid;
+ grid-gap: 50px;
+ grid-template-columns: repeat(auto-fill, calc((100% - 100px) / 3));
+}
+.index-box {
+ min-width: 300px;
+ min-height: 200px;
+}
+@media only screen and (max-width: 1050px) {
+ .grid-container {
+ grid-template-columns: repeat(auto-fill, calc((100% - 50px) / 2));
+ }
+}
+@media only screen and (max-width: 750px) {
+ .grid-container {
+ grid-template-columns: repeat(auto-fill, 100%);
+ }
+ .profile-info {
+ width: 100%;
+ margin-top: 30px;
+ margin-bottom: 30px;
+ flex-wrap: wrap;
+ max-width: auto;
+ min-width: auto;
+ }
+ .about-container {
+ min-height: auto;
+ width: 90vw;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ .hamburger {
+ display: block;
+ font-size: 1.2em;
+ }
+}
+.metadata-value {
+ font-size: 0.8em;
+}
+.icon {
+ font-size: 1.7em;
+}
+.icon:hover {
+ font-size: 1.65em;
+}
+.top-h1 {
+ font-size: 3em !important;
+}
+#TableOfContents > ul {
+ margin-left: 10px;
+ padding-left: 5px;
+ font-variant: small-caps;
+}
+.newer:hover,
+.older:hover,
+.to-top:hover {
+ cursor: pointer;
+ color: #2f16acde;
+}
+.bg-secondary2 {
+ background-color: #2f16ac;
+}
+.border-primary2 {
+ border-color: #2f16ac !important;
+}
+.pagination {
+ display: flex;
+ justify-content: center !important;
+}
+.page-link {
+ color: #2f16ac;
+ border: 1px solid #2f16ac !important;
+}
+.page-item.active .page-link {
+ color: #fff !important;
+ background-color: #2f16ac;
+}
+.page-item.disabled .page-link {
+ color: #fff !important;
+ background-color: #5c58589c;
+}
+#alltaxa {
+ margin-top: 30px;
+ padding-top: 40px;
+ padding-bottom: 30px;
+ min-height: calc(100vh - 110px);
+}
+.external-link-icon {
+ font-size: 0.8em;
+}
+.date-short {
+ font-size: 0.75em;
+ min-width: 60px;
+ display: flex;
+ justify-content: end;
+ align-items: center;
+}
diff --git a/static/js/khata.js b/static/js/khata.js
new file mode 100644
index 0000000..b5a56e4
--- /dev/null
+++ b/static/js/khata.js
@@ -0,0 +1,30 @@
+let toggleHeight = function(elem) {
+ if (getComputedStyle(elem)["height"] === "0px") {
+ elem.style.maxHeight = elem.scrollHeight + "px";
+ } else {
+ elem.style.maxHeight = "0px";
+ }
+};
+let toggleDisplay = function(elem) {
+ elem.classList.toggle("d-none");
+};
+let zeroHeight = function(elem) {
+ elem.style.maxHeight = "0px";
+};
+let checkClick = function() {
+ if (!document.querySelector(".dropdown").contains(event.target)) {
+ zeroHeight(document.querySelector(".dropdown-content"));
+ }
+ if (
+ window.matchMedia("(max-width: 750px)").matches &&
+ !document.querySelector("nav").contains(event.target)
+ ) {
+ document.querySelector(".all-menu").classList.add("d-none");
+ }
+};
+window.onclick = function() {
+ checkClick();
+};
+window.ontouchstart = function() {
+ checkClick();
+};
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..78323c2
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,12 @@
+name = "khata"
+license = "MIT"
+licenselink = ""
+description = "Documentation theme for Hugo"
+homepage = ""
+tags = ["documentation", "white", "simple"]
+features = ["documentation", "white", "bootstrap", "responsive"]
+min_version = "0.55"
+
+[author]
+ name = "Darshan Baral"
+ homepage = "https://www.darshanbaral.com/"