Skip to content

Commit 50c1d12

Browse files
committed
lightweight blog list in member bios
1 parent e21ac8d commit 50c1d12

3 files changed

Lines changed: 52 additions & 26 deletions

File tree

_includes/team-blog.html

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
<!-- Blog section-->
2-
{% assign n = site.categories[{{page.id}}] | size %}
3-
{% if n != 0 %}
4-
<section class="section news">
5-
<div class='section-title'>
6-
<h2 class='header text-xl'>Blog</h2>
7-
<h2 class='header-shadow'>Blog</h2>
8-
</div>
9-
<ul>
10-
{% for post in site.categories[{{page.id}}] %}
11-
<li class='news-list-item'>
12-
<span class='text-s news-date'>{{ post.date | date: "%m/%d/%Y"}}</span>
13-
<a class='text-l news-title link' href="{{site.baseurl}}{{ post.url }}">{{ post.title }}</a>
14-
</li class='news-list-item'>
15-
{% endfor %}
1+
<!-- Blog posts authored by the current team member -->
2+
{% assign author_posts = site.categories[page.id] %}
3+
{% if author_posts and author_posts.size > 0 %}
4+
<div class="member-posts">
5+
<p class="text-xxs member-posts-heading">Blog posts</p>
6+
<ul class="member-posts-list">
7+
{% for post in author_posts %}
8+
<li class="member-posts-item">
9+
<a class="member-posts-link" href="{{ site.baseurl }}{{ post.url }}">
10+
<strong class="member-posts-date">{{ post.date | date: "%m/%d/%Y" }}</strong>
11+
{{ post.title }}
12+
</a>
13+
</li>
14+
{% endfor %}
1615
</ul>
17-
</section>
16+
</div>
1817
{% endif %}

_layouts/team.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ <h3 class='text-m name'>{{ page.member-name }}</h3>
2424
<!-- member bio-->
2525
<div class='text-xxs generated-content'>{{ content }}</div>
2626

27+
{% include team-blog.html %}
28+
2729
<a class='text-xxs all' href="{{ site.baseurl }}/#team">View Full Team...</a>
2830
</div>
2931
</div>
3032
</section>
3133

32-
{% include team-blog.html %}
33-
3434
</div>

_sass/pages/team.scss

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,47 @@
115115
}
116116
}
117117

118-
.news {
119-
background: $color--gray;
120-
padding: 65px $spacing--l 40px;
118+
.member-posts {
119+
margin-top: 32px;
121120

122121
@include breakpoint($desktop-small) {
123-
padding: 150px 100px 95px;
122+
margin-top: 40px;
124123
}
124+
}
125125

126-
@include breakpoint($desktop-large) {
127-
padding: 170px 245px 115px;
126+
.member-posts-heading {
127+
margin-bottom: 12px;
128+
font-weight: 600;
129+
}
130+
131+
.member-posts-list {
132+
margin: 0;
133+
padding-left: 18px;
134+
list-style: disc;
135+
}
136+
137+
.member-posts-item {
138+
margin-bottom: 8px;
139+
line-height: 1.4;
140+
}
141+
142+
.member-posts-link {
143+
color: inherit;
144+
text-decoration: none;
145+
146+
&:hover,
147+
&:focus {
148+
text-decoration: underline;
128149
}
150+
}
151+
152+
.member-posts-date {
153+
font-weight: 600;
154+
white-space: nowrap;
155+
display: inline;
129156

130-
.header-shadow {
131-
color: $color--slate;
157+
&::after {
158+
content: "\00a0";
132159
}
133160
}
134161
}

0 commit comments

Comments
 (0)