diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-07-18 15:53:12 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-07-18 15:53:12 -0400 |
commit | 4373e1f7baada56627d0946534afadae5ebda403 (patch) | |
tree | fc7296494d89db829c2ae3b5648c6a1958512ccb /_includes/post-card.liquid | |
parent | 4f6598644b11ed03594bc3ebd6e797b15a27ac1c (diff) | |
download | carpentertutoring-4373e1f7baada56627d0946534afadae5ebda403.tar.xz carpentertutoring-4373e1f7baada56627d0946534afadae5ebda403.zip |
updated blog page; how posts are rendered, made meta pull from
frontmatter
Diffstat (limited to '_includes/post-card.liquid')
-rw-r--r-- | _includes/post-card.liquid | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/_includes/post-card.liquid b/_includes/post-card.liquid new file mode 100644 index 0000000..8e2a0a7 --- /dev/null +++ b/_includes/post-card.liquid @@ -0,0 +1,39 @@ +<div class="card"> + <div class="card-header"> + <div class="card-header-title"> + <h1 class="subtitle"> + {{ post.title }} + </h1> + </div> + </div> + {% if post.data.coverImage %} + <div class="card-image"> + <figure class="image is-4by3"> + <picture> + <source srcset="{{post.data.coverImage}}.webp" type="image/webp" /> + <source srcset="{{post.data.coverImage}}.png" type="image/png" /> + <img src="{{post.data.coverImage}}.png" /> + </picture> + </figure> + </div> + {% endif %} + <div class="card-content"> + <div class="content"> + {{ post.content | truncatewords: 20 }} + <a target="_blank" href="{{ post.permalink}}"> + <span class="icon"> + <i class="iconify" data-icon="open-in-new"></i> + </span> + Read more + </a> + </div> + </div> + <div class="card-footer"> + <div class="card-footer-item"> + Share on LinkedIn + </div> + <div class="card-footer-item"> + Share on Facebook + </div> + </div> +</div> |