experience.html 2.3 KB

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