diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/sections/about.html | 22 | ||||
-rw-r--r-- | layouts/partials/sections/contact.html | 14 | ||||
-rw-r--r-- | layouts/partials/sections/services.html | 12 | ||||
-rw-r--r-- | layouts/partials/sections/skills.html | 14 | ||||
-rw-r--r-- | layouts/partials/title-bar.html | 26 |
5 files changed, 37 insertions, 51 deletions
diff --git a/layouts/partials/sections/about.html b/layouts/partials/sections/about.html index 5adf820..a31e905 100644 --- a/layouts/partials/sections/about.html +++ b/layouts/partials/sections/about.html @@ -1,4 +1,3 @@ -{{ "<!-- ABOUT -->" | safeHTML }} {{ $params := .Site.Params.about }} {{ with .Site.Data.about }} {{ $big_side := 8 }} @@ -33,24 +32,9 @@ --about-bkg-size: {{ . }}; {{- end -}} "> - <div class="container-fluid"> - <div class="row"> - {{ $title_length := 10 }} - {{ with $params.title_length }} - {{ $title_length = . }} - {{ end }} - {{ if eq $params.title_align "left" }} - <div class="col-md-{{ $title_length }} section-title-left"> - {{ else }} - <div class="col-md-{{ $title_length }} col-md-offset-{{ sub 12 $title_length }} section-title-right"> - {{ end }} - {{ with .title }} - <h2 class="section-heading">{{ . }}</h2> - <hr class="primary light"> - {{ end }} - </div> - </div> - </div> + {{ with .title }} + {{ partial "title-bar.html" (dict "title" . "align" $params.title_align "length" $params.title_length) }} + {{ end }} <div class="container-fluid"> <div class="row"> {{ if eq $params.layout "right" }} diff --git a/layouts/partials/sections/contact.html b/layouts/partials/sections/contact.html index 83cda9e..4411010 100644 --- a/layouts/partials/sections/contact.html +++ b/layouts/partials/sections/contact.html @@ -1,21 +1,15 @@ -{{ "<!-- CONTACT -->" | safeHTML }} +{{ $params := .Site.Params.contact }} {{ with .Site.Data.contact }} <section class="section" id="contact" {{ with .background_image }} style="background-image: url('{{ (printf "images/%s" .) | absURL }}');" {{ end }} > + {{ with .title }} + {{ partial "title-bar.html" (dict "title" . "align" $params.title_align "length" $params.title_length) }} + {{ end }} <div class="container-fluid"> <div class="row"> - <div class="col-md-4 col-md-offset-8 section-title-right"> - {{ with .title }} - <h2 class="section-heading text-tertiary">{{ . }}</h2> - <hr class="primary"> - {{ end }} - </div> - </div> - - <div class="row"> <div class="col-md-4 col-md-offset-1 text-center"> <div class="profile bg-secondary"> {{ with .photo }} diff --git a/layouts/partials/sections/services.html b/layouts/partials/sections/services.html index fcbc90e..0c2d37b 100644 --- a/layouts/partials/sections/services.html +++ b/layouts/partials/sections/services.html @@ -1,4 +1,4 @@ -{{ "<!-- SERVICES -->" | safeHTML }} +{{ $params := .Site.Params.services }} {{ with .Site.Data.services }} <section class="section" id="services" {{ with .background_image }} @@ -6,16 +6,8 @@ {{ end }} > {{ with .title }} - <div class="container-fluid"> - <div class="row"> - <div class="text-center"> - <h2 class="section-heading text-tertiary">{{ . }}</h2> - <hr class="primary"> - </div> - </div> - </div> + {{ partial "title-bar.html" (dict "title" . "align" $params.title_align "length" $params.title_length) }} {{ end }} - <div class="container services-container"> <div class="row"> {{ partial "utils/get-number-columns.html" (dict "length" (len .services) "scratch" $.Scratch) }} diff --git a/layouts/partials/sections/skills.html b/layouts/partials/sections/skills.html index a177cbf..72dc59e 100644 --- a/layouts/partials/sections/skills.html +++ b/layouts/partials/sections/skills.html @@ -1,17 +1,9 @@ -{{ "<!-- SKILLS -->" | safeHTML }} +{{ $params := .Site.Params.skills }} {{ $data := .Site.Data.skills }} <section class="section" id="skills"> {{ with $data.title }} - <div class="container-fluid"> - <div class="row"> - <div class="text-center"> - <h2 class="section-heading">{{ . }}</h2> - <hr class="primary"> - </div> - </div> - </div> + {{ partial "title-bar.html" (dict "title" . "align" $params.title_align "length" $params.title_length) }} {{ end }} - <div class="container-fluid"> <div class="row"> <div class="col-lg-6 col-lg-offset-1 text-primary"> @@ -31,7 +23,6 @@ </div> {{ end }} </div> - {{/* Tags & Categories */}} {{ $project_sections := .Site.Params.projects.categories }} <div class="row"> @@ -45,7 +36,6 @@ </div> </div> </div> - <div class="col-lg-5"> <div class="skills-container"> {{ $label := or $data.categories_label "CATEGORIES" }} diff --git a/layouts/partials/title-bar.html b/layouts/partials/title-bar.html new file mode 100644 index 0000000..bc4c574 --- /dev/null +++ b/layouts/partials/title-bar.html @@ -0,0 +1,26 @@ +{{/* + Parameters: + - length: width of title bar + - align: alignment (left|center|right) + - title: the title text +*/}} +<div class="container-fluid"> + <div class="row"> + {{ $title_length := 10 }} + {{ with .length }} + {{ $title_length = . }} + {{ end }} + {{ if eq .align "left" }} + <div class="col-md-{{ $title_length }} section-title-left"> + {{ else if eq .align "right" }} + <div class="col-md-{{ $title_length }} col-md-offset-{{ sub 12 $title_length }} section-title-right"> + {{ else }} + <div class="col-md-{{ $title_length }} col-md-offset-{{ div (sub 12 $title_length) 2 }} section-title-center"> + {{ end }} + {{ with .title }} + <h2 class="section-heading">{{ . }}</h2> + <hr class="section-hr"> + {{ end }} + </div> + </div> +</div>
\ No newline at end of file |