-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bac97e3
commit 8012a41
Showing
8 changed files
with
200 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { executeQueryOutsideAstro } from '~/lib/datocms/executeQuery'; | ||
import { | ||
EnterpriseAppUrlFragment, | ||
buildUrlForEnterpriseApp, | ||
} from '~/lib/datocms/gqlUrlBuilder/enterpriseApp'; | ||
import type { BuildSitemapUrlsFn } from '~/pages/sitemap.xml'; | ||
import { ResponsiveImageFragment } from '~/components/ResponsiveImage/graphql'; | ||
import { ImageFragment } from '~/components/blocks/Image/graphql'; | ||
import { InternalVideoFragment } from '~/components/blocks/InternalVideo/graphql'; | ||
import { VideoFragment } from '~/components/blocks/Video/graphql'; | ||
import { TagFragment } from '~/lib/datocms/commonFragments'; | ||
import { graphql } from '~/lib/datocms/graphql'; | ||
|
||
export const query = graphql( | ||
/* GraphQL */ ` | ||
query EnterpriseAppQuery($slug: String!) { | ||
page: enterpriseApp(filter: { slug: { eq: $slug } }) { | ||
seo: _seoMetaTags { | ||
...TagFragment | ||
} | ||
title | ||
description | ||
shortDescription | ||
logo { | ||
url | ||
width | ||
height | ||
} | ||
content { | ||
value | ||
blocks { | ||
... on RecordInterface { | ||
id | ||
__typename | ||
} | ||
... on ImageRecord { | ||
...ImageFragment | ||
} | ||
... on VideoRecord { | ||
...VideoFragment | ||
} | ||
... on InternalVideoRecord { | ||
...InternalVideoFragment | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`, | ||
[TagFragment, ResponsiveImageFragment, ImageFragment, VideoFragment, InternalVideoFragment], | ||
); | ||
|
||
export const buildSitemapUrls: BuildSitemapUrlsFn = async ({ includeDrafts }) => { | ||
const { entries } = await executeQueryOutsideAstro( | ||
graphql( | ||
/* GraphQL */ ` | ||
query BuildSitemapUrls { | ||
entries: allEnterpriseApps(first: 100) { | ||
...EnterpriseAppUrlFragment | ||
} | ||
} | ||
`, | ||
[EnterpriseAppUrlFragment], | ||
), | ||
{ includeDrafts }, | ||
); | ||
|
||
return entries.map(buildUrlForEnterpriseApp); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.grid { | ||
display: grid; | ||
gap: rfs(60px); | ||
|
||
@media screen and (min-width: 1024px) { | ||
grid-template-columns: 1fr 340px; | ||
} | ||
} | ||
|
||
.content { | ||
.title { | ||
font-size: rfs(48px); | ||
} | ||
|
||
.subtitle { | ||
color: var(--light-body-color); | ||
font-size: rfs(24px); | ||
font-weight: 400; | ||
margin-top: 1em; | ||
} | ||
} | ||
|
||
.aside { | ||
.asideContent { | ||
position: sticky; | ||
top: 140px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
import Wrapper from '~/components/Wrapper/ReactComponent'; | ||
import { Button } from '~/components/Button'; | ||
import { Image } from '~/components/blocks/Image'; | ||
import { InternalVideo } from '~/components/blocks/InternalVideo'; | ||
import { Layout } from '~/layouts/Layout'; | ||
import { MarketplaceCard } from '~/components/MarketplaceCard'; | ||
import { Prose } from '~/components/Prose'; | ||
import { Space } from '~/components/Space'; | ||
import { Text } from '~/components/structuredText/Text'; | ||
import { Video } from '~/components/blocks/Video'; | ||
import { executeQuery } from '~/lib/datocms/executeQuery'; | ||
import { notFoundResponse, avoidAstroTypeCheckBug } from '~/lib/notFoundResponse'; | ||
import { withAllComponents } from '~/lib/datocms/structuredText'; | ||
import { query } from './_graphql'; | ||
import s from './_style.module.css'; | ||
const { slug } = Astro.params; | ||
const variables = { slug: slug! }; | ||
const { page } = await executeQuery(Astro, query, { variables }); | ||
if (!page) { | ||
avoidAstroTypeCheckBug(notFoundResponse); | ||
return notFoundResponse(); | ||
} | ||
--- | ||
|
||
<Layout noFinalCta additionalSeo={[]}> | ||
<Fragment slot="head"> | ||
<title>Enterprise apps - Marketplace</title> | ||
</Fragment> | ||
|
||
<Space top={2}> | ||
<Wrapper> | ||
<div class={s.grid}> | ||
<div class={s.content}> | ||
<h1 class={s.title}>{page.title}</h1> | ||
<h3 class={s.subtitle}>{page.description}</h3> | ||
<Space top={2}> | ||
<Prose> | ||
<Text | ||
data={page.content} | ||
blockComponents={withAllComponents(page.content.blocks, { | ||
ImageRecord: Image, | ||
InternalVideoRecord: InternalVideo, | ||
VideoRecord: Video, | ||
})} | ||
/> | ||
</Prose> | ||
</Space> | ||
</div> | ||
|
||
<aside class={s.aside}> | ||
<div class={s.asideContent}> | ||
<MarketplaceCard title={page.title} background="azure" svgLogoUrl={page.logo.url}> | ||
{page.shortDescription} | ||
<Fragment slot="below"> | ||
<Button as="a" href="/contact" target="_blank">Request activation</Button> | ||
</Fragment> | ||
</MarketplaceCard> | ||
</div> | ||
</aside> | ||
</div> | ||
</Wrapper> | ||
</Space> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters