From 21d8d878ade7595ecb80681510386d797fbc76dc Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:10:15 +0000 Subject: :sparkles: Drive intro content from data instead of config --- exampleSite/data/home/intro.yaml | 12 ++++++++++++ layouts/partials/intro.html | 21 ++++++++++++--------- package.json | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 exampleSite/data/home/intro.yaml diff --git a/exampleSite/data/home/intro.yaml b/exampleSite/data/home/intro.yaml new file mode 100644 index 0000000..4f94344 --- /dev/null +++ b/exampleSite/data/home/intro.yaml @@ -0,0 +1,12 @@ +sections: +- icon: 'sdsd' + title: 'text' + description: '1 des' + +- icon: 'sdsd' + title: 'texsdsdt' + description: '1 des' + +- icon: 'sdsd' + title: 'text' + description: '1 des' \ No newline at end of file diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html index b76fabd..55932af 100644 --- a/layouts/partials/intro.html +++ b/layouts/partials/intro.html @@ -1,31 +1,34 @@ +{{ $section1 := index .Site.Data.home.intro.sections 0 }} +{{ $section2 := index .Site.Data.home.intro.sections 1 }} +{{ $section3 := index .Site.Data.home.intro.sections 2 }}
- +
-

{{ .Site.Params.Intro.title1 }}

+

{{ $section1.title }}

-

{{ .Site.Params.Intro.description1 }}

+

{{ $section1.description }}

- +
-

{{ .Site.Params.Intro.title2 }}

+

{{ $section2.title }}

-

{{ .Site.Params.Intro.description2 }}

+

{{ $section2.description }}

- +
-

{{ .Site.Params.Intro.title3 }}

+

{{ $section3.title }}

-

{{ .Site.Params.Intro.description3 }}

+

{{ $section3.description }}

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": { -- cgit v1.2.3 From df924548ee4e36930fc39f6f333d2d311fcbdd9b Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:12:09 +0000 Subject: :wrench: Copy configuration over to intro data --- exampleSite/data/home/intro.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exampleSite/data/home/intro.yaml b/exampleSite/data/home/intro.yaml index 4f94344..479a15c 100644 --- a/exampleSite/data/home/intro.yaml +++ b/exampleSite/data/home/intro.yaml @@ -1,12 +1,12 @@ sections: -- icon: 'sdsd' - title: 'text' - description: '1 des' +- icon: 'fa-cog' + title: 'Ipsum consequat' + description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.' -- icon: 'sdsd' - title: 'texsdsdt' - description: '1 des' +- icon: 'fa-flash' + title: 'Magna etiam dolor' + description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.' -- icon: 'sdsd' - title: 'text' - description: '1 des' \ No newline at end of file +- icon: 'fa-star' + title: 'Tempus adipiscing' + description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.' \ No newline at end of file -- cgit v1.2.3 From 4803be9d27b7a53c68296b5f95477d8d80af3099 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:13:03 +0000 Subject: :fire: Remove redundant configuration --- exampleSite/config-prod.toml | 12 ------------ exampleSite/config.toml | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 9b2c48a..3030ebb 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -8,18 +8,6 @@ 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." - buttonlink1 = "#" buttontext1 = "Get Started" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2935a89..54c9fcf 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,18 +8,6 @@ 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." - buttonlink1 = "#" buttontext1 = "Get Started" -- cgit v1.2.3 From 485c5d8dbab39f1d0f46cca062096c51a0a342b7 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:16:41 +0000 Subject: :sparkles: Move buttons to data file and remove intro config --- exampleSite/config-prod.toml | 7 ------- exampleSite/config.toml | 7 ------- exampleSite/data/home/intro.yaml | 9 ++++++++- layouts/partials/intro.html | 6 ++++-- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 3030ebb..112d17c 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -7,13 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[params.intro] - buttonlink1 = "#" - buttontext1 = "Get Started" - - buttonlink2 = "#" - buttontext2 = "Learn More" - [params.footer] title1 = "Blandit nisl adipiscing" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 54c9fcf..83bec74 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,13 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[params.intro] - buttonlink1 = "#" - buttontext1 = "Get Started" - - buttonlink2 = "#" - buttontext2 = "Learn More" - [params.footer] title1 = "Blandit nisl adipiscing" diff --git a/exampleSite/data/home/intro.yaml b/exampleSite/data/home/intro.yaml index 479a15c..6f29784 100644 --- a/exampleSite/data/home/intro.yaml +++ b/exampleSite/data/home/intro.yaml @@ -9,4 +9,11 @@ sections: - icon: 'fa-star' title: 'Tempus adipiscing' - description: 'Nisl amet dolor sit ipsum veroeros sed blandit consequat veroeros et magna tempus.' \ No newline at end of file + 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/layouts/partials/intro.html b/layouts/partials/intro.html index 55932af..381cc12 100644 --- a/layouts/partials/intro.html +++ b/layouts/partials/intro.html @@ -2,6 +2,8 @@ {{ $section1 := index .Site.Data.home.intro.sections 0 }} {{ $section2 := index .Site.Data.home.intro.sections 1 }} {{ $section3 := index .Site.Data.home.intro.sections 2 }} +{{ $button1 := index .Site.Data.home.intro.buttons 0 }} +{{ $button2 := index .Site.Data.home.intro.buttons 1 }}
\ No newline at end of file -- cgit v1.2.3 From 5bab708ea64b74b48f752f835ad49b4ac1d9bbbf Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:20:37 +0000 Subject: :recycle: Replace hugo variables with with statements --- layouts/partials/intro.html | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html index 381cc12..d5ce1b0 100644 --- a/layouts/partials/intro.html +++ b/layouts/partials/intro.html @@ -1,43 +1,48 @@ -{{ $section1 := index .Site.Data.home.intro.sections 0 }} -{{ $section2 := index .Site.Data.home.intro.sections 1 }} -{{ $section3 := index .Site.Data.home.intro.sections 2 }} -{{ $button1 := index .Site.Data.home.intro.buttons 0 }} -{{ $button2 := index .Site.Data.home.intro.buttons 1 }}
- + {{ with index .Site.Data.home.intro.sections 0 }} +
-

{{ $section1.title }}

+

{{ .title }}

-

{{ $section1.description }}

+

{{ .description }}

+ {{ end }}
- + {{ with index .Site.Data.home.intro.sections 1 }} +
-

{{ $section2.title }}

+

{{ .title }}

-

{{ $section2.description }}

+

{{ .description }}

+ {{ end }}
- + {{ with index .Site.Data.home.intro.sections 2 }} +
-

{{ $section3.title }}

+

{{ .title }}

-

{{ $section3.description }}

+

{{ .description }}

+ {{ end }}
\ No newline at end of file -- cgit v1.2.3 From 1188bc0069873885dd32e0c5f9e3270cbdaa535c Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:23:57 +0000 Subject: :truck: Move footer links into specific folder --- exampleSite/data/footer/links/left.yaml | 18 ++++++++++++++++++ exampleSite/data/footer/links/right.yaml | 18 ++++++++++++++++++ exampleSite/data/footerlinks/left.yaml | 18 ------------------ exampleSite/data/footerlinks/right.yaml | 18 ------------------ layouts/partials/footer/index.html | 4 ++-- 5 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 exampleSite/data/footer/links/left.yaml create mode 100644 exampleSite/data/footer/links/right.yaml delete mode 100644 exampleSite/data/footerlinks/left.yaml delete mode 100644 exampleSite/data/footerlinks/right.yaml diff --git a/exampleSite/data/footer/links/left.yaml b/exampleSite/data/footer/links/left.yaml new file mode 100644 index 0000000..0435123 --- /dev/null +++ b/exampleSite/data/footer/links/left.yaml @@ -0,0 +1,18 @@ +links: +- text: 'Lorem ipsum dolor sit amet sit veroeros' + url: '#' + +- text: 'Sed et blandit consequat sed tlorem blandit' + url: '#' + +- text: 'Adipiscing feugiat phasellus sed tempus' + url: '#' + +- text: 'Hendrerit tortor vitae mattis tempor sapien' + url: '#' + +- text: 'Sem feugiat sapien id suscipit magna felis nec' + url: '#' + +- text: 'Elit class aptent taciti sociosqu ad litora' + url: '#' \ No newline at end of file diff --git a/exampleSite/data/footer/links/right.yaml b/exampleSite/data/footer/links/right.yaml new file mode 100644 index 0000000..0435123 --- /dev/null +++ b/exampleSite/data/footer/links/right.yaml @@ -0,0 +1,18 @@ +links: +- text: 'Lorem ipsum dolor sit amet sit veroeros' + url: '#' + +- text: 'Sed et blandit consequat sed tlorem blandit' + url: '#' + +- text: 'Adipiscing feugiat phasellus sed tempus' + url: '#' + +- text: 'Hendrerit tortor vitae mattis tempor sapien' + url: '#' + +- text: 'Sem feugiat sapien id suscipit magna felis nec' + url: '#' + +- text: 'Elit class aptent taciti sociosqu ad litora' + url: '#' \ No newline at end of file diff --git a/exampleSite/data/footerlinks/left.yaml b/exampleSite/data/footerlinks/left.yaml deleted file mode 100644 index 0435123..0000000 --- a/exampleSite/data/footerlinks/left.yaml +++ /dev/null @@ -1,18 +0,0 @@ -links: -- text: 'Lorem ipsum dolor sit amet sit veroeros' - url: '#' - -- text: 'Sed et blandit consequat sed tlorem blandit' - url: '#' - -- text: 'Adipiscing feugiat phasellus sed tempus' - url: '#' - -- text: 'Hendrerit tortor vitae mattis tempor sapien' - url: '#' - -- text: 'Sem feugiat sapien id suscipit magna felis nec' - url: '#' - -- text: 'Elit class aptent taciti sociosqu ad litora' - url: '#' \ No newline at end of file diff --git a/exampleSite/data/footerlinks/right.yaml b/exampleSite/data/footerlinks/right.yaml deleted file mode 100644 index 0435123..0000000 --- a/exampleSite/data/footerlinks/right.yaml +++ /dev/null @@ -1,18 +0,0 @@ -links: -- text: 'Lorem ipsum dolor sit amet sit veroeros' - url: '#' - -- text: 'Sed et blandit consequat sed tlorem blandit' - url: '#' - -- text: 'Adipiscing feugiat phasellus sed tempus' - url: '#' - -- text: 'Hendrerit tortor vitae mattis tempor sapien' - url: '#' - -- text: 'Sem feugiat sapien id suscipit magna felis nec' - url: '#' - -- text: 'Elit class aptent taciti sociosqu ad litora' - url: '#' \ No newline at end of file diff --git a/layouts/partials/footer/index.html b/layouts/partials/footer/index.html index 404b53d..6d59f50 100644 --- a/layouts/partials/footer/index.html +++ b/layouts/partials/footer/index.html @@ -25,7 +25,7 @@

{{ .Site.Params.Footer.title3 }}

    - {{ range .Site.Data.footerlinks.left.links }} + {{ range .Site.Data.footer.links.left.links }}
  • {{ .text }}
  • {{ end }}
@@ -37,7 +37,7 @@

{{ .Site.Params.Footer.title4 }}

    - {{ range .Site.Data.footerlinks.right.links }} + {{ range .Site.Data.footer.links.right.links }}
  • {{ .text }}
  • {{ end }}
-- cgit v1.2.3 From 4e038cbae1f830b27fb1280a2d50f4482f7ab2f1 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:44:09 +0000 Subject: :sparkles: Move footer content to data files --- exampleSite/config-prod.toml | 16 ---------------- exampleSite/config.toml | 16 ---------------- exampleSite/data/footer/content.yaml | 15 +++++++++++++++ layouts/partials/footer/index.html | 16 +++++++++------- layouts/partials/footer/recentposts.html | 4 +++- 5 files changed, 27 insertions(+), 40 deletions(-) create mode 100644 exampleSite/data/footer/content.yaml diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 112d17c..dce9e3b 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -7,22 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[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" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 83bec74..ea71d5c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,22 +7,6 @@ theme = "../.." subtitle = "Howdy. This is Dopetrope." subtitleline2 = "A responsive template by HTML5 UP" -[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" 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/layouts/partials/footer/index.html b/layouts/partials/footer/index.html index 6d59f50..39404f9 100644 --- a/layouts/partials/footer/index.html +++ b/layouts/partials/footer/index.html @@ -5,16 +5,18 @@ {{ partial "footer/recentposts.html" . }}
+ {{ with index .Site.Data.footer.content.sections 1 }}
-

{{ .Site.Params.Footer.title2 }}

+

{{ .title }}

- +

- {{ .Site.Params.Footer.description2 }} + {{ .description }}

+ {{ end }}
@@ -22,7 +24,7 @@
-

{{ .Site.Params.Footer.title3 }}

+

{{ (index .Site.Data.footer.content.sections 2).title }}

    {{ range .Site.Data.footer.links.left.links }} @@ -34,7 +36,7 @@
    -

    {{ .Site.Params.Footer.title4 }}

    +

    {{ (index .Site.Data.footer.content.sections 3).title }}

      {{ range .Site.Data.footer.links.right.links }} @@ -46,7 +48,7 @@
      -

      {{ .Site.Params.Footer.title5 }}

      +

      {{ (index .Site.Data.footer.content.sections 4).title }}

      {{ partial "footer/social.html" . }}
        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 @@
        + {{ with index .Site.Data.footer.content.sections 0 }}
        -

        {{ .Site.Params.Footer.title1 }}

        +

        {{ .title }}

        + {{ end }}
          {{ range first 5 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
        • -- cgit v1.2.3 From e09028a905aceacb7d855b7d6d8e39f1f574a884 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 09:48:24 +0000 Subject: :sparkles: Move social links to data files --- exampleSite/config-prod.toml | 7 ------- exampleSite/config.toml | 7 ------- exampleSite/data/footer/links/social.yaml | 5 +++++ layouts/partials/footer/social.html | 22 ++++++++++++---------- 4 files changed, 17 insertions(+), 24 deletions(-) create mode 100644 exampleSite/data/footer/links/social.yaml diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index dce9e3b..5b4c8b9 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -18,13 +18,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" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ea71d5c..9368bec 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,13 +18,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" 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/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 @@ \ No newline at end of file -- cgit v1.2.3 From e49918d911771db616f49952959d105e232f75b8 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 10:00:15 +0000 Subject: :sparkles: Move address to data from config --- exampleSite/config-prod.toml | 5 ----- exampleSite/config.toml | 5 ----- exampleSite/data/footer/contactinfo.yaml | 6 ++++++ layouts/partials/footer/contact.html | 22 ++++++++++++++++++++++ layouts/partials/footer/index.html | 19 +------------------ 5 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 exampleSite/data/footer/contactinfo.yaml create mode 100644 layouts/partials/footer/contact.html diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 5b4c8b9..2eb29b0 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -18,11 +18,6 @@ theme = "../.." postsperpage = "6" foldername = "blog" -[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" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9368bec..de311e5 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,11 +18,6 @@ theme = "../.." postsperpage = "6" foldername = "blog" -[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" diff --git a/exampleSite/data/footer/contactinfo.yaml b/exampleSite/data/footer/contactinfo.yaml new file mode 100644 index 0000000..4d3d11b --- /dev/null +++ b/exampleSite/data/footer/contactinfo.yaml @@ -0,0 +1,6 @@ +addresslines: +- line: 'Untitled Incorporated' + +- line: '1234 Somewhere Road Suite' + +- line: 'Nashville, TN 00000-0000' diff --git a/layouts/partials/footer/contact.html b/layouts/partials/footer/contact.html new file mode 100644 index 0000000..5ff160b --- /dev/null +++ b/layouts/partials/footer/contact.html @@ -0,0 +1,22 @@ +
            + {{ if .Site.Data.footer.contactinfo.addresslines }} +
          • +

            Address

            +

            + + {{ range $i, $e := .Site.Data.footer.contactinfo.addresslines }} + {{ if $i }}
            {{ end }} {{ .line }} + {{ end }} + +

            +
          • + {{ end }} +
          • +

            Mail

            +

            {{ .Site.Params.Contact.email }}

            +
          • +
          • +

            Phone

            +

            {{ .Site.Params.Contact.phone }}

            +
          • +
          \ No newline at end of file diff --git a/layouts/partials/footer/index.html b/layouts/partials/footer/index.html index 39404f9..806ad28 100644 --- a/layouts/partials/footer/index.html +++ b/layouts/partials/footer/index.html @@ -51,24 +51,7 @@

          {{ (index .Site.Data.footer.content.sections 4).title }}

          {{ partial "footer/social.html" . }} -
            -
          • -

            Address

            -

            - {{ .Site.Params.Address.line1 }}
            - {{ .Site.Params.Address.line2 }}
            - {{ .Site.Params.Address.line3 }} -

            -
          • -
          • -

            Mail

            -

            {{ .Site.Params.Contact.email }}

            -
          • -
          • -

            Phone

            -

            {{ .Site.Params.Contact.phone }}

            -
          • -
          + {{ partial "footer/contact.html" . }}
      -- cgit v1.2.3 From cbcfca8e1058619ad90b1147b54eca154bac656c Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 10:08:37 +0000 Subject: :sparkles: Move sidebar content to data --- exampleSite/config-prod.toml | 20 +------------------- exampleSite/config.toml | 21 +-------------------- exampleSite/data/footer/contactinfo.yaml | 4 ++++ exampleSite/data/sidebar/content.yaml | 14 ++++++++++++++ layouts/_default/single.html | 6 +++--- layouts/partials/footer/contact.html | 8 ++++++-- layouts/partials/post/sidebar.html | 20 +++++++++++--------- 7 files changed, 40 insertions(+), 53 deletions(-) create mode 100644 exampleSite/data/sidebar/content.yaml diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 2eb29b0..fcf2151 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -18,24 +18,6 @@ theme = "../.." postsperpage = "6" foldername = "blog" -[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 de311e5..8da763e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,25 +18,6 @@ theme = "../.." postsperpage = "6" foldername = "blog" -[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 index 4d3d11b..0414d9d 100644 --- a/exampleSite/data/footer/contactinfo.yaml +++ b/exampleSite/data/footer/contactinfo.yaml @@ -4,3 +4,7 @@ addresslines: - 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/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 @@
      - {{ 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)) }}
      - {{ if eq .Site.Params.Sidebar.position "left" }} + {{ if eq .Site.Data.sidebar.content.position "left" }}
      {{ partial "post/sidebar" . }}
      @@ -33,7 +33,7 @@
      {{ partial "post/content.html" . }}
      - {{ if eq .Site.Params.Sidebar.position "right" }} + {{ if eq .Site.Data.sidebar.content.position "right" }}
      {{ partial "post/sidebar" . }}
      diff --git a/layouts/partials/footer/contact.html b/layouts/partials/footer/contact.html index 5ff160b..06bde75 100644 --- a/layouts/partials/footer/contact.html +++ b/layouts/partials/footer/contact.html @@ -11,12 +11,16 @@

      {{ end }} + {{ if .Site.Data.footer.contactinfo.email }}
    • Mail

      -

      {{ .Site.Params.Contact.email }}

      +

      {{ .Site.Data.footer.contactinfo.email }}

    • + {{ end }} + {{ if .Site.Data.footer.contactinfo.email }}
    • Phone

      -

      {{ .Site.Params.Contact.phone }}

      +

      {{ .Site.Data.footer.contactinfo.phone }}

    • + {{ end }}
    \ 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 }}
    - {{ if $sidebar.image1 }} - + {{ if $sidebarsection1.image }} + {{ end }}
    -

    {{ $sidebar.title1 }}

    +

    {{ $sidebarsection1.title }}

    -

    {{ $sidebar.description1 }}

    +

    {{ $sidebarsection1.description }}

    -

    {{ $sidebar.title2 }}

    +

    {{ $sidebarsection2.title }}

    -

    {{ $sidebar.description2 }}

    +

    {{ $sidebarsection2.description }}

      {{ range first 4 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
    • {{ .Title }}
    • {{ end }}
    \ No newline at end of file -- cgit v1.2.3 From 51704a46752b756b819627c331f089aed1138f1d Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sat, 24 Feb 2018 10:12:40 +0000 Subject: :sparkles: :wrench: Move banner text to data yaml files --- exampleSite/config-prod.toml | 4 ---- exampleSite/config.toml | 4 ---- exampleSite/data/home/banner.yaml | 2 ++ layouts/partials/banner.html | 6 ++++-- 4 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 exampleSite/data/home/banner.yaml diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index fcf2151..ed2587a 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -3,10 +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.portfolio] title = "My Portfolio" foldername = "portfolio" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8da763e..7e7dc5b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -3,10 +3,6 @@ title = "Dopetrope" baseURL = "http://localhost:1313/" theme = "../.." -[params] - subtitle = "Howdy. This is Dopetrope." - subtitleline2 = "A responsive template by HTML5 UP" - [params.portfolio] title = "My Portfolio" foldername = "portfolio" 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/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 @@ \ No newline at end of file -- cgit v1.2.3