Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions layouts/blog-index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,30 @@

<main>
<div class="container">

<ul>
{{#each collections.blog}}
{{#if title}}
<li>
<a href="/{{../../site.locale}}/{{ path }}">{{ title }}</a>
</li>
{{/if}}
{{/each}}
</ul>

<article>
{{#with collections.blog.[0]}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will display the entire first blog post …

<h3 class="blog-title"><a href="/{{../site.locale}}/{{path}}">{{title}}</a></h3>
<div class="blog-blurb">
{{{ contents }}}
</div>
<p class="blog-ellipses">...</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use … (&hellip;).

<a href="/{{../site.locale}}/{{path}}">Read the full post</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… so we don't really need the link here (you have already read the full post). And it also appears in the list below.
It's a nice start, but I think this can become problematic when having rather long posts (e.g. the weekly updates).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this was just posting a blurb of the most recent post. I added the blurb because the entries were long. I can change it to be the full post in, or leave the blurb.

{{/with}}
</article>

<article>
<h5 class="header-label">Previous Posts</h5>
<ul class="blog-list">
{{#each collections.blog}}
{{#if title}}
<li class="blog-list-item">
<a href="/{{../../site.locale}}/{{path}}">{{title}}</a><br />
</li>
{{/if}}
{{/each}}
</ul>
</article>

</div>
</main>
Expand Down
1 change: 1 addition & 0 deletions layouts/css/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ small
@import 'layout/_grid'
@import 'layout/_main'
@import 'layout/_lists'
@import 'page-modules/_blog'
@import 'page-modules/_linuxfoundation'
@import 'page-modules/_header'
@import 'page-modules/_footer'
Expand Down
5 changes: 1 addition & 4 deletions layouts/css/layout/_sticky-footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ body
margin 0

main
flex 1

footer
padding 0 20px
flex 1
22 changes: 22 additions & 0 deletions layouts/css/page-modules/_blog.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ul.blog-list
list-style-type none
padding 0
margin 0

.blog-list-item
margin-bottom 10px
font-size .9em

> time
font-size .8 em

.blog-title
margin-bottom 5px

.blog-blurb
font-size .8em
max-height 300px
overflow hidden

.blog-ellipses
font-weight bold
2 changes: 1 addition & 1 deletion layouts/css/page-modules/_linuxfoundation.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.linuxfoundation-footer
width 100%
padding-bottom 1em
padding 1em
font-size 14px
color #fff
background #404042
Expand Down