experience.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {{ $ := .root }}
  2. {{ $page := .page }}
  3. {{ $columns := $page.Params.design.columns | default "2" }}
  4. <!-- Experience widget -->
  5. <div class="col-12 {{if eq $columns "2"}}col-lg-8{{end}}">
  6. {{ with $page.Content }}{{ . }}{{ end }}
  7. {{ if $page.Params.experience }}
  8. {{ $exp_len := len $page.Params.experience }}
  9. {{ range $idx, $key := sort $page.Params.experience ".date_start" "desc" }}
  10. <div class="row experience">
  11. <!-- Timeline -->
  12. <div class="col-auto text-center flex-column d-none d-sm-flex">
  13. <div class="row h-50">
  14. <div class="col {{if gt $idx 0}}border-right{{end}}">&nbsp;</div>
  15. <div class="col">&nbsp;</div>
  16. </div>
  17. <div class="m-2">
  18. <span class="badge badge-pill border {{if not .date_end}}exp-fill{{end}}">&nbsp;</span>
  19. </div>
  20. <div class="row h-50">
  21. <div class="col {{if lt $idx (sub $exp_len 1)}}border-right{{end}}">&nbsp;</div>
  22. <div class="col">&nbsp;</div>
  23. </div>
  24. </div>
  25. <!-- Content -->
  26. <div class="col py-2">
  27. <div class="card">
  28. <div class="card-body">
  29. <h4 class="card-title exp-title text-muted mt-0 mb-1">{{.title | markdownify | emojify}}</h4>
  30. <h4 class="card-title exp-company text-muted my-0">
  31. {{- with .company_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end}}{{.company | markdownify | emojify}}{{with .company_url}}</a>{{end -}}
  32. </h4>
  33. <div class="text-muted exp-meta">
  34. {{ (time .date_start).Format ($page.Params.date_format | default "January 2006") }} –
  35. {{ if .date_end}}
  36. {{ (time .date_end).Format ($page.Params.date_format | default "January 2006") }}
  37. {{else}}
  38. {{ i18n "present" | default "Present" }}
  39. {{end}}
  40. {{with .location}}
  41. <span class="middot-divider"></span>
  42. <span>{{.}}</span>
  43. {{end}}
  44. </div>
  45. {{with .description}}<div class="card-text">{{. | markdownify | emojify}}</div>{{end}}
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. {{end}}
  51. {{end}}
  52. </div>