Skip to content

Commit

Permalink
Merge branch 'New-Article-Page' into feat/Author-Sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
wlliaml committed Jan 9, 2024
2 parents 8f515ac + 0dab374 commit 90ea777
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/common/styles/variables/spacing.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
--spacing-base-xx-tight: 0.375rem; /* 6px */
--spacing-x-tight: 0.5rem; /* 8px */
--spacing-base-tight: 0.625rem; /* 10px */
--spacing-tighter: 0.6875rem; /* 11px */
--spacing-tight: 0.75rem; /* 12px */
--spacing-x-base: 0.875rem; /* 14px */
--spacing-base: 1rem; /* 16px */
Expand Down
1 change: 0 additions & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export type ButtonSpacingX =
| 'xxtight'
| 'xtight'
| 'baseTight'
| 'tighter'
| 'tight'
| 'base'
| 'loose'
Expand Down
30 changes: 6 additions & 24 deletions src/components/Button/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,6 @@ span.container {
}
}

.spacingYTighter {
&:not(.isTransparent) {
padding-top: var(--spacing-tighter);
padding-bottom: var(--spacing-tighter);
}

& .hotarea {
margin-top: calc(var(--spacing-tighter) * -1);
margin-bottom: calc(var(--spacing-tighter) * -1);
}
}

.spacingYTight {
&:not(.isTransparent) {
padding-top: var(--spacing-tight);
Expand Down Expand Up @@ -230,18 +218,6 @@ span.container {
}
}

.spacingXTighter {
&:not(.isTransparent) {
padding-right: var(--spacing-tighter);
padding-left: var(--spacing-tighter);
}

& .hotarea {
margin-right: calc(var(--spacing-tighter) * -1);
margin-left: calc(var(--spacing-tighter) * -1);
}
}

.spacingXTight {
&:not(.isTransparent) {
padding-right: var(--spacing-tight);
Expand Down Expand Up @@ -291,6 +267,12 @@ span.container {
}

/* Background */
.bgWhite {
& .hotarea {
background: var(--color-white);
}
}

.bgGreyDarkest {
& .hotarea {
background: var(--color-grey-darkest);
Expand Down
10 changes: 5 additions & 5 deletions src/views/ArticleDetail/AppreciationButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
toast,
Tooltip,
Translate,
// Turnstile,
Turnstile,
// TURNSTILE_DEFAULT_SCRIPT_ID,
// TURNSTILE_SCRIPT_URL,
TurnstileInstance,
Expand Down Expand Up @@ -264,14 +264,14 @@ const AppreciationButton = ({
)
}

// const siteKey = process.env
// .NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY as string
const siteKey = process.env
.NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY as string

// Appreciable
if (canAppreciate && !disabled) {
return (
<section>
{/* <Turnstile
<Turnstile
ref={turnstileRef}
options={{
action: 'appreciate',
Expand All @@ -285,7 +285,7 @@ const AppreciationButton = ({
compat: 'recaptcha',
appendTo: 'body',
}}
/> */}
/>
<AppreciateButton
onClick={appreciate}
count={appreciatedCount > 0 ? appreciatedCount : undefined}
Expand Down
8 changes: 7 additions & 1 deletion src/views/ArticleDetail/MetaInfo/FingerprintButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ interface FingerprintButtonProps {

const FingerprintButton = ({ article }: FingerprintButtonProps) => {
return (
<Button textColor="black" textActiveColor="greyDarker">
<Button
textColor="black"
textActiveColor="greyDarker"
onClick={() => {
// TODO: redirect to IPFS page
}}
>
<FormattedMessage defaultMessage="IPFS" id="tio9Gt" />
</Button>
)
Expand Down
2 changes: 2 additions & 0 deletions src/views/ArticleDetail/SupportWidget/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

& .donationButton {
margin-top: var(--spacing-loose);
background: var(--color-white);
border-radius: 5rem;
}

& .donators {
Expand Down
1 change: 1 addition & 0 deletions src/views/ArticleDetail/Toolbar/DesktopToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const DesktopToolbar = ({
</ReCaptchaProvider>

<section className={styles.commentBar}>
{/* TODO: open comment drawer */}
<CommentButton
article={article}
disabled={!article.canComment}
Expand Down
2 changes: 1 addition & 1 deletion src/views/ArticleDetail/Toolbar/FixedToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const FixedToolbar = ({
bgColor="greyLighter"
borderRadius="0.5rem"
textColor="greyDarker"
spacing={['tighter', 'tighter']}
spacing={['baseTight', 'baseTight']}
onClick={() => {
// TODO: open comment drawer
console.log('comment...')
Expand Down

0 comments on commit 90ea777

Please sign in to comment.