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-24 13:13:40 +0300
committerGitHub <noreply@github.com>2018-02-24 13:13:40 +0300
commit75f05c9db8556866edf1ce4ba83051b105a658e8 (patch)
treefadc3928cf89ae9f31fd7d02e37f983e89235426
parente24761e529cdda48d8ee0d7fb02364ebeeef6495 (diff)
parent51704a46752b756b819627c331f089aed1138f1d (diff)
Merge pull request #31 from curttimson/feature/move-intro-config4.0.0v
Feature/move intro config
-rw-r--r--exampleSite/config-prod.toml71
-rw-r--r--exampleSite/config.toml72
-rw-r--r--exampleSite/data/footer/contactinfo.yaml10
-rw-r--r--exampleSite/data/footer/content.yaml15
-rw-r--r--exampleSite/data/footer/links/left.yaml (renamed from exampleSite/data/footerlinks/left.yaml)0
-rw-r--r--exampleSite/data/footer/links/right.yaml (renamed from exampleSite/data/footerlinks/right.yaml)0
-rw-r--r--exampleSite/data/footer/links/social.yaml5
-rw-r--r--exampleSite/data/home/banner.yaml2
-rw-r--r--exampleSite/data/home/intro.yaml19
-rw-r--r--exampleSite/data/sidebar/content.yaml14
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/partials/banner.html6
-rw-r--r--layouts/partials/footer/contact.html26
-rw-r--r--layouts/partials/footer/index.html39
-rw-r--r--layouts/partials/footer/recentposts.html4
-rw-r--r--layouts/partials/footer/social.html22
-rw-r--r--layouts/partials/intro.html32
-rw-r--r--layouts/partials/post/sidebar.html20
-rw-r--r--package.json2
19 files changed, 160 insertions, 205 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index 9b2c48a..ed2587a 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -3,45 +3,6 @@ title = "Dopetrope"
baseURL = "https://curttimson.github.io/hugo-theme-dopetrope/"
theme = "../.."
-[params]
- subtitle = "Howdy. This is Dopetrope."
- 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."
-
- buttonlink1 = "#"
- buttontext1 = "Get Started"
-
- buttonlink2 = "#"
- buttontext2 = "Learn More"
-
-[params.footer]
- title1 = "Blandit nisl adipiscing"
-
- title2 = "What's this all about?"
- imagelink2 = "#"
- imageurl2 = "images/pic10.jpg"
- description2 = "This is Dopetrope a free, fully responsive HTML5 site template by AJ for HTML5 UP It's released for free under the Creative Commons Attribution license so feel free to use it for any personal or commercial project – just don't forget to credit us!"
- buttonlink2 = "#"
- buttontext2 = "Find out more"
-
- title3 = "Tempus consequat"
-
- title4 = "Ipsum et phasellus"
-
- title5 = "Vitae tempor lorem"
-
[params.portfolio]
title = "My Portfolio"
foldername = "portfolio"
@@ -53,36 +14,6 @@ theme = "../.."
postsperpage = "6"
foldername = "blog"
-[params.social]
- facebook = "https://facebook.com"
- twitter = "https://twitter.com/"
- dribbble = "https://dribbble.com"
- linkedin = "https://www.linkedin.com"
- googleplus = "https://plus.google.com/"
-
-[params.address]
- line1 = "Untitled Incorporated"
- line2 = "1234 Somewhere Road Suite"
- line3 = "Nashville, TN 00000-0000"
-
-[params.contact]
- email = "someone@untitled.tld"
- phone = "(800) 000-0000"
-
[params.settings]
googleanalytics = "UA-113904582-2"
- disqus = "hugo-dopetrope"
-
-[params.sidebar]
- position = "right"
-
- image1 = "images/pic09.jpg"
- title1 = "Sed etiam lorem nulla"
- description1 = "Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore."
- buttonlink1 = "#"
- buttontext1 = "Magna sed taciti"
-
- title2 = "Feugiat consequat"
- description2 = "Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore."
- buttonlink2 = "#"
- buttontext2 = "Ipsum consequat" \ No newline at end of file
+ disqus = "hugo-dopetrope" \ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 2935a89..7e7dc5b 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -3,45 +3,6 @@ title = "Dopetrope"
baseURL = "http://localhost:1313/"
theme = "../.."
-[params]
- subtitle = "Howdy. This is Dopetrope."
- 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."
-
- buttonlink1 = "#"
- buttontext1 = "Get Started"
-
- buttonlink2 = "#"
- buttontext2 = "Learn More"
-
-[params.footer]
- title1 = "Blandit nisl adipiscing"
-
- title2 = "What's this all about?"
- imagelink2 = "#"
- imageurl2 = "images/pic10.jpg"
- description2 = "This is Dopetrope a free, fully responsive HTML5 site template by AJ for HTML5 UP It's released for free under the Creative Commons Attribution license so feel free to use it for any personal or commercial project – just don't forget to credit us!"
- buttonlink2 = "#"
- buttontext2 = "Find out more"
-
- title3 = "Tempus consequat"
-
- title4 = "Ipsum et phasellus"
-
- title5 = "Vitae tempor lorem"
-
[params.portfolio]
title = "My Portfolio"
foldername = "portfolio"
@@ -53,37 +14,6 @@ theme = "../.."
postsperpage = "6"
foldername = "blog"
-[params.social]
- facebook = "https://facebook.com"
- twitter = "https://twitter.com/"
- dribbble = "https://dribbble.com"
- linkedin = "https://www.linkedin.com"
- googleplus = "https://plus.google.com/"
-
-[params.address]
- line1 = "Untitled Incorporated"
- line2 = "1234 Somewhere Road Suite"
- line3 = "Nashville, TN 00000-0000"
-
-[params.contact]
- email = "someone@untitled.tld"
- phone = "(800) 000-0000"
-
[params.settings]
googleanalytics = "UA-113904582-1"
- disqus = "hugo-dopetrope"
-
-[params.sidebar]
- position = "right"
-
- image1 = "images/pic09.jpg"
- imagelink1 = "#"
- title1 = "Sed etiam lorem nulla"
- description1 = "Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore."
- buttonlink1 = "#"
- buttontext1 = "Magna sed taciti"
-
- title2 = "Feugiat consequat"
- description2 = "Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore."
- buttonlink2 = "#"
- buttontext2 = "Ipsum consequat" \ No newline at end of file
+ disqus = "hugo-dopetrope" \ No newline at end of file
diff --git a/exampleSite/data/footer/contactinfo.yaml b/exampleSite/data/footer/contactinfo.yaml
new file mode 100644
index 0000000..0414d9d
--- /dev/null
+++ b/exampleSite/data/footer/contactinfo.yaml
@@ -0,0 +1,10 @@
+addresslines:
+- line: 'Untitled Incorporated'
+
+- line: '1234 Somewhere Road Suite'
+
+- line: 'Nashville, TN 00000-0000'
+
+email: 'someone@untitled.tld'
+
+phone: '(800) 000-0000' \ No newline at end of file
diff --git a/exampleSite/data/footer/content.yaml b/exampleSite/data/footer/content.yaml
new file mode 100644
index 0000000..7773ea9
--- /dev/null
+++ b/exampleSite/data/footer/content.yaml
@@ -0,0 +1,15 @@
+sections:
+- title: 'Blandit nisl adipiscing'
+
+- title: "What's this all about?"
+ imagelink: '#'
+ imageurl: "images/pic10.jpg"
+ description: "This is Dopetrope a free, fully responsive HTML5 site template by AJ for HTML5 UP It's released for free under the Creative Commons Attribution license so feel free to use it for any personal or commercial project – just don't forget to credit us!"
+ buttonlink: "#"
+ buttontext: "Find out more"
+
+- title: 'Tempus consequat'
+
+- title: 'Ipsum et phasellus'
+
+- title: 'Vitae tempor lorem'
diff --git a/exampleSite/data/footerlinks/left.yaml b/exampleSite/data/footer/links/left.yaml
index 0435123..0435123 100644
--- a/exampleSite/data/footerlinks/left.yaml
+++ b/exampleSite/data/footer/links/left.yaml
diff --git a/exampleSite/data/footerlinks/right.yaml b/exampleSite/data/footer/links/right.yaml
index 0435123..0435123 100644
--- a/exampleSite/data/footerlinks/right.yaml
+++ b/exampleSite/data/footer/links/right.yaml
diff --git a/exampleSite/data/footer/links/social.yaml b/exampleSite/data/footer/links/social.yaml
new file mode 100644
index 0000000..230ad13
--- /dev/null
+++ b/exampleSite/data/footer/links/social.yaml
@@ -0,0 +1,5 @@
+facebook: "https://facebook.com"
+twitter: "https://twitter.com/"
+dribbble: "https://dribbble.com"
+linkedin: "https://www.linkedin.com"
+googleplus: "https://plus.google.com/" \ No newline at end of file
diff --git a/exampleSite/data/home/banner.yaml b/exampleSite/data/home/banner.yaml
new file mode 100644
index 0000000..5cbd56f
--- /dev/null
+++ b/exampleSite/data/home/banner.yaml
@@ -0,0 +1,2 @@
+line1: 'Howdy. This is Dopetrope.'
+line2: 'A responsive template by HTML5 UP' \ No newline at end of file
diff --git a/exampleSite/data/home/intro.yaml b/exampleSite/data/home/intro.yaml
new file mode 100644
index 0000000..6f29784
--- /dev/null
+++ b/exampleSite/data/home/intro.yaml
@@ -0,0 +1,19 @@
+sections:
+- icon: 'fa-cog'
+ title: 'Ipsum consequat'
+ description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.'
+
+- icon: 'fa-flash'
+ title: 'Magna etiam dolor'
+ description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.'
+
+- icon: 'fa-star'
+ title: 'Tempus adipiscing'
+ description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.'
+
+buttons:
+- link: '#'
+ text: 'Get Started'
+
+- link: '#'
+ text: 'Learn More' \ No newline at end of file
diff --git a/exampleSite/data/sidebar/content.yaml b/exampleSite/data/sidebar/content.yaml
new file mode 100644
index 0000000..8056f9f
--- /dev/null
+++ b/exampleSite/data/sidebar/content.yaml
@@ -0,0 +1,14 @@
+position: "right"
+
+sections:
+- image: "images/pic09.jpg"
+ imagelink: "#"
+ title: "Sed etiam lorem nulla"
+ description: "Lorem ipsum dolor sit amet sit veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat phasellus tempus dolore ipsum lorem dolore."
+ buttonlink: "#"
+ buttontext: "Magna sed taciti"
+
+- title: "Feugiat consequat"
+ description: "Veroeros sed amet blandit consequat veroeros lorem blandit adipiscing et feugiat sed lorem consequat feugiat lorem dolore."
+ buttonlink: "#"
+ buttontext: "Ipsum consequat" \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b4df0e0..cc16d29 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -23,9 +23,9 @@
<!-- Main -->
<div id="main-wrapper">
<div class="container">
- {{ if and (or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right")) (not (eq .Params.hidesidebar true)) }}
+ {{ if and (or (eq .Site.Data.sidebar.content.position "left") (eq .Site.Data.sidebar.content.position "right")) (not (eq .Params.hidesidebar true)) }}
<div class="row">
- {{ if eq .Site.Params.Sidebar.position "left" }}
+ {{ if eq .Site.Data.sidebar.content.position "left" }}
<div class="4u 12u(mobile)">
{{ partial "post/sidebar" . }}
</div>
@@ -33,7 +33,7 @@
<div class="8u 12u(mobile)">
{{ partial "post/content.html" . }}
</div>
- {{ if eq .Site.Params.Sidebar.position "right" }}
+ {{ if eq .Site.Data.sidebar.content.position "right" }}
<div class="4u 12u(mobile)">
{{ partial "post/sidebar" . }}
</div>
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html
index c4725f1..13ed1d5 100644
--- a/layouts/partials/banner.html
+++ b/layouts/partials/banner.html
@@ -1,7 +1,9 @@
<!-- Banner -->
<section id="banner">
<header>
- <h2>{{ .Site.Params.Subtitle }}</h2>
- <p>{{ .Site.Params.Subtitleline2 }}</p>
+ {{ with .Site.Data.home.banner }}
+ <h2>{{ .line1 }}</h2>
+ <p>{{ .line2 }}</p>
+ {{ end }}
</header>
</section> \ No newline at end of file
diff --git a/layouts/partials/footer/contact.html b/layouts/partials/footer/contact.html
new file mode 100644
index 0000000..06bde75
--- /dev/null
+++ b/layouts/partials/footer/contact.html
@@ -0,0 +1,26 @@
+<ul class="contact">
+ {{ if .Site.Data.footer.contactinfo.addresslines }}
+ <li>
+ <h3>Address</h3>
+ <p>
+
+ {{ range $i, $e := .Site.Data.footer.contactinfo.addresslines }}
+ {{ if $i }} <br/> {{ end }} {{ .line }}
+ {{ end }}
+
+ </p>
+ </li>
+ {{ end }}
+ {{ if .Site.Data.footer.contactinfo.email }}
+ <li>
+ <h3>Mail</h3>
+ <p><a href="mailto:{{ .Site.Data.footer.contactinfo.email }}">{{ .Site.Data.footer.contactinfo.email }}</a></p>
+ </li>
+ {{ end }}
+ {{ if .Site.Data.footer.contactinfo.email }}
+ <li>
+ <h3>Phone</h3>
+ <p>{{ .Site.Data.footer.contactinfo.phone }}</p>
+ </li>
+ {{ end }}
+</ul> \ No newline at end of file
diff --git a/layouts/partials/footer/index.html b/layouts/partials/footer/index.html
index 404b53d..806ad28 100644
--- a/layouts/partials/footer/index.html
+++ b/layouts/partials/footer/index.html
@@ -5,16 +5,18 @@
{{ partial "footer/recentposts.html" . }}
<div class="4u 12u(mobile)">
<section>
+ {{ with index .Site.Data.footer.content.sections 1 }}
<header>
- <h2>{{ .Site.Params.Footer.title2 }}</h2>
+ <h2>{{ .title }}</h2>
</header>
- <a href="{{ .Site.Params.Footer.imagelink2 }}" class="image featured"><img src="{{ .Site.BaseURL }}{{ .Site.Params.Footer.imageurl2 }}" alt="" /></a>
+ <a href="{{ .imagelink }}" class="image featured"><img src="{{ .Site.BaseURL }}{{ .imageurl }}" alt="" /></a>
<p>
- {{ .Site.Params.Footer.description2 }}
+ {{ .description }}
</p>
<footer>
- <a href="{{ .Site.Params.Footer.buttonlink2 }}" class="button">{{ .Site.Params.Footer.buttontext2 }}</a>
+ <a href="{{ .buttonlink }}" class="button">{{ .buttontext }}</a>
</footer>
+ {{ end }}
</section>
</div>
</div>
@@ -22,10 +24,10 @@
<div class="4u 12u(mobile)">
<section>
<header>
- <h2>{{ .Site.Params.Footer.title3 }}</h2>
+ <h2>{{ (index .Site.Data.footer.content.sections 2).title }}</h2>
</header>
<ul class="divided">
- {{ range .Site.Data.footerlinks.left.links }}
+ {{ range .Site.Data.footer.links.left.links }}
<li><a href="{{ .url }}">{{ .text }}</a></li>
{{ end }}
</ul>
@@ -34,10 +36,10 @@
<div class="4u 12u(mobile)">
<section>
<header>
- <h2>{{ .Site.Params.Footer.title4 }}</h2>
+ <h2>{{ (index .Site.Data.footer.content.sections 3).title }}</h2>
</header>
<ul class="divided">
- {{ range .Site.Data.footerlinks.right.links }}
+ {{ range .Site.Data.footer.links.right.links }}
<li><a href="{{ .url }}">{{ .text }}</a></li>
{{ end }}
</ul>
@@ -46,27 +48,10 @@
<div class="4u 12u(mobile)">
<section>
<header>
- <h2>{{ .Site.Params.Footer.title5 }}</h2>
+ <h2>{{ (index .Site.Data.footer.content.sections 4).title }}</h2>
</header>
{{ partial "footer/social.html" . }}
- <ul class="contact">
- <li>
- <h3>Address</h3>
- <p>
- {{ .Site.Params.Address.line1 }}<br />
- {{ .Site.Params.Address.line2 }}<br />
- {{ .Site.Params.Address.line3 }}
- </p>
- </li>
- <li>
- <h3>Mail</h3>
- <p><a href="mailto:{{ .Site.Params.Contact.email }}">{{ .Site.Params.Contact.email }}</a></p>
- </li>
- <li>
- <h3>Phone</h3>
- <p>{{ .Site.Params.Contact.phone }}</p>
- </li>
- </ul>
+ {{ partial "footer/contact.html" . }}
</section>
</div>
</div>
diff --git a/layouts/partials/footer/recentposts.html b/layouts/partials/footer/recentposts.html
index 275faaa..1842b3b 100644
--- a/layouts/partials/footer/recentposts.html
+++ b/layouts/partials/footer/recentposts.html
@@ -1,8 +1,10 @@
<div class="8u 12u(mobile)">
<section>
+ {{ with index .Site.Data.footer.content.sections 0 }}
<header>
- <h2>{{ .Site.Params.Footer.title1 }}</h2>
+ <h2>{{ .title }}</h2>
</header>
+ {{ end }}
<ul class="dates">
{{ range first 5 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
<li>
diff --git a/layouts/partials/footer/social.html b/layouts/partials/footer/social.html
index e31e2cb..68e9120 100644
--- a/layouts/partials/footer/social.html
+++ b/layouts/partials/footer/social.html
@@ -1,17 +1,19 @@
<ul class="social">
- {{ if .Site.Params.Social.facebook }}
- <li><a class="icon fa-facebook" href="{{ .Site.Params.Social.facebook }}"><span class="label">Facebook</span></a></li>
+ {{ with .Site.Data.footer.links.social }}
+ {{ if .facebook }}
+ <li><a class="icon fa-facebook" href="{{ .facebook }}"><span class="label">Facebook</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.twitter }}
- <li><a class="icon fa-twitter" href="{{ .Site.Params.Social.twitter }}"><span class="label">Twitter</span></a></li>
+ {{ if .twitter }}
+ <li><a class="icon fa-twitter" href="{{ .twitter }}"><span class="label">Twitter</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.dribbble }}
- <li><a class="icon fa-dribbble" href="{{ .Site.Params.Social.dribbble }}"><span class="label">Dribbble</span></a></li>
+ {{ if .dribbble }}
+ <li><a class="icon fa-dribbble" href="{{ .dribbble }}"><span class="label">Dribbble</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.linkedin }}
- <li><a class="icon fa-linkedin" href="{{ .Site.Params.Social.linkedin }}"><span class="label">LinkedIn</span></a></li>
+ {{ if .linkedin }}
+ <li><a class="icon fa-linkedin" href="{{ .linkedin }}"><span class="label">LinkedIn</span></a></li>
+ {{ end }}
+ {{ if .googleplus }}
+ <li><a class="icon fa-google-plus" href="{{ .googleplus }}"><span class="label">Google+</span></a></li>
{{ end }}
- {{ if .Site.Params.Social.googleplus }}
- <li><a class="icon fa-google-plus" href="{{ .Site.Params.Social.googleplus }}"><span class="label">Google+</span></a></li>
{{ end }}
</ul> \ No newline at end of file
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index b76fabd..d5ce1b0 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -3,36 +3,46 @@
<div class="row">
<div class="4u 12u(mobile)">
<section class="first">
- <i class='icon featured {{ .Site.Params.Intro.icon1 }}'></i>
+ {{ with index .Site.Data.home.intro.sections 0 }}
+ <i class='icon featured {{ .icon }}'></i>
<header>
- <h2>{{ .Site.Params.Intro.title1 }}</h2>
+ <h2>{{ .title }}</h2>
</header>
- <p>{{ .Site.Params.Intro.description1 }}</p>
+ <p>{{ .description }}</p>
+ {{ end }}
</section>
</div>
<div class="4u 12u(mobile)">
<section class="middle">
- <i class="icon featured alt {{ .Site.Params.Intro.icon2 }}"></i>
+ {{ with index .Site.Data.home.intro.sections 1 }}
+ <i class="icon featured alt {{ .icon }}"></i>
<header>
- <h2>{{ .Site.Params.Intro.title2 }}</h2>
+ <h2>{{ .title }}</h2>
</header>
- <p>{{ .Site.Params.Intro.description2 }}</p>
+ <p>{{ .description }}</p>
+ {{ end }}
</section>
</div>
<div class="4u 12u(mobile)">
<section class="last">
- <i class="icon featured alt2 {{ .Site.Params.Intro.icon3 }}"></i>
+ {{ with index .Site.Data.home.intro.sections 2 }}
+ <i class="icon featured alt2 {{ .icon }}"></i>
<header>
- <h2>{{ .Site.Params.Intro.title3 }}</h2>
+ <h2>{{ .title }}</h2>
</header>
- <p>{{ .Site.Params.Intro.description3 }}</p>
+ <p>{{ .description }}</p>
+ {{ end }}
</section>
</div>
</div>
<footer>
<ul class="actions">
- <li><a href="{{ .Site.Params.Intro.buttonlink1 }}" class="button big">{{ .Site.Params.Intro.buttontext1 }}</a></li>
- <li><a href="{{ .Site.Params.Intro.buttonlink2 }}" class="button alt big">{{ .Site.Params.Intro.buttontext2 }}</a></li>
+ {{ with index .Site.Data.home.intro.buttons 0 }}
+ <li><a href="{{ .link }}" class="button big">{{ .text }}</a></li>
+ {{ end }}
+ {{ with index .Site.Data.home.intro.buttons 1 }}
+ <li><a href="{{ .link }}" class="button alt big">{{ .text }}</a></li>
+ {{ end }}
</ul>
</footer>
</section> \ No newline at end of file
diff --git a/layouts/partials/post/sidebar.html b/layouts/partials/post/sidebar.html
index 90a93ef..63b70e4 100644
--- a/layouts/partials/post/sidebar.html
+++ b/layouts/partials/post/sidebar.html
@@ -1,28 +1,30 @@
-{{ $sidebar := .Site.Params.Sidebar }}
+{{ $sidebar := .Site.Data.sidebar.content }}
+{{ $sidebarsection1 := index $sidebar.sections 0 }}
+{{ $sidebarsection2 := index $sidebar.sections 1 }}
<!-- Sidebar -->
<section class="box">
- {{ if $sidebar.image1 }}
- <a href="{{ $sidebar.imagelink1 }}" class="image featured"><img src="{{ .Site.BaseURL }}{{ $sidebar.image1 }}" alt="" /></a>
+ {{ if $sidebarsection1.image }}
+ <a href="{{ $sidebarsection1.imagelink }}" class="image featured"><img src="{{ .Site.BaseURL }}{{ $sidebarsection1.image }}" alt="" /></a>
{{ end }}
<header>
- <h3>{{ $sidebar.title1 }}</h3>
+ <h3>{{ $sidebarsection1.title }}</h3>
</header>
- <p>{{ $sidebar.description1 }}</p>
+ <p>{{ $sidebarsection1.description }}</p>
<footer>
- <a href="{{ $sidebar.buttonlink1 }}" class="button alt">{{ $sidebar.buttontext1 }}</a>
+ <a href="{{ $sidebarsection1.buttonlink }}" class="button alt">{{ $sidebarsection1.buttontext }}</a>
</footer>
</section>
<section class="box">
<header>
- <h3>{{ $sidebar.title2 }}</h3>
+ <h3>{{ $sidebarsection2.title }}</h3>
</header>
- <p>{{ $sidebar.description2 }}</p>
+ <p>{{ $sidebarsection2.description }}</p>
<ul class="divided">
{{ range first 4 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
<footer>
- <a href="{{ $sidebar.buttonlink2 }}" class="button alt">{{ $sidebar.buttontext2 }}</a>
+ <a href="{{ $sidebarsection2.buttonlink }}" class="button alt">{{ $sidebarsection2.buttontext }}</a>
</footer>
</section> \ No newline at end of file
diff --git a/package.json b/package.json
index cf2dd74..9816863 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-dopetrope",
- "version": "3.2.1",
+ "version": "4.0.0",
"description": "Hugo Theme Dopetrope",
"main": "index.js",
"scripts": {