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

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/disqus.html17
-rw-r--r--layouts/partials/footer.html24
-rw-r--r--layouts/partials/header.html62
-rw-r--r--layouts/partials/navigation.html31
-rw-r--r--layouts/partials/octo-header.html5
-rw-r--r--layouts/partials/pagination.html49
-rw-r--r--layouts/partials/post_footer.html40
-rw-r--r--layouts/partials/sidebar.html64
8 files changed, 292 insertions, 0 deletions
diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html
new file mode 100644
index 0000000..f6f8750
--- /dev/null
+++ b/layouts/partials/disqus.html
@@ -0,0 +1,17 @@
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+
+(function() {
+ // Don't ever inject Disqus on localhost--it creates unwanted
+ // discussions from 'localhost:1313' on your Disqus account...
+ // if (window.location.hostname == "localhost")
+ // return;
+
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ var disqus_shortname = '{{ .Site.Params.disqusShortname }}';
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+})();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..0610940
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,24 @@
+
+<!-- Will this even work?
+if we want to do theme specific highlighting - incase we don't want to do solarized highlighting via pygment and want to do with js
+{{ if isset .Site.Params "highlight" }}<script src="{{ "/js/highlight.pack.js" | absURL }}"></script>
+<script>hljs.initHighlightingOnLoad();</script>{{ end }}
+-->
+
+<footer role="contentinfo">
+ <p>Copyright &copy; {{ .Now.Format "2006" }} {{ .Site.Params.author }} - <a href="{{ "/license/" | absURL }}">License</a> -
+ <span class="credit">Powered by <a target="_blank" href="https://gohugo.io">Hugo</a> and <a target="_blank" href="https://github.com/parsiya/hugo-octopress/">Hugo-Octopress</a> theme.
+</p>
+
+</footer>
+
+{{ with .Site.Params.googleAnalytics }}
+<script>
+ var _gaq=[['_setAccount','{{ . }}'],['_trackPageview']];
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g,s)}(document,'script'));
+</script>
+{{ end }}
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..135cebb
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
+<head>
+ <link href="http://gmpg.org/xfn/11" rel="profile">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+ <!-- added from octo -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
+
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts added from Octo-->
+ <link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+ <link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+ <!-- goes into the title bar -->
+ <title>{{ .Title }}</title>
+
+ <!-- CSS -->
+ <link rel="stylesheet" href="{{ "/css/hugo-octopress.css" | absURL }}">
+
+ <!-- For sidebar icons - TODO: find local icons I guess-->
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
+
+ <!-- if you want your own highlight.css -->
+ <!--
+ {{ if isset .Site.Params "highlight" }}<link rel="stylesheet" href="{{ "/css/highlight/" | absURL }}{{ .Site.Params.highlight }}.css">{{ end }}
+ -->
+
+ <!-- Icons -->
+ <link href="{{ "/favicon.png" | absURL }}" rel="icon">
+
+ <!-- RSS -->
+ {{ $siteTitle := .Site.Title }}
+ {{ $authorName := .Site.Author.name }}
+
+ <!--
+ {{ with .RSSLink }}<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $siteTitle }} &middot; {{ $authorName }}" />{{ end }}
+ -->
+
+ {{ with .RSSLink }}<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $siteTitle }}" />{{ end }}
+
+ <meta name="description" content="{{ if ne .Description "" }}{{ .Description }}{{ else }}{{ .Site.Params.defaultDescription }}{{ end }}">
+ <meta name="keywords" content="{{ range $index, $element := .Keywords }}{{ if gt $index 0 }},{{ end }}{{ . }}{{ else }}{{ .Site.Params.defaultKeywords }}{{ end }}">
+
+ <meta name="author" content="{{ .Site.Params.author }}">
+
+ <!-- find a way to autoamtically put Hugo version here -->
+ <meta name="generator" content="Hugo 0.15" />
+
+ <!-- Google Analytics -->
+ {{ template "_internal/google_analytics.html" . }}
+
+</head>
+<body{{ with .Site.Params.theme }} class="{{ . }}"{{ end }}>
+
+<!-- top header for octopress -->
+<header role="banner">{{ partial "octo-header.html" . }}</header>
+
+<!-- navigation -->
+<nav role="navigation">{{ partial "navigation.html" . }}</nav>
+
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html
new file mode 100644
index 0000000..adaec40
--- /dev/null
+++ b/layouts/partials/navigation.html
@@ -0,0 +1,31 @@
+
+<!-- reading menu items from config file -->
+
+<ul class="main-navigation">
+ <!-- do not open links to root in new window - otherwise any other link can be opened in new window -->
+ {{ range .Site.Menus.main }}
+ {{ if eq .URL "/" }}
+ <li><a href="{{ .URL | absURL }}" title="{{ .Name }}">{{ .Name }}</a></li>
+ {{ else }}
+ <li><a href="{{ .URL | absURL }}" target="_blank" title="{{ .Name }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+</ul>
+
+<!-- http://fontawesome.io icon fa-lg adapts it to size (at least it is supposed to) -->
+<ul class="subscription">
+ {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" target="_blank" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-lg"></i></a>{{ end }}
+
+ <!-- If you prefer RSS text (like Octopress) replace the line above with next comment -->
+ <!-- <li><a href="/index.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li> -->
+
+</ul>
+
+{{ if isset .Site.Params "search_engine_url" }}
+<form action="{{ .Site.Params.search_engine_url }}" method="get" target="_blank">
+ <fieldset role="search">
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ <input type="hidden" name="q" value="site:{{ "/" | absURL }}" />
+ </fieldset>
+</form>
+{{end}}
diff --git a/layouts/partials/octo-header.html b/layouts/partials/octo-header.html
new file mode 100644
index 0000000..ece9d09
--- /dev/null
+++ b/layouts/partials/octo-header.html
@@ -0,0 +1,5 @@
+<hgroup>
+ <!-- Remember that .Title will refer to the title of the specific page. For index it is the .Site.Title but is different for individual pages -->
+ <h1><a href="{{ "/" | absURL }}">{{ .Site.Title }}</a></h1>
+ <h2>{{ .Site.Params.subtitle }}</h2>
+</hgroup> \ No newline at end of file
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..ce59635
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,49 @@
+<!-- copy pasted from tpl/template_embedded.go -->
+<!-- default pagination.html creates <ul class="pagination"> and then a list of links for counters, forwardw and backward
+ while Octopress uses <div class="pagination"> and links inside-->
+
+<!-- this is how octopress implements the pagination links
+<div class="pagination">
+
+ <a class="prev" href="/blog/page/3/">← Older</a>
+
+ <a href="/blog/archives">Blog Archives</a>
+
+ <a class="next" href="/">Newer →</a>
+
+ </div>
+-->
+
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+<div class="pagination">
+
+ {{ with $pag.First }}
+ <!-- if you prefer characters instead use the following line -->
+ <!-- <a href="{{ .URL }}" aria-label="First" class="label-pagination"><span aria-hidden="true">&laquo;&laquo;</span></a> -->
+ <!-- fa-lg is supposedly dynamic size. You can use fa-1x to fa-5x and probably even more, check http://fontawesome.io -->
+ <a href="{{ .URL }}" aria-label="First" class="label-pagination"><i class="fa fa-angle-double-left fa-lg"></i></a>
+ {{ end }}
+
+ {{ if $pag.HasPrev }}
+ <!-- <a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria-label="Previous" class="label-pagination"><span aria-hidden="true">&laquo;</span></a> -->
+ <a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria-label="Previous" class="label-pagination"><i class="fa fa-angle-left fa-lg"></i></a>
+ {{ end }}
+
+ {{ range $pag.Pagers }}
+ <a href="{{ .URL }}" class="label-pagination">{{ .PageNumber }}</a>
+ {{ end }}
+
+ {{ if $pag.HasNext }}
+ <!-- <a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria-label="Next" class="label-pagination"><span aria-hidden="true">&raquo;</span></a> -->
+ <a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria-label="Next" class="label-pagination"><i class="fa fa-angle-right fa-lg"></i></a>
+ {{ end }}
+
+ {{ with $pag.Last }}
+ <!-- <a href="{{ .URL }}" aria-label="Last"><span aria-hidden="true" class="label-pagination">&raquo;&raquo;</span></a> -->
+ <a href="{{ .URL }}" aria-label="Last"><i class="fa fa-angle-double-right fa-lg"></i></a>
+ {{ end }}
+
+</div>
+{{ end }}
+
diff --git a/layouts/partials/post_footer.html b/layouts/partials/post_footer.html
new file mode 100644
index 0000000..5ee00ab
--- /dev/null
+++ b/layouts/partials/post_footer.html
@@ -0,0 +1,40 @@
+<!-- This file contains the footer for each post - do not mistake it with page footer which is in footer.html partial -->
+
+<footer>
+ <p class="meta">
+ <span class="byline author vcard">Posted by <span class="fn">{{ with .Site.Params.author }}{{ . }}{{ end }}</span></span>
+ <!-- can't put the .Date.Format inside the datetime attribute because of double quotes, so it's outside -->
+ <time>{{ .Date.Format "Jan 2, 2006" }}</time>
+ <span class="categories">
+ Tags:
+ {{ if isset .Params "tags" }}
+ <!-- need to convert the tags to lower for the URLs to work -->
+ {{ range .Params.tags }}<a class="category" href="{{ "/tags/" | absURL }}{{ . | urlize | lower }}">{{ . }}</a> {{ end }}
+ {{ end }}
+ </span>
+ </p>
+
+ <!-- For sharing stuff -->
+ <!-- <div class="sharing"> </div> -->
+
+ <!-- PrevInSection and nextInSection point to previous and next page in the same section, in this case "post"
+ this way we won't see other pages.
+ If you don't like it, use .Prev and .Next - if you want to use .Prev and .Next keep in mind that as of Hugo v0.15 they work the other way around
+ meaning that .Prev needs to go to right which will point to the next post and .Next will go to left and will post to previous post - strange
+ This does not happen with InSection ones
+ For more info about template variables: https://gohugo.io/templates/variables/ -->
+
+ <p class="meta">
+ {{ with .PrevInSection }}
+ <a class="basic-alignment left" href="{{ .Permalink }}" title="{{ .LinkTitle }}">{{ .LinkTitle }}</a>
+ {{ end }}
+
+ {{ with .NextInSection }}
+ <a class="basic-alignment right" href="{{ .Permalink }}" title="{{ .LinkTitle }}">{{ .LinkTitle }}</a>
+ {{ end }}
+ </p>
+
+ {{ partial "disqus.html" . }}
+</footer>
+
+ \ No newline at end of file
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
new file mode 100644
index 0000000..0fbe350
--- /dev/null
+++ b/layouts/partials/sidebar.html
@@ -0,0 +1,64 @@
+
+<!-- to modify sidebar width check the css file lines 757 and 765 (for large screens) -->
+
+<aside class="sidebar thirds">
+ <section class="first odd">
+ <h1>Header in sidebar</h1>
+ <p>This is the rest of the sidebar - here's a link to <a target="_blank" href="http://google.com" title="Google">Google</a>.</p>
+ <p>If links are set in config file, there will be links to keybase/github/twitter/linkedin etc.</p>
+
+ <!-- {{ with .Site.Params.tagline }}<p class="lead">{{ . | markdownify }}</p>{{ end }} -->
+ </section>
+
+ <!-- Links in side bar, for example the following links add blog - I have removed them as we have links in the navigation
+ you can also add sidebar links from config file via the .Site.Menus.main part
+ <ul class="sidebar-nav">
+ <li class="sidebar-nav-item"><a href="{{ "/" | absURL }}">{{ if isset .Site.Params "home"}}{{ .Site.Params.home }}{{ else }}Blog{{ end }}</a></li>
+ {{ range .Site.Menus.main }}
+ <li class="sidebar-nav-item">{{ .Pre }}<a href="{{ .URL | absURL }}">{{ .Name }}</a></li>
+ {{end}}
+ </ul>
+-->
+
+<!-- Font awesome icons - code taken from the Hyde-x theme - "Font Awesome by Dave Gandy - http://fontawesome.io"
+ Icons: https://fortawesome.github.io/Font-Awesome/icons/
+ to give icons square dark backgrounds use them like this: fa fa-key-square
+ size is fa-3x, sizes are 1-5
+ -->
+
+ <ul class="sidebar-nav">
+ <li class="sidebar-nav-item">
+ {{ with .Site.Params.github }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.bitbucket }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.stackOverflow }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.linkedin }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.googleplus }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-google-plus fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.facebook }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.twitter }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.youtube }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-key fa-3x"></i></a>{{ end }} <!-- added keybase -->
+
+ <!-- don't need RSS here anymore -->
+ <!-- {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-3x"></i></a>{{ end }} -->
+ </li>
+ </ul>
+
+ <!-- add recent posts - limit is .Site.Params.SidebarRecentLimit - example copied from https://gohugo.io/templates/go-templates/ -->
+ <section class="even">
+ <h1>Recent Posts</h1>
+
+ <!-- check if the number of recent posts is set in config file, otherwise use 5 -->
+ <ul id="recent_posts">
+ {{ $numberofrecentposts := 5 }}
+ {{ if isset .Site.Params "SidebarRecentLimit" }}
+ {{ $numberofrecentposts := .Site.Params.SidebarRecentLimit }}
+ {{ end }}
+ {{range first $numberofrecentposts .Site.Pages }}
+ <li class="post">
+ <a href="{{.RelPermalink}}">{{.Title}}</a>
+ </li>
+ {{ end }}
+ </ul>
+ </section>
+
+</aside>