Remove unnecessary codes + Fix CSS

This commit is contained in:
hossainemruz 2020-07-06 23:45:19 +06:00
parent 89e8dd2068
commit b903065691
7 changed files with 89 additions and 64 deletions

View file

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

View file

@ -1,23 +1,29 @@
<div class="col-10 col-lg-8">
<div class="experience-entry-heading">
<h5>{{ if .company.url }} <a href={{.company.url}}> {{end }} {{ .company.name }}</a></a></h5>
<!-- 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}}
<h6>{{ .designation }}</h6>
<p class="text-muted">{{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }} {{ $mostRecentPosition.end }} {{ else }} Present {{ end }},
<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>
<p>{{ .company.overview | markdownify }}</p>
{{ $totalPositions:= len .positions }}
<!-- Add the positions information -->
<div class="positions">
{{ range $index,$position:= .positions }}
<h6>{{ $position.designation }}</h6>
<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>
<br>
{{ range $position.responsibilities }}
<li>{{ . | markdownify }}</li>
{{ end }}
</div>
</ul>
{{ end }}
</div>
</div>

View file

@ -1,17 +0,0 @@
<div class="col-10 col-lg-8">
<div class="experience-entry-heading">
<h5>{{ .designation }}</h5>
<h6>{{ if .company.url }} <a href={{.company.url}}> {{end }} {{ .company.name }}</a></h6>
<p class="text-muted">{{ .start }} - {{ if .end }} {{ .end }} {{ else }}Present{{ end }},
{{ .company.location }}
</p>
</div>
<p>{{ .company.overview | markdownify }}</p>
<h6 class="text-muted">Responsibilities:</h6>
<ul class="justify-content-around">
{{ range .responsibilities }}
<li>{{ . | markdownify }}</li>
{{ end }}
</ul>
</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>