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:
authorparsiya <parsiya@gmail.com>2018-11-23 21:49:42 +0300
committerparsiya <parsiya@gmail.com>2018-11-23 21:49:42 +0300
commite62b793c61e75bae591e19af343f15941b955f1d (patch)
tree04a594b8d49f01c88fc4f69170cc27f4f11eaccc
parentdc15df8630c240fb96ac58a510dbfc7bac6619d9 (diff)
Mild whitespace clean up in partials
-rw-r--r--README.md2
-rw-r--r--layouts/404.html4
-rw-r--r--layouts/index.html1
-rwxr-xr-xlayouts/partials/classic_index.html68
-rw-r--r--layouts/partials/disqus.html23
-rw-r--r--layouts/partials/footer.html65
-rw-r--r--layouts/partials/header.html4
-rw-r--r--layouts/partials/navigation.html15
-rw-r--r--layouts/partials/octo_header.html2
-rw-r--r--layouts/partials/post_header.html28
10 files changed, 99 insertions, 113 deletions
diff --git a/README.md b/README.md
index 8d3799f..4a51913 100644
--- a/README.md
+++ b/README.md
@@ -472,7 +472,7 @@ If you discover any issues/bugs or want new features please use the Github issue
* [Octopress](octopress-link) is created by [Brandon Mathis](https://github.com/imathis). Octopress source can be found on [https://github.com/imathis/octopress](https://github.com/imathis/octopress).
* Some code was taken from the [Hyde-x](https://github.com/zyro/hyde-x) Hugo theme by [Andrei Mihu](http://andreimihu.com/).
* Sidebar icons are from [Font Awesome](https://github.com/FortAwesome/Font-Awesome) by Dave Gandy and [Fork Awesome](https://github.com/ForkAwesome/Fork-Awesome).
-* Special thanks to everyone who has helped with pull requests and issues.
+* Special thanks to [contributors](https://github.com/parsiya/Hugo-Octopress/graphs/contributors) and everyone who has helped with issues.
## <a name="Ported by"></a>Ported by
Ported by Parsia Hakimian:
diff --git a/layouts/404.html b/layouts/404.html
index 7d16e3b..0342615 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -24,9 +24,7 @@
</div>
</article>
</div>
-
{{ partial "sidebar.html" . }}
</div>
</div>
-
-{{ partial "footer.html" . }}
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 4707897..959f103 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,5 +1,6 @@
{{ partial "header.html" . }}
+<!-- use compact index if it is set in the config file -->
{{ if .Site.Params.compactIndex }}
{{ partial "compact_index.html" . }}
{{ else }}
diff --git a/layouts/partials/classic_index.html b/layouts/partials/classic_index.html
index 64b88bb..fb07298 100755
--- a/layouts/partials/classic_index.html
+++ b/layouts/partials/classic_index.html
@@ -1,42 +1,34 @@
<!-- Partial for classic index page -->
<div id="main">
- <div id="content">
- <div class="blog-index">
- {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
- {{ range $paginator.Pages }}
- <article>
-
- {{ .Scratch.Set "isHome" true }}
- {{ partial "post_header.html" . }}
-
- {{ if eq .Site.Params.truncate false }}
- {{ .Content }}
- {{ else if .Description }}
- {{ .Description }}
- <footer>
- <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On &rarr;{{ end }}</a>
- </footer>
- {{ else }}
- <p>{{ .Summary }}</p>
-
- {{ if .Truncated }}
- <footer>
- <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On &rarr;{{ end }}</a>
- </footer>
- {{ end }}
-
- {{ end }}
-
- </article>
- {{ end }}
- <!-- {{ template "_internal/pagination.html" . }} default pagination -->
- {{ partial "pagination.html" . }} <!-- use custom pagination -->
-
- </div>
-
- {{ partial "sidebar.html" . }} <!-- sidebar -->
+ <div id="content">
+ <div class="blog-index">
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
+ {{ range $paginator.Pages }}
+ <article>
+ {{ .Scratch.Set "isHome" true }}
+ {{ partial "post_header.html" . }}
+ {{ if eq .Site.Params.truncate false }}
+ {{ .Content }}
+ {{ else if .Description }}
+ {{ .Description }}
+ <footer>
+ <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On &rarr;{{ end }}</a>
+ </footer>
+ {{ else }}
+ <p>{{ .Summary }}</p>
+ {{ if .Truncated }}
+ <footer>
+ <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On &rarr;{{ end }}</a>
+ </footer>
+ {{ end }}
+ {{ end }}
+ </article>
+ {{ end }}
+ <!-- {{ template "_internal/pagination.html" . }} default pagination -->
+ {{ partial "pagination.html" . }} <!-- use custom pagination -->
</div>
- </div>
-
- {{ partial "footer.html" . }} <!-- footer --> \ No newline at end of file
+ {{ partial "sidebar.html" . }} <!-- sidebar -->
+ </div>
+</div>
+{{ partial "footer.html" . }} <!-- footer --> \ No newline at end of file
diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html
index 56115a0..b589d78 100644
--- a/layouts/partials/disqus.html
+++ b/layouts/partials/disqus.html
@@ -1,18 +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...
+ // Comment out these two lines to test Disqus locally
+ if (window.location.hostname == "localhost")
+ return;
-(function() {
- // Don't ever inject Disqus on localhost--it creates unwanted
- // discussions from 'localhost:1313' on your Disqus account...
- // Comment out these two lines to test Disqus locally
- if (window.location.hostname == "localhost")
- return;
-
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- var disqus_shortname = '{{ .Site.DisqusShortname }}';
- dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
-})();
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ var disqus_shortname = '{{ .Site.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>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 59b6a9c..48aa5c5 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,36 +1,35 @@
-<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 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>
-</footer>
+ <!-- Piwik -->
+ {{ with .Site.Params.analytics.piwik.ID }}
+ <script type="text/javascript">
+ var _paq = _paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//{{ $.Site.Params.analytics.piwik.URL }}/";
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setSiteId', {{ . }}]);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ })();
+ </script>
+ {{ end }}
+ <!-- End Piwik Code -->
-<!-- Piwik -->
-{{ with .Site.Params.analytics.piwik.ID }}
-<script type="text/javascript">
- var _paq = _paq || [];
- /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
- _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
- _paq.push(['trackPageView']);
- _paq.push(['enableLinkTracking']);
- (function() {
- var u="//{{ $.Site.Params.analytics.piwik.URL }}/";
- _paq.push(['setTrackerUrl', u+'piwik.php']);
- _paq.push(['setSiteId', {{ . }}]);
- var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
- })();
-</script>
-{{ end }}
-<!-- End Piwik Code -->
-
-{{ 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>
+ {{ 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>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 4b89455..438c2ea 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -10,7 +10,7 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
{{ if not .Site.Params.disableGoogleFonts }}
- <!-- If local Google Fonts are enabled -->
+ <!-- if local Google fonts are enabled -->
{{ if not .Site.Params.remoteFonts }}
<link href="/css/fonts.css" rel="stylesheet" type="text/css">
{{ else }}
@@ -45,7 +45,6 @@
<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 }}">
<!-- Generator version for usage tacking -->
@@ -58,7 +57,6 @@
{{ with .Site.Params.twitterCardEnabled }}
{{ partial "custom_twitter_card.html" $ }}
{{ end }}
-
</head>
<body>
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html
index 45831c5..9f9860d 100644
--- a/layouts/partials/navigation.html
+++ b/layouts/partials/navigation.html
@@ -1,6 +1,6 @@
<!-- mobile navigation -->
<fieldset class="mobile-nav">
- <!-- Apart from Disqus, this is the only place where we need JavaScript. -->
+ <!-- apart from Disqus and analytics, this is the only place where we need JavaScript -->
<select onchange="location = this.value;">
<option value="">Navigate…</option>
{{ range .Site.Menus.main }}
@@ -29,14 +29,13 @@
<li><a href="/index.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
{{ end }}
{{ end }}
-
</ul>
{{ with .Site.Params.searchEngineURL }}
-<form action="{{ . }}" 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>
+ <form action="{{ . }}" 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
index 5a0fae2..f754a82 100644
--- a/layouts/partials/octo_header.html
+++ b/layouts/partials/octo_header.html
@@ -1,7 +1,7 @@
<!-- Octopress header partial -->
<hgroup>
<!-- Remember that .Title will refer to the title of the specific page.
- For index it's .Site.Title but is different for individual pages -->
+ For index, it's .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/post_header.html b/layouts/partials/post_header.html
index 7b2bede..b723b46 100644
--- a/layouts/partials/post_header.html
+++ b/layouts/partials/post_header.html
@@ -1,18 +1,18 @@
-<!-- Partial that geenrates the header/title for each post -->
+<!-- Partial that generates the header/title for each post -->
<header>
- <p class="meta">{{ .Date.Format "Jan 2, 2006" }}
- {{ if not .Site.Params.disableReadingTime }} - {{ .ReadingTime }} minute read {{ end }}
- {{ if .Site.DisqusShortname }} - <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
+ <p class="meta">{{ .Date.Format "Jan 2, 2006" }}
+ {{ if not .Site.Params.disableReadingTime }} - {{ .ReadingTime }} minute read {{ end }}
+ {{ if .Site.DisqusShortname }} - <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
- {{ if isset .Params "categories" }}
- <!-- in order to make category URLs work, we need to urlize them and
- convert them to lowercase
- e.g. .NET Remoting -urlize-> .NET-Remoting -lowercase-> .net-remoting -->
- - {{ range .Params.categories }}<a class="label" href="{{ "/categories/" | absURL }}{{ . | urlize | lower }}/">{{ . }} </a>{{ end }}
- {{ end }}
- </p>
- <h1 class="entry-title">
- {{ if ($.Scratch.Get "isHome") }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ else }} {{ .Title }} {{ end }}
- </h1>
+ {{ if isset .Params "categories" }}
+ <!-- in order to make category URLs work, we need to urlize them and
+ convert them to lowercase
+ e.g. .NET Remoting -urlize-> .NET-Remoting -lowercase-> .net-remoting -->
+ - {{ range .Params.categories }}<a class="label" href="{{ "/categories/" | absURL }}{{ . | urlize | lower }}/">{{ . }} </a>{{ end }}
+ {{ end }}
+ </p>
+ <h1 class="entry-title">
+ {{ if ($.Scratch.Get "isHome") }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ else }} {{ .Title }} {{ end }}
+ </h1>
</header>