initial commit
This commit is contained in:
commit
f92932b947
44 changed files with 851 additions and 0 deletions
11
layouts/404.html
Normal file
11
layouts/404.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
<article class="post">
|
||||
{{ partial "not_found.html" . }}
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
9
layouts/_default/list.html
Normal file
9
layouts/_default/list.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
{{ partial "preview_list.html" . }}
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
13
layouts/_default/single.html
Normal file
13
layouts/_default/single.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
<article class="page">
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
9
layouts/index.html
Normal file
9
layouts/index.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
{{ partial "preview_list.html" . }}
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
9
layouts/microposts/single.html
Normal file
9
layouts/microposts/single.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
{{ partial "preview_micropost.html" . }}
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
2
layouts/partials/bio.html
Normal file
2
layouts/partials/bio.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
Here you can place a short bio about yourself. Place a `bio.html` file in your
|
||||
project directory under `layout/partials`. That will override this message.
|
11
layouts/partials/custom_image_handler.html
Normal file
11
layouts/partials/custom_image_handler.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
// @summary: jquery implementation
|
||||
$(function() {
|
||||
// @summary: Use the author's flickr ID to load images from the public flickr feed
|
||||
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.FlickrID }}&format=json&jsoncallback=?", function(data) {
|
||||
iweblog.application.displayImages(data, 8);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
1
layouts/partials/custom_javascript.html
Normal file
1
layouts/partials/custom_javascript.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- Create your own layouts/partials/custom_javascript.html to add javascript -->
|
1
layouts/partials/custom_stylesheets.html
Normal file
1
layouts/partials/custom_stylesheets.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- Create your own layouts/partials/custom_stylesheets.html to add custom styles -->
|
3
layouts/partials/not_found.html
Normal file
3
layouts/partials/not_found.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
404. Not Found. Try again.
|
||||
|
||||
If you don't like this, create a partial called `not_found.html`.
|
22
layouts/partials/page_footer.html
Normal file
22
layouts/partials/page_footer.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<footer>
|
||||
<div class="footer_text">
|
||||
<div>
|
||||
<h3>Hi, <a href="{{ .Site.Author.AboutPage }}">I'm {{ .Site.Author.FirstName }}</a></h3>
|
||||
<p>
|
||||
{{ partial "bio.html" . }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3><a href="https://www.flickr.com/photos/{{ .Site.Author.FlickrID }}/">Photo Stream</a></h3>
|
||||
<div id="photos"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if .Site.Params.ShowCopyright }}
|
||||
<div class="footer_copyright">
|
||||
© {{ .Now.Format "2006" }} <a href="{{ .Site.Author.AboutPage }}">{{ .Site.Author.FirstName }} {{ .Site.Author.LastName }}</a>
|
||||
{{ with .Site.Author.Location }} - Made in {{ . }}{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</footer>
|
19
layouts/partials/page_header.html
Normal file
19
layouts/partials/page_header.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<header>
|
||||
<nav>
|
||||
<h1><a href="/">@{{ .Site.Author.Handle }}</a>’s {{ .Site.Title }}.</h1>
|
||||
<div class="menu">
|
||||
{{ $.Scratch.Add "sections" .Site.Params.RSSSections }}
|
||||
<ul>
|
||||
{{ range .Site.Menus.main }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if in ($.Scratch.Get "sections") .Name }}
|
||||
<a href="{{ .URL }}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ with .Site.Author.AboutPage }}<li><a href="{{ . }}">About</a></li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
13
layouts/partials/pagination.html
Normal file
13
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="pagination">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}">« Newer</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .Paginator.HasNext .Paginator.HasPrev }}
|
||||
<span>|</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}">Older »</a>
|
||||
{{ end }}
|
||||
</div>
|
19
layouts/partials/preview_list.html
Normal file
19
layouts/partials/preview_list.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ $paginator := .Paginate (where .Data.Pages "Type" "!=" "page") }}
|
||||
{{ range .Paginator.Pages }}
|
||||
{{ $url := replace .Permalink .Site.BaseURL "" }}
|
||||
|
||||
{{ if or (eq .Type "microposts") (eq .Type "micropost") }}
|
||||
{{ partial "preview_micropost.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (eq .Type "photos") (eq .Type "photo") }}
|
||||
{{ partial "preview_photo_post.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (eq .Type "posts") (eq .Type "post") }}
|
||||
{{ partial "preview_post.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
4
layouts/partials/preview_micropost.html
Normal file
4
layouts/partials/preview_micropost.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<article class="micropost">
|
||||
{{ .Content }}
|
||||
<a href='{{ .Permalink }}'><aside class="dates">→ {{ .Date.Format "2006/01/02 3:04 PM" }}</aside></a>
|
||||
</article>
|
12
layouts/partials/preview_photo_post.html
Normal file
12
layouts/partials/preview_photo_post.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<article class="photo">
|
||||
|
||||
<div class="preview">
|
||||
<div class="title">
|
||||
<span><a href="{{ .Permalink }}">{{ .Title }}</a></span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<a href="{{ .Permalink }}">{{ .Summary }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
32
layouts/partials/preview_post.html
Normal file
32
layouts/partials/preview_post.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<article class="post">
|
||||
{{ if (not (isset .Params "externalurl")) }}
|
||||
<h2><a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ else }}
|
||||
<h2><a rel="remote-article" href="{{ .Params.externalurl }}">→ {{ .Title }}</a> <a href="{{ .Permalink }}">∞</a></h2>
|
||||
{{ end }}
|
||||
|
||||
<div class="postmeta">Posted on <time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{ if (isset .Params "categories") }}
|
||||
in
|
||||
<span class="categories">
|
||||
{{ range $i, $v := .Params.categories }}
|
||||
<a class="category" href="/categories/{{ $v | urlize }}">{{ $v }}</a>{{ if ne (len $.Params.categories) (add $i 1) }}, {{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<p>
|
||||
{{ if (not (isset .Params "externalurl")) }}
|
||||
{{ .Summary }}
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</p>
|
||||
|
||||
{{ if .Truncated }}
|
||||
{{ if (not (isset .Params "externalurl")) }}
|
||||
<a class="continue" rel="full-article" href="{{ .Permalink }}">Continue Reading »</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
8
layouts/partials/site_footer.html
Normal file
8
layouts/partials/site_footer.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/2.2.0/jquery.min.js"></script>
|
||||
<script src="/js/lightgallery-all.min.js"></script>
|
||||
<script src="/js/weblog.js" charset="utf-8"></script>
|
||||
{{ partial "custom_javascript.html" . }}
|
||||
{{ partial "custom_image_handler.html" . }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
</body>
|
||||
</html>
|
22
layouts/partials/site_header.html
Normal file
22
layouts/partials/site_header.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="{{ with .Site.Author.FirstName }}{{ . }}{{ end }}">
|
||||
<meta name="description" content="{{ with .Site.Params.Description }}{{ . }}{{ end }}">
|
||||
{{ .Hugo.Generator }}
|
||||
|
||||
{{ $.Scratch.Add "title" .Site.Title }}
|
||||
<title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} · {{ end }}{{ end }}{{ .Site.Title }}</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/weblog.css" media="screen" charset="utf-8" />
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/lightgallery.min.css" type="text/css" />
|
||||
{{ partial "custom_stylesheets.html" . }}
|
||||
|
||||
{{ if .Site.Params.RSSEnabled }}
|
||||
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
</head>
|
||||
<body class="site">
|
21
layouts/photos/single.html
Normal file
21
layouts/photos/single.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
<article class="post">
|
||||
<h2><a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
|
||||
<div class="postmeta">
|
||||
{{ with .Params.location }}Photos taken in {{ . }} on {{ end }}
|
||||
<time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2, 2006" }}</time>
|
||||
{{ with .Params.camera }} with {{ . }}{{ end }}
|
||||
</div>
|
||||
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
30
layouts/posts/single.html
Normal file
30
layouts/posts/single.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
|
||||
<article class="post">
|
||||
{{ if (not (isset .Params "externalurl")) }}
|
||||
<h2><a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ else }}
|
||||
<h2><a rel="remote-article" href="{{ .Params.externalurl }}">→ {{ .Title }}</a> <a href="{{ .Permalink }}">∞</a></h2>
|
||||
{{ end }}
|
||||
|
||||
<div class="postmeta">Posted on <time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2, 2006" }}</time> in
|
||||
<span class="categories">
|
||||
{{ range $i, $v := .Params.categories }}
|
||||
<a class="category" href="/categories/{{ $v | urlize }}">{{ $v }}</a>{{ if ne (len $.Params.categories) (add $i 1) }}, {{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</article>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
24
layouts/rss.xml
Normal file
24
layouts/rss.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }}{{ with .Title }} - {{ .}}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
|
||||
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
|
||||
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
|
||||
{{ range .Data.Pages }}
|
||||
{{ if ne .Type "page" }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
31
layouts/section/posts.html
Normal file
31
layouts/section/posts.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{ partial "site_header.html" . }}
|
||||
{{ partial "page_header.html" . }}
|
||||
|
||||
<main class="content">
|
||||
<article class="post-groups">
|
||||
<div class="post-group">
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<div class="post-group-item">
|
||||
<h3>{{ .Key }}</h3>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
{{ if (not (isset .Params "externalurl")) }}
|
||||
<a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
on <time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2" }}</time>
|
||||
{{ else }}
|
||||
<a rel="remote-article" href="{{ .Params.externalurl }}">{{ .Title }} →</a>
|
||||
on
|
||||
<a href="{{ .Permalink }}"><time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2" }}</time></a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{ partial "page_footer.html" . }}
|
||||
{{ partial "site_footer.html" . }}
|
Loading…
Add table
Add a link
Reference in a new issue