From dd97710d71a455a713b1b79cdf0d2b50af90341a Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 12 Nov 2021 16:39:52 -0600 Subject: [PATCH] many small design enhancements --- components/comment.module.css | 4 ++++ components/comments-flat.js | 2 +- components/discussion-form.js | 2 +- components/footer.js | 2 +- components/header.js | 16 +++++++++++++--- components/header.module.css | 13 ++++++++----- components/item-full.js | 20 ++++++++++++-------- components/item.module.css | 17 +++++++++-------- components/more-footer.js | 2 +- components/notifications.js | 9 ++++++--- components/price.js | 4 ++-- components/reply.js | 2 +- components/reply.module.css | 5 +++-- components/text.module.css | 1 + pages/[name]/index.js | 2 +- pages/[name]/posts.js | 10 ++++++---- pages/top/[[...within]].js | 2 +- styles/globals.scss | 6 +++++- styles/item.module.css | 4 ++-- 19 files changed, 78 insertions(+), 45 deletions(-) diff --git a/components/comment.module.css b/components/comment.module.css index 8ef19fdf..efff7094 100644 --- a/components/comment.module.css +++ b/components/comment.module.css @@ -75,6 +75,10 @@ background-color: var(--theme-commentBg); } +.hunk { + margin-bottom: 0; +} + .comment:not(:last-child) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; diff --git a/components/comments-flat.js b/components/comments-flat.js index 5c06ed91..27f79c71 100644 --- a/components/comments-flat.js +++ b/components/comments-flat.js @@ -23,7 +23,7 @@ export default function CommentsFlat ({ variables, comments, cursor, ...props }) {comments.map(item => (
{ router.push({ pathname: '/items/[id]', diff --git a/components/discussion-form.js b/components/discussion-form.js index aa770e8f..82f1b95f 100644 --- a/components/discussion-form.js +++ b/components/discussion-form.js @@ -81,7 +81,7 @@ export function DiscussionForm ({ label={<>{textLabel} optional} name='text' as={TextareaAutosize} - minRows={4} + minRows={6} hint={editThreshold ?
: null} diff --git a/components/footer.js b/components/footer.js index e243e165..9d350ecc 100644 --- a/components/footer.js +++ b/components/footer.js @@ -95,7 +95,7 @@ export default function Footer ({ noLinks }) {
} {data &&
connect: { + if (n < 1e3) return n + if (n >= 1e3 && n < 1e6) return +(n / 1e3).toFixed(1) + 'k' + if (n >= 1e6 && n < 1e9) return +(n / 1e6).toFixed(1) + 'm' + if (n >= 1e9 && n < 1e12) return +(n / 1e9).toFixed(1) + 'b' + if (n >= 1e12) return +(n / 1e12).toFixed(1) + 't' +} + function WalletSummary ({ me }) { - return `${me?.sats} \\ ${me?.stacked}` + if (!me) return null + + return `${formatSats(me.sats)} \\ ${formatSats(me.stacked)}` } export default function Header () { @@ -41,7 +51,7 @@ export default function Header () { -
+
@@ -133,7 +143,7 @@ export default function Header () { return ( <> - +