Skip to content

Commit 0ada1f8

Browse files
committed
Landing page implementation
1 parent e4b0b35 commit 0ada1f8

Some content is hidden

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

78 files changed

+18934
-851
lines changed

README.md

Lines changed: 1 addition & 848 deletions
Large diffs are not rendered by default.

example/public/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
name="description"
1010
content="The next content manager"
1111
/>
12-
<link rel="apple-touch-icon" href="logo192.png" />
12+
13+
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/icon-192x192.png">
14+
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
15+
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon-96x96.png">
16+
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
17+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/icon-192x192.png" />
1318
<!--
1419
manifest.json provides metadata used when your web app is installed on a
1520
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/

src/CMSAppProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const makeTheme = (
205205
default: mode === "dark" ? "#424242" : "#f6f8f9"
206206
},
207207
primary: {
208-
main: primaryColor ? primaryColor : blue["800"]
208+
main: primaryColor ? primaryColor : "#0070f4"
209209
},
210210
secondary: {
211211
main: secondaryColor ? secondaryColor : pink["400"]

src/collection/fields/TableNumberInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function NumberTableInput(props: {
4444
useEffect(
4545
() => {
4646
if (!focused && propStringValue !== internalValue)
47-
setInternalValue(value ? value.toString(): null);
47+
setInternalValue(value !== undefined && value !== null ? value.toString(): null);
4848
},
4949
[value, focused]
5050
);

src/types_test.tsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// This file contains a minimum example based on current code
2+
// to see that the type checking in our schemas does not work
3+
interface EntitySchema<Key extends string = string, T extends any = any> {
4+
properties: Record<Key, Property<T>>;
5+
}
6+
7+
type Property<T = any> =
8+
T extends string ? StringProperty :
9+
T extends number ? NumberProperty : never;
10+
11+
12+
interface StringProperty {
13+
dataType: "string";
14+
}
15+
16+
interface NumberProperty {
17+
dataType: "number";
18+
}
19+
20+
function buildSchemaFrom<Type extends Partial<{ [P in Key]: T; }>,
21+
Key extends string = Extract<keyof Type, string>,
22+
T = any>(
23+
schema: EntitySchema<Key, T>
24+
): EntitySchema<Key, T> {
25+
return schema;
26+
}
27+
28+
type Product = {
29+
name: string,
30+
price: number,
31+
}
32+
33+
export const productSchema = buildSchemaFrom<Product>({
34+
properties: {
35+
name: {
36+
dataType: "string"
37+
},
38+
price: {
39+
dataType: "string", // THIS SHOULD FAIL
40+
},
41+
// missing: { // This fails if uncommented, which is expected
42+
// dataType: "string",
43+
// },
44+
}
45+
});

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```console
8+
yarn install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
yarn start
15+
```
16+
17+
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

website/blog/2019-05-28-hola.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
slug: hola
3+
title: Hola
4+
author: Gao Wei
5+
author_title: Docusaurus Core Team
6+
author_url: https://github.com/wgao19
7+
author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4
8+
tags: [hola, docusaurus]
9+
---
10+
11+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
slug: hello-world
3+
title: Hello
4+
author: Endilie Yacop Sucipto
5+
author_title: Maintainer of Docusaurus
6+
author_url: https://github.com/endiliey
7+
author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
8+
tags: [hello, docusaurus]
9+
---
10+
11+
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://v2.docusaurus.io/).
12+
13+
<!--truncate-->
14+
15+
This is a test post.
16+
17+
A whole bunch of other information.

0 commit comments

Comments
 (0)