initial commit

This commit is contained in:
Josh Johnson 2016-02-19 23:35:42 -05:00
commit f92932b947
44 changed files with 851 additions and 0 deletions

11
layouts/404.html Normal file
View 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" . }}

View 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" . }}

View 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
View 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" . }}

View 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" . }}

View 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.

View 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>

View file

@ -0,0 +1 @@
<!-- Create your own layouts/partials/custom_javascript.html to add javascript -->

View file

@ -0,0 +1 @@
<!-- Create your own layouts/partials/custom_stylesheets.html to add custom styles -->

View file

@ -0,0 +1,3 @@
404. Not Found. Try again.
If you don't like this, create a partial called `not_found.html`.

View 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">
&copy; {{ .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>

View 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>

View 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>

View 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" . }}

View 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>

View 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>

View 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>

View 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>

View 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") }}{{ . }} &middot; {{ 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">

View 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
View 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
View 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>

View 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" . }}