forked from mirrors/hugo-theme-terminal
Init
This commit is contained in:
15
layouts/partials/footer.html
Normal file
15
layouts/partials/footer.html
Normal file
@ -0,0 +1,15 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if .Site.Copyright }}
|
||||
<div class="copyright copyright--user">{{ .Site.Copyright| safeHTML }}</div>
|
||||
{{else}}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||
<span>:: Theme made by <a href="https://twitter.com/panr">panr</a></span>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/main.js"></script>
|
||||
<script src="/assets/prism.js"></script>
|
52
layouts/partials/head.html
Normal file
52
layouts/partials/head.html
Normal file
@ -0,0 +1,52 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}"/>
|
||||
<meta name="keywords" content="{{ .Site.Params.keywords }}"/>
|
||||
<meta name="robots" content="noodp"/>
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
{{ if (ne .Site.Params.ThemeColor "orange") }}
|
||||
<link rel="stylesheet" href="/assets/{{ .Site.Params.ThemeColor }}.css">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/apple-touch-icon-144-precomposed.png">
|
||||
{{ with .Site.Params.ThemeColor }}
|
||||
<link rel="shortcut icon" href="/img/favicon/{{ . }}.png">
|
||||
{{ end }}
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
|
||||
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="twitter:site" content="{{ .Site.BaseURL }}" />
|
||||
<meta name="twitter:creator" content="{{ .Params.Author }}" />
|
||||
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
|
||||
|
||||
<!-- OG data -->
|
||||
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}">
|
||||
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:site_name" content="{{ .Title }}" />
|
||||
<meta property="og:image" content="{{ with .Params.Cover }}{{ $.Site.BaseURL }}img/post/{{ . }}{{ else }}{{ $.Site.BaseURL }}img/default.jpg{{ end }}">
|
||||
<meta property="og:image:width" content="2048">
|
||||
<meta property="og:image:height" content="1024">
|
||||
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||
{{ if isset .Params "date" }}<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ if .OutputFormats.Get "json" }}
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
11
layouts/partials/header.html
Normal file
11
layouts/partials/header.html
Normal file
@ -0,0 +1,11 @@
|
||||
<header class="header">
|
||||
<div class="header__inner">
|
||||
<div class="header__logo">
|
||||
{{ partial "logo.html" . }}
|
||||
</div>
|
||||
<div class="menu-trigger">menu</div>
|
||||
</div>
|
||||
{{ if len .Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
{{ end }}
|
||||
</header>
|
5
layouts/partials/logo.html
Normal file
5
layouts/partials/logo.html
Normal file
@ -0,0 +1,5 @@
|
||||
<a href="{{ if .Site.Params.Logo.LogoHomeLink }}{{ .Site.Params.Logo.LogoHomeLink }}{{else}}{{ .Site.BaseURL }}{{ end }}" style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}Terminal{{ end }}
|
||||
</div>
|
||||
</a>
|
7
layouts/partials/menu.html
Normal file
7
layouts/partials/menu.html
Normal file
@ -0,0 +1,7 @@
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
20
layouts/partials/pagination.html
Normal file
20
layouts/partials/pagination.html
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<span class="button previous">
|
||||
<a href="{{ .Paginator.Prev.URL }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">Newer posts</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<span class="button next">
|
||||
<a href="{{ .Paginator.Next.URL }}">
|
||||
<span class="button__text">Older posts</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user