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
This commit is contained in:
Md. Emruz Hossain 2020-07-22 04:14:08 +06:00 committed by GitHub
parent 647578e88b
commit fa4d474974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1735 additions and 679 deletions

View file

@ -0,0 +1,5 @@
{{ if gt (len .positions) 1 }}
{{ partial "sections/experiences/multiple-positions" . }}
{{ else }}
{{ partial "sections/experiences/single-position.html" . }}
{{ end }}

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>