accomplishments.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{ $ := .root }}
  2. {{ $page := .page }}
  3. {{ $columns := $page.Params.design.columns | default "2" }}
  4. <!-- Accomplishments widget -->
  5. <div class="col-12 {{if eq $columns "2"}}col-lg-8{{end}}">
  6. {{ with $page.Content }}{{ . }}{{ end }}
  7. {{ if $page.Params.item }}
  8. {{ range $idx, $key := sort $page.Params.item ".date_start" "desc" }}
  9. <div class="card experience course">
  10. <div class="card-body">
  11. {{- $svg_icon := resources.Get (printf "media/icons/brands/%s.svg" (replace (lower .organization) " " "_")) -}}
  12. {{- if $svg_icon }}
  13. <div class="d-flex align-content-start">
  14. <div class="mr-2 mb-2">
  15. {{- with .organization_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end -}}
  16. <img src="{{ $svg_icon.RelPermalink }}" width="56px" height="56px" alt="{{.organization | plainify}}" loading="lazy">
  17. {{- with .organization_url}}</a>{{end -}}
  18. </div>
  19. <div>
  20. {{ end }}
  21. {{- with .url -}}<a href="{{.}}" target="_blank" rel="noopener">{{- end -}}
  22. <div class="section-subheading card-title exp-title text-muted my-0">{{.title | markdownify | emojify}}</div>
  23. {{- with .url -}}</a>{{- end -}}
  24. <div class="card-subtitle my-0 article-metadata">
  25. {{- with .organization_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end -}}
  26. {{- .organization | markdownify | emojify -}}
  27. {{- with .organization_url}}</a>{{end -}}
  28. <span class="middot-divider"></span>
  29. {{ (time .date_start) | time.Format ($page.Params.date_format | default "Jan 2006") }}
  30. {{ if .date_end}}
  31. – {{ (time .date_end) | time.Format ($page.Params.date_format | default "Jan 2006") }}
  32. {{end}}
  33. </div>
  34. {{- if $svg_icon}}
  35. </div>
  36. </div>
  37. {{end}}
  38. {{with .description}}
  39. <div class="card-text">{{. | markdownify | emojify}}</div>
  40. {{end}}
  41. {{ with .certificate_url }}
  42. <a class="card-link" href="{{.}}" target="_blank" rel="noopener">
  43. {{ i18n "see_certificate" | default "See certificate" }}
  44. </a>
  45. {{ end }}
  46. </div>
  47. </div>
  48. {{end}}
  49. {{end}}
  50. </div>