diff --git a/packages/web/components/elements/Label.tsx b/packages/web/components/elements/Label.tsx
index 44dbed21a..a8bedd8a8 100644
--- a/packages/web/components/elements/Label.tsx
+++ b/packages/web/components/elements/Label.tsx
@@ -23,7 +23,7 @@ export function Label(props: LabelProps): JSX.Element {
color: props.color,
padding: '4px 8px 4px 8px',
border: `1px solid rgba(${color[0]}, ${color[1]}, ${color[2]}, 0.40)`,
- backgroundColor: `rgba(${color[0]}, ${color[1]}, ${color[2]}, 0.20)`,
+ backgroundColor: `rgba(${color[0]}, ${color[1]}, ${color[2]}, 0.05)`,
}}
>
{props.text}
diff --git a/packages/web/components/elements/images/MoreOptionsIcon.tsx b/packages/web/components/elements/images/MoreOptionsIcon.tsx
index e29580982..c51229426 100644
--- a/packages/web/components/elements/images/MoreOptionsIcon.tsx
+++ b/packages/web/components/elements/images/MoreOptionsIcon.tsx
@@ -1,3 +1,5 @@
+import { DotsThree, DotsThreeVertical } from 'phosphor-react'
+
type Orientation = 'horizontal' | 'vertical'
type MoreOptionsIconProps = {
@@ -7,48 +9,9 @@ type MoreOptionsIconProps = {
}
export function MoreOptionsIcon(props: MoreOptionsIconProps): JSX.Element {
- const dots =
- props.orientation == 'horizontal' ? (
- <>
-
-
-
- >
+ return props.orientation == 'horizontal' ? (
+
) : (
- <>
-
-
-
- >
+
)
-
- return (
-
- )
}
diff --git a/packages/web/components/patterns/ArticleSubtitle.tsx b/packages/web/components/patterns/ArticleSubtitle.tsx
index 811f028f6..96fe5e15e 100644
--- a/packages/web/components/patterns/ArticleSubtitle.tsx
+++ b/packages/web/components/patterns/ArticleSubtitle.tsx
@@ -51,7 +51,7 @@ function articleSubtitle(url: string, author?: string): string {
}
export function authoredByText(author: string): string {
- return `By ${removeHTMLTags(author)}`
+ return `by ${removeHTMLTags(author)}`
}
function removeHTMLTags(str: string | null | undefined): string {
diff --git a/packages/web/components/patterns/LinkedItemCard.tsx b/packages/web/components/patterns/LinkedItemCard.tsx
index 1dc194d36..4dbac4b77 100644
--- a/packages/web/components/patterns/LinkedItemCard.tsx
+++ b/packages/web/components/patterns/LinkedItemCard.tsx
@@ -8,6 +8,7 @@ import { theme } from './../tokens/stitches.config'
import { CardMenu } from './../patterns/CardMenu'
import { LayoutType } from '../templates/homeFeed/HomeFeedContainer'
import { UserBasicData } from '../../lib/networking/queries/useGetViewerQuery'
+import { Label } from './../elements/Label'
export type LinkedItemCardAction =
| 'showDetail'
@@ -45,6 +46,23 @@ export function LinkedItemCard(props: LinkedItemCardProps): JSX.Element {
}
}
+// Dummy Data
+const Labels = [
+ {
+ text: 'Tag 1',
+ color: "#B20042"
+ },
+ {
+ text: 'Tag 2',
+ color: "#01A800"
+ },
+ {
+ text: 'Tag 3',
+ color: "#007E9E"
+ },
+]
+
+
export function GridLinkedItemCard(props: LinkedItemCardProps): JSX.Element {
const originText = siteName(props.item.originalArticleUrl, props.item.url)
@@ -63,13 +81,33 @@ export function GridLinkedItemCard(props: LinkedItemCardProps): JSX.Element {
overflow: 'clip',
border: '1px solid $grayBorder',
boxShadow: '0px 3px 11px rgba(32, 31, 29, 0.04)',
+ position: 'relative',
}}
alignment='start'
distribution='start'
onClick={() => {
props.handleAction('showDetail')
}}
+ className="grid-item-card"
>
+ div': {
+ borderRadius: '100vmax 100vmax 0 0',
+ }
+ }}>
+
+
-
-
- {originText}
+
+
+ {props.item.title}
}
actionHandler={props.handleAction}
/>
-
- {props.item.title}
-
+
+
+ {props.item.author && (
+
+ {authoredByText(props.item.author)}
+
+ )
+ }
+
+ {originText}
+
+
+
+
- {props.item.author && (
-
- {authoredByText(props.item.author)}
- {props.item.description ? ' \u2013 ' : ''}
-
- )}
- {props.item.description?.substring(0, 300)}
+ {props.item.description}
- {props.item.image && (
+ {/* {props.item.image && ( */}
{
- ;(e.target as HTMLElement).style.display = 'none'
+ // (e.target as HTMLElement).style.display = 'none'
}}
/>
- )}
+ {/* )} */}
+
+
+ {
+ Labels.map(({text, color}, index) => )
+ }
-
//
)
@@ -163,30 +226,26 @@ export function ListLinkedItemCard(props: LinkedItemCardProps): JSX.Element {
return (
//
- {
- props.handleAction('showDetail')
- }}
- >
{
+ props.handleAction('showDetail')
+ }}
>
-
{props.item.title}
{props.item.author && (
-
+
{authoredByText(props.item.author)}
)}
-
+
{originText}
-
+
+
+
+ {
// This is here to prevent menu click events from bubbling
// up and causing us to "click" on the link item.
@@ -223,19 +307,13 @@ export function ListLinkedItemCard(props: LinkedItemCardProps): JSX.Element {
}
actionHandler={props.handleAction}
/>
-
-
//
)
}
@@ -244,6 +322,7 @@ type ProgressBarProps = {
fillPercentage: number
fillColor: string
backgroundColor: string
+ borderRadius: string
}
function ProgressBar(props: ProgressBarProps): JSX.Element {
@@ -253,9 +332,7 @@ function ProgressBar(props: ProgressBarProps): JSX.Element {
height: '4px',
width: '100%',
borderRadius: '$1',
- backgroundColor: props.backgroundColor,
overflow: 'hidden',
- mt: '$1',
}}
>
diff --git a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
index 8b7741f24..d70f4117c 100644
--- a/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
+++ b/packages/web/components/templates/homeFeed/HomeFeedContainer.tsx
@@ -1,10 +1,11 @@
import { Box, HStack, VStack } from './../../elements/LayoutPrimitives'
+import { useGetLibraryItemsQuery } from '../../../lib/networking/queries/useGetLibraryItemsQuery'
+import { useGetViewerQuery } from '../../../lib/networking/queries/useGetViewerQuery'
+import { isDarkTheme } from '../../../lib/themeUpdater'
import type {
LibraryItem,
LibraryItemsQueryInput,
} from '../../../lib/networking/queries/useGetLibraryItemsQuery'
-import { useGetLibraryItemsQuery } from '../../../lib/networking/queries/useGetLibraryItemsQuery'
-import { useGetViewerQuery } from '../../../lib/networking/queries/useGetViewerQuery'
import {
LinkedItemCard,
LinkedItemCardAction,
@@ -532,15 +533,11 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
gridAutoRows: 'auto',
borderRadius: '8px',
gridGap: layout == 'LIST_LAYOUT' ? '0' : '$3',
- border:
- props.hasData && layout == 'LIST_LAYOUT'
- ? '1px solid $grayBorder'
- : 'none',
marginTop: layout == 'LIST_LAYOUT' ? '21px' : '0',
marginBottom: '0px',
- paddingTop: layout == 'LIST_LAYOUT' ? '2px' : '21px',
+ paddingTop: layout == 'LIST_LAYOUT' ? '0' : '21px',
paddingBottom: layout == 'LIST_LAYOUT' ? '0px' : '21px',
- overflow: 'visible',
+ overflow: 'hidden',
'@smDown': {
border: 'unset',
width: layout == 'LIST_LAYOUT' ? '100vw' : undefined,
@@ -556,24 +553,6 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
},
}}
>
- {props.hasData && layout === 'LIST_LAYOUT' && (
- // list view gets a title
-
-
- {props.totalItems} links
-
-
- )}
{props.items.map((linkedItem) => (
div': {
bg: '$grayBg',
},
'&:focus': {
'> div': {
- bg: '$grayBgActive',
- },
+ boxShadow: isDarkTheme() ? '$cardItemDarkShadow' : '$cardItemLightShadow',
+ }
},
'&:hover': {
- '> div': {
- bg: '$grayBgActive',
- },
+ '> div.grid-item-card': {
+ boxShadow: isDarkTheme() ? '$cardItemDarkShadow' : '$cardItemLightShadow',
+ }
},
}}
>
diff --git a/packages/web/components/tokens/stitches.config.ts b/packages/web/components/tokens/stitches.config.ts
index 537eb72e5..55fa92ff6 100644
--- a/packages/web/components/tokens/stitches.config.ts
+++ b/packages/web/components/tokens/stitches.config.ts
@@ -111,6 +111,8 @@ export const { styled, css, theme, getCssText, globalCss, keyframes, config } =
borderStyles: {},
shadows: {
panelShadow: '0px 4px 18px rgba(120, 123, 134, 0.12)',
+ cardItemLightShadow: '0px 8px 32px rgba(32, 31, 29, 0.33)',
+ cardItemDarkShadow: '0px 8px 32px rgba(255, 255, 255, 0.33)',
},
zIndices: {},
transitions: {},