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-17 01:53:44 +0300
committerGitHub <noreply@github.com>2018-02-17 01:53:44 +0300
commitfd2a6329e8c4d6c2305ae61d3869f418a838b727 (patch)
tree20ff5670a2f7a049d1819da0c6bd8dfe3bbce0ce
parent46cc519857c12be45cd2b8617683366dda8214f2 (diff)
parente6525a5b5fe89b08e47892953072c405b9053104 (diff)
Merge pull request #28 from curttimson/feature/hide-portfolio3.0.0
Feature/hide portfolio
-rw-r--r--exampleSite/config-prod.toml8
-rw-r--r--exampleSite/config.toml8
-rw-r--r--layouts/index.html5
-rw-r--r--layouts/partials/intro.html6
-rw-r--r--layouts/partials/nav.html5
-rw-r--r--layouts/partials/portfolio.html6
-rw-r--r--package.json2
7 files changed, 30 insertions, 10 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index 3a922bf..e03a277 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -8,12 +8,15 @@ theme = "../.."
subtitleline2 = "A responsive template by HTML5 UP"
[params.intro]
+ icon1 = "fa-cog"
title1 = "Ipsum consequat"
description1 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
+ icon2 = "fa-flash"
title2 = "Magna etiam dolor"
description2 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
+ icon3 = "fa-star"
title3 = "Tempus adipiscing"
description3 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
@@ -39,6 +42,11 @@ theme = "../.."
title5 = "Vitae tempor lorem"
+[params.portfolio]
+ title = "My Portfolio"
+ foldername = "portfolio"
+ findoutmoretext = "Find out more"
+
[params.blog]
title = "The Blog"
viewalltext = "View All"
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index b54447a..0a1f9f9 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -8,12 +8,15 @@ theme = "../.."
subtitleline2 = "A responsive template by HTML5 UP"
[params.intro]
+ icon1 = "fa-cog"
title1 = "Ipsum consequat"
description1 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
+ icon2 = "fa-flash"
title2 = "Magna etiam dolor"
description2 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
+ icon3 = "fa-star"
title3 = "Tempus adipiscing"
description3 = "Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus."
@@ -39,6 +42,11 @@ theme = "../.."
title5 = "Vitae tempor lorem"
+[params.portfolio]
+ title = "My Portfolio"
+ foldername = "portfolio"
+ findoutmoretext = "Find out more"
+
[params.blog]
title = "The Blog"
viewalltext = "View All"
diff --git a/layouts/index.html b/layouts/index.html
index 8c247a4..82154f2 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -28,13 +28,14 @@
<!-- Main -->
<div id="main-wrapper">
<div class="container">
+ {{ $portfolioItems := where .Site.Pages "Type" .Site.Params.Portfolio.foldername }}
+ {{ if $portfolioItems }}
<div class="row">
<div class="12u">
-
{{ partial "portfolio.html" . }}
-
</div>
</div>
+ {{ end }}
{{ $blogPaginator := .Paginate (where .Data.Pages "Type" .Site.Params.Blog.foldername) 2 }}
{{ if $blogPaginator.TotalNumberOfElements }}
<div class="row">
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index 8506b40..b76fabd 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -3,7 +3,7 @@
<div class="row">
<div class="4u 12u(mobile)">
<section class="first">
- <i class="icon featured fa-cog"></i>
+ <i class='icon featured {{ .Site.Params.Intro.icon1 }}'></i>
<header>
<h2>{{ .Site.Params.Intro.title1 }}</h2>
</header>
@@ -12,7 +12,7 @@
</div>
<div class="4u 12u(mobile)">
<section class="middle">
- <i class="icon featured alt fa-flash"></i>
+ <i class="icon featured alt {{ .Site.Params.Intro.icon2 }}"></i>
<header>
<h2>{{ .Site.Params.Intro.title2 }}</h2>
</header>
@@ -21,7 +21,7 @@
</div>
<div class="4u 12u(mobile)">
<section class="last">
- <i class="icon featured alt2 fa-star"></i>
+ <i class="icon featured alt2 {{ .Site.Params.Intro.icon3 }}"></i>
<header>
<h2>{{ .Site.Params.Intro.title3 }}</h2>
</header>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index bb524a7..0819e07 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -2,9 +2,12 @@
<nav id="nav">
<ul>
<li class="current"><a href="{{ .Site.BaseURL }}">Home</a></li>
+ {{ $portfolioItems := where .Site.Pages "Type" .Site.Params.Portfolio.foldername }}
+ {{ if $portfolioItems }}
<li>
- <a href="{{ .Site.BaseURL }}#portfolio">My Portfolio</a>
+ <a href="{{ .Site.BaseURL }}#portfolio">{{ .Site.Params.Portfolio.title }}</a>
</li>
+ {{ end }}
{{ $blogPosts := first 5 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
{{ if $blogPosts }}
<li>
diff --git a/layouts/partials/portfolio.html b/layouts/partials/portfolio.html
index 5a2a605..5c46e89 100644
--- a/layouts/partials/portfolio.html
+++ b/layouts/partials/portfolio.html
@@ -1,10 +1,10 @@
<!-- Portfolio -->
<section id="portfolio">
<header class="major">
- <h2>My Portfolio</h2>
+ <h2>{{ .Site.Params.Portfolio.title }}</h2>
</header>
<div class="row">
- {{ range where .Data.Pages "Type" "portfolio" }}
+ {{ range where .Data.Pages "Type" .Site.Params.Portfolio.foldername }}
<div class="4u 12u(mobile)">
<section class="box">
<a href="{{ .Permalink }}" class="image featured"><img src="{{ .Params.thumbnail }}" alt="" /></a>
@@ -13,7 +13,7 @@
</header>
<p>{{ .Description }}</p>
<footer>
- <a href="{{ .Permalink }}" class="button alt">Find out more</a>
+ <a href="{{ .Permalink }}" class="button alt">{{ .Site.Params.Portfolio.findoutmoretext }}</a>
</footer>
</section>
</div>
diff --git a/package.json b/package.json
index 008224d..c6a4c46 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-dopetrope",
- "version": "2.1.0",
+ "version": "3.0.0",
"description": "Hugo Theme Dopetrope",
"main": "index.js",
"scripts": {