experiences.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. {{ $sectionID := replace (lower .section.name) " " "-" }}
  2. {{ if .section.id }}
  3. {{ $sectionID = .section.id }}
  4. {{ end }}
  5. <div class="container-fluid anchor pb-5 experiences-section">
  6. {{ if not (.section.hideTitle) }}
  7. <h1 class="text-center">
  8. <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
  9. {{ else }}
  10. <h1 class="text-center" style="display: none">
  11. <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
  12. {{ end }}
  13. <div class="container timeline text-justify">
  14. {{ $totalExperiences:= len .experiences }}
  15. {{ range $index,$experience:= .experiences }}
  16. {{ if eq (mod $index 2) 0 }}
  17. <div class="row align-items-center d-flex">
  18. {{ partial "sections/experiences/vertical-line.html" $index }}
  19. {{ partial "sections/experiences/positions.html" $experience }}
  20. </div>
  21. {{else}}
  22. <div class="row align-items-center justify-content-end d-flex">
  23. {{ partial "sections/experiences/positions.html" $experience }}
  24. {{ partial "sections/experiences/vertical-line.html" $index }}
  25. </div>
  26. {{ end }}
  27. {{ if lt $index (sub $totalExperiences 1) }}
  28. {{ partial "sections/experiences/horizontal-line.html" $index }}
  29. {{ end }}
  30. {{ end }}
  31. </div>
  32. </div>