Rearchitect theme directory (#59)
* Rearchitect theme directory * Fix symlink
This commit is contained in:
6
layouts/partials/footer.html
Normal file
6
layouts/partials/footer.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<footer class="footer">
|
||||
<span>© {{ now.Year }} {{ .Site.Params.Footer}}</span>
|
||||
<span>
|
||||
Made with ❤️ using <a target="_blank" href="https://github.com/526avijitgupta/gokarna">Gokarna</a>
|
||||
</span>
|
||||
</footer>
|
||||
50
layouts/partials/head.html
Normal file
50
layouts/partials/head.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--accent-color: {{ .Site.Params.AccentColor | default "#FF4D4D" }};
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ $title := .Title | default .Site.Title }}
|
||||
{{ $description := .Description | default .Site.Params.Description }}
|
||||
{{ $image := .Params.image | default .Site.Params.AvatarURL }}
|
||||
{{ $siteKeywords := .Site.Params.MetaKeywords | default (slice) }}
|
||||
{{ $postKeywords := .Params.tags | default (slice) }}
|
||||
{{ $keywords := union $siteKeywords $postKeywords }}
|
||||
|
||||
<!-- SEO titles & descriptions -->
|
||||
<title>{{ $title }}</title>
|
||||
<meta name="description" content="{{ $description }}">
|
||||
<meta name="keywords" content='{{ delimit $keywords ", "}}'>
|
||||
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:image" content="{{ $image }}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
<meta property="twitter:domain" content="{{ .Permalink }}">
|
||||
<meta property="twitter:url" content="{{ .Permalink }}">
|
||||
<meta name="twitter:image" content="{{ $image }}">
|
||||
|
||||
<!-- SEO canonicals: helps Google understand your site better when using marketing campaign tagging etc -->
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/normalize.min.css" media="print" onload="this.media='all'">
|
||||
<link rel="stylesheet" type="text/css" href="/css/main.css">
|
||||
<link disabled id="dark-theme" rel="stylesheet" href="/css/dark.css">
|
||||
|
||||
<script src="/js/feather-icons.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<!-- Option for user to inject custom html -->
|
||||
{{ if .Site.Params.CustomHeadHTML }}
|
||||
{{ .Site.Params.CustomHeadHTML | safeHTML }}
|
||||
{{ end }}
|
||||
</head>
|
||||
56
layouts/partials/header.html
Normal file
56
layouts/partials/header.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<header class="header">
|
||||
<nav class="header-nav">
|
||||
|
||||
{{ if isset .Site.Params "avatarurl" }}
|
||||
<div class="avatar">
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
<img src="{{ .Site.Params.AvatarURL }}" alt="avatar" />
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="nav-title">
|
||||
<a class="nav-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-links">
|
||||
{{ range .Site.Menus.main }}
|
||||
<div class="nav-link">
|
||||
<a href="{{ .URL }}">
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<span class="nav-icons-divider"></span>
|
||||
<div class="nav-link dark-theme-toggle">
|
||||
<a>
|
||||
<span id="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-link" id="hamburger-menu-toggle">
|
||||
<a>
|
||||
<span data-feather="menu"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- For mobile -->
|
||||
<ul class="nav-hamburger-list visibility-hidden">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="nav-item">
|
||||
<a href="{{ .URL }}">
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="nav-item dark-theme-toggle">
|
||||
<a>
|
||||
<span id="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
5
layouts/partials/list-posts.html
Normal file
5
layouts/partials/list-posts.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<article class="post-title">
|
||||
<a href="{{ .RelPermalink }}" class="post-link">{{ .Title }}</a>
|
||||
<div class="flex-break"></div>
|
||||
<span class="post-date">{{ dateFormat "January 2, 2006" .Date }}</span>
|
||||
</article>
|
||||
14
layouts/partials/list.html
Normal file
14
layouts/partials/list.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="container list-posts">
|
||||
|
||||
<h1 class="list-title">{{ .Name }}</h2>
|
||||
|
||||
{{ range (where .Pages "Params.type" "post" ).GroupByDate "2006" }}
|
||||
|
||||
<h2 class="posts-year">{{ .Key }}</h2>
|
||||
|
||||
{{- range .Pages -}}
|
||||
{{- partial "list-posts.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
13
layouts/partials/page.html
Normal file
13
layouts/partials/page.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="post container">
|
||||
|
||||
<div class="post-header-section">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
23
layouts/partials/post.html
Normal file
23
layouts/partials/post.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="post container">
|
||||
|
||||
<div class="post-header-section">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<small role="doc-subtitle">{{ .Description }}</small>
|
||||
<p class="post-date">
|
||||
{{ dateFormat "January 2, 2006" .Date }}
|
||||
</p>
|
||||
|
||||
<ul class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
<li class="post-tag"><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user