Skip to content

Commit

Permalink
Merge pull request #812 from appwrite/startup-page
Browse files Browse the repository at this point in the history
feat: startups form page
  • Loading branch information
TorstenDittmann authored Apr 23, 2024
2 parents 329d7a6 + f38f8f5 commit ebd7390
Show file tree
Hide file tree
Showing 48 changed files with 1,680 additions and 19 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PUBLIC_APPWRITE_FN_TLDR_ID=
PUBLIC_APPWRITE_ENDPOINT=
PUBLIC_APPWRITE_PROJECT_ID=
PUBLIC_APPWRITE_PROJECT_INIT_ID=
PUBLIC_GROWTH_ENDPOINT=
APPWRITE_DB_INIT_ID=
APPWRITE_COL_INIT_ID=
APPWRITE_API_KEY_INIT=
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
"PUBLIC_APPWRITE_COL_MESSAGES_ID=${{ vars.PUBLIC_APPWRITE_COL_MESSAGES_ID }}"
"PUBLIC_APPWRITE_FN_TLDR_ID=${{ vars.PUBLIC_APPWRITE_FN_TLDR_ID }}"
"PUBLIC_APPWRITE_PROJECT_INIT_ID=${{ vars.PUBLIC_APPWRITE_PROJECT_INIT_ID }}"
"PUBLIC_GROWTH_ENDPOINT=${{ vars.PUBLIC_GROWTH_ENDPOINT }}"
"APPWRITE_DB_INIT_ID=${{ secrets.APPWRITE_DB_INIT_ID }}"
"APPWRITE_COL_INIT_ID=${{ secrets.APPWRITE_COL_INIT_ID }}"
"APPWRITE_API_KEY_INIT=${{ secrets.APPWRITE_API_KEY_INIT }}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
"PUBLIC_APPWRITE_COL_MESSAGES_ID=${{ vars.PUBLIC_APPWRITE_COL_MESSAGES_ID }}"
"PUBLIC_APPWRITE_FN_TLDR_ID=${{ vars.PUBLIC_APPWRITE_FN_TLDR_ID }}"
"PUBLIC_APPWRITE_PROJECT_INIT_ID=${{ vars.PUBLIC_APPWRITE_PROJECT_INIT_ID }}"
"PUBLIC_GROWTH_ENDPOINT=${{ vars.PUBLIC_GROWTH_ENDPOINT }}"
"APPWRITE_DB_INIT_ID=${{ secrets.APPWRITE_DB_INIT_ID }}"
"APPWRITE_COL_INIT_ID=${{ secrets.APPWRITE_COL_INIT_ID }}"
"APPWRITE_API_KEY_INIT=${{ secrets.APPWRITE_API_KEY_INIT }}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
PUBLIC_APPWRITE_COL_MESSAGES_ID: ${{ secrets.PUBLIC_APPWRITE_COL_MESSAGES_ID }}
PUBLIC_APPWRITE_FN_TLDR_ID: ${{ secrets.PUBLIC_APPWRITE_FN_TLDR_ID }}
PUBLIC_APPWRITE_PROJECT_INIT_ID: ${{ secrets.PUBLIC_APPWRITE_PROJECT_INIT_ID }}
PUBLIC_GROWTH_ENDPOINT: ${{ secrets.PUBLIC_GROWTH_ENDPOINT }}
APPWRITE_DB_INIT_ID: ${{ secrets.APPWRITE_DB_INIT_ID }}
APPWRITE_COL_INIT_ID: ${{ secrets.APPWRITE_COL_INIT_ID }}
APPWRITE_API_KEY_INIT: ${{ secrets.APPWRITE_API_KEY_INIT }}
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ ENV PUBLIC_APPWRITE_PROJECT_ID ${PUBLIC_APPWRITE_PROJECT_ID}
ARG PUBLIC_APPWRITE_PROJECT_INIT_ID
ENV PUBLIC_APPWRITE_PROJECT_INIT_ID ${PUBLIC_APPWRITE_PROJECT_INIT_ID}

ARG PUBLIC_GROWTH_ENDPOINT
ENV PUBLIC_GROWTH_ENDPOINT ${PUBLIC_GROWTH_ENDPOINT}

ARG APPWRITE_DB_INIT_ID
ENV APPWRITE_DB_INIT_ID ${APPWRITE_DB_INIT_ID}

Expand Down
14 changes: 6 additions & 8 deletions src/lib/components/FooterNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{ label: 'Functions', href: '/docs/products/functions' },
{ label: 'Messaging', href: '/docs/products/messaging' },
{ label: 'Storage', href: '/docs/products/storage' },
{ label: 'Realtime', href: '/docs/apis/realtime' },
{ label: 'Realtime', href: '/docs/apis/realtime' }
],
Learn: [
{ label: 'Docs', href: '/docs' },
Expand All @@ -57,6 +57,10 @@
rel: 'noopener noreferrer'
}
],
Program: [
{ label: 'Heroes', href: '/heroes' },
{ label: 'Startups', href: '/startups' }
],
About: [
{ label: 'Company', href: '/company' },
{ label: 'Pricing', href: '/pricing' },
Expand All @@ -66,20 +70,14 @@
target: '_blank',
rel: 'noopener noreferrer'
},
{ label: 'Heroes', href: '/heroes' },
{
label: 'Store',
href: 'https://appwrite.store',
target: '_blank',
rel: 'noopener noreferrer'
},
{ label: 'Contact us', href: '/contact-us' },
{ label: 'Assets', href: '/assets' },
],
Policies: [
{ label: 'Terms', href: '/terms' },
{ label: 'Privacy', href: '/privacy' },
{ label: 'Cookies', href: '/cookies' }
{ label: 'Assets', href: '/assets' }
]
};
</script>
Expand Down
9 changes: 8 additions & 1 deletion src/lib/components/MainFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@
</li>
{/each}
</ul>
<div>Copyright © {year} Appwrite</div>
<div class="u-flex u-gap-16">
<ul class="u-flex u-gap-8">
<li><a class="web-link" href="/terms">Terms</a></li>
<li><a class="web-link" href="/privacy">Privacy</a></li>
<li><a class="web-link" href="/cookies">Cookies</a></li>
</ul>
<div>Copyright © {year} Appwrite</div>
</div>
</footer>
{:else if variant === 'docs'}
<footer
Expand Down
15 changes: 10 additions & 5 deletions src/lib/utils/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface Property {
type?: string;
oneOf?: OpenAPIV3.ReferenceObject[];
} & OpenAPIV3.ReferenceObject;
}
}

export enum ModelType {
REST = 'REST',
Expand Down Expand Up @@ -203,6 +203,7 @@ async function getSpec(version: string, platform: string) {
export async function getApi(version: string, platform: string): Promise<OpenAPIV3.Document> {
const raw = await getSpec(version, platform);
const api = JSON.parse(raw);

return api;
}

Expand All @@ -220,7 +221,10 @@ export async function getDescription(service: string): Promise<string> {
if (!(target in descriptions)) {
throw new Error('Missing service description');
}
return descriptions[target]();

const description = descriptions[target]();

return description;
}

export async function getService(
Expand Down Expand Up @@ -308,6 +312,7 @@ export async function getService(
if (!(path in examples)) {
continue;
}

data.methods.push({
id: operation['x-appwrite'].method,
demo: await examples[path](),
Expand Down Expand Up @@ -353,7 +358,7 @@ export const generateExample = (schema: OpenAPIV3.SchemaObject, api: OpenAPIV3.D

const properties = Object.keys(schema.properties ?? {}).map((key) =>{
const name = key;
const fields = schema.properties?.[key];
const fields = schema.properties?.[key];
return {
name,
...fields
Expand Down Expand Up @@ -388,7 +393,7 @@ export const generateExample = (schema: OpenAPIV3.SchemaObject, api: OpenAPIV3.D
// default to first child type if multiple available
const firstSchema = (property.items as unknown as AppwriteSchemaObject)?.anyOf?.[0];
const schema = getSchema(getIdFromReference(firstSchema as OpenAPIV3.ReferenceObject), api)

return {
...carry,
[propertyName]: [generateExample(schema, api, modelType)]
Expand Down Expand Up @@ -429,4 +434,4 @@ export const generateExample = (schema: OpenAPIV3.SchemaObject, api: OpenAPIV3.D
}
}, {});
return example;
}
}
1 change: 1 addition & 0 deletions src/markdoc/layouts/Tutorial.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export type Tutorial = {
title: string;
framework?: string;
category?: string;
step: number;
href: string;
draft?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/changelog/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getAllChangelogEntries = async () => {
});
};

export const CHANGELOG_DEPENDENCY = 'changelog';
export const CHANGELOG_DEPENDENCY = 'dependency:changelog';

export const CHANGELOG_KEY = 'changelog';

Expand Down
Loading

0 comments on commit ebd7390

Please sign in to comment.