diff options
author | Md. Emruz Hossain <hossainemruz@gmail.com> | 2020-07-22 01:14:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 01:14:08 +0300 |
commit | fa4d47497403491cff184d226a5b2a07ad5dc081 (patch) | |
tree | 9dd7afb7c54f83533361282e4ecd011d59cbecf2 /layouts/partials/sections/experiences | |
parent | 647578e88be55c5cbb2eda157e17242f56ee5630 (diff) |
Refactor sidebar logic + Add Table of Contents in reading page (#33)
* Refactor sidebar logic + fix responsiveness
* Add TOC
* Add Pagination
* Update exampleSite
* Update README.md
Diffstat (limited to 'layouts/partials/sections/experiences')
5 files changed, 69 insertions, 0 deletions
diff --git a/layouts/partials/sections/experiences/experience-info.html b/layouts/partials/sections/experiences/experience-info.html new file mode 100644 index 0000000..d49932c --- /dev/null +++ b/layouts/partials/sections/experiences/experience-info.html @@ -0,0 +1,5 @@ +{{ if gt (len .positions) 1 }} + {{ partial "sections/experiences/multiple-positions" . }} +{{ else }} + {{ partial "sections/experiences/single-position.html" . }} +{{ end }} diff --git a/layouts/partials/sections/experiences/horizontal-line.html b/layouts/partials/sections/experiences/horizontal-line.html new file mode 100644 index 0000000..95f13ae --- /dev/null +++ b/layouts/partials/sections/experiences/horizontal-line.html @@ -0,0 +1,11 @@ +<div class="row horizontal-line"> + <div class="col-1 col-lg-2 timeline-side-div"> + <div class="corner"></div> + </div> + <div class="col-10 col-lg-8"> + <hr /> + </div> + <div class="col-1 col-lg-2 timeline-side-div"> + <div class="corner"></div> + </div> +</div> diff --git a/layouts/partials/sections/experiences/multiple-positions.html b/layouts/partials/sections/experiences/multiple-positions.html new file mode 100644 index 0000000..aae5f3d --- /dev/null +++ b/layouts/partials/sections/experiences/multiple-positions.html @@ -0,0 +1,29 @@ +<div class="col-10 col-lg-8"> + <div class="experience-entry-heading"> + <!-- For multiple positions, give emphasis on the company name--> + <h5>{{ if .company.url }}<a href={{.company.url}}>{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h5> + + <!-- Total experience duration on a company is time between the starting date of the oldest position and ending date of most recent position --> + {{ $oldestPosition := index (last 1 .positions) 0}} + {{ $mostRecentPosition := index (first 1 .positions) 0}} + <p class="text-muted"> + {{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }}{{ $mostRecentPosition.end }}{{ else }}Present{{ end }}, + {{ .company.location }} + </p> + <!-- Add company overview --> + <p>{{ .company.overview | markdownify }}</p> + </div> + <!-- Add the positions information --> + <div class="positions"> + {{ range $index,$position:= .positions }} + <h6 class="designation">{{ $position.designation }}</h6> + <p class="text-muted">{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} Present {{end}}</p> + <!-- Add the responsibilities handled at this position --> + <ul class="justify-content-around"> + {{ range $position.responsibilities }} + <li>{{ . | markdownify }}</li> + {{ end }} + </ul> + {{ end }} + </div> +</div> diff --git a/layouts/partials/sections/experiences/single-position.html b/layouts/partials/sections/experiences/single-position.html new file mode 100644 index 0000000..dda35ef --- /dev/null +++ b/layouts/partials/sections/experiences/single-position.html @@ -0,0 +1,21 @@ +<div class="col-10 col-lg-8"> + <div class="experience-entry-heading"> + {{ $position:= index .positions 0 }} + <!-- For single position, give emphasis on the designation--> + <h5>{{ $position.designation }}</h5> + <h6>{{ if .company.url }}<a href={{.company.url}}>{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h6> + <!-- Add experience duration info --> + <p class="text-muted">{{ $position.start }} - {{ if $position.end }}{{ $position.end }}{{ else }}Present{{ end }}, + {{ .company.location }} + </p> + </div> + <!-- Add company overview --> + <p>{{ .company.overview | markdownify }}</p> + <!-- Add the responsibilities handled at this position --> + <h6 class="text-muted">Responsibilities:</h6> + <ul class="justify-content-around"> + {{ range $position.responsibilities }} + <li>{{ . | markdownify }}</li> + {{ end }} + </ul> +</div> diff --git a/layouts/partials/sections/experiences/vertical-line.html b/layouts/partials/sections/experiences/vertical-line.html new file mode 100644 index 0000000..7d8b74b --- /dev/null +++ b/layouts/partials/sections/experiences/vertical-line.html @@ -0,0 +1,3 @@ +<div class="col-1 col-lg-2 text-center vertical-line d-inline-flex justify-content-center"> + <div class="circle font-weight-bold">{{ add . 1 }}</div> +</div> |