Skip to content

Commit 7bd77ed

Browse files
committed
Merge branch 'main' of https://github.com/netsnek/liba
1 parent 29c08ec commit 7bd77ed

File tree

90 files changed

+5126
-1318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5126
-1318
lines changed

email/contact.html

Lines changed: 1421 additions & 0 deletions
Large diffs are not rendered by default.

email/contact_confirmation.html

Lines changed: 1411 additions & 0 deletions
Large diffs are not rendered by default.

gatsby-config.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require('dotenv').config({
66

77
const config: GatsbyConfig = {
88
siteMetadata: {
9-
siteUrl: `https://netsnek.com`
9+
siteUrl: `https://barbara-mauz.at/`
1010
},
1111
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
1212
// If you use VSCode you can also use the GraphQL plugin
@@ -25,13 +25,13 @@ const config: GatsbyConfig = {
2525
repository: 'netsnek/netsnek.com'
2626
},
2727
zitadel: {
28-
organizationId: '268207341512496739',
29-
clientId: '268418317486724723@photonq',
30-
authority: 'https://accounts.photonq.org',
28+
organizationId: '278641258304378483',
29+
clientId: '278642690558596723@barbara-mauz',
30+
authority: 'https://accounts.netsnek.com',
3131
redirectUri:
3232
process.env.NODE_ENV === 'production'
3333
? 'https://netsnek.com'
34-
: 'https://opulent-carnival-pg7v6wp7prhr556-8000.app.github.dev',
34+
: 'https://redesigned-carnival-4gq4rvwqwvhq4pp-8000.app.github.dev',
3535
projectIds: ['263491274097563233']
3636
},
3737
// sentry: {
@@ -47,9 +47,10 @@ const config: GatsbyConfig = {
4747
{
4848
resolve: `gatsby-jaen-mailpress`,
4949
options: {
50-
pylonUrl: 'https://pylons.photonq.org/mailpress/graphql'
50+
pylonUrl: 'https://mailpress.netsnek.com/graphql'
5151
}
52-
}
52+
},
53+
//`gatsby-jaen-lens`
5354
]
5455
};
5556

gatsby-node.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PageConfig } from '@atsnek/jaen';
1+
import { PageConfig } from 'jaen';
22
import { GatsbyNode } from 'gatsby';
33
import path from 'path';
44
import fs from 'fs';
@@ -35,6 +35,16 @@ export const onPostBuild: GatsbyNode['onPostBuild'] = async ({
3535
jaenFields: Record<string, any> | null;
3636
pageConfig: PageConfig | null;
3737
buildPath: string;
38+
sections: Array<{
39+
items: Array<{
40+
jaenFields: Record<string, any>;
41+
sections: Array<{
42+
items: Array<{
43+
jaenFields: Record<string, any>;
44+
}>;
45+
}>;
46+
}>;
47+
}>;
3848
}>;
3949
};
4050
}>(`
@@ -53,6 +63,16 @@ export const onPostBuild: GatsbyNode['onPostBuild'] = async ({
5363
jaenFields
5464
pageConfig
5565
buildPath
66+
sections {
67+
items {
68+
jaenFields
69+
sections {
70+
items {
71+
jaenFields
72+
}
73+
}
74+
}
75+
}
5676
}
5777
}
5878
}
@@ -85,6 +105,16 @@ async function preparePagesAndBuildSearch(allJaenPage: {
85105
jaenFields: Record<string, any> | null;
86106
pageConfig: PageConfig | null;
87107
buildPath: string;
108+
sections: Array<{
109+
items: Array<{
110+
jaenFields: Record<string, any>;
111+
sections: Array<{
112+
items: Array<{
113+
jaenFields: Record<string, any>;
114+
}>;
115+
}>;
116+
}>;
117+
}>;
88118
}>;
89119
}) {
90120
const nodesForSearchIndex = allJaenPage.nodes.map(node => {

package.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"postinstall": "patch-package"
1818
},
1919
"dependencies": {
20-
"@atsnek/jaen": "^1.0.0-rc.87",
21-
"@atsnek/jaen-fields-mdx": "^1.0.0-rc.19",
20+
"jaen": "^1.2.2",
21+
"jaen-fields-mdx": "^1.2.1",
2222
"@chakra-ui/icons": "^2.1.0",
2323
"@chakra-ui/react": "^2.8.1",
2424
"@emotion/react": "^11.11.1",
@@ -27,22 +27,25 @@
2727
"flexsearch": "^0.7.43",
2828
"framer-motion": "^10.16.1",
2929
"gatsby": "^5.11.0",
30-
"gatsby-jaen-mailpress": "0.0.6",
31-
"gatsby-plugin-cloudflare-pages": "^1.0.2",
32-
"gatsby-plugin-jaen": "^1.0.0-rc.102",
30+
"gatsby-jaen-lens": "1.2.0",
31+
"gatsby-jaen-mailpress": "^2.1.1",
32+
"gatsby-plugin-cloudflare-pages": "^1.0.3",
33+
"gatsby-plugin-jaen": "^1.4.0",
3334
"github-slugger": "^2.0.0",
35+
"hast-util-sanitize": "^5.0.1",
3436
"prismjs": "^1.29.0",
3537
"quantum-circuit": "^0.9.218",
3638
"react": "^18.2.0",
3739
"react-dom": "^18.2.0",
3840
"react-fast-marquee": "^1.6.4",
3941
"react-highlight-words": "^0.20.0",
42+
"react-simple-code-editor": "^0.13.1",
4043
"react-tsparticles": "^2.12.2",
44+
"snek-query": "^0.0.114",
4145
"tsparticles": "^2.12.0",
46+
"use-debounce": "^10.0.0",
4247
"zxcvbn": "^4.4.2",
43-
"react-simple-code-editor": "^0.13.1",
44-
"snek-query": "^0.0.114",
45-
"use-debounce": "^10.0.0"
48+
"gqty": "^3.2.2"
4649
},
4750
"devDependencies": {
4851
"@types/github-slugger": "^2.0.0",
@@ -51,6 +54,7 @@
5154
"@types/react": "^18.2.14",
5255
"@types/react-dom": "^18.2.6",
5356
"@types/react-highlight-words": "^0.16.4",
57+
"@types/uuid": "^9.0.8",
5458
"@types/zxcvbn": "^4.4.4",
5559
"patch-package": "^8.0.0",
5660
"typescript": "^5.1.6"

src/components/AppLayout/AppLayout.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { FC, ReactNode, useMemo } from 'react';
33
import TopNav from '../navigation/TopNav';
44
import AltTopNav from '../navigation/AltTopNav';
55

6-
import { useAuth, useCMSManagementContext } from '@atsnek/jaen';
6+
import { useAuth, useCMSManagementContext } from 'jaen';
77
import { useLocation } from '@reach/router';
88
import { MenuStructureContext } from '../../contexts/menu-structure';
99
import { createPageTree } from '../../utils/navigation';
@@ -17,7 +17,7 @@ interface AppLayoutProps {
1717
children?: React.ReactNode;
1818
isDocs?: boolean;
1919
path: string;
20-
footer?: FC;
20+
footer?: FC<{ pullUp?: boolean }>;
2121
}
2222

2323
/**
@@ -43,14 +43,12 @@ const AppLayout: FC<AppLayoutProps> = ({ children, isDocs, path, footer }) => {
4343

4444
const isCommunity = ['/experiments', '/experiments/'].includes(path);
4545

46-
if (isDocs) {
46+
if (isDocs || isCommunity) {
4747
childrenElmnt = (
4848
<DocsLayout path={path} isCommunity={isCommunity}>
4949
{children}
5050
</DocsLayout>
5151
);
52-
} else if (isCommunity) {
53-
childrenElmnt = <CommunityLayout>{children}</CommunityLayout>;
5452
} else if (
5553
(path.startsWith('/experiments') &&
5654
path !== '/experiments/' &&
@@ -89,12 +87,12 @@ const AppLayout: FC<AppLayoutProps> = ({ children, isDocs, path, footer }) => {
8987
yOffset={-96}
9088
interactive
9189
/>}
92-
{!isAuthenticated && path !== "/" && <TopNav path={path} />}
90+
{!isAuthenticated && path !== "/" && <AltTopNav path={path} />}
9391
{!isAuthenticated && path === "/" && <AltTopNav path={path} />}
9492
{childrenElmnt}
9593
</Box>
9694
</MenuStructureContext.Provider>
97-
<FooterComp />
95+
<FooterComp pullUp={path === '/'} />
9896
</>
9997
);
10098
};

src/components/AppLayout/DocsLayout.tsx

Lines changed: 65 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@ import { createBreadCrumbParts } from '../../utils/navigation';
88
import { MainBreadcrumbPart } from '../../utils/navigation/types';
99
import Links from '../Links';
1010
import TbUsers from '../icons/tabler/TbUsers';
11+
import TbBooks from '../icons/tabler/TbBooks';
1112
import MainBottomNav from '../navigation/MainBottomNav';
1213
import MainBreadcrumb from '../navigation/MainBreadcrumb';
1314
import TableOfContent from '../navigation/TableOfContent';
1415
import PageDirectory from '../navigation/page-directory/PageDirectory';
1516

16-
const links = [
17-
{
18-
name: 'Question? Give us feedback',
19-
href: '/contact'
20-
},
21-
{
22-
name: 'Edit this page on Jaen',
23-
href: '/cms/pages'
24-
}
17+
const links: {
18+
name: string;
19+
href: string;
20+
}[] = [
21+
// {
22+
// name: 'Question? Give us feedback',
23+
// href: '/contact'
24+
// },
25+
// {
26+
// name: 'Edit this page on Jaen',
27+
// href: '/cms/pages'
28+
// }
2529
];
2630

2731
interface DocsLayoutProps {
@@ -38,7 +42,7 @@ const DocsLayout: FC<DocsLayoutProps> = ({ children, path, isCommunity }) => {
3842
const breadcrumbParts: MainBreadcrumbPart[] = useMemo(() => {
3943
return [
4044
{
41-
name: 'Documentation',
45+
name: 'Artikel',
4246
isDisabled: path === '/docs/',
4347
href: '/docs'
4448
},
@@ -50,8 +54,6 @@ const DocsLayout: FC<DocsLayoutProps> = ({ children, path, isCommunity }) => {
5054

5155
const MemoizedToc = React.memo(TableOfContent, () => false);
5256

53-
console.log('DocsLayout', path);
54-
5557
const offset = useNavOffset();
5658

5759
return (
@@ -74,22 +76,22 @@ const DocsLayout: FC<DocsLayoutProps> = ({ children, path, isCommunity }) => {
7476
path={path}
7577
baseMenuItems={[
7678
{
77-
name: 'Research',
78-
icon: <TbUsers />,
79+
name: 'Rezept Etnwicklung',
80+
icon: <TbBooks />,
7981
items: [
8082
{
81-
name: 'Experiments',
82-
href: '/experiments',
83-
isActive: path?.startsWith('/experiments')
83+
name: 'Rezepte',
84+
href: '/recipes',
85+
isActive: path?.startsWith('/recipes')
8486
}
8587
]
8688
},
8789
{
88-
name: 'More',
90+
name: 'Mehr',
8991
icon: <FaLink />,
9092
items: [
9193
{
92-
name: 'PhotonQ',
94+
name: 'Hauptseite',
9395
href: '/'
9496
}
9597
]
@@ -104,48 +106,55 @@ const DocsLayout: FC<DocsLayoutProps> = ({ children, path, isCommunity }) => {
104106
</Container> */}
105107

106108
<TOCProvider>
107-
<Container flex="1" mt="6" maxW="3xl">
108-
<MainBreadcrumb parts={breadcrumbParts} />
109-
110-
{memoedChildren}
109+
{isCommunity ? (
110+
<Box flex="1" mt="6" mx="8">
111+
{memoedChildren}
112+
</Box>
113+
) : (
114+
<>
115+
<Container flex="1" mt="6" maxW="3xl">
116+
<MainBreadcrumb parts={breadcrumbParts} />
111117

112-
<MainBottomNav />
113-
</Container>
118+
{memoedChildren}
114119

115-
<Box
116-
as="aside"
117-
flex="1"
118-
maxW={{ base: '150px', lg: '2xs' }}
119-
display={{
120-
base: 'none',
121-
md: 'block'
122-
}}
123-
pb="4"
124-
>
125-
<Box position="sticky" top="100px" mt="50px">
126-
<Flex as="nav" direction="column" mt={5}>
127-
<MemoizedToc />
128-
</Flex>
120+
<MainBottomNav />
121+
</Container>
129122
<Box
130-
mt={7}
131-
pt={7}
132-
borderTop="1px solid"
133-
borderTopColor="components.separator.borderColor"
134-
fontSize="xs"
123+
as="aside"
124+
flex="1"
125+
maxW={{ base: '150px', lg: '2xs' }}
126+
display={{
127+
base: 'none',
128+
md: 'block'
129+
}}
130+
pb="4"
135131
>
136-
<VStack rowGap={1} textAlign="left">
137-
<Links
138-
links={links}
139-
props={{
140-
variant: 'right-bottom-nav',
141-
w: '100%',
142-
display: 'block'
143-
}}
144-
/>
145-
</VStack>
132+
<Box position="sticky" top="100px" mt="50px">
133+
<Flex as="nav" direction="column" mt={5}>
134+
<MemoizedToc />
135+
</Flex>
136+
<Box
137+
mt={7}
138+
pt={7}
139+
borderTop="1px solid"
140+
borderTopColor="components.separator.borderColor"
141+
fontSize="xs"
142+
>
143+
<VStack rowGap={1} textAlign="left">
144+
<Links
145+
links={links}
146+
props={{
147+
variant: 'right-bottom-nav',
148+
w: '100%',
149+
display: 'block'
150+
}}
151+
/>
152+
</VStack>
153+
</Box>
154+
</Box>
146155
</Box>
147-
</Box>
148-
</Box>
156+
</>
157+
)}
149158
</TOCProvider>
150159
</Flex>
151160
</Container>

0 commit comments

Comments
 (0)