blog.trnck.dev

Add an all post page

+72 -1
+9
_includes/all_posts.html
··· 1 + <h2 {% if site.style == 'dark' %}class="text-white"{% endif %}>Blog</h2> 2 + <p class="f4 mb-4 {% if site.style == 'dark' %}text-white{% else %}text-gray{% endif %}">All of the articles from my blog</p> 3 + <div class="d-sm-flex flex-wrap gutter-condensed mb-4"> 4 + {% for post in site.posts %} 5 + <div class="col-sm-6 col-md-12 col-lg-6 col-xl-4 mb-3"> 6 + {% include post-card.html %} 7 + </div> 8 + {% endfor %} 9 + </div>
+2 -1
_includes/thoughts.html
··· 1 1 <h2 {% if site.style == 'dark' %}class="text-white"{% endif %}>Blog</h2> 2 2 <p class="f4 mb-4 {% if site.style == 'dark' %}text-white{% else %}text-gray{% endif %}">Some articles I have written</p> 3 3 <div class="d-sm-flex flex-wrap gutter-condensed mb-4"> 4 - {% for post in site.posts limit: 12 %} 4 + {% for post in site.posts limit: 6 %} 5 5 <div class="col-sm-6 col-md-12 col-lg-6 col-xl-4 mb-3"> 6 6 {% include post-card.html %} 7 7 </div> 8 8 {% endfor %} 9 + <a class="all_art" href="/posts/" >Check out all of the articles </a> 9 10 </div>
+58
_layouts/posts.html
··· 1 + {% include header.html %} 2 + <link 3 + rel="stylesheet" 4 + href="https://unpkg.com/github-calendar@latest/dist/github-calendar-responsive.css" 5 + /> 6 + 7 + {% if site.layout == 'stacked' %} 8 + <div class="container-lg py-6 p-responsive text-center"> 9 + {% include masthead.html metadata=true %} 10 + 11 + <div {% if site.style == 'dark' %}class="text-white" {% endif %}> 12 + {{ content }} 13 + </div> 14 + 15 + 16 + 17 + {% unless posts_total == 0 %} 18 + 19 + <div class="my-6"> 20 + {% include all_posts.html %} 21 + </div> 22 + {% endunless %} 23 + </div> 24 + {% else %} 25 + <div class="d-md-flex min-height-full {% unless site.style == 'dark' %}border-md-bottom{% endunless %}"> 26 + <div 27 + class="flex-self-stretch {% if site.style == 'dark' %}bg-gray-dark{% else %}border-md-right border-gray-light bg-white{% endif %} col-md-5 col-lg-4 col-xl-3 px-4 px-md-6 px-lg-7 py-6"> 28 + {% include masthead.html metadata=true %} 29 + </div> 30 + 31 + <div class="col-md-7 col-lg-8 col-xl-9 px-4 py-6 px-lg-7 border-top border-md-top-0 bg-gray-light" 32 + {% if site.style == 'dark' %}style="background-color: #2f363d !important" {% endif %}> 33 + <div class="mx-auto" style="max-width: 900px;"> 34 + {% unless content == "" %} 35 + <div class="f4 {% if site.style == 'dark' %}text-white{% endif %} mb-6"> 36 + {{ content }} 37 + </div> 38 + {% endunless %} 39 + 40 + {% unless posts_total == 0 %} 41 + <p class="f5"><a href="/" style="color:#0366d6;text-decoration: none;" class="d-flex flex-items-center">{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:#0366d6 aria-label:Home %}Home</a></p> 42 + 43 + {% include all_posts.html %} 44 + {% endunless %} 45 + 46 + 47 + 48 + 49 + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> 50 + 51 + 52 + </div> 53 + </div> 54 + </div> 55 + 56 + {% endif %} 57 + 58 + {% include footer.html %}
+3
posts.html
··· 1 + --- 2 + layout: posts 3 + ---