Skip to content

Commit 10f3261

Browse files
authored
Remove redundancy of the use of the card-authors macro (GoogleChrome#3773)
1 parent 00d2dc1 commit 10f3261

3 files changed

Lines changed: 15 additions & 61 deletions

File tree

site/_includes/layouts/author-individual.njk

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% from 'macros/cards/frontmatter-card.njk' import frontMatterCard with context %}
1+
{% from 'macros/cards/blog-card.njk' import blogCard with context %}
22
{% from 'macros/icon.njk' import icon with context %}
33

44
{% extends "layouts/base.njk" %}
@@ -54,7 +54,20 @@
5454
<div class="measure-1280 width-full center-margin pad-left-400 pad-right-400">
5555
<div class="blog-grid">
5656
{% for fm in paged.pagination.items %}
57-
{{ frontMatterCard(fm) }}
57+
{% set post = {
58+
data: {
59+
thumbnail: fm.hero,
60+
title: fm.title,
61+
alt: fm.title,
62+
description: fm.description,
63+
tags: fm.tags,
64+
authors: fm.authors,
65+
date: fm.date
66+
67+
},
68+
url: fm.url
69+
} %}
70+
{{ blogCard(post) }}
5871
{% endfor %}
5972
</div>
6073
{% include 'partials/pagination.njk' %}

site/_includes/macros/cards/author-card.njk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{% from 'macros/card-authors.njk' import cardAuthors with context %}
2-
31
{% macro authorCard(author) %}
42
<div class="blog-card rounded-lg pad-300 md:pad-400 width-full text-align-center">
53
{% if author.image %}

site/_includes/macros/cards/frontmatter-card.njk

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)