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

github.com/zhe/hugo-theme-slim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBunker <bunker@achter.be>2015-06-07 09:29:45 +0300
committerBunker <bunker@achter.be>2015-06-07 09:29:45 +0300
commit3ab39559cfb589f4cf038ea80672bee412f967d2 (patch)
tree5dfbfabe84a3071bf9a15242907a59d0f8f11d24
parentccdd0de582c4f36a51a05e2cb11c0a5f190cbe49 (diff)
added tags, summary or content to home page
* Added tags to homepage list view * Added Summary or content switch to homepage view * Added small separator for menu between pages and external links * Changed from useso.com to google api as according to useso.com instructions on there homepage as source for fonts — also loads a lot faster * updated README to represent changes and added functionality
-rw-r--r--README.md6
-rw-r--r--layouts/index.html17
-rw-r--r--layouts/pages/signle.html0
-rw-r--r--layouts/partials/head.html3
-rw-r--r--layouts/partials/header.html4
-rw-r--r--static/css/slim.css20
6 files changed, 47 insertions, 3 deletions
diff --git a/README.md b/README.md
index 96bc150..f47c429 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,9 @@ You could add `params` into your site's `config.toml` file:
GithubID = "Your Github ID"
TwitterID = "Your Twitter ID"
AnalyticsID = "Your Google Analytics tracking code"
+ Summary = true # takes true or false
+ Content = false # takes true or false
+ # if both are set to true, summary is shown.
```
if you use `config.yaml`, it could look like:
@@ -35,6 +38,9 @@ params:
GithubID: "Your Github ID"
TwitterID: "Your Twitter ID"
AnalyticsID: "Your Google Analytics tracking code"
+ Summary: true # takes true or false
+ Content: false # takes true or false
+ # if both are set to true, summary is shown
```
## Build your site
diff --git a/layouts/index.html b/layouts/index.html
index da5754c..83cd23f 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -14,6 +14,23 @@
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span>
+ {{ if .Params.tags }}
+ <span class="post-tags">
+ {{ range .Params.tags }}
+ #<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
+ {{ end }}
+ </span>
+ {{ end }}
+ {{ if .Site.Params.Summary }}
+ <div class="summary">
+ {{ .Summary }}
+ <a class="read-more" href="{{.RelPermalink}}">&hellip;</a>
+ </div>
+ {{ else if .Site.Params.Content }}
+ <div class="content">
+ {{ .Content }}
+ </div>
+ {{ end }}
</div>
{{ end }}
</div>
diff --git a/layouts/pages/signle.html b/layouts/pages/signle.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/pages/signle.html
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index ff8c638..ffbb74c 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -5,8 +5,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/slim.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/highlight.min.css">
-<link href='http://fonts.useso.com/css?family=Open+Sans:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
-
+<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600&subset=latin,latin-ext' rel='stylesheet'>
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.ico">
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 57204a7..9ee2d33 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -8,7 +8,9 @@
<ul class="nav-list">
{{ range .Site.Menus.main }}
<li><a href="{{ .Url }}">{{ .Name }}</a></li>
- {{end}} {{ with .Site.Params.GithubID }}
+ {{end}}
+ <li class="spacer">&ac;</li>
+{{ with .Site.Params.GithubID }}
<li><a href="https://github.com/{{.}}">Github</a></li>{{ end }} {{ with .Site.Params.TwitterID }}
<li><a href="https://twitter.com/{{.}}">Twitter</a></li>{{ end }} {{ with .Site.Params.LinkedInID }}
<li><a href="http://linkedin.com/in/{{.}}">LinkedIn</a></li>{{ end }}
diff --git a/static/css/slim.css b/static/css/slim.css
index 1e28750..0b0a463 100644
--- a/static/css/slim.css
+++ b/static/css/slim.css
@@ -212,6 +212,10 @@ button,
-webkit-transition: all 0.2s;
transition: all 0.2s; }
+.nav-list .spacer {
+ text-align: center;
+}
+
.ci {
display: inline-block;
font-size: inherit;
@@ -338,3 +342,19 @@ button,
.post-content {
margin: 2rem 0; }
+
+/* styling for tags on homepage */
+
+.post-tags {
+ color: #ccc;
+ font-size: 14px;
+ position: absolute;
+ right: 25px;
+ top: 45px;
+ text-align: right;
+}
+
+.post-tags a {
+ color: #ccc;
+}
+