Skip to content

Commit 538996c

Browse files
author
Brandon Green
committed
vertical blog layout
1 parent fcbbdbf commit 538996c

File tree

3 files changed

+33
-34
lines changed

3 files changed

+33
-34
lines changed

‎_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ collections:
6767

6868
pagination:
6969
enabled: true
70-
per_page: 3
70+
per_page: 8
7171
permalink: '/:num/'
7272
title: ':title | :num of :max'
7373
limit: 0

‎_layouts/blog.html

+14-33
Original file line numberDiff line numberDiff line change
@@ -32,41 +32,22 @@ <h1 class="blog-index-title">
3232
<div class="main-content-wrapper">
3333
<div class="main-content">
3434
<div class="container">
35-
<!-- Temporarily hidden sub menu until there are more blog posts and categories -->
36-
<!-- <nav class="navbar navbar-expand-lg navbar-light main-content-menu">
37-
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#blogPostFilter" aria-controls="navbarNavDropdown"
38-
aria-expanded="false" aria-label="Toggle navigation">
39-
<span class="navbar-toggler-icon"></span>
40-
</button>
35+
<div class="row blog-vertical">
4136

42-
<div class="collapse navbar-collapse" id="blogPostFilter">
43-
<ul class="navbar-nav">
44-
<li class="nav-item">
45-
<a class="nav-link {% if current_page[3] == null %} selected {% endif %}" data-category="all" href="{{ site.baseurl }}/blog">All</a>
46-
</li>
47-
{% for category in display_post_categories %}
48-
<li class="nav-item">
49-
<a class="nav-link {% if current_page[3] == post_categories[forloop.index0] %} selected {% endif %}" data-category="{{ category | slugify }}" href="{{ site.baseurl }}/blog/categories/{{ category | slugify }}">{{ category }}</a>
50-
</li>
51-
{% endfor %}
52-
<li class="nav-item">
53-
<a class="nav-link">Search</a>
54-
</li>
55-
</ul>
56-
</div>
57-
</nav> -->
58-
<!-- End submenu -->
59-
60-
<div class="row blog-index">
6137
{% for post in posts %}
62-
<div class="col-md-4">
63-
<p class="blog-date">{{ post.date | date: '%B %d, %Y' }}</p>
64-
<h4>
65-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
66-
</h4>
67-
<p>{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 500}}</p>
68-
<img src="{{ post.image }}" class="img-fluid">
69-
</div>
38+
<div class="vertical-blog-container">
39+
<div class="col-md-4">
40+
<p class="blog-date">{{ post.date | date: '%B %d, %Y' }}</p>
41+
<h4>
42+
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
43+
</h4>
44+
<p>{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 500}}</p>
45+
<img src="{{ post.image }}" class="img-fluid">
46+
</div>
47+
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-lg with-right-arrow">
48+
Read More
49+
</a>
50+
</div>
7051
{% endfor %}
7152
</div>
7253

‎_sass/blog.scss

+18
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,24 @@
7777
color: $dark_grey;
7878
}
7979
}
80+
.row.blog-vertical {
81+
display: block;
82+
max-width: 100%;
83+
margin: auto;
84+
.col-md-4 {
85+
display: initial;
86+
}
87+
.btn {
88+
float: left;
89+
}
90+
}
91+
.vertical-blog-container {
92+
border-bottom: 1px solid #E2E2E2;
93+
padding-bottom: 3rem;
94+
&:last-of-type {
95+
margin-bottom: 2rem;
96+
}
97+
}
8098
@include desktop {
8199
margin-top: 380px + $desktop_header_height;
82100
.row.blog-index

0 commit comments

Comments
 (0)