big bang
This commit is contained in:
commit
9943fc2d55
45 changed files with 669 additions and 0 deletions
4
layouts/404.html
Normal file
4
layouts/404.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<h1>Page not found</h1>
|
||||
<p><a href="{{ .Site.BaseURL }}">Return to the home page</a>.</p>
|
||||
{{ end }}
|
56
layouts/_default/baseof.html
Normal file
56
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ .Site.Title }}{{ $url := urls.Parse .Page.Permalink }}{{ $url.Path }}</title>
|
||||
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="all,follow">
|
||||
<meta name="googlebot" content="index,follow,snippet,archive">
|
||||
<link rel="stylesheet" href="{{ "hugo-theme-console/css/terminal-0.7.1.min.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "hugo-theme-console/css/animate-3.7.2.min.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "hugo-theme-console/css/console.css" | absURL }}">
|
||||
{{ `
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
` | safeHTML }}
|
||||
|
||||
<link rel="shortcut icon" href="{{ "img/favicon.ico" | absURL }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
|
||||
<link rel="manifest" href="/img/site.webmanifest">
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
|
||||
{{ end }}
|
||||
{{ template "opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
</head>
|
||||
<body class="terminal">
|
||||
<div class="container">
|
||||
<div class="terminal-nav">
|
||||
<header class="terminal-logo">
|
||||
<div class="logo terminal-prompt">
|
||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL }}
|
||||
<a href="{{ .Site.BaseURL }}" class="no-style site-name">{{ .Site.Title }}</a>:~# {{ range $index, $element := split $url "/" }}{{ $.Scratch.Add "path" $element }}{{ if ne $element "" }}<a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a>/{{ $.Scratch.Add "path" "/" }}{{ end }}{{ end }}</header>
|
||||
<nav class="terminal-menu">
|
||||
<ul vocab="https://schema.org/" typeof="BreadcrumbList">
|
||||
{{ range .Site.Params.navlinks }}
|
||||
<li><a href="{{ absURL .url }}" typeof="ListItem">{{ .name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container animated zoomIn fast">
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
14
layouts/_default/list.html
Normal file
14
layouts/_default/list.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Page.Title }}</h1>
|
||||
<br/>
|
||||
{{ .Content }}
|
||||
|
||||
{{ range sort .Data.Pages "Date" "desc" }}
|
||||
{{ if not .Params.private }}
|
||||
<div class="post-list-date">{{ .PublishDate.Format "Jan. 2, 2006" }}</div>
|
||||
<h1><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
4
layouts/_default/single.html
Normal file
4
layouts/_default/single.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
17
layouts/gallery/list.html
Normal file
17
layouts/gallery/list.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Page.Title }}</h1>
|
||||
{{ .Content }}
|
||||
<div class="image-grid">
|
||||
{{ range sort .Data.Pages "Date" "desc" }}
|
||||
{{ if and (isset .Params "image") .Params.image }}
|
||||
<a href="{{ .Permalink }}" title="{{ .Title }}">
|
||||
{{ $image := .Page.Resources.GetMatch .Params.image }}
|
||||
{{ with $image }}
|
||||
{{ $thumb := .Resize "400x" }}
|
||||
<img src="{{ $thumb.RelPermalink }}" alt="{{ .Title }}" class="img-responsive">
|
||||
{{end}}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
15
layouts/gallery/single.html
Normal file
15
layouts/gallery/single.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Page.Title }}</h1>
|
||||
|
||||
{{ if and (isset .Params "image") .Params.image }}
|
||||
{{ $image := .Page.Resources.GetMatch .Params.image }}
|
||||
{{ with $image }}
|
||||
{{ $thumb := .Resize "1000x" }}
|
||||
{{ printf `<img src="%s" alt="%s" class="img-responsive gallery-image">` $thumb.RelPermalink .Title | safeHTML }}
|
||||
{{end}}
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
7
layouts/index.html
Normal file
7
layouts/index.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<head>
|
||||
{{ range .Site.Params.navlinks }}
|
||||
{{ if .home }}
|
||||
<meta http-equiv="refresh" content="0; URL={{ .url | absURL }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</head>
|
49
layouts/opengraph.html
Normal file
49
layouts/opengraph.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<meta property="og:title" content="{{ .Title }}" />
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
||||
{{- with .Params.image }}
|
||||
{{ $image := $.Resources.GetMatch . }}
|
||||
{{ with $image }}
|
||||
{{ $thumb := .Resize "400x" }}
|
||||
<meta property="og:image" content="{{ $thumb.Permalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||
{{- if .IsPage }}
|
||||
{{- if not .PublishDate.IsZero }}<meta property="article:published_time" {{ .PublishDate.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{ else if not .Date.IsZero }}<meta property="article:published_time" {{ .Date.Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />
|
||||
{{ end }}
|
||||
{{- end }}{{/* .IsPage */}}
|
||||
|
||||
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
|
||||
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
|
||||
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
|
||||
{{- with .Params.videos }}
|
||||
{{- range . }}
|
||||
<meta property="og:video" content="{{ . | absURL }}" />
|
||||
{{ end }}{{ end }}
|
||||
|
||||
{{- /* If it is part of a series, link to related articles */}}
|
||||
{{- $permalink := .Permalink }}
|
||||
{{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }}
|
||||
{{- range $name := . }}
|
||||
{{- $series := index $siteSeries $name }}
|
||||
{{- range $page := first 6 $series.Pages }}
|
||||
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
|
||||
{{- end }}
|
||||
{{ end }}{{ end }}
|
||||
|
||||
{{- if .IsPage }}
|
||||
{{- range .Site.Authors }}{{ with .Social.facebook }}
|
||||
<meta property="article:author" content="https://www.facebook.com/{{ . }}" />{{ end }}{{ with .Site.Social.facebook }}
|
||||
<meta property="article:publisher" content="https://www.facebook.com/{{ . }}" />{{ end }}
|
||||
<meta property="article:section" content="{{ .Section }}" />
|
||||
{{- with .Params.tags }}{{ range first 6 . }}
|
||||
<meta property="article:tag" content="{{ . }}" />{{ end }}{{ end }}
|
||||
{{- end }}{{ end }}
|
||||
|
||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
||||
{{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
14
layouts/posts/single.html
Normal file
14
layouts/posts/single.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ .PublishDate.Format "Jan. 2, 2006" }}
|
||||
{{ with .Params.linkedin }}
|
||||
// <a href="{{ . }}">Linkedin</a>
|
||||
{{ end }}
|
||||
{{ with .Params.twitter }}
|
||||
// <a href="{{ . }}">Twitter</a>
|
||||
{{ end }}
|
||||
<br/><br/>
|
||||
{{ .Content }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
16
layouts/sitemap.xml
Normal file
16
layouts/sitemap.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}
|
||||
{{ if not .Params.private }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>{{ end }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>{{ end }}
|
||||
</url>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</urlset>
|
Loading…
Add table
Add a link
Reference in a new issue