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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-10 19:46:00 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-10 19:46:00 +0300
commitfafb7871a22229e0be4a3defad4fbd4130469ad7 (patch)
tree577aad55bd7b714f29904bd4106011f45bfe61bb
parentd718c432f009db4ea4e1329f40ba86e6206e0bf6 (diff)
Make recent posts in footer dynamic
-rw-r--r--exampleSite/content/post/01-post.md2
-rw-r--r--exampleSite/content/post/02-post.md2
-rw-r--r--exampleSite/content/post/03-post.md11
-rw-r--r--exampleSite/content/post/04-post.md11
-rw-r--r--exampleSite/content/post/05-post.md11
-rw-r--r--exampleSite/content/post/06-post.md11
-rw-r--r--layouts/partials/footer/index.html35
-rw-r--r--layouts/partials/footer/recentposts.html16
-rw-r--r--package.json2
9 files changed, 64 insertions, 37 deletions
diff --git a/exampleSite/content/post/01-post.md b/exampleSite/content/post/01-post.md
index aee42e7..924af3d 100644
--- a/exampleSite/content/post/01-post.md
+++ b/exampleSite/content/post/01-post.md
@@ -1,6 +1,6 @@
+++
description = "First post description"
-date = "2018-01-01T00:00:00"
+date = "2017-01-01T00:00:00"
thumbnail = "images/pic09.jpg"
image = "images/pic01.jpg"
title = "First post"
diff --git a/exampleSite/content/post/02-post.md b/exampleSite/content/post/02-post.md
index ad086a9..62ab4a5 100644
--- a/exampleSite/content/post/02-post.md
+++ b/exampleSite/content/post/02-post.md
@@ -1,6 +1,6 @@
+++
description = "Second post description"
-date = "2018-01-02T00:00:00"
+date = "2017-07-21T00:00:00"
thumbnail = "images/pic08.jpg"
image = "images/pic01.jpg"
title = "Second post"
diff --git a/exampleSite/content/post/03-post.md b/exampleSite/content/post/03-post.md
new file mode 100644
index 0000000..9b9344a
--- /dev/null
+++ b/exampleSite/content/post/03-post.md
@@ -0,0 +1,11 @@
++++
+description = "Third post description"
+date = "2017-10-31T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "Third post"
+slug = "third-post"
+author = "John Smith"
+draft = false
++++
+Testing content \ No newline at end of file
diff --git a/exampleSite/content/post/04-post.md b/exampleSite/content/post/04-post.md
new file mode 100644
index 0000000..c4c1646
--- /dev/null
+++ b/exampleSite/content/post/04-post.md
@@ -0,0 +1,11 @@
++++
+description = "fourth post description"
+date = "2017-12-25T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "fourth post"
+slug = "fourth-post"
+author = "John Smith"
+draft = false
++++
+Testing content \ No newline at end of file
diff --git a/exampleSite/content/post/05-post.md b/exampleSite/content/post/05-post.md
new file mode 100644
index 0000000..6af0401
--- /dev/null
+++ b/exampleSite/content/post/05-post.md
@@ -0,0 +1,11 @@
++++
+description = "Fifth post description"
+date = "2018-01-05T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "Fifth post"
+slug = "fifth-post"
+author = "John Smith"
+draft = false
++++
+Testing content \ No newline at end of file
diff --git a/exampleSite/content/post/06-post.md b/exampleSite/content/post/06-post.md
new file mode 100644
index 0000000..8622f10
--- /dev/null
+++ b/exampleSite/content/post/06-post.md
@@ -0,0 +1,11 @@
++++
+description = "Sixth post description"
+date = "2018-02-06T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "Sixth post"
+slug = "sixth-post"
+author = "John Smith"
+draft = false
++++
+Testing content \ No newline at end of file
diff --git a/layouts/partials/footer/index.html b/layouts/partials/footer/index.html
index d45d794..9c8827d 100644
--- a/layouts/partials/footer/index.html
+++ b/layouts/partials/footer/index.html
@@ -2,40 +2,7 @@
<div id="footer-wrapper">
<section id="footer" class="container">
<div class="row">
- <div class="8u 12u(mobile)">
- <section>
- <header>
- <h2>{{ .Site.Params.Footer.title1 }}</h2>
- </header>
- <ul class="dates">
- <li>
- <span class="date">Jan <strong>27</strong></span>
- <h3><a href="#">Lorem dolor sit amet veroeros</a></h3>
- <p>Ipsum dolor sit amet veroeros consequat blandit ipsum phasellus lorem consequat etiam.</p>
- </li>
- <li>
- <span class="date">Jan <strong>23</strong></span>
- <h3><a href="#">Ipsum sed blandit nisl consequat</a></h3>
- <p>Blandit phasellus lorem ipsum dolor tempor sapien tortor hendrerit adipiscing feugiat lorem.</p>
- </li>
- <li>
- <span class="date">Jan <strong>15</strong></span>
- <h3><a href="#">Magna tempus lorem feugiat</a></h3>
- <p>Dolore consequat sed phasellus lorem sed etiam nullam dolor etiam sed amet sit consequat.</p>
- </li>
- <li>
- <span class="date">Jan <strong>12</strong></span>
- <h3><a href="#">Dolore tempus ipsum feugiat nulla</a></h3>
- <p>Feugiat lorem dolor sed nullam tempus lorem ipsum dolor sit amet nullam consequat.</p>
- </li>
- <li>
- <span class="date">Jan <strong>10</strong></span>
- <h3><a href="#">Blandit tempus aliquam?</a></h3>
- <p>Feugiat sed tempus blandit tempus adipiscing nisl lorem ipsum dolor sit amet dolore.</p>
- </li>
- </ul>
- </section>
- </div>
+ {{ partial "footer/recentposts.html" . }}
<div class="4u 12u(mobile)">
<section>
<header>
diff --git a/layouts/partials/footer/recentposts.html b/layouts/partials/footer/recentposts.html
new file mode 100644
index 0000000..5946cb0
--- /dev/null
+++ b/layouts/partials/footer/recentposts.html
@@ -0,0 +1,16 @@
+<div class="8u 12u(mobile)">
+ <section>
+ <header>
+ <h2>{{ .Site.Params.Footer.title1 }}</h2>
+ </header>
+ <ul class="dates">
+ {{ range first 5 (where .Data.Pages "Type" "post") }}
+ <li>
+ <span class="date">{{ .Date.Format "Jan" }} <strong>{{ .Date.Format "_2" }}</strong></span>
+ <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
+ <p>{{ .Description }}</p>
+ </li>
+ {{ end }}
+ </ul>
+ </section>
+</div> \ No newline at end of file
diff --git a/package.json b/package.json
index 7c2678f..6f02769 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-dopetrope",
- "version": "0.3.0",
+ "version": "0.4.0",
"description": "Hugo Theme Dopetrope",
"main": "index.js",
"scripts": {