Website Summary Files Commits Branches @commit @diff @stats
path: root / themes / natrium / layouts / partials
diff options
context:
space:
mode:
Commitea6082d632122e42ad118d514f87665c34ddf6c8 (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-08-29 21:02:12 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-08-29 21:02:12 +0300
Files63ecfd5f9be47a14a4eb7823bfe69bd62a5edf08 /themes/natrium/layouts/partials
IPL-ea6082d632122e42ad118d514f87665c34ddf6c8.tar
IPL-ea6082d632122e42ad118d514f87665c34ddf6c8.tar.gz
IPL-ea6082d632122e42ad118d514f87665c34ddf6c8.zip
Initial commit
- natrium: e006b529af8bee9422e4b2f8af0c6be4e8b41001 - reveal-hugo: 3bd0dbabe99e13a6c4970bbbfea12b0f084a0d1a
diff --git a/themes/natrium/layouts/partials/footer.html b/themes/natrium/layouts/partials/footer.html
new file mode 100644
index 0000000..a907193
--- /dev/null
+++ b/themes/natrium/layouts/partials/footer.html
@@ -0,0 +1,18 @@
+ <footer class="footer">
+ <ul class="footer-links">
+ <li>
+ <a href="{{ .Site.RSSLink }}" type="application/rss+xml" target="_blank"><i class="fa fa-rss"></i> {{ i18n "footerRSS" }}</a>
+ </li>
+ <li>
+ <a href="https://github.com/mobybit/hugo-natrium-theme"><i class="fa fa-github"></i> Code</a>
+ </li>
+ <li>
+ <a href="{{ .Site.BaseURL }}site-notice">{{ i18n "siteNotice" }}</a>
+ </li>
+ </ul>
+ </footer>
+
+ </div>
+
+ </body>
+</html>
diff --git a/themes/natrium/layouts/partials/head.html b/themes/natrium/layouts/partials/head.html
new file mode 100644
index 0000000..b17415e
--- /dev/null
+++ b/themes/natrium/layouts/partials/head.html
@@ -0,0 +1,31 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+{{ .Hugo.Generator }}
+
+{{ if eq .URL "/" }}
+<title>{{ .Title }}</title>
+<meta property="og:title" content="{{ .Title }}">
+<meta property="og:type" content="website">
+{{ else }}
+<title>{{ .Title }} - {{ .Site.Title }}</title>
+<meta property="og:title" content="{{ .Title }} - {{ .Site.Title }}">
+{{ end }}
+
+{{ if eq .URL "/" }}
+<meta property="description" content="{{ .Site.Params.description }}">
+{{ else }}
+ {{ if .Description }}
+ <meta property="description" content="{{ .Description }}">
+ {{ end }}
+{{ end }}
+
+{{ if .Keywords }}
+<meta property="keywords" content ="{{ delimit .Keywords ", " }}">
+{{ end }}
+
+{{ if .RSSLink }}
+<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+{{ end }}
+
+<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" media="all">
+<link rel="stylesheet" href="{{ .Site.BaseURL }}css/fonts.css">
diff --git a/themes/natrium/layouts/partials/header.html b/themes/natrium/layouts/partials/header.html
new file mode 100644
index 0000000..6a3b55c
--- /dev/null
+++ b/themes/natrium/layouts/partials/header.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+ <head>
+ {{ partial "head.html" . }}
+ </head>
+ <body>
+ <div class="wrapper">
+ <header class="header">
+ {{ partial "nav.html" . }}
+ </header>
diff --git a/themes/natrium/layouts/partials/list-item.html b/themes/natrium/layouts/partials/list-item.html
new file mode 100644
index 0000000..245a80d
--- /dev/null
+++ b/themes/natrium/layouts/partials/list-item.html
@@ -0,0 +1,6 @@
+ <nav class="list-item">
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <span class="list-item-date">
+ {{ .Date.Format "2006-01-02" }}
+ </span>
+ </nav>
diff --git a/themes/natrium/layouts/partials/nav.html b/themes/natrium/layouts/partials/nav.html
new file mode 100644
index 0000000..607878c
--- /dev/null
+++ b/themes/natrium/layouts/partials/nav.html
@@ -0,0 +1,14 @@
+<nav class="nav">
+ <a href="{{ .Site.BaseURL }}" class="nav-logo">
+ <img src="{{ .Site.BaseURL }}images/{{ .Site.Params.logo.url }}"
+ width="{{ .Site.Params.logo.width }}"
+ height="{{ .Site.Params.logo.height }}"
+ alt="{{ .Site.Params.logo.alt }}">
+ </a>
+
+ <ul class="nav-links">
+ {{ range .Site.Menus.main }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+</nav>
diff --git a/themes/natrium/layouts/partials/pagination.html b/themes/natrium/layouts/partials/pagination.html
new file mode 100644
index 0000000..d818c18
--- /dev/null
+++ b/themes/natrium/layouts/partials/pagination.html
@@ -0,0 +1,34 @@
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+
+<ul class="page-links">
+ <li
+ {{ if not $pag.HasPrev }}class="page-links-disabled"{{ end }}>
+ <a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria-label="Previous"><span aria-hidden="true">&lt;&#160;</span></a>
+ </li>
+ {{ $.Scratch.Set "__paginator.ellipsed" false }}
+ {{ range $pag.Pagers }}
+ {{ $right := sub .TotalPages .PageNumber }}
+ {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
+ {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
+ {{ if $showNumber }}
+ {{ $.Scratch.Set "__paginator.ellipsed" false }}
+ {{ $.Scratch.Set "__paginator.shouldEllipse" false }}
+ {{ else }}
+ {{ $.Scratch.Set "__paginator.shouldEllipse" (not ($.Scratch.Get "__paginator.ellipsed") ) }}
+ {{ $.Scratch.Set "__paginator.ellipsed" true }}
+ {{ end }}
+ {{ if $showNumber }}
+ <li
+ {{ if eq . $pag }}class="page-links-active"{{ end }}><a href="{{ .URL }}">{{ .PageNumber }}</a>
+ </li>
+ {{ else if ($.Scratch.Get "__paginator.shouldEllipse") }}
+ <li class="page-links-disabled"><span aria-hidden="true">&hellip;</span></li>
+ {{ end }}
+ {{ end }}
+ <li
+ {{ if not $pag.HasNext }}class="page-links-disabled"{{ end }}>
+ <a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria-label="Next"><span aria-hidden="true">&#160;&gt;</span></a>
+ </li>
+</ul>
+{{ end }}