Initial commit, porting in progress

This commit is contained in:
Carson Ip
2017-02-18 23:25:00 +01:00
commit 275f414ed6
17 changed files with 362 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<article class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<!--<%- partial('post/gallery') %>-->
{{ if .Title }}
<header class="article-header">
<h1 class="article-title" itemprop="name">{{ .Title }}</h1>
</header>
{{ end }}
<div class="article-meta">
<a href="{{ .RelPermalink }}" class="article-date">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05.000-07:00" }}' itemprop="datePublished">{{ .Date.Format "2006-01-02" }}</time>
</a>
{{ $Site := .Site }}
{{ if .Params.categories }}
<div class="post-categories">
<div class="article-category">
{{ range $i, $e := .Params.categories }}
{{ if gt $i 0 }}
<span>&gt;</span>
{{ end }}
<a class="article-category-link" href="{{ $Site.BaseURL }}/categories/{{ $e | urlize }}">{{ $e }}</a>
{{ end }}
</div>
</div>
{{ end }}
{{ if and (isset .Site.Params "disqusShortname") (ne .Site.Params.disqusShortname "") }}
<div class="article-comment-link-wrap">
<a href="{{ .RelPermalink }}#ds-thread" class="article-comment-link">Comments</a>
</div>
{{ end }}
</div>
<div class="article-entry" itemprop="articleBody">
{{ .Content }}
</div>
{{ if not .Params.notoc }}
{{ if .TableOfContents }}
<div class="article-toc">
<h3>Contents</h3>
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
{{ if .Params.tags }}
<footer class="article-footer">
<ul class="article-tag-list">
{{ range .Params.tags }}
<li class="article-tag-list-item">
<a class="article-tag-list-link" href="{{ $Site.BaseURL}}/tags/{{ . | urlize }}">{{ . }}
</a>
</li>
{{ end }}
</ul>
</footer>
{{ end }}
</div>
{{ partial "nav.html" . }}
</article>

View File

@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

View File

@@ -0,0 +1,8 @@
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
&copy; {{ .Now.Format "2006"}} {{ or .Site.Author .Site.Title }}&nbsp;
Powered by <a href="https://gohugo.io" target="_blank">Hugo</a> with theme <a href="https://github.com/carsonip/hugo-theme-minos">Minos</a>
</div>
</div>
</footer>

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ .Title }}{{ if ne .Title .Site.Title }} // {{ .Site.Title }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
{{ partial "og.html" . }}
<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link rel="shortcut icon" href="/favicon.png">
<link href="{{ .Site.BaseURL }}/css/webfonts/ptserif/main.css" rel='stylesheet' type='text/css'>
<link href="{{ .Site.BaseURL }}/css/webfonts/source-code-pro/main.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css">
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="{{ .Description }}">
<meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">
<meta name="author" content="{{ .Params.author }}">
{{ template "_internal/google_analytics.html" . }}
{{ .Hugo.Generator }}
</head>

View File

@@ -0,0 +1,18 @@
<header id="header">
<div id="header-outer" class="outer">
<div id="header-inner" class="inner">
<a id="main-nav-toggle" class="nav-icon" href="javascript:;"></a>
<a id="logo" class="logo-text" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<nav id="main-nav">
{{ range .Site.Menus.main }}
<a class="main-nav-link" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
<nav id="sub-nav">
<div id="search-form-wrap">
<!--<%- search_form({button: '&#xF002;'}) %>-->
</div>
</nav>
</div>
</div>
</header>

14
layouts/partials/nav.html Normal file
View File

@@ -0,0 +1,14 @@
<nav id="article-nav">
{{ if .Prev }}
<a href="{{ .Prev.RelPermalink }}" id="article-nav-newer" class="article-nav-link-wrap">
<div class="article-nav-title"><span>&lt;</span>&nbsp;
{{ .Prev.Title }}
</div>
</a>
{{ end }}
{{ if .Next }}
<a href="{{ .Next.RelPermalink }}" id="article-nav-older" class="article-nav-link-wrap">
<div class="article-nav-title">{{ .Next.Title }}&nbsp;<span>&gt;</span></div>
</a>
{{ end }}
</nav>

8
layouts/partials/og.html Normal file
View File

@@ -0,0 +1,8 @@
<meta property="og:title" content="{{ if .Params.ogtitle }}{{ .Params.ogtitle }}{{ else }}{{ .Title }}{{ end }}" />
<meta property="og:description" content="{{ if .Params.ogdescription }}{{ .Params.ogdescription }}{{ else }}{{ .Description }}{{ end }}" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.ogimage }}
<meta property="og:image" content="{{ .Params.ogimage }}" />
{{ end }}

View File

@@ -0,0 +1,9 @@
<div class="share_addthis">
<div class="sharing addthis_toolbox share">
<a class="addthis_button_facebook_like"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-560c64c35486b3d4" async="async"></script>
</div>