-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 style: redesign post listing and other minor changes
- Loading branch information
Showing
10 changed files
with
183 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
.bloglist-container { | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
} | ||
|
||
.bloglist-row { | ||
background-color: var(--navbar-color); | ||
display: flex; | ||
align-items: flex-start; | ||
padding: 2.5rem 0; | ||
|
||
.date { | ||
font-size: 0.85rem; | ||
font-weight: 300; | ||
color: var(--meta-color); | ||
width: 14.5rem; | ||
} | ||
|
||
.bloglist-tags { | ||
margin-top: -0.5rem; | ||
|
||
.tag { | ||
margin-right: 0.7rem; | ||
font-size: 0.7rem; | ||
font-weight: 400; | ||
text-transform: uppercase; | ||
} | ||
} | ||
|
||
.bloglist-content { | ||
flex: 1; | ||
|
||
|
||
.bloglist-title { | ||
font-size: 1.2em; | ||
font-weight: bold; | ||
|
||
a { | ||
color: var(--text-color-high-contrast); | ||
font-weight: 550; | ||
|
||
&:hover { | ||
color: var(--hover-color); | ||
} | ||
} | ||
} | ||
|
||
.description { | ||
margin: 0.5rem 0 1rem; | ||
color: var(--text-color); | ||
font-family: var(--sans-serif-font); | ||
font-size: 0.9rem; | ||
font-weight: 250; | ||
line-height: 1.5rem; | ||
} | ||
} | ||
} | ||
|
||
.all-posts { | ||
font-size: 1.3rem; | ||
font-weight: 350; | ||
} | ||
|
||
@media only screen and (max-width: 1100px) { | ||
.bloglist-row { | ||
flex-direction: column; | ||
align-items: flex-start; | ||
padding: 2rem 0; | ||
} | ||
|
||
.date { | ||
margin-bottom: 0; | ||
width: 100%; | ||
} | ||
|
||
.bloglist-content { | ||
width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,55 @@ | ||
{% macro list_posts(pages) %} | ||
<div class="bloglist-container"> | ||
{% for page in pages %} | ||
<section class="bloglist-table-row"> | ||
<div class="bloglist-title"> | ||
<a href="{{ page.permalink }}">{{ page.title }}</a> | ||
</div> | ||
{% macro list_posts(posts, max) %} | ||
|
||
<div class="card-meta"> | ||
{% if page.date %} | ||
{{ macros_format_date::format_date(date=page.date) }} | ||
<div class="bloglist-container"> | ||
{% for post in posts %} | ||
{% if loop.index <= max %} | ||
{% if loop.index == max %} | ||
<section class="bloglist-row"> | ||
{% elif loop.last %} | ||
<section class="bloglist-row"> | ||
{% else %} | ||
<section class="bloglist-row bottom-divider"> | ||
{% endif %} | ||
|
||
<br/> | ||
<span>{{ page.reading_time }} min read</span> | ||
{% if page.draft %} | ||
<span class="draft-label">DRAFT</span> | ||
{% if post.date %} | ||
<div class="date"> | ||
{{ macros_format_date::format_date(date=post.date) }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<br/> | ||
<div class="description"> | ||
{% if page.description %} | ||
{{ page.description }} | ||
{% elif page.summary %} | ||
{{ page.summary | safe }}… | ||
{% else %} | ||
{% set hide_read_more = true %} | ||
{% endif %} | ||
</div> | ||
<div class="bloglist-content"> | ||
<div class="bloglist-title"> | ||
<a href="{{ post.permalink }}">{{ post.title }}</a> | ||
</div> | ||
|
||
{% if not hide_read_more %} | ||
<a class="readmore" href={{ page.permalink }}>Read more ⟶</a> | ||
{% if post.taxonomies.tags %} | ||
<div class="bloglist-tags"> | ||
{% for tag in post.taxonomies.tags %} | ||
<a class="tag" href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="description"> | ||
{% if post.description %} | ||
{{ post.description }} | ||
{% elif post.summary %} | ||
{{ post.summary | safe }}… | ||
{% endif %} | ||
</div> | ||
|
||
<a class="readmore" href={{ post.permalink }}>Read more →</a> | ||
</div> | ||
</section> | ||
{% endif %} | ||
{% if not loop.last %} | ||
{% if loop.index == max %} | ||
<div class="all-posts"> | ||
<a href="{{ get_url(path="/blog/") }}">All posts ⟶</a> | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
</section> | ||
{% endfor %} | ||
</div> | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% macro page_header(title) %} | ||
<div class="title-container section-title"> | ||
<div class="title-container section-title bottom-divider"> | ||
{{ title }} | ||
</div> | ||
{% endmacro page_header %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.