Skip to content

Commit

Permalink
restore /pkgs without any AI generated content
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 26, 2024
1 parent 9c5906f commit 229909a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/pkgx.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<Route path='/' element={<HomeFeed />} />
<Route path='/privacy-policy' element={<PrivacyPolicy/>} />
<Route path='/terms-of-use' element={<TermsOfUse/>} />
<Route path='/pkgs' element={<PackageShowcase />} />
<Route path='/pkgs/*' element={<PackageListing/>} />
</Routes>
<Footer/>
</Stack>
Expand Down
8 changes: 1 addition & 7 deletions src/pkgx.dev/HomeFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ function FeedItemBox(item: FeedItem) {
const { url, title, image, description, type } = item
const text_style: CSSProperties = {whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden'}

if (type == 'pkg') return

const color = (() => {
switch (type) {
case 'blog': return 'secondary'
Expand All @@ -147,10 +145,6 @@ function FeedItemBox(item: FeedItem) {
fontVariant: 'small-caps'
}} />

// the author of rye is strangely hostile to our project
const imgsrc = title == 'rye' ? undefined : image


return (
<Card
variant={color ? 'outlined' : undefined}
Expand All @@ -161,7 +155,7 @@ function FeedItemBox(item: FeedItem) {
<CardMedia
height={isxs ? 150 : 300}
component={Box}
image={imgsrc}
image={type == 'pkg' ? undefined : image}
textAlign='right'
>
{chip}
Expand Down
5 changes: 1 addition & 4 deletions src/pkgx.dev/PackageListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ function Package({ project, dirs }: { project: string, dirs: string[] }) {
<Button variant='outlined' href={description.value.github} target='_blank' rel='noreferrer' endIcon={<ArrowOutwardIcon />}>GitHub</Button>
</>

// the author of rye is strangely hostile to our project
const imgsrc = project == 'rye-up.com' ? undefined : `https://gui.tea.xyz/prod/${project}/1024x1024.webp`

return <Stack direction={{xs: "column", md: "row"}} spacing={4}>
<Card sx={{height: 'fit-content', minWidth: 375}}>
<img style={{display: 'block'}} src={imgsrc} width={375} height={375} />
<img style={{display: 'block'}} src={undefined} width={375} height={375} />
</Card>
<Stack spacing={2}>
<Box>
Expand Down
2 changes: 1 addition & 1 deletion src/pkgx.dev/PackageShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function PkgCard({project, description, name, labels, isLoader}: Package) {
<CardMedia
height={mediaHeight}
component={Box}
image={`https://gui.tea.xyz/prod/${project}/512x512.webp`}
image={/*`https://gui.tea.xyz/prod/${project}/512x512.webp`*/ undefined}
textAlign="right"
>
{chips}
Expand Down

0 comments on commit 229909a

Please sign in to comment.