Browse Source

Update hugo-cactus-theme

master
Brett Langdon 8 years ago
parent
commit
452cbed5dc
No known key found for this signature in database GPG Key ID: A2ECAB73CE12147F
26 changed files with 205 additions and 201 deletions
  1. +41
    -9
      themes/hugo-cactus-theme/CHANGELOG.md
  2. +2
    -6
      themes/hugo-cactus-theme/README.md
  3. +5
    -4
      themes/hugo-cactus-theme/archetypes/default.md
  4. +2
    -3
      themes/hugo-cactus-theme/exampleSite/config.toml
  5. +2
    -1
      themes/hugo-cactus-theme/exampleSite/content/about/_index.md
  6. +0
    -6
      themes/hugo-cactus-theme/exampleSite/content/post/creating-a-new-theme.md
  7. +0
    -1
      themes/hugo-cactus-theme/exampleSite/content/post/goisforlovers.md
  8. +0
    -1
      themes/hugo-cactus-theme/exampleSite/content/post/hugoisforlovers.md
  9. +0
    -5
      themes/hugo-cactus-theme/exampleSite/content/post/migrate-from-jekyll.md
  10. +9
    -17
      themes/hugo-cactus-theme/layouts/404.html
  11. +16
    -0
      themes/hugo-cactus-theme/layouts/_default/baseof.html
  12. +4
    -11
      themes/hugo-cactus-theme/layouts/_default/list.html
  13. +36
    -43
      themes/hugo-cactus-theme/layouts/_default/single.html
  14. +5
    -0
      themes/hugo-cactus-theme/layouts/about/list.html
  15. +7
    -14
      themes/hugo-cactus-theme/layouts/index.html
  16. +1
    -1
      themes/hugo-cactus-theme/layouts/partials/footer.html
  17. +25
    -29
      themes/hugo-cactus-theme/layouts/partials/head.html
  18. +3
    -3
      themes/hugo-cactus-theme/layouts/partials/js.html
  19. +6
    -8
      themes/hugo-cactus-theme/layouts/partials/latest-posts.html
  20. +6
    -7
      themes/hugo-cactus-theme/layouts/partials/nav.html
  21. +3
    -3
      themes/hugo-cactus-theme/layouts/partials/pagination.html
  22. +6
    -9
      themes/hugo-cactus-theme/layouts/partials/post-list.html
  23. +3
    -3
      themes/hugo-cactus-theme/layouts/partials/profile.html
  24. +2
    -2
      themes/hugo-cactus-theme/layouts/partials/share.html
  25. +13
    -7
      themes/hugo-cactus-theme/static/css/style.css
  26. +8
    -8
      themes/hugo-cactus-theme/theme.toml

+ 41
- 9
themes/hugo-cactus-theme/CHANGELOG.md View File

@ -1,39 +1,71 @@
# Changelog # Changelog
### 2016/04/01
## Release v1.1.1 - 04th September 2017
#### Fontawesome as option for social icons in footer
- [6f818c5](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/6f818c506139debad3188d3bb027ca6808d9577d) Ordered lists are now styled
- [9fb2a23](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/9fb2a23ab32fb61b62a77e9e8d590ab2cddb8201) adds support for subtitles in pages that can be defined with `.Description` in the front matter
-[a0db308](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/a0db30812aafc89cde5a77d3189f3a028fabe5ba) widens the content column to improve the readability of code examples
- [5108c87](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/5108c8787408d4d31a9161bb47cc506fd2d01fc6) loads FontAwesome from Bootstrap's CDN instead of using the local file.
## Release v1.1 - 26th April 2017
*In the future new additions and changes will be assigned to version numbers rather than dates.* This allows you to track changes in a better fashion. The state of this theme before this release has been assigned to v1.0.
**Some changes and additions listed below require Hugo v0.20 or higher.** Consider to update Hugo to a newer as well if necessary.
### Fixes:
[34f8cf2](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/34f8cf2)q fixes display issues of the about page that occured in Hugo v0.18 and higher due to the way how Hugo treats sites as a page of different kinds. **It's required to rename `content/about/index.md` to `content/about/_index.md`**.
### Improvements
- [931eb53](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/931eb53) improves the generation URLs and linkage of pages
- [9b358a9](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/9b358a9) uses block templates to reduce redundancy
- [dd67ac4](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/dd67ac4) adds support for linking pages in the main menu
### Deprecations
- [fa3c87d](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/fa3c87d) replaces .Now which was deprecated in Hugo v0.19
- [c618828](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/c618828) deprecates the `params.about` config option
- [1b6b863](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/1b6b863) deprecates the option to hide single pages with the `hidden = true` front matter option. Use `draft = true` instead
## 4th January 2016
### Fontawesome as option for social icons in footer
You can now use Fontawesome as alternative to the Mono social icons. Look [here](https://github.com/digitalcraftsman/hugo-cactus-theme/tree/dev#social-link-icons) for more instructions. You can now use Fontawesome as alternative to the Mono social icons. Look [here](https://github.com/digitalcraftsman/hugo-cactus-theme/tree/dev#social-link-icons) for more instructions.
[Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/79e5435d6be25ae882ab5ae8455f17834f109a32) [Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/79e5435d6be25ae882ab5ae8455f17834f109a32)
#### Hide pages
### Hide pages
Pages can now be hidden by adding `hidden = true` to the frontmatter. The pages are still built but they will not appear in the post in on the homepage. Pages can now be hidden by adding `hidden = true` to the frontmatter. The pages are still built but they will not appear in the post in on the homepage.
[Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/cf93e42859280b04703cd6ca96062db9a4adb65e) [Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/cf93e42859280b04703cd6ca96062db9a4adb65e)
### 2015/07/12
## 7th December 2015
#### Social link icons
### Social link icons
Social links with icons can be enabled replacing the copyright field in footer. Configure the style and links in `config.toml`. Social links with icons can be enabled replacing the copyright field in footer. Configure the style and links in `config.toml`.
### 2015/26/11
## 26th November 2015
Hugo v0.15 is required in order to run the theme with the changes listed below: Hugo v0.15 is required in order to run the theme with the changes listed below:
#### Google Analytics
### Google Analytics
The setup of Google Analytics changed slighty due to the switch to Hugo's built-in template. In order to update the theme you need to relocate the `google_analytics` variable in the configs and rename it to `googleAnalytics`. Take a look in the example [`config.toml`](https://github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml). The setup of Google Analytics changed slighty due to the switch to Hugo's built-in template. In order to update the theme you need to relocate the `google_analytics` variable in the configs and rename it to `googleAnalytics`. Take a look in the example [`config.toml`](https://github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml).
[Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/c2cdd9a02a968738438c48d246ae3949a4e032fc) [Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/c2cdd9a02a968738438c48d246ae3949a4e032fc)
#### Disqus
### Disqus
Now the theme uses the built-in template of Hugo to enable the comments section with Disqus. This change requires to relocate the `disqusShortname` variable in the configs.
Now the theme uses the built-in template of Hugo to enable the comments section with Disqus. This change requires to relocate the `disqusShortname` variable in the configs.
[Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/9ebf05f5b03b3a60fc11cc47775234b7fc2616f0) [Show me the diff](https://github.com/digitalcraftsman/hugo-cactus-theme/commit/9ebf05f5b03b3a60fc11cc47775234b7fc2616f0)

+ 2
- 6
themes/hugo-cactus-theme/README.md View File

@ -27,10 +27,6 @@ Make sure to update the `themesDir` property in the config file to point to your
Use the about page to introduce yourself to your visitors. You can customize the content as you like in the [`config.toml`](//github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml). Furthermore, you should replace the [avatar placeholder](//github.com/digitalcraftsman/hugo-cactus-theme/blob/master/static/images/avatar.png) with a great image of yourself. Use the about page to introduce yourself to your visitors. You can customize the content as you like in the [`config.toml`](//github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml). Furthermore, you should replace the [avatar placeholder](//github.com/digitalcraftsman/hugo-cactus-theme/blob/master/static/images/avatar.png) with a great image of yourself.
## Hide pages
Pages can be hidden and don't appear in the post list on the homepage if you add the variable `hidden = true` to the frontmatter. This allows you to link from elsewhere, i.e. just the menu.
## Disqus ## Disqus
This theme features a comment system powered by Disqus too. Just add your Disqus-shortname to the [`config.toml`](//github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml) and let readers respond to your blog posts. This theme features a comment system powered by Disqus too. Just add your Disqus-shortname to the [`config.toml`](//github.com/digitalcraftsman/hugo-cactus-theme/blob/dev/exampleSite/config.toml) and let readers respond to your blog posts.
@ -46,7 +42,7 @@ Assign either `font-awesome` or `mono-social` to the `iconFont` variable. The Mo
## Nearly finished ## Nearly finished
In order to see your site in action, run Hugo's built-in local server.
In order to see your site in action, run Hugo's built-in local server.
$ hugo server $ hugo server
@ -67,7 +63,7 @@ This theme is released under the MIT license. For more information read the [lic
## Acknowledgements ## Acknowledgements
Thanks to
Thanks to
- [Nick Balestra](//github.com/nickbalestra/kactus) for creating the original theme - [Nick Balestra](//github.com/nickbalestra/kactus) for creating the original theme
- [Steve Francia](//github.com/spf13) for creating Hugo and the awesome community around the project. - [Steve Francia](//github.com/spf13) for creating Hugo and the awesome community around the project.

+ 5
- 4
themes/hugo-cactus-theme/archetypes/default.md View File

@ -1,4 +1,5 @@
+++
title = ""
description = ""
+++
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
---

+ 2
- 3
themes/hugo-cactus-theme/exampleSite/config.toml View File

@ -12,7 +12,7 @@ disqusShortname = "spf13"
[params] [params]
name = "John Doe" name = "John Doe"
description = "Describe your website" description = "Describe your website"
bio = "Blogger - Programmer - Gopher"
bio = "Blogger & Programmer"
# Enter optionally your twitter account # Enter optionally your twitter account
twitter = "Your Twitter account" twitter = "Your Twitter account"
enableRSS = true enableRSS = true
@ -27,7 +27,6 @@ disqusShortname = "spf13"
# Navigation links # Navigation links
home = "" home = ""
about = ""
subscribe = "" subscribe = ""
# Pagination links # Pagination links
olderPosts = "" olderPosts = ""
@ -35,7 +34,7 @@ disqusShortname = "spf13"
readMore = "" readMore = ""
copyright = "" copyright = ""
# Sharing options and author information in posts # Sharing options and author information in posts
aboutAuthor = "I'm an enthusiastic gopher."
aboutAuthor = "I'm an blogger."
tweet = "" tweet = ""
share = "" share = ""
# 404 page # 404 page


themes/hugo-cactus-theme/exampleSite/content/about/index.md → themes/hugo-cactus-theme/exampleSite/content/about/_index.md View File


+ 0
- 6
themes/hugo-cactus-theme/exampleSite/content/post/creating-a-new-theme.md View File

@ -2,13 +2,7 @@
author: "Michael Henderson" author: "Michael Henderson"
date: 2014-09-28 date: 2014-09-28
linktitle: Creating a New Theme linktitle: Creating a New Theme
menu:
main:
parent: tutorials
next: /tutorials/github-pages-blog
prev: /tutorials/automated-deployments
title: Creating a New Theme title: Creating a New Theme
weight: 10
--- ---


+ 0
- 1
themes/hugo-cactus-theme/exampleSite/content/post/goisforlovers.md View File

@ -13,7 +13,6 @@ categories = [
"Development", "Development",
"golang", "golang",
] ]
menu = "main"
+++ +++
Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for


+ 0
- 1
themes/hugo-cactus-theme/exampleSite/content/post/hugoisforlovers.md View File

@ -12,7 +12,6 @@ categories = [
"Development", "Development",
"golang", "golang",
] ]
menu = "main"
+++ +++
## Step 1. Install Hugo ## Step 1. Install Hugo


+ 0
- 5
themes/hugo-cactus-theme/exampleSite/content/post/migrate-from-jekyll.md View File

@ -1,12 +1,7 @@
--- ---
date: 2014-03-10 date: 2014-03-10
linktitle: Migrating from Jekyll linktitle: Migrating from Jekyll
menu:
main:
parent: tutorials
prev: /tutorials/mathjax
title: Migrate to Hugo from Jekyll title: Migrate to Hugo from Jekyll
weight: 10
--- ---
## Move static content to `static` ## Move static content to `static`


+ 9
- 17
themes/hugo-cactus-theme/layouts/404.html View File

@ -1,18 +1,10 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ define "main" }}
<article class="post">
<header>
<h1>{{ .Site.Params.title404 | default "404 - Page not found" }}</h1>
<h3>{{ .Site.Params.subtitle404 | default "The content you're looking for doesn't seem to exist." }}</h3>
</header>
<section id="wrapper" class="home">
<article class="post">
<header>
<h1>{{ with .Site.Params.title404 }}{{ . }}{{ else }}404 - Page not found{{ end }}</h1>
<h3>{{ with .Site.Params.subtitle404 }}{{ . }}{{ else }}The content you're looking for doesn't seem to exist.{{ end }}</h3>
</header>
{{ partial "latest-posts.html" . }}
</article>
{{ partial "footer.html" . }}
</section>
</body>
</html>
{{ partial "latest-posts.html" . }}
</article>
{{ end }}

+ 16
- 0
themes/hugo-cactus-theme/layouts/_default/baseof.html View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en" }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
{{ partial "nav.html" . }}
<section id="wrapper">
{{ block "profile" . }}{{ end }}
{{ block "main" . -}}{{- end }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>

+ 4
- 11
themes/hugo-cactus-theme/layouts/_default/list.html View File

@ -1,14 +1,7 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ define "profile" }}{{ partial "profile.html" . }}{{ end }}
{{ define "main" }}
{{ partial "post-list.html" . }} {{ partial "post-list.html" . }}
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
{{ end }}

+ 36
- 43
themes/hugo-cactus-theme/layouts/_default/single.html View File

@ -1,46 +1,39 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ define "main" }}
<article class="post">
<header>
<h1>{{ .Title }}</h1>
<h2 class="subtitle">{{ .Description | markdownify }}</h2>
<h2 class="headline">
{{ .Date.Format "January 2, 2006" }}
<br>
{{ with .Params.tags }}
{{ if ge (len .) 1 }}
{{ range . }}
<a href="{{ printf "tags/%s" (. | urlize) | absURL }}">{{ . }}</a>
{{ end }}
{{ end }}
{{ end}}
</h2>
</header>
<section id="post-body">
{{ .Content }}
</section>
</article>
<section id="wrapper">
<article class="post">
<header>
<h1>{{ .Title }}</h1>
<h2 class="headline">
{{ .Date.Format "January 2, 2006" }}
<br>
{{ with .Params.tags }}
{{ if ge (len .) 1 }}
{{ range . }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
{{ end}}
</h2>
</header>
<section id="post-body">
{{ .Content }}
</section>
</article>
<footer id="post-meta" class="clearfix">
{{ with .Site.Params.twitter }}<a href="https://twitter.com/{{ . }}">{{ end }}
<img class="avatar" src="{{ .Site.BaseURL }}images/avatar.png">
<div>
<span class="dark">{{ .Site.Params.name }}</span>
<span>{{ .Site.Params.aboutAuthor }}</span>
</div>
{{ with .Site.Params.twitter }}</a>{{ end }}
<section id="sharing">
{{ partial "share.html" . }}
</section>
</footer>
<footer id="post-meta" class="clearfix">
{{ with .Site.Params.twitter }}<a href="https://twitter.com/{{ . }}">{{ end }}
<img class="avatar" src="{{ "images/avatar.png" | absURL }}">
<div>
<span class="dark">{{ .Site.Params.name }}</span>
<span>{{ .Site.Params.aboutAuthor }}</span>
</div>
{{ with .Site.Params.twitter }}</a>{{ end }}
<section id="sharing">
{{ partial "share.html" . }}
</section>
</footer>
{{ template "_internal/disqus.html" . }}
{{ template "_internal/disqus.html" . }}
{{ partial "latest-posts.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
{{ partial "latest-posts.html" . }}
{{ end }}

+ 5
- 0
themes/hugo-cactus-theme/layouts/about/list.html View File

@ -0,0 +1,5 @@
{{ define "profile" }}
{{ partial "profile.html" . }}
{{ end }}
{{ define "main" }}{{ .Content }}{{ end }}

+ 7
- 14
themes/hugo-cactus-theme/layouts/index.html View File

@ -1,15 +1,8 @@
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
{{ define "profile" }}
{{ partial "profile.html" . }}
{{ end }}
{{ partial "profile.html" . }}
<section id="wrapper" class="home">
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ partial "footer.html" . }}
</section>
{{ partial "js.html" . }}
</body>
</html>
{{ define "main" }}
{{ partial "post-list.html" . }}
{{ partial "pagination.html" . }}
{{ end }}

+ 1
- 1
themes/hugo-cactus-theme/layouts/partials/footer.html View File

@ -6,7 +6,7 @@
{{ with .Site.Params.copyright }} {{ with .Site.Params.copyright }}
{{ . | markdownify }} {{ . | markdownify }}
{{ else }} {{ else }}
© Copyright {{.Now.Format "2006"}} {{ .Site.Params.name }}
© Copyright {{ now.Format "2006" }} {{ .Site.Params.name }}
{{ end }} {{ end }}
</p> </p>
</footer> </footer>

+ 25
- 29
themes/hugo-cactus-theme/layouts/partials/head.html View File

@ -1,32 +1,28 @@
<!DOCTYPE html>
<html {{ with .Site.LanguageCode }}lang="{{ . }}"{{ 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">
{{ with .Site.Params.name }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<title>{{ if .IsHome }}{{ .Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>
<link rel="shortcut icon" href="{{ .Site.BaseURL }}images/favicon.ico">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/highlight.css">
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}
<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">
{{ with .Site.Params.name }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<title>{{ .Title }}{{ if .IsHome }} &middot; {{ .Site.Title }}{{ end }}</title>
<link rel="shortcut icon" href="{{ "images/favicon.ico" | absURL }}">
<link rel="stylesheet" href="{{ "css/style.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/highlight.css" | absURL }}">
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}
{{ if eq .Site.Params.iconFont "font-awesome" }}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
{{ else }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/monosocialiconsfont.css">
{{ end }}
{{ if eq .Site.Params.iconFont "font-awesome" }}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
{{ else }}
<link rel="stylesheet" href="{{ "css/monosocialiconsfont.css" | absURL }}">
{{ end }}
{{ if .Site.Params.enableRSS }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ if .Site.Params.enableRSS }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
</head>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}

+ 3
- 3
themes/hugo-cactus-theme/layouts/partials/js.html View File

@ -1,10 +1,10 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="{{ .Site.BaseURL }}js/main.js"></script>
<script src="{{ .Site.BaseURL }}js/highlight.js"></script>
<script src="{{ "js/main.js" | absURL }}"></script>
<script src="{{ "js/highlight.js" | absURL }}"></script>
<script>hljs.initHighlightingOnLoad();</script> <script>hljs.initHighlightingOnLoad();</script>
{{ range .Site.Params.customJS }} {{ range .Site.Params.customJS }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
<script src="{{ . | absURL }}"></script>
{{ end }} {{ end }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}

+ 6
- 8
themes/hugo-cactus-theme/layouts/partials/latest-posts.html View File

@ -1,13 +1,11 @@
<ul id="post-list" class="archive readmore"> <ul id="post-list" class="archive readmore">
<h3>{{ with .Site.Params.readMore }}{{ . }}{{ else }}Read more{{ end }}</h3>
<h3>{{ .Site.Params.readMore | default "Read more" }}</h3>
{{ $pages := where .Site.Pages "Kind" "page" }}
{{ range first 10 (where $pages "Params.hidden" "ne" "true") }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if and (ne $url "about/") }}
{{ $kind := where .Site.RegularPages "Section" "!=" "" }}
{{ $othr := where $kind "URL" "!=" .URL }}
{{ range first 10 $othr }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Title }}<aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
<a href="{{ .URL }}">{{ .LinkTitle }}<aside class="dates">{{ .Date.Format "Jan 2 2006" }}</aside></a>
</li> </li>
{{ end }}
{{ end }}
{{ end }}
</ul> </ul>

+ 6
- 7
themes/hugo-cactus-theme/layouts/partials/nav.html View File

@ -1,14 +1,13 @@
<nav class="main-nav"> <nav class="main-nav">
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if not .IsHome }} {{ if not .IsHome }}
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ with .Site.Params.home }}{{ . }}{{ else }}Home{{ end }}</a>
<a href='{{ .Site.BaseURL }}'> <span class="arrow"></span>{{ .Site.Params.home | default "Home" }}</a>
{{ end }} {{ end }}
{{ if ne $url "about/" }}
<a href='{{ .Site.BaseURL }}about'>{{ with .Site.Params.about }}{{ . }}{{ else }}About{{ end }}</a>
{{ end }}
{{ range .Site.Menus.main }}
<a href='{{ .URL }}'>{{ .Name }}</a>
{{ end }}
{{ if .Site.Params.enableRSS }} {{ if .Site.Params.enableRSS }}
<a class="cta" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
<a class="cta" href="{{ .Site.RSSLink }}">{{ .Site.Params.subscribe | default "Subscribe" }}</a>
{{ end }} {{ end }}
</nav>
</nav>

+ 3
- 3
themes/hugo-cactus-theme/layouts/partials/pagination.html View File

@ -3,16 +3,16 @@
{{ if .Paginator.HasPrev }} {{ if .Paginator.HasPrev }}
<span class="prev"> <span class="prev">
<a href="{{.Paginator.Prev.URL}}"> <a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}Newer Posts{{ end }}
<span class="arrow"></span> {{ .Site.Params.newerPosts | default "Newer Posts" }}
</a> </a>
</span> </span>
{{ end }} {{ end }}
{{ if .Paginator.HasNext }} {{ if .Paginator.HasNext }}
<span class="next"> <span class="next">
<a href="{{.Paginator.Next.URL}}"> <a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}Older Posts{{ end }} <span class="arrow"></span>
{{ .Site.Params.olderPosts | default "Older Posts" }}<span class="arrow"></span>
</a> </a>
</span> </span>
{{ end }} {{ end }}
{{ end }} {{ end }}
</nav>
</nav>

+ 6
- 9
themes/hugo-cactus-theme/layouts/partials/post-list.html View File

@ -1,11 +1,8 @@
<ul id="post-list"> <ul id="post-list">
{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if ne $url "about/" }}
<li>
<a href='{{ .Permalink }}'><aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
<a href='{{ .Permalink }}'>{{ .Title }} <h2>{{ .Description | markdownify }}</h2></a>
</li>
{{ end }}
{{ range where .Paginator.Pages "Section" "ne" "" }}
<li>
<a href='{{ .URL }}'><aside class="dates">{{ .Date.Format "Jan 2 2006" }}</aside></a>
<a href='{{ .URL }}'>{{ .LinkTitle }}<h2>{{ .Description | markdownify }}</h2></a>
</li>
{{ end }} {{ end }}
</ul>
</ul>

+ 3
- 3
themes/hugo-cactus-theme/layouts/partials/profile.html View File

@ -1,11 +1,11 @@
<div class="profile"> <div class="profile">
<section id="wrapper"> <section id="wrapper">
<header id="header"> <header id="header">
<a href='{{ .Site.BaseURL }}about'>
<img id="avatar" class="2x" src="{{ .Site.BaseURL }}images/avatar.png"/>
<a href="{{ "about" | absURL }}">
<img id="avatar" class="2x" src="{{ "images/avatar.png" | absURL }}"/>
</a> </a>
<h1>{{ .Site.Params.name }}</h1> <h1>{{ .Site.Params.name }}</h1>
<h2>{{ .Site.Params.bio | markdownify }}</h2> <h2>{{ .Site.Params.bio | markdownify }}</h2>
</header> </header>
</section> </section>
</div>
</div>

+ 2
- 2
themes/hugo-cactus-theme/layouts/partials/share.html View File

@ -1,9 +1,9 @@
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Permalink }} - {{ .Title }} {{ with .Site.Params.twitter }}by @{{ . }}{{ end }}"><span class="icon-twitter"> {{ with .Site.Params.tweet }}{{ . }}{{ else }}Tweet{{ end }}</span></a>
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Permalink }} - {{ .LinkTitle }} {{ with .Site.Params.twitter }}by @{{ . }}{{ end }}"><span class="icon-twitter"> {{ .Site.Params.tweet | default "tweet" }}</span></a>
<a class="facebook" href="#" onclick=" <a class="facebook" href="#" onclick="
window.open( window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog', 'facebook-share-dialog',
'width=626,height=436'); 'width=626,height=436');
return false;"><span class="icon-facebook-rect"> {{ with .Site.Params.share }}{{ . }}{{ else }}Share{{ end }}</span>
return false;"><span class="icon-facebook-rect"> {{ .Site.Params.share | default "Share" }}</span>
</a> </a>

+ 13
- 7
themes/hugo-cactus-theme/static/css/style.css View File

@ -43,7 +43,7 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
.icon-facebook-rect:before { content: '\e803'; } .icon-facebook-rect:before { content: '\e803'; }
/* Spacing */ /* Spacing */
.post h1, h3, h4, h5, p, .post-body ul, pre {
.post h1, h3, h4, h5, p, .post-body ul, ol, pre {
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -71,7 +71,7 @@ h2 {
.profile #wrapper { .profile #wrapper {
padding: 100px 40px 0px; padding: 100px 40px 0px;
max-width: 600px;
max-width: 800px;
margin: 0 auto; margin: 0 auto;
} }
@ -137,13 +137,13 @@ nav.main-nav a.cta {
} }
#wrapper { #wrapper {
max-width: 600px;
max-width: 800px;
margin: 0 auto; margin: 0 auto;
padding: 60px 40px 100px 40px; padding: 60px 40px 100px 40px;
} }
#wrapper.home { #wrapper.home {
max-width: 600px;
max-width: 800px;
margin: 0 auto; margin: 0 auto;
padding: 0px 40px 20px 40px; padding: 0px 40px 20px 40px;
} }
@ -180,8 +180,10 @@ a,
transition: all 0.15s ease; transition: all 0.15s ease;
} }
ul { margin:0; padding:0; margin-bottom: 20px; }
li { list-style-type:circle; list-style-position:inside; }
ul, ol { margin:0; padding:0; margin-bottom: 20px; }
ul { list-style-type:circle; }
ol { list-style: decimal; }
li { list-style-position:inside; }
/* Line Height */ /* Line Height */
#post-body, p { line-height:1.7; } #post-body, p { line-height:1.7; }
@ -225,7 +227,7 @@ em, i { font-style: italic; }
} }
.post h1 { .post h1 {
margin-bottom: 20px;
margin-bottom: 0px;
color: #222; color: #222;
font: 300 32px/1.4em "Helvetica Neue", Helvetica,Arial,sans-serif; font: 300 32px/1.4em "Helvetica Neue", Helvetica,Arial,sans-serif;
} }
@ -236,6 +238,10 @@ em, i { font-style: italic; }
color: #111; color: #111;
} }
.post h2.subtitle {
font: italic 19px/1.3em Georgia,serif;
color: #bbb;
}
.post h2.headline { .post h2.headline {
/*font: italic 22px/1.3em Georgia,serif;*/ /*font: italic 22px/1.3em Georgia,serif;*/


+ 8
- 8
themes/hugo-cactus-theme/theme.toml View File

@ -1,11 +1,11 @@
name = "Cactus" name = "Cactus"
license = "MIT" license = "MIT"
licenselink = "//github.com/digitalcraftsman/hugo-cactus-theme/blob/master/LICENSE.md"
licenselink = "https://github.com/digitalcraftsman/hugo-cactus-theme/blob/master/License.md"
description = "A minimalistic and responsive theme for bloggers." description = "A minimalistic and responsive theme for bloggers."
homepage = "//github.com/digitalcraftsman/hugo-cactus-theme"
homepage = "https://github.com/digitalcraftsman/hugo-cactus-theme"
tags = ["blog", "disqus", "google analytics", "rss", "syntax highlighting"] tags = ["blog", "disqus", "google analytics", "rss", "syntax highlighting"]
features = ["disqus", "google analytics", "rss", "syntax highlighting", "blog", "pagination", "<sharing options"]
min_version = 0.15
features = ["disqus", "google analytics", "rss", "syntax highlighting", "blog", "pagination", "sharing options"]
min_version = 0.20
[author] [author]
name = "digitalcraftsman" name = "digitalcraftsman"
@ -14,11 +14,11 @@ min_version = 0.15
[[original]] [[original]]
# Ported the stardard theme of the Cactus for Mac static site generator to Jekyll # Ported the stardard theme of the Cactus for Mac static site generator to Jekyll
name = "Nick Balestra" name = "Nick Balestra"
homepage = "//nick.balestra.ch/"
repo = "//github.com/nickbalestra/kactus"
homepage = "http://nick.balestra.ch/"
repo = "https://github.com/nickbalestra/kactus"
[[original]] [[original]]
# Original creators of the stardard theme for the Cactus for Mac static site generator # Original creators of the stardard theme for the Cactus for Mac static site generator
name = "Cactus for Mac authors" name = "Cactus for Mac authors"
homepage = "//cactusformac.com"
repo = "github.com/koenbok/Cactus"
homepage = "http://cactusformac.com"
repo = "https://github.com/koenbok/Cactus"

Loading…
Cancel
Save