Website Summary Files Commits Branches @commit @diff @stats
path: root / website / layouts / partials
diff options
context:
space:
mode:
Commit28e13917829d649c71ed1696519db8f1845466b3 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-04 08:20:14 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-04 08:20:14 +0300
Files9079ae947a4271ad835f1c9ad10516e6d43f7f20 /website/layouts/partials
IPL-28e13917829d649c71ed1696519db8f1845466b3.tar
IPL-28e13917829d649c71ed1696519db8f1845466b3.tar.gz
IPL-28e13917829d649c71ed1696519db8f1845466b3.zip
Parentb65dbe28ba20a14de4c194e93284f9f1a4aa8858 (diff)
Parent49eed25b200c0f5f0aba46baa3f7332d0e93b276 (diff)
Merge branch 'feature/themes'
- Switch theme to hugo-clarity - Move old content to 2018
diff --git a/website/layouts/partials/nav.html b/website/layouts/partials/nav.html
new file mode 100644
index 0000000..8d7cf30
--- /dev/null
+++ b/website/layouts/partials/nav.html
@@ -0,0 +1,43 @@
+{{- $params := .Site.Params }}
+{{- $centerLogo := $params.centerLogo }}
+{{ $logo := $params.logo }}
+<header class = 'nav_header' >
+ <nav class = 'nav'>
+ <a href='{{ absURL "" }}' class = 'nav_brand nav_item{{ if eq $centerLogo true }} nav_hide{{ end }}'>
+ {{- with $logo }}
+ <img src="{{ absURL .url }}" width="{{ .width }}" height="{{ .height }}" class="logo">
+ {{- else }}
+ {{ .Site.Title }}
+ {{- end }}
+ <div class = 'nav_close'>
+ <svg class="icon">
+ <use xlink:href="#open-menu"></use>
+ </svg>
+ <svg class="icon">
+ <use xlink:href="#closeme"></use>
+ </svg>
+ </div>
+ </a>
+ <div class = 'nav_body nav_body_{{ .Site.Params.mobileNavigation }}'>
+ {{- $link := .RelPermalink }}
+ {{- range .Site.Data.menu }}
+ <div class = 'nav_parent{{ if eq .link $link }} nav_active{{ end}}'>
+ <a href = '{{ absURL .link }}' class = 'nav_item'>{{ .name }} {{ with .submenu }}<img src= {{ absURL "icons/caret-icon.svg" }} alt="icon" class="nav_icon">{{ end }}</a>
+ {{- with .submenu }}
+ <div class = 'nav_sub'>
+ {{- range . }}
+ <a href = '{{ absURL .link }}' class = 'nav_child nav_item'>{{ .name }}</a>
+ {{- end }}
+ </div>
+ {{- end }}
+ </div>
+ {{- end }}
+ {{- if eq $centerLogo true }}
+ <a href='{{ absURL "" }}' class = 'nav_brand nav_center nav_item'>
+ <img src="{{ absURL $logo }}" class="logo">
+ </a>
+ {{- end }}
+ {{- partial "follow" . }}
+ </div>
+ </nav>
+</header>
diff --git a/website/layouts/partials/reveal-hugo/body.html b/website/layouts/partials/reveal-hugo/body.html
deleted file mode 100644
index f2dd4bf..0000000
--- a/website/layouts/partials/reveal-hugo/body.html
+++ /dev/null
@@ -1 +0,0 @@
-<!-- override this partial to add content before the body tag closes --> \ No newline at end of file
diff --git a/website/layouts/partials/reveal-hugo/head.html b/website/layouts/partials/reveal-hugo/head.html
deleted file mode 100644
index ed1e892..0000000
--- a/website/layouts/partials/reveal-hugo/head.html
+++ /dev/null
@@ -1 +0,0 @@
-<!-- override this partial to add content before the head tag closes --> \ No newline at end of file
diff --git a/website/layouts/partials/reveal-hugo/slides.html b/website/layouts/partials/reveal-hugo/slides.html
deleted file mode 100644
index e578882..0000000
--- a/website/layouts/partials/reveal-hugo/slides.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<div class="reveal">
- <!-- Any section element inside of this container is displayed as a slide -->
- <div class="slides">
- <!-- Use the array of pages passed as a param -->
- {{ range . -}}
- <!-- Don't process empty content files -->
- {{- if ne (len .Content) 0 -}}
- <!-- Remove the <hr /> tag generated by blackfriday for footnotes -->
- {{- $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" -}}
- <!-- Split the processed content by <hr /> tag -->
- {{- range (split $content "<hr />") -}}
- <!-- Only wrap in <section> tag if not already wrapped by shortcode -->
- {{- if in . "data-noprocess" -}}
-{{- . | safeHTML -}}
- {{- else }}
-<section>
- {{- . | safeHTML }}
-</section>
- {{- end -}}
- {{- end -}}
- {{- end -}}
- {{- end }}
- </div>
-</div> \ No newline at end of file
diff --git a/website/layouts/partials/share.html b/website/layouts/partials/share.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/website/layouts/partials/share.html
diff --git a/website/layouts/partials/sidebar.html b/website/layouts/partials/sidebar.html
new file mode 100644
index 0000000..738a20c
--- /dev/null
+++ b/website/layouts/partials/sidebar.html
@@ -0,0 +1,66 @@
+{{ $title := .Title }}
+<aside class="sidebar">
+ <section class="sidebar_inner">
+ <h2>{{ .Site.Params.name }}</h2>
+ <div>
+ {{ .Site.Params.description }}
+ </div>
+ <h2 class="mt-4">Featured Posts</h2>
+ <ul>
+ {{ range where .Site.RegularPages "Params.featured" true }}
+ {{- if ne $title .Title }}
+ <li>
+ <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
+ </li>
+ {{- end }}
+ {{ end }}
+ </ul>
+ <h2 class="mt-4">Recent Posts</h2>
+ <ul class="flex-column">
+ {{ range first 8 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" true) }}
+ {{- if ne $title .Title }}
+ <li>
+ <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
+ </li>
+ {{- end }}
+ {{- end }}
+ </ul>
+ {{- $numberOfTagsLimit := $.Site.Params.numberOfTagsShown }} <!-- See config -->
+ {{ range $key, $value := .Site.Taxonomies }}
+ <div>
+ <h2 class="mt-4 taxonomy" id="{{ $key }}-section">{{ $key }}</h2>
+ <nav class="tags_nav">
+ {{- $onPageTags := $.Page.Params.tags }}
+ {{- $slicedTags := ($value.ByCount | first $numberOfTagsLimit) }}
+ {{- range $slicedTags }}
+ <a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent">
+ {{ upper .Name }}
+ <span class='button_tally'>{{ .Count }}</span>
+ </a>
+ {{ end }}
+ {{ if gt (len $value.ByCount) $numberOfTagsLimit }}
+ <br>
+ <div class="post_tags_toggle button">All {{ $key }}</div>
+ {{- $tagsInfo := newScratch }}
+ <div class="post_tags">
+ <div class="tags_list">
+ {{- range $value.Alphabetical }}
+ {{ $tagsInfo.Add "tagsInfo" (slice .Name .Count)}}
+ <a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent" data-position={{ .Count }}>
+ {{- upper .Name -}}
+ <span class='button_tally'>{{ .Count }}</span>
+ </a>
+ {{ end }}
+ <div class="tags_sort"><span title="sort alphabetically">[A~Z]</span><span title="sort by count">[0~9]</span>
+ </div>
+ <span class="tags_hide"><svg class="icon">
+ <use xlink:href="#closeme"></use>
+ </svg></span>
+ </div>
+ </div>
+ {{ end }}
+ </nav>
+ </div>
+ {{ end }}
+ </section>
+</aside>