home.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. ---
  2. layout: default
  3. ---
  4. {% include masthead/masthead-home.html %}
  5. <section class="py-5 bg-light">
  6. <div class="mb-5 sb-nav-tabs-wrapper">
  7. <div class="container">
  8. <ul class="nav nav-tabs sb-nav-tabs border-0" id="myTab" role="tablist">
  9. <li class="nav-item">
  10. <a class="nav-link nav-link-theme active" id="theme-tab" data-toggle="tab" href="#theme" role="tab" aria-controls="home" aria-selected="true">Popular Themes</a>
  11. </li>
  12. <li class="nav-item">
  13. <a class="nav-link nav-link-template" id="template-tab" data-toggle="tab" href="#template" role="tab" aria-controls="profile" aria-selected="false">Popular Templates</a>
  14. </li>
  15. <li class="nav-item">
  16. <a class="nav-link nav-link-snippet" id="snippet-tab" data-toggle="tab" href="#snippet" role="tab" aria-controls="contact" aria-selected="false">Popular Snippets</a>
  17. </li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div class="container">
  22. <div class="row">
  23. <div class="col-lg-8">
  24. <div class="tab-content mb-5 mb-lg-0" id="myTabContent">
  25. <div class="tab-pane fade show active" id="theme" role="tabpanel" aria-labelledby="theme-tab">
  26. <div class="row">
  27. {% assign themes_sorted = site.themes | sort: 'rank' %}
  28. {% for theme in themes_sorted limit: 8 %}
  29. <div class="col-md-6">
  30. <div class="item-preview mb-5">
  31. {% if theme.update %}
  32. <span class="badge badge-info position-absolute badge-pill" style="right: -.5rem; top: -.5rem; z-index: 999;">Updated!</span>
  33. {% endif %}
  34. <a class="item-preview-img box-shadow-lg d-block mb-3" href="{{ theme.src }}">
  35. <img class="lazy img-fluid" data-src="{{ theme.img-thumbnail }}" alt="{{ theme.img-desc }}">
  36. </a>
  37. <div class="item-preview-title d-flex align-items-center">
  38. {{ theme.title }}
  39. {% if theme.pro %}
  40. <span class='badge badge-warning ml-auto small badge-pill'>Pro</span>
  41. {% else %}
  42. <span class='badge badge-success ml-auto small badge-pill'>Free</span>
  43. {% endif %}
  44. </div>
  45. <div class="item-preview-description">{{ theme.bump }}</div>
  46. </div>
  47. </div>
  48. {% endfor %}
  49. <div class="col-12 text-center">
  50. <a href="/themes/" class="btn btn-xl btn-theme shadow">Browse All Themes</a>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="tab-pane fade" id="template" role="tabpanel" aria-labelledby="template-tab">
  55. <div class="row">
  56. {% assign templates_sorted = site.templates | sort: 'rank' %}
  57. {% for template in templates_sorted limit: 8 %}
  58. <div class="col-md-6">
  59. <div class="item-preview mb-5">
  60. <a class="item-preview-img box-shadow-lg d-block mb-3" href="{{ template.src }}">
  61. <img class="lazy img-fluid" data-src="{{ template.img-thumbnail }}" alt="{{ template.img-desc }}">
  62. </a>
  63. <div class="item-preview-title d-flex align-items-center">
  64. {{ template.title }}
  65. {% if template.pro %}
  66. <span class='badge badge-warning ml-auto small badge-pill'>Pro</span>
  67. {% else %}
  68. <span class='badge badge-success ml-auto small badge-pill'>Free</span>
  69. {% endif %}
  70. </div>
  71. <div class="item-preview-description">{{ template.bump }}</div>
  72. </div>
  73. </div>
  74. {% endfor %}
  75. <div class="col text-center">
  76. <a href="/templates/" class="btn btn-xl btn-template shadow">Browse All Templates</a>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="tab-pane fade" id="snippet" role="tabpanel" aria-labelledby="snippet-tab">
  81. <div class="row">
  82. {% assign snippets_sorted = site.snippets | sort: 'rank' %}
  83. {% for snippet in snippets_sorted limit: 9 %}
  84. <div class="col-md-4">
  85. <div class="item-preview mb-5">
  86. <a class="item-preview-img box-shadow-lg d-block mb-3" href="{{ snippet.src }}">
  87. <img class="lazy img-fluid" data-src="{{ snippet.img-thumbnail }}" alt="{{ snippet.img-desc }}">
  88. </a>
  89. <div class="item-preview-title">{{ snippet.title }}</div>
  90. <div class="item-preview-description">{{ snippet.bump }}</div>
  91. </div>
  92. </div>
  93. {% endfor %}
  94. <div class="col text-center">
  95. <a href="/snippets/" class="btn btn-xl btn-snippet text-white shadow">Browse All Snippets</a>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="col-lg-4">
  102. <div class="carbon-inverse mb-4">
  103. {% include carbon.html %}
  104. </div>
  105. <div class="card border-0 shadow mb-4">
  106. <div class="card-header border-0 bg-success text-white py-3">
  107. <span class="font-weight-bold small"><i class="far fa-books"></i> Latest Guides &amp; Tutorials</span>
  108. </div>
  109. <div class="list-group list-group-flush">
  110. {% assign guides_sorted = site.guides | sort: 'date' | reverse %}
  111. {% for guide in guides_sorted limit: 4 %}
  112. {% assign timeframe = 1209600 %}
  113. {% assign post_in_seconds = guide.date | date: "%s" | plus: 0 %}
  114. {% assign recent_posts = "now" | date: "%s" | minus: timeframe %}
  115. <a href="{{ guide.src }}" class="list-group-item list-group-item-action py-3">
  116. <div class="mb-1">
  117. {% if post_in_seconds > recent_posts %}
  118. <span class="badge badge-pill badge-warning">New!</span>
  119. {% endif %}
  120. {% if guide.categories contains 'beginner' %}
  121. <span class="badge badge-pill badge-guide">Beginner Friendly</span>
  122. {% endif %}
  123. {% if guide.categories contains 'design' %}
  124. <span class="badge badge-pill badge-theme">Design</span>
  125. {% endif %}
  126. {% if guide.categories contains 'development' %}
  127. <span class="badge badge-pill badge-template">Development &amp; Code</span>
  128. {% endif %}
  129. </div>
  130. <div class="font-weight-bold mb-1">{{ guide.title }}</div>
  131. <div class="small mb-2">{{ guide.description }}</div>
  132. <div class="small text-muted">{{ guide.date | date: "%b %-d, %Y" }}</div>
  133. </a>
  134. {% endfor %}
  135. </div>
  136. </div>
  137. <div class="text-center mb-4">
  138. <a href="/guides" class="btn btn-guide btn-xl shadow">Browse All Guides</a>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </section>
  144. {{ content }}