Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
fixup! Add blog template for SnippetCard organism
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Jan 17, 2020
1 parent 9eab000 commit 9d4d0e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/organisms/snippetCard/blogSnippetCard/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
line-height: 1.5rem;
text-align: right;
}

p:not(:first-child) {
line-height: 2;
}
}

.blog-list-item {
Expand Down
6 changes: 3 additions & 3 deletions src/templates/snippetPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const templateData = {
pageType: 'snippet',
};
// TODO: Handle blog post descriptions properly.
const determineDescription = snippet =>
(!snippet.language || !snippet.language.long) ? '' :
const determineDescription = (snippet, cardTemplate) =>
(cardTemplate === 'blog') ? snippet.description :
_l`site.pageDescription${{...templateData, snippetName: snippet.title, snippetLanguage: snippet.language.long }}`;

const SnippetPage = ({
Expand All @@ -36,7 +36,7 @@ const SnippetPage = ({
<>
<Meta
title={ snippet.title }
description={ determineDescription(snippet) }
description={ determineDescription(snippet, cardTemplate) }
logoSrc={ cardTemplate === 'blog' ? snippet.cover.src : splashLogoSrc }
structuredData={ {
title: snippet.title,
Expand Down

0 comments on commit 9d4d0e5

Please sign in to comment.