diff --git a/exampleSite/data/home/project.toml b/exampleSite/data/home/bottom.toml
similarity index 80%
rename from exampleSite/data/home/project.toml
rename to exampleSite/data/home/bottom.toml
index 014ebec..f7e846a 100644
--- a/exampleSite/data/home/project.toml
+++ b/exampleSite/data/home/bottom.toml
@@ -1,6 +1,10 @@
+title = "Projects"
+id = "projects"
+
[[list]]
title = "lorem"
image = "https://picsum.photos/400/200"
+ imageAlt = "Random image from Picsum"
text = """
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Voluptatibus quia, nulla! Maiores et perferendis eaque,
@@ -9,8 +13,9 @@
[[list]]
title = "lorem"
image = "https://picsum.photos/400/200"
+ imageAlt = "Random image from Picsum"
text = """
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Voluptatibus quia, nulla! Maiores et perferendis eaque,
exercitationem praesentium nihil.
- """
\ No newline at end of file
+ """
diff --git a/exampleSite/data/home/skills.toml b/exampleSite/data/home/middle.toml
similarity index 95%
rename from exampleSite/data/home/skills.toml
rename to exampleSite/data/home/middle.toml
index 9171ae0..33ea4f7 100644
--- a/exampleSite/data/home/skills.toml
+++ b/exampleSite/data/home/middle.toml
@@ -1,3 +1,6 @@
+title = "Skills"
+id = "skills"
+
[[list]]
name = "go"
icon = "https://devicons.github.io/devicon/devicon.git/icons/go/go-original.svg"
@@ -21,4 +24,4 @@
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Voluptatibus quia, nulla! Maiores et perferendis eaque,
exercitationem praesentium nihil.
- """
\ No newline at end of file
+ """
diff --git a/exampleSite/data/home/about.toml b/exampleSite/data/home/top.toml
similarity index 83%
rename from exampleSite/data/home/about.toml
rename to exampleSite/data/home/top.toml
index 8944590..67d7bab 100644
--- a/exampleSite/data/home/about.toml
+++ b/exampleSite/data/home/top.toml
@@ -1,4 +1,6 @@
-title = "Hello, World!"
+mainTitle = "About Me"
+secondaryTitle = "Hello, World!"
+id = "about"
text = """
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
@@ -20,4 +22,4 @@ exercitationem praesentium nihil.
url = "#"
[[link]]
icon = "fab fa-facebook"
- url = "#"
\ No newline at end of file
+ url = "#"
diff --git a/exampleSite/data/site/layouts.toml b/exampleSite/data/site/layouts.toml
new file mode 100644
index 0000000..c353182
--- /dev/null
+++ b/exampleSite/data/site/layouts.toml
@@ -0,0 +1,8 @@
+[[home]]
+ enableWave = "true"
+ enableTopWidget = "true"
+ enableMiddleWidget = "true"
+ enableBottomWidget = "true"
+
+[[single]]
+ enableWave = "true"
diff --git a/layouts/partials/home/home.html b/layouts/partials/home/home.html
index 2e9cf3c..34539b6 100644
--- a/layouts/partials/home/home.html
+++ b/layouts/partials/home/home.html
@@ -1,34 +1,60 @@
+
- {{ partial "utilities/wave" .}}
+
+ {{ $layouts := .Site.Data.site.layouts }}
+
+
+ {{ range $layouts.home }}
+ {{if eq .enableWave "true"}}
+ {{ partial "utilities/wave" .}}
+ {{end}}
+ {{end}}
+
+
+
+
+
+
+ {{if $.Site.Params.maintitle }}
+ {{ $.Site.Params.maintitle }}
+ {{else}}
+ Hello, World
+ {{end}}
+
+
+
+
+ {{if $.Site.Params.maintext}}
+ {{ $.Site.Params.maintext }}
+ {{else}}
+ Edit config.toml/params
+ {{end}}
+
-
-
- {{if $.Site.Params.maintitle }}
- {{ $.Site.Params.maintitle }}
- {{else}}
- Hello, World
- {{end}}
-
- {{if $.Site.Params.maintext}}
- {{ $.Site.Params.maintext }}
- {{else}}
- Edit config.toml/params
- {{end}}
-
-
+
- {{partial "utilities/widgetAbout" .}}
- {{partial "utilities/widgetBoxIconText" .}}
- {{partial "utilities/widgetBoxImageText" .}}
+ {{ range $layouts.home }}
+ {{if eq .enableTopWidget "true"}}
+ {{partial "utilities/widgetSocial" $.Site}}
+ {{end}}
+
+ {{if eq .enableMiddleWidget "true"}}
+ {{partial "utilities/widgetBoxIconText" $.Site}}
+ {{end}}
+
+ {{if eq .enableBottomWidget "true"}}
+ {{partial "utilities/widgetBoxImageText" $.Site}}
+ {{end}}
+ {{end}}
diff --git a/layouts/partials/utilities/widgetBoxIconText.html b/layouts/partials/utilities/widgetBoxIconText.html
index efd412d..baf81a1 100644
--- a/layouts/partials/utilities/widgetBoxIconText.html
+++ b/layouts/partials/utilities/widgetBoxIconText.html
@@ -1,14 +1,14 @@
{{ $data := .Site.Data.home }}
-
+
- {{ partial "home/homeTitle" (dict "title" "Skills") }}
+ {{ partial "home/homeTitle" (dict "title" $data.middle.title) }}
- {{if $data.skills.list}}
+ {{if $data.middle.list}}
- {{ range $data.skills.list }}
+ {{ range $data.middle.list }}
@@ -34,6 +34,6 @@
{{else}}
-
Skills don't exist
+
Undefined list
{{end}}
diff --git a/layouts/partials/utilities/widgetBoxImageText.html b/layouts/partials/utilities/widgetBoxImageText.html
index d0dfa0c..0ab80d4 100644
--- a/layouts/partials/utilities/widgetBoxImageText.html
+++ b/layouts/partials/utilities/widgetBoxImageText.html
@@ -1,19 +1,19 @@
{{ $data := .Site.Data.home }}
-
+
- {{ partial "home/homeTitle" (dict "title" "Projects") }}
+ {{ partial "home/homeTitle" (dict "title" $data.bottom.title) }}
- {{if $data.skills.list}}
+ {{if $data.bottom.list}}
- {{ range $data.project.list }}
+ {{ range $data.bottom.list }}
@@ -27,6 +27,6 @@
{{else}}
-
Projects does not exist
+
Undefined list
{{end}}
diff --git a/layouts/partials/utilities/widgetAbout.html b/layouts/partials/utilities/widgetSocial.html
similarity index 52%
rename from layouts/partials/utilities/widgetAbout.html
rename to layouts/partials/utilities/widgetSocial.html
index cc20d98..6e058fc 100644
--- a/layouts/partials/utilities/widgetAbout.html
+++ b/layouts/partials/utilities/widgetSocial.html
@@ -1,12 +1,13 @@
{{ $data := .Site.Data.home }}
-
+
- {{ partial "home/homeTitle" (dict "title" "About Me") }}
+ {{ partial "home/homeTitle" (dict "title" $data.top.mainTitle) }}
- {{ range $data.about.link }}
-
{{end}}
+ {{ range .Site.Data.home.top.link }}
+
+ {{end}}
@@ -14,16 +15,16 @@
- {{ if $data.about.title }}
- {{$data.about.title}}
+ {{ if $data.top.secondaryTitle }}
+ {{$data.top.secondaryTitle}}
{{else}}
You can put text in data/home/about.toml/title
{{end}}
- {{ if $data.about.text}}
- {{ replace $data.about.text "\n" "
" | safeHTML }}
+ {{ if $data.top.text}}
+ {{ replace $data.top.text "\n" "
" | safeHTML }}
{{else}}
You can put text in data/home/about.toml/text
{{end}}