From 9d4d0e5035036887041f516432a80c8558343b34 Mon Sep 17 00:00:00 2001 From: Chalarangelo Date: Fri, 17 Jan 2020 16:49:15 +0200 Subject: [PATCH] fixup! Add blog template for SnippetCard organism --- src/organisms/snippetCard/blogSnippetCard/_index.scss | 4 ++++ src/templates/snippetPage/index.jsx | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/organisms/snippetCard/blogSnippetCard/_index.scss b/src/organisms/snippetCard/blogSnippetCard/_index.scss index 55b2e43f6..8704825e5 100644 --- a/src/organisms/snippetCard/blogSnippetCard/_index.scss +++ b/src/organisms/snippetCard/blogSnippetCard/_index.scss @@ -47,6 +47,10 @@ line-height: 1.5rem; text-align: right; } + + p:not(:first-child) { + line-height: 2; + } } .blog-list-item { diff --git a/src/templates/snippetPage/index.jsx b/src/templates/snippetPage/index.jsx index 5a6889d52..79d88d17f 100644 --- a/src/templates/snippetPage/index.jsx +++ b/src/templates/snippetPage/index.jsx @@ -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 = ({ @@ -36,7 +36,7 @@ const SnippetPage = ({ <>