diff options
author | Hanzei <hanzei@mailbox.org> | 2018-07-18 17:58:51 +0300 |
---|---|---|
committer | Hanzei <hanzei@mailbox.org> | 2018-07-18 18:39:11 +0300 |
commit | 0f2d3808ee3b548f1861c602489432015465f71f (patch) | |
tree | 736f04dd78d6aa067917fa7c6ef5f8b9b4b34c67 /layouts/index.html | |
parent | 2ed572bea85f12c65ca59d03689f99443a0efd75 (diff) |
Use headless bundle for home page
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/layouts/index.html b/layouts/index.html index e789c89..dac49a5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,17 +8,18 @@ </head> <body> <div id="top"> + {{ with .Site.GetPage "page" "home" }} <div class="hero is-{{ .Site.Params.introHeight | default "fullheight" }}"> <!-- Super sweet Hero body title --> <div class="hero-body"> <div class="container has-text-centered"> <!-- Title and tagline --> <h1 class="bold-title {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}"> - {{ .Site.Params.firstName | default "Introduction" }}. + {{ .Title }} </h1> - <h3 class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"> - {{ .Site.Params.tagLine }} - </h3> + <div class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"> + {{ .Content }} + </div> <!-- End title and tagline --> <!-- Some social icons --> <div class=" {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}"> @@ -29,43 +30,58 @@ </div> <!-- Hero body title end --> </div> + {{ end }} + <!-- Done with Hero --> - <!-- Everything below fades in three! --> <div class="section no-padding-top {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}"> <!-- Tell them all about it! --> {{ partial "nav.html" . }} - {{ with .Site.GetPage "page" "about" }} + + {{ with .Site.GetPage "page" "home" }} + {{ $home := . }} + {{ range sort (.Resources.ByType "page") "Params.weight" }} + + {{ if ne .Name "contact.md" }} + <!-- Range through all sections in /home execept contact.md --> <div class="section" id="{{ .File.TranslationBaseName }}"> <div class="container"> <h2 class="title is-2 has-text-centered">{{ .Title }}</h2> - <div class="columns"><!-- Avatar and about.md side by side except mobile --> - {{ if .Site.Params.avatar }} + {{ if .Params.Image }} + <div class="columns"> <div class="column is-one-third has-text-centered"> - <img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="{{ i18n "index_avatarAlt" . }}"> + {{ with $home.Resources.GetMatch .Params.Image }} + {{ with .Resize "320x" }} + <img class="img-responsive avatar" src="{{ .RelPermalink }}" alt="{{ .Name }}"> + {{ end }} + {{ end }} </div> - {{ end }} - <div class="column markdown"> - {{.Content}} + <div class="markdown column"> + {{ .Content }} </div> </div> + {{ else }} + <div class="markdown has-text-centered"> + {{ .Content }} + </div> + {{ end }} </div> <!-- End About container--> {{ partial "top-icon.html" . }} </div> <div class="container"><hr></div> - <!-- End About section --> + {{ end }} {{ end }} <!-- Now for some cool projects --> {{ partial "home/projects.html" . }} <!-- Let's show some blog posts --> {{ partial "home/blog.html" . }} <!-- Let's chat, shall we? --> - {{ with .Site.GetPage "page" "contact" }} + {{ with .Resources.GetMatch "contact.md" }} <div class="section" id="{{ .File.TranslationBaseName }}"> <div class="container has-text-centered"> <h2 class="title is-2">{{ .Title }}</h2> <div class="markdown"> - {{.Content}} + {{ .Content }} </div> {{ if .Site.Params.localTime }} <p>{{ i18n "index_currentTime" . }} <span id='time'></span>.</p> @@ -83,6 +99,8 @@ <div class="container"><hr></div> {{ end }} <!-- End Contact section --> + {{ end }} + {{ partial "footer/text.html" . }} </div> </div> |