wip: make theme workable with hugoBasicExample site
This commit is contained in:
parent
07e816219f
commit
e7b2fba1b0
24 changed files with 343 additions and 34 deletions
|
@ -3,7 +3,7 @@
|
|||
<div class="row pt-sm-2 pt-md-4 align-self-center">
|
||||
<!-- summery -->
|
||||
<div class="col-md-6">
|
||||
<h3 class="p-1">{{ .Site.Data.about.name }}</h3>
|
||||
<h3 class="p-1">{{ .Site.Data.home.author.name }}</h3>
|
||||
<h5 class="p-1">
|
||||
{{ .Site.Data.about.designation }} at
|
||||
<a href="{{ .Site.Data.about.company.url }}"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="filtr-item" data-category='{{ delimit .Params.categories ","}}'>
|
||||
<div class="filtr-item" data-category='{{ partial "helpers/get-categories.html" .Params }}'>
|
||||
<div class="card">
|
||||
<div class="card-head">
|
||||
<img class="card-img-top" src="{{ .Params.hero }}" alt="Card image cap" />
|
||||
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" .Params }}'/>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ .Title }}</h5>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="col-lg-4 col-md-6 pt-2">
|
||||
<div class="card">
|
||||
<div class="card-head">
|
||||
<img class="card-img-top" src="{{ .Params.hero }}"
|
||||
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" .Params }}'
|
||||
alt="Card image cap"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
<div class="container-fluid experiences bg-white anchor" id="experiences">
|
||||
<h1 class="text-center">Experiences</h1>
|
||||
<div class="container timeline text-justify">
|
||||
{{ $total:= len .Site.Data.experiences.experiences }}
|
||||
{{ range $idx,$val:= .Site.Data.experiences.experiences }}
|
||||
{{ if eq (mod $idx 2) 0 }}
|
||||
<div class="row align-items-center d-flex">
|
||||
{{ partial "experiences/left-v-line.html" $idx }}
|
||||
{{ partial "experiences/experience-info.html" $val }}
|
||||
</div>
|
||||
{{ if lt $idx (sub $total 1) }}
|
||||
{{ partial "experiences/left-to-right-h-line.html" $idx }}
|
||||
{{ end }}
|
||||
{{else}}
|
||||
<div class="row align-items-center justify-content-end d-flex">
|
||||
{{ partial "experiences/experience-info.html" $val }}
|
||||
{{ partial "experiences/right-v-line.html" $idx }}
|
||||
</div>
|
||||
{{ if lt $idx (sub $total 1) }}
|
||||
{{ partial "experiences/right-to-left-h-line.html" $idx }}
|
||||
{{ if .Site.Data }}
|
||||
{{ $total:= len .Site.Data.experiences.experiences }}
|
||||
{{ range $idx,$val:= .Site.Data.experiences.experiences }}
|
||||
{{ if eq (mod $idx 2) 0 }}
|
||||
<div class="row align-items-center d-flex">
|
||||
{{ partial "experiences/left-v-line.html" $idx }}
|
||||
{{ partial "experiences/experience-info.html" $val }}
|
||||
</div>
|
||||
{{ if lt $idx (sub $total 1) }}
|
||||
{{ partial "experiences/left-to-right-h-line.html" $idx }}
|
||||
{{ end }}
|
||||
{{else}}
|
||||
<div class="row align-items-center justify-content-end d-flex">
|
||||
{{ partial "experiences/experience-info.html" $val }}
|
||||
{{ partial "experiences/right-v-line.html" $idx }}
|
||||
</div>
|
||||
{{ if lt $idx (sub $total 1) }}
|
||||
{{ partial "experiences/right-to-left-h-line.html" $idx }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
5
layouts/partials/helpers/get-author-image.html
Normal file
5
layouts/partials/helpers/get-author-image.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $authorImage:= "/assets/images/default-avatar.svg"}}
|
||||
{{ if isset .author "image" }}
|
||||
{{ $authorImage = .author.image }}
|
||||
{{ end }}
|
||||
{{ return $authorImage }}
|
5
layouts/partials/helpers/get-author-name.html
Normal file
5
layouts/partials/helpers/get-author-name.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $authorName:= "John Doe"}}
|
||||
{{ if isset .author "name" }}
|
||||
{{ $authorName = .author.name }}
|
||||
{{ end }}
|
||||
{{ return $authorName }}
|
5
layouts/partials/helpers/get-categories.html
Normal file
5
layouts/partials/helpers/get-categories.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $categories:= ""}}
|
||||
{{ if .categories }}
|
||||
{{ $categories = delimit .categories "," }}
|
||||
{{ end }}
|
||||
{{ return $categories }}
|
5
layouts/partials/helpers/get-hero.html
Normal file
5
layouts/partials/helpers/get-hero.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $heroImage:= "/assets/images/default-hero.jpg"}}
|
||||
{{ if .hero }}
|
||||
{{ $heroImage = .hero }}
|
||||
{{ end }}
|
||||
{{ return $heroImage }}
|
5
layouts/partials/helpers/get-profile-image.html
Normal file
5
layouts/partials/helpers/get-profile-image.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $profileImage:= "/assets/images/default-avatar.svg"}}
|
||||
{{ if .Site.Data.home.image }}
|
||||
{{ $profileImage = .Site.Data.home.image }}
|
||||
{{ end }}
|
||||
{{ return $profileImage }}
|
|
@ -1,21 +1,20 @@
|
|||
<div class="container-fluid home" id="home">
|
||||
<div
|
||||
class="background container-fluid"
|
||||
style="background-image: url('assets/images/background/flower.jpg');"
|
||||
style="background-image: url('{{ .Site.Data.home.background }}');"
|
||||
></div>
|
||||
<div class="container content text-center">
|
||||
<img
|
||||
src="assets/images/profile-image.jpg"
|
||||
src="{{ .Site.Data.home.author.image }}"
|
||||
class="rounded-circle mx-auto d-block img-fluid"
|
||||
alt=""
|
||||
/>
|
||||
<h1 class="greeting">{{- .Site.Data.home.greeting -}}</h1>
|
||||
<h1 class="greeting">Hi, I am {{ .Site.Data.home.author.name -}}</h1>
|
||||
<div class="typing-carousel">
|
||||
<span id="ityped" class="ityped"></span>
|
||||
<span class="ityped-cursor"></span>
|
||||
</div>
|
||||
<ul id="typing-carousel-data">
|
||||
{{ range .Site.Data.home.typeWriter }}
|
||||
{{ range .Site.Data.home.author.summary }}
|
||||
<li>{{ . }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
{{ else }}
|
||||
{{ partial "cards/post.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue