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:
authorZhe Zhang <neomana@gmail.com>2015-05-02 23:05:59 +0300
committerZhe Zhang <neomana@gmail.com>2015-05-02 23:05:59 +0300
commitb6efc125f87687244637514e00c6b3f836ca0eb0 (patch)
tree0fe02f91fa243e407526775e263a397516980c81 /layouts
parentf3540128bc9f6238472c4ba967cb2091dd5264af (diff)
add pagination & remove normalize.css
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html15
-rw-r--r--layouts/index.html9
-rw-r--r--layouts/partials/footer.html6
-rw-r--r--layouts/partials/head.html3
-rw-r--r--layouts/partials/header.html14
-rw-r--r--layouts/partials/pagination.html5
-rw-r--r--layouts/post/single.html32
7 files changed, 59 insertions, 25 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c265df6..fa8d589 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="">
+<html>
<head>
{{ partial "head.html" . }}
@@ -9,13 +9,10 @@
<div class="container">
{{ partial "header.html" . }}
<div class="content">
- <div class="posts">
- <div class="post">
- <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
- <span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span>
- <div class="post-content">
- {{ .Content }}
- </div>
+ <div class="post">
+ <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <div class="post-content">
+ {{ .Content }}
</div>
</div>
</div>
@@ -26,4 +23,4 @@
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 4a74f8f..da5754c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="">
+<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head.html" . }}
@@ -10,19 +10,20 @@
{{ partial "header.html" . }}
<div class="content">
<div class="posts">
- {{ range .Data.Pages }}
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ range $paginator.Pages }}
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span>
</div>
{{ end }}
</div>
+ {{ partial "pagination.html" . }}
</div>
{{ partial "footer.html" . }}
</div>
- <script src="{{ .Site.BaseUrl }}/js/slim.js"></script>
+ <script src="{{ .Site.BaseUrl }}js/slim.js"></script>
{{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index b73607f..b186f8c 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,3 +1,3 @@
- <footer>
- <p>Powered by <a href="http://gohugo.io">Hugo</a>. This theme—Slim—is open sourced on <a href="https://github.com/zhe/hugo-theme-slim">Github</a>.</p>
- </footer>
+<div class="footer">
+ <p>Powered by <a href="http://gohugo.io">Hugo</a>. This theme—Slim—is open sourced on <a href="https://github.com/zhe/hugo-theme-slim">Github</a>.</p>
+</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 9be08bb..7cdc461 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,7 +3,6 @@
<title> {{ .Title }} &middot; {{ .Site.Title }} </title>
<!-- CSS -->
-<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/normalize.css">
<link rel="stylesheet" href="{{ .Site.BaseUrl }}/css/slim.css">
<link href='http://fonts.useso.com/css?family=Open+Sans:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
@@ -12,4 +11,4 @@
<link rel="shortcut icon" href="/favicon.ico">
<!-- RSS -->
-<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index eecb26f..57204a7 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,17 +1,17 @@
<div class="header">
<h1 class="site-title"><a href="{{ .Site.BaseUrl }}">{{ .Site.Title }}</a></h1>
- <p class="site-tagline">{{ .Site.Params.Subtitle }}</p>
+ <p class="site-tagline">{{ .Site.Params.Subtitle }}</p>
<div class="nav">
<a class="nav-btn" href="#">
<span class="ci ci-burger"></span>
</a>
<ul class="nav-list">
- {{ 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 }}
+ {{ range .Site.Menus.main }}
+ <li><a href="{{ .Url }}">{{ .Name }}</a></li>
+ {{end}} {{ 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 }}
</ul>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..c779702
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,5 @@
+<div class="pagination">
+ {{ if .Paginator.HasPrev }}
+ <a class="btn previous" href="{{ .Paginator.Prev.Url }}">Newer</a> {{ end }} {{ if .Paginator.HasNext }}
+ <a class="btn next" href="{{ .Paginator.Next.Url }}">Older</a> {{ end }}
+</div> \ No newline at end of file
diff --git a/layouts/post/single.html b/layouts/post/single.html
new file mode 100644
index 0000000..3dae753
--- /dev/null
+++ b/layouts/post/single.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ {{ partial "head.html" . }}
+</head>
+
+<body>
+ <div class="container">
+ {{ partial "header.html" . }}
+ <div class="content">
+ <div class="posts">
+ <div class="post">
+ <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <span class="post-date">{{ .Date.Format "Jan 2, 2006 " }}</span>
+ <div class="post-content">
+ {{ .Content }}
+ </div>
+ </div>
+ <div class="pagination">{{ if .Prev }}
+ <a class="btn previous " href="{{.Prev.Permalink}}"> Prev</a> {{ end }} {{ if .Next }}
+ <a class="btn next " href="{{.Next.Permalink}}"> Next</a> {{ end }}
+ </div>
+ </div>
+ </div>
+ {{ partial "footer.html " . }}
+ </div>
+ <script src="{{ .Site.BaseUrl }}/js/slim.js"></script>
+ {{ with .Site.Params.AnalyticsID }}{{ partial "analytics.html" . }}{{ end }}
+</body>
+
+</html> \ No newline at end of file