You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

portfolio.html 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{ $data := index site.Data site.Language.Lang }}
  2. {{ if $data.portfolio.portfolio.enable }}
  3. {{ with $data.portfolio.portfolio }}
  4. {{"<!-- Portfolio Section -->" | safeHTML}}
  5. <section class="portfolio section" id="portfolio">
  6. <div class="container">
  7. <div class="row ">
  8. <div class="col-xl-12">
  9. {{"<!-- section title -->" | safeHTML}}
  10. <div class="title text-center">
  11. <h2>{{ with .title }} {{ index (split . " ") 0 | safeHTML }} {{ end }}<span class="color">
  12. {{ with .title }} {{ after (len (index (split . " ") 0)) . | safeHTML }} {{ end }}</span></h2>
  13. <div class="border-meghna"></div>
  14. </div>
  15. {{"<!-- /section title -->" | safeHTML}}
  16. </div>
  17. </div>
  18. <div class="row">
  19. <div class="col-lg-12">
  20. <div class="btn-group portfolio-filter btn-group-toggle justify-content-center d-flex flex-wrap"
  21. data-toggle="buttons">
  22. <label class="btn active">
  23. <input type="radio" name="shuffle-filter" value="all" checked="checked" />{{ i18n "all"}}
  24. </label>
  25. {{ $categories := slice }}
  26. {{ range .portfolio_item }}
  27. {{ range .categories }}
  28. {{ $categories = $categories | append . }}
  29. {{ end }}
  30. {{ end }}
  31. {{ range ( $categories | uniq ) }}
  32. <label class="btn">
  33. <input type="radio" name="shuffle-filter" value="{{ . | urlize }}" />{{ . | humanize }}
  34. </label>
  35. {{ end }}
  36. </div>
  37. </div>
  38. </div>
  39. <div class="row shuffle-wrapper justify-content-center">
  40. {{"<!-- portfolio item -->" | safeHTML}}
  41. {{ range .portfolio_item }}
  42. <div class="col-lg-4 col-md-6 shuffle-item"
  43. data-groups="[{{range $index, $element:= .categories }}{{if ne $index 0}},{{end}}&quot;{{. | urlize}}&quot;{{ end }}]">
  44. <div class="portfolio-block mb-4">
  45. <img class="img-fluid" src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}">
  46. <div class="caption">
  47. <a class="search-icon image-popup" data-effect="mfp-with-zoom" href="{{ .image | relURL }}"
  48. data-lightbox="image-1">
  49. <i class="ti-search"></i>
  50. </a>
  51. <h4 class="mt-3">
  52. {{ if or (eq .link "#") (eq .link "") }}
  53. {{ .name }}
  54. {{ else }}
  55. <a href="{{ .link | safeURL }}">{{ .name }}</a>
  56. {{ end }}
  57. </h4>
  58. <p>{{ .content | markdownify }}</p>
  59. </div>
  60. </div>
  61. </div>
  62. {{ end }}
  63. </div>
  64. </div>
  65. </section>
  66. {{"<!-- /Portfolio -->" | safeHTML}}
  67. {{ end }}
  68. {{ end }}