Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wd/hugo-fabric.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwd <wd@wdicc.com>2017-03-10 14:12:39 +0300
committerwd <wd@wdicc.com>2017-03-10 14:12:39 +0300
commit50754afdf05da0c3d14e5806fc6d97ae043dbdd7 (patch)
tree5c4c143042d49a0a05e5c5e3b613a1bb89290a4b /layouts
parent6a8a9ae472fec882677a2f648c4e7ca5a45f7476 (diff)
First version
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html0
-rw-r--r--layouts/_default/baseof.html27
-rw-r--r--layouts/_default/list.html3
-rw-r--r--layouts/_default/single.html16
-rw-r--r--layouts/_default/terms.html7
-rw-r--r--layouts/archives/single.html4
-rw-r--r--layouts/index.html22
-rw-r--r--layouts/partials/archive.html27
-rw-r--r--layouts/partials/article.html24
-rw-r--r--layouts/partials/author.html8
-rw-r--r--layouts/partials/categories.html8
-rw-r--r--layouts/partials/disqus.html19
-rw-r--r--layouts/partials/footer.html9
-rw-r--r--layouts/partials/head.html47
-rw-r--r--layouts/partials/header.html13
-rw-r--r--layouts/partials/navigation.html14
-rw-r--r--layouts/partials/post/author.html8
-rw-r--r--layouts/partials/post/categories.html8
-rw-r--r--layouts/partials/post/date.html1
-rw-r--r--layouts/partials/post/sharing.html15
-rw-r--r--layouts/partials/post/tags.html5
-rw-r--r--layouts/partials/social.html50
-rw-r--r--layouts/partials/tags.html25
23 files changed, 360 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/404.html
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..3b77125
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,27 @@
+{{ partial "head.html" . }}
+
+<body>
+ <div id="wrapper">
+ <header id="header" class="inner">{{ partial "header.html" . }}</header>
+
+<div id="toload">
+<!-- begin toload -->
+ <div id="content" class="inner">
+ {{ block "body" . }}{{ end }}
+ </div>
+ <footer id="footer">
+ {{ partial "footer.html" . }}
+ </footer>
+ <script src="/js/fabric.js"></script>
+
+<!-- end toload -->
+</div>
+</div>
+<script src="/js/jquery.ui.totop.js" type="text/javascript"></script>
+<script type="text/javascript">
+/*<![CDATA[*/
+;(function($){$().UItoTop({easingType:'easeOutCirc'});})(jQuery);
+/*]]>*/
+</script><!-- remove it to remove the scroll to top button -->
+</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..6fa6844
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,3 @@
+{{ define "body" }}
+{{ partial "tags.html" . }}
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..74d61d3
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,16 @@
+{{ define "body" }}
+<article class="post">{{ partial "article.html" (dict "post" . "index" false) }}</article>
+
+{{ partial "post/sharing.html" (dict "theme" $.Site.Params.theme) }}
+
+{{ partial "disqus.html" (dict "shortname" $.Site.Params.theme.disqus_shortname "index" false "post" .) }}
+
+{{ if $.Site.Params.theme.disqus_shortname }}
+<section id="comment">
+ <h2 class="title">Comments</h2>
+ <div id="disqus_thread" aria-live="polite">
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ </div>
+</section>
+{{ end }}
+{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..22ee845
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,7 @@
+{{ define "body" }}
+{{ $site := .Site }}
+{{ $data := .Data }}
+{{ range $key, $value := .Data.Terms.Alphabetical }}
+<a href="{{ $site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a>({{ $value.Count }})
+{{ end }}
+{{ end }}
diff --git a/layouts/archives/single.html b/layouts/archives/single.html
new file mode 100644
index 0000000..ff22477
--- /dev/null
+++ b/layouts/archives/single.html
@@ -0,0 +1,4 @@
+{{ define "body" }}
+{{ partial "disqus.html" (dict "index" true) }}
+{{ partial "archive.html" . }}
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..8d74656
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,22 @@
+{{ define "body" }}
+{{ $index := true }}
+{{ $pag := $.Paginator }}
+
+{{ partial "disqus.html" (dict "shortname" $.Site.Params.theme.disqus_shortname "index" $index) }}
+
+{{ range where $pag.Pages "Type" "ne" $.Site.Params.theme.archive_post_type }}
+ <article class="post">{{ partial "article.html" (dict "post" . "index" $index "theme" $.Site.Params.theme) }}</article>
+{{ end }}
+
+{{ if gt $pag.TotalPages 1 }}
+ <nav id="pagenavi">
+ {{ if $pag.HasPrev }}
+ <a href="{{ $pag.Prev.URL }}" class="prev">Prev</a>
+ {{ end }}
+ {{ if $pag.HasNext }}
+ <a href="{{ $pag.Next.URL }}" class="next">Next</a>
+ {{ end }}
+ <div class="center"><a href="/archives/index.html">Blog Archives</a></div>
+ </nav>
+{{ end }}
+{{ end }}
diff --git a/layouts/partials/archive.html b/layouts/partials/archive.html
new file mode 100644
index 0000000..d835dc2
--- /dev/null
+++ b/layouts/partials/archive.html
@@ -0,0 +1,27 @@
+{{ $.Scratch.Add "last" 0 }}
+{{ range (where $.Site.Pages "Kind" $.Site.Params.theme.post_type) }}
+ {{ if ne .Type $.Site.Params.theme.archive_post_type }}
+ {{ $year := .Date.Format "2006" | int }}
+ {{ $post_date := .Date.Format "01-02" }}
+ {{ $last := $.Scratch.Get "last" }}
+ {{ if ne $last $year }}
+ {{ if ne $last 0 }}
+ </section>
+ {{ end }}
+ {{ $.Scratch.Set "last" $year }}
+ <section class="archives"><h1 class="year">{{ $year }}</h1><div class="top-border-padding"></div>
+ {{ end }}
+
+ <article>
+ <h2 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <div class="meta">
+ <span class="date">{{ $post_date }}</span>
+ <span class="tags">{{ partial "post/tags.html" . }}</span>
+ {{ if $.Site.Params.theme.disqus_shortname }}
+ <span class="comments"><a href="{{ .Permalink }}#disqus_thread">Comments</a></span>
+ {{ end }}
+ </div>
+ </article>
+ {{ end }}
+{{ end }}
+</section>
diff --git a/layouts/partials/article.html b/layouts/partials/article.html
new file mode 100644
index 0000000..a3d7133
--- /dev/null
+++ b/layouts/partials/article.html
@@ -0,0 +1,24 @@
+{{ if .index }}
+ <h2 class="title">
+ <a href="{{ .post.URL }}">{{ .post.Title }}</a>
+ </h2>
+ <div class="entry-content">
+ <div class="meta">
+ <div class="date">Published on: {{ partial "post/date.html" .post }}</div>
+ <div class="tags">Tags: {{ partial "post/tags.html" .post }}</div>
+ </div>
+ {{ .post.Content }}
+ </div>
+{{ else }}
+ <h2 class="title">{{ .post.Title }}</h2>
+ <div class="meta">
+ <div class="date">Published on: {{ partial "post/date.html" .post }}</div>
+ <div class="tags">Tags: {{ partial "post/tags.html" .post }}</div>
+ </div>
+ <div class="entry-content">{{ .post.Content }}</div>
+{{ end }}
+<div class="meta">
+ {{ if .theme.disqus_shortname }}
+ <span class="comments"><a href="{{ .post.URL }}#disqus_thread">Comments</a></span>
+ {{ end }}
+</div>
diff --git a/layouts/partials/author.html b/layouts/partials/author.html
new file mode 100644
index 0000000..5d04424
--- /dev/null
+++ b/layouts/partials/author.html
@@ -0,0 +1,8 @@
+<% if post.author %>
+ <% assign author = post.author %>
+<% elsif page.author %>
+ <% assign author = page.author %>
+<% else %>
+ <% assign author = theme.author %>
+<% } %>
+<% if author %><span class="byline author vcard">Posted by <span class="fn"><%= author %></span></span><% } %>
diff --git a/layouts/partials/categories.html b/layouts/partials/categories.html
new file mode 100644
index 0000000..7638fbf
--- /dev/null
+++ b/layouts/partials/categories.html
@@ -0,0 +1,8 @@
+<% capture category %><% if post %><%= post.categories | category_links | size %><% else %><%= page.categories | category_links | size %><% } %><% endcapture %>
+<% unless category == '0' %>
+<% if post %>
+ <%= post.categories | category_links %>
+<% else %>
+ <%= page.categories | category_links %>
+<% } %>
+<% endunless %>
diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html
new file mode 100644
index 0000000..9da7440
--- /dev/null
+++ b/layouts/partials/disqus.html
@@ -0,0 +1,19 @@
+{{ if .shortname }}
+ {{ if (not .index) }}
+ <script type="text/javascript">
+ var disqus_config = function () {
+ this.page.url = '{{ .post.Permalink }}';
+ this.page.identifier = '{{ .post.Permalink }}';
+ };
+
+ (function() {
+ var d = document, s = d.createElement('script');
+ s.src = '//{{ .shortname }}.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+ {{ else }}
+ <script id="dsq-count-scr" src="//{{ .shortname }}.disqus.com/count.js" async></script>
+ {{ end }}
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..0f8f808
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,9 @@
+<div style="display:inline">
+ Copyright &copy; {{ now | dateFormat "2006" }}
+ {{ if .Site.Params.author }}
+ {{ .Site.Params.author }}
+ {{ else }}
+ {{ .Site.Title }}
+ {{ end }}. Powered by <a href="http://gohugo.io" target="_blank">Hugo</a> |
+ Theme is <a href="https://github.com/wd/hugo-fabric">hugo-fabric</a>, fork from <a href="https://github.com/wd/hexo-fabric">hexo-fabric</a> by <a href="https://wdicc.com">me</a>
+</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..36e3edb
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <!--
+ var title = page.title;
+
+ if (is_archive()){
+ title = 'Archives';
+
+ if (is_month()){
+ title += ': ' + page.year + '/' + page.month;
+ } else if (is_year()){
+ title += ': ' + page.year;
+ }
+ } else if (is_category()){
+ title = 'Category: ' + page.category;
+ } else if (is_tag()){
+ title = 'Tag: ' + page.tag;
+ }
+ -->
+ {{ $.Scratch.Add "title" "" }}
+ {{ if eq .Type "Archives" }}
+ {{ $.Scratch.Set "title" "Archives" }}
+ {{ end }}
+ <title>{{ if $.Scratch.Get "title" }}{{ $.Scratch.Get "title" }} - {{ end }}{{ .Title }}</title>
+ <meta name="author" content="{{ .Site.Params.author }}">
+ <meta name="description" content="{{ .Description }}">
+ <meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+
+ <link href="{{ .RSSLink }}" rel="alternate" title="{{ .Site.Title }}" type="application/atom+xml">
+ <link href="/favicon.ico" rel="shortcut icon">
+ <link href="/css/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link href="/css/custom.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link href="/css/hljs.css" media="screen, projection" rel="stylesheet" type="text/css">
+
+ <link href='//fonts.googleapis.com/css?family=Slackey' rel='stylesheet' type='text/css'>
+ <link href='//fonts.googleapis.com/css?family=Fjalla+One' rel='stylesheet' type='text/css'>
+ <link href='//fonts.googleapis.com/css?family=Amethysta' rel='stylesheet' type='text/css'>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
+ <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![}]-->
+
+ <script type="text/javascript" src="/js/jquery-tapir.js"></script>
+
+ {{ template "_internal/google_analytics_async.html" . }}
+</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..78bf8a4
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,13 @@
+<!-- for more effects see _animate.scss -->
+<h1 class="animated bounceInDown">
+ <div id="headerbg">
+ {{ .Site.Title }}
+ </div>
+</h1>
+{{ $theme := .Site.Params.theme }}
+<span class="subtitle">{{ if $theme.subtitle }}{{ $theme.subtitle }}{{ end }}</span>
+<br>
+
+{{ partial "social.html" (dict "theme" $theme) }}
+
+{{ partial "navigation.html" . }}
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html
new file mode 100644
index 0000000..fe34abd
--- /dev/null
+++ b/layouts/partials/navigation.html
@@ -0,0 +1,14 @@
+<ul id="nav">
+ <li id="ajax"><a href="/index.html">Home</a></li>
+ <li id="ajax"><a href="/archives/index.html">Archives</a></li>
+ <li id="ajax"><a href="/tags/index.html">Tags</a></li>
+ <li><a href="/atom.xml">RSS</a></li>
+ <li>
+ <div id="dark">
+ <form action="//www.google.com.hk/search" method="get" accept-charset="UTF-8" id="search">
+ <input type="hidden" name="sitesearch" value="{{ .Site.BaseURL }}" />
+ <input type="text" name="q" results="0" placeholder="Search..." x-webkit-speech />
+ </form>
+ </div>
+ </li>
+</ul>
diff --git a/layouts/partials/post/author.html b/layouts/partials/post/author.html
new file mode 100644
index 0000000..5d04424
--- /dev/null
+++ b/layouts/partials/post/author.html
@@ -0,0 +1,8 @@
+<% if post.author %>
+ <% assign author = post.author %>
+<% elsif page.author %>
+ <% assign author = page.author %>
+<% else %>
+ <% assign author = theme.author %>
+<% } %>
+<% if author %><span class="byline author vcard">Posted by <span class="fn"><%= author %></span></span><% } %>
diff --git a/layouts/partials/post/categories.html b/layouts/partials/post/categories.html
new file mode 100644
index 0000000..7638fbf
--- /dev/null
+++ b/layouts/partials/post/categories.html
@@ -0,0 +1,8 @@
+<% capture category %><% if post %><%= post.categories | category_links | size %><% else %><%= page.categories | category_links | size %><% } %><% endcapture %>
+<% unless category == '0' %>
+<% if post %>
+ <%= post.categories | category_links %>
+<% else %>
+ <%= page.categories | category_links %>
+<% } %>
+<% endunless %>
diff --git a/layouts/partials/post/date.html b/layouts/partials/post/date.html
new file mode 100644
index 0000000..359aeef
--- /dev/null
+++ b/layouts/partials/post/date.html
@@ -0,0 +1 @@
+<time datetime='{{ .Date.Format "2006-01-02T15:04:05.000-07:00" }}' itemprop="datePublished">{{ .Date.Format "2006-01-02" }}</time>
diff --git a/layouts/partials/post/sharing.html b/layouts/partials/post/sharing.html
new file mode 100644
index 0000000..34e6a60
--- /dev/null
+++ b/layouts/partials/post/sharing.html
@@ -0,0 +1,15 @@
+<div class="share">
+ <div class="addthis_toolbox addthis_default_style ">
+ {{ if .theme.facebook_like }}
+ <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
+ {{ end }}
+ {{ if .theme.twitter_tweet_button }}
+ <a class="addthis_button_tweet"></a>
+ {{ end }}
+ {{ if .theme.google_plus_one }}
+ <a class="addthis_button_google_plusone" g:plusone:size="{{ .theme.google_plus_one_size }}"></a>
+ {{ end }}
+ <a class="addthis_counter addthis_pill_style"></a>
+ </div>
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid={{ .theme.addthis_profile_id }}"></script>
+</div>
diff --git a/layouts/partials/post/tags.html b/layouts/partials/post/tags.html
new file mode 100644
index 0000000..970d7c3
--- /dev/null
+++ b/layouts/partials/post/tags.html
@@ -0,0 +1,5 @@
+{{ if .Params.tags }}
+{{ range .Params.tags }}
+<a href="/tags/{{ . | urlize }}">{{ . }}</a>
+{{ end }}
+{{ end }}
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
new file mode 100644
index 0000000..b4c9407
--- /dev/null
+++ b/layouts/partials/social.html
@@ -0,0 +1,50 @@
+<ul id="social-links" style="text-align:center; clear:both;">
+ {{ if .theme.github_user }}
+ <!-- GitHub -->
+ <li>
+ <a href="https://github.com/{{ .theme.github_user }}" class="github" title="Github"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.googleplus_user }}
+ <!-- Google Plus -->
+ <li>
+ <a href="http://plus.google.com/{{ .theme.googleplus_user }}?rel=author" class="google" title="Google+"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.facebook_user }}
+ <!-- Facebook -->
+ <li>
+ <a href="http://www.facebook.com/{{ .theme.facebook_user }}" class="facebook" title="Facebook"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.twitter_user }}
+ <!-- Twitter -->
+ <li>
+ <a href="http://www.twitter.com/{{ .theme.twitter_user }}" class="twitter" title="Twitter"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.linkedin_user }}
+ <!-- LinkedIn -->
+ <li>
+ <a href="http://www.linkedin.com/in/{{ .theme.linkedin_user }}" class="linkedin" title="LinkedIn"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.skype_user }}
+ <!-- Skype -->
+ <li>
+ <a href="http://myskype.info/{{ .theme.skype_user }}" class="skype" title="Skype"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.youtube_user }}
+ <!-- Youtube -->
+ <li>
+ <a href="http://youtube.com/user/{{ .theme.youtube_user }}" class="youtube" title="Youtube"></a>
+ </li>
+ {{ end }}
+ {{ if .theme.lastfm_user }}
+ <!-- LastFM -->
+ <li>
+ <a href="http://www.lastfm.com/user/{{ .theme.lastfm_user }}" class="lastfm" title="LastFM"></a>
+ </li>
+ {{ end }}
+</ul>
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644
index 0000000..f1924b8
--- /dev/null
+++ b/layouts/partials/tags.html
@@ -0,0 +1,25 @@
+{{ $.Scratch.Add "last" 0 }}
+{{ range .Data.Pages }}
+ {{ $year := .Date.Format "2006" | int }}
+ {{ $post_date := .Date.Format "01-02" }}
+ {{ $last := $.Scratch.Get "last" }}
+ {{ if ne $last $year }}
+ {{ if ne $last 0 }}
+ </section>
+ {{ end }}
+ {{ $.Scratch.Set "last" $year }}
+ <section class="archives"><h1 class="year">{{ $year }}</h1><div class="top-border-padding"></div>
+ {{ end }}
+
+ <article>
+ <h2 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <div class="meta">
+ <span class="date">{{ $post_date }}</span>
+ <span class="tags">{{ partial "post/tags.html" . }}</span>
+ {{ if $.Site.Params.theme.disqus_shortname }}
+ <span class="comments"><a href="{{ .Permalink }}#disqus_thread">Comments</a></span>
+ {{ end }}
+ </div>
+ </article>
+{{ end }}
+</section>