Skip to content

Commit

Permalink
Hide books section on home page since books are empty (#781)
Browse files Browse the repository at this point in the history
* fix: hide book section on hompage when empty

* fix: PR review comments
  • Loading branch information
vyktoremario authored Oct 24, 2023
1 parent 0883e12 commit 052649a
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 37 deletions.
7 changes: 4 additions & 3 deletions packages/site/src/data/angular/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down Expand Up @@ -300,9 +300,10 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'Angular Nation',
description:
'A free and friendly place to network and collaborate with Angular developers just like you!',
image: 'https://pbs.twimg.com/profile_images/1331571398834315264/xtrGFRx-_400x400.jpg',
image:
'https://pbs.twimg.com/profile_images/1331571398834315264/xtrGFRx-_400x400.jpg',
type: 'Online Events',
href: 'https://www.angularnation.net/',
tags: ['meetups'],
}
},
]
2 changes: 1 addition & 1 deletion packages/site/src/data/deno/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/graphql/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/nodejs/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/qwik/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/react/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/solidjs/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
5 changes: 2 additions & 3 deletions packages/site/src/data/solidjs/libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ export const libraries: Library[] = [
package: 'https://www.npmjs.com/package/@tanstack/solid-query',
href: 'https://tanstack.com/query/v4/docs/adapters/solid-query',
description:
'🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. - query/packages at main · TanStack/query',
image:
'https://raw.githubusercontent.com/TanStack/query/beta/media/repo-header.png',
'Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. - query/packages at main · TanStack/query',
image: 'https://avatars.githubusercontent.com/u/72518640?s=200&v=4',
tags: [LibraryTag.DATA_FETCHING],
language: 'TypeScript',
},
Expand Down
12 changes: 1 addition & 11 deletions packages/site/src/data/svelte/blogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const blogs: Blog<(typeof blogTags)[number]>[] = [
title: 'Joy of Code',
author: 'Matija',
description:
"Matija from 🇭🇷 Croatia and he's infinitely curious at how things work but he's mostly passionate about JavaScript and 🎨 UI/UX design.",
"Matija from Croatia and he's infinitely curious at how things work but he's mostly passionate about JavaScript and UI/UX design.",
image:
'https://yt3.ggpht.com/f-nkXHIt4t8B7yFIOdkQBGEyTY0LVrS8DWkAnF6W7KazXPtcD2XHzWPSsOx_vAjVgs3RQu736cY=s176-c-k-c0x00ffffff-no-rj-mo',
href: 'https://joyofcode.xyz/categories/svelte',
Expand Down Expand Up @@ -85,16 +85,6 @@ export const blogs: Blog<(typeof blogTags)[number]>[] = [
href: 'https://magrippis.com/blog',
tags: [],
},
{
title: 'Rodney Lab',
author: 'Rodney',
description:
'Hello and welcome! I’m Rodney, a web developer based in the UK 🇬🇧 and am available for consultancy work.',
image:
'https://rodneylab.com/assets/rodney-johnson-about-rodneylab-1350x1350.208d1490.avif',
href: 'https://rodneylab.com/tags/sveltekit/',
tags: [],
},
{
title: 'Ryan Filler',
author: 'Ryan Filler',
Expand Down
12 changes: 2 additions & 10 deletions packages/site/src/data/svelte/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'Svelte Summit',
description:
'Svelte Summit is an event dedicated to Svelte and everything that is happening in the community.',
image: 'https://www.sveltesummit.com/_app/assets/logo-3e24e7c2.svg',
image: 'https://sveltesociety.dev/images/logo.svg',
type: 'Live Events',
href: 'https://www.sveltesummit.com/',
tags: [],
Expand All @@ -54,7 +54,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down Expand Up @@ -201,14 +201,6 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
href: 'https://www.jsday.ie/',
tags: ['conferences'],
},
{
name: 'Svelte Summit',
description: 'A meetup dedicated to the latest release of Svelte',
image: 'https://sveltesociety.dev/images/logo.svg',
type: 'Live Events',
href: 'https://beta.guild.host/svelte-society-london/events',
tags: ['conferences'],
},
{
name: 'Svelte js Meetup',
description: 'A meetup dedicated to all things Svelte',
Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/data/vue/communities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const communities: Community<(typeof communityTags)[number]>[] = [
name: 'International Javascript Conference',
description: 'Conference dedicated to full stack JavaScript development',
image:
'https://pbs.twimg.com/profile_images/841217931455401984/uzU4VfwA_400x400.jpg',
'https://javascript-conference.com/wp-content/uploads/2019/12/Konferenzlogos_Website_Navi_68979_v1_iJS.png',
type: 'Live Events',
href: 'https://javascript-conference.com/',
tags: ['conferences'],
Expand Down
10 changes: 7 additions & 3 deletions packages/system/src/components/homepage/homepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ export function Homepage({
<Blogs blogs={blogs} />
</div>
<ContributorBanner contributors={contributorsData}></ContributorBanner>
<div className={homepageTwoAndOneSectionStyle}>
{books.length > 0 ? (
<div className="homepageTwoAndOneSectionStyle">
<LatestTools tools={tools} />
<Books books={books} />
</div>
) : (
<LatestTools tools={tools} />
<Books books={books} />
</div>
)}
<Communities communities={communities} />

<ResourcesInfoBanner
Expand Down

0 comments on commit 052649a

Please sign in to comment.