refactor[partials]: reorganize partials to enhance code reuse
Partials have been reorganized, to improve general understandability and enhance code reuse (ex. when adding pages, the "wave" will be loaded as a partial)
This commit is contained in:
parent
f11421ae38
commit
df1a0fd2ea
|
@ -1,3 +1,3 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "home.html" . }}
|
||||
{{ partial "home/home.html" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{ partial "navbar.html" . }}
|
||||
{{ partial "utilities/navbar.html" . }}
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
<div>
|
||||
<div
|
||||
id="mainBG"
|
||||
style="background-image: url('{{ if $.Site.Params.mainbg }}{{ $.Site.Params.mainbg }}{{ else }}https://picsum.photos/1920/1080{{ end }}');"
|
||||
>
|
||||
<div
|
||||
class="wave wave1"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave2"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave3"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave4"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div class="centerAll">
|
||||
<div class="title text-6xl font-bold text-center">
|
||||
{{if $.Site.Params.maintitle }}{{ $.Site.Params.maintitle }}{{else}}Hello, World{{end}}
|
||||
</div>
|
||||
<div class="text text-xl text-center">{{if $.Site.Params.maintext}}{{ $.Site.Params.maintext }}{{else}}Edit config.toml/params{{end}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="mainBG"
|
||||
style="background-image: url('{{ if $.Site.Params.mainbg }}{{ $.Site.Params.mainbg }}{{ else }}https://picsum.photos/1920/1080{{ end }}');"
|
||||
>
|
||||
|
||||
{{ partial "utilities/wave"}}
|
||||
|
||||
<div class="centerAll">
|
||||
<div class="title text-6xl font-bold text-center">
|
||||
{{if $.Site.Params.maintitle }}{{ $.Site.Params.maintitle }}{{else}}Hello, World{{end}}
|
||||
</div>
|
||||
|
||||
<div class="text text-xl text-center">
|
||||
{{if $.Site.Params.maintext}}{{ $.Site.Params.maintext }}{{else}}Edit config.toml/params{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{ $data := .Site.Data.home }}
|
||||
<main class="container mx-auto mt-8 px-4 xl:px-0">
|
||||
<section id="about" class="md:flex justify-around">
|
||||
<div class="my-auto md:mr-4">
|
||||
{{ partial "home_title" (dict "title" "About Me") }}
|
||||
{{ partial "home/homeTitle" (dict "title" "About Me") }}
|
||||
<div class="flex mt-3 gap-3 text-xl">
|
||||
{{ range $data.about.link }}
|
||||
<a href="{{.url}}"><i class="{{ .icon }}"></i></a>{{end}}
|
||||
|
@ -52,7 +45,7 @@
|
|||
</section>
|
||||
<section id="skills" class="mt-12">
|
||||
<div class="md:flex justify-center">
|
||||
{{ partial "home_title" (dict "title" "Skills") }}
|
||||
{{ partial "home/homeTitle" (dict "title" "Skills") }}
|
||||
</div>
|
||||
|
||||
{{if $data.skills.list}}
|
||||
|
@ -87,7 +80,7 @@
|
|||
</section>
|
||||
<section id="projects" class="mt-12">
|
||||
<div class="md:flex justify-center">
|
||||
{{ partial "home_title" (dict "title" "Projects") }}
|
||||
{{ partial "home/homeTitle" (dict "title" "Projects") }}
|
||||
</div>
|
||||
|
||||
{{if $data.skills.list}}
|
|
@ -0,0 +1,16 @@
|
|||
<div
|
||||
class="wave wave1"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave2"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave3"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
||||
<div
|
||||
class="wave wave4"
|
||||
style="background-image: url('{{ .Site.BaseURL }}/img/wave.png');"
|
||||
></div>
|
Loading…
Reference in New Issue