From 9969dd8c7dd6e4699c1af221f46c50acecbeb913 Mon Sep 17 00:00:00 2001 From: Cadence Fish Date: Sun, 1 Mar 2020 15:35:45 +1300 Subject: [PATCH] Fix name on post when no full_name --- src/site/pug/includes/post.pug | 6 +++++- src/site/sass/main.sass | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/site/pug/includes/post.pug b/src/site/pug/includes/post.pug index d564c67..ee41af8 100644 --- a/src/site/pug/includes/post.pug +++ b/src/site/pug/includes/post.pug @@ -6,7 +6,11 @@ mixin post(post, headerWithNavigation) .user-header header.user-header-inner img(src=post.ownerPfpCacheP width=150 height=150 alt="").pfp - a.name(href=`/u/${post.getBasicOwner().username}`)= `${post.data.owner.full_name} (@${post.getBasicOwner().username})` + a.name(href=`/u/${post.getBasicOwner().username}`) + if post.data.owner.full_name + = `${post.data.owner.full_name} (@${post.getBasicOwner().username})` + else + = `@${post.getBasicOwner().username}` if headerWithNavigation button.navigate-posts.previous img(src="/static/img/arrow-circled.svg" alt="Previous post." style="transform: rotate(180deg)").icon diff --git a/src/site/sass/main.sass b/src/site/sass/main.sass index c0a7b7c..582c76b 100644 --- a/src/site/sass/main.sass +++ b/src/site/sass/main.sass @@ -268,11 +268,12 @@ body display: block .user-header-inner + grid-row: 1 + grid-column: 2 display: flex align-items: center justify-content: center - grid-row: 1 - grid-column: 2 + margin: 0px 10px .pfp $size: 40px @@ -297,7 +298,7 @@ body font-size: 20px line-height: 1.4 unicode-bidi: plaintext - + @media screen and (max-width: $layout-a-max) font-size: 18px