feat: update landing page
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||||
import {
|
import {
|
||||||
useRef,
|
|
||||||
useEffect,
|
|
||||||
useState,
|
|
||||||
ReactElement,
|
|
||||||
PropsWithChildren,
|
PropsWithChildren,
|
||||||
|
ReactElement,
|
||||||
|
useEffect,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
import { EditorHeader } from '@/components/header';
|
import { EditorHeader } from '@/components/header';
|
||||||
@@ -16,6 +16,7 @@ import type { NextPageWithLayout } from '../..//_app';
|
|||||||
import WorkspaceLayout from '@/components/workspace-layout';
|
import WorkspaceLayout from '@/components/workspace-layout';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
|
|
||||||
const StyledEditorContainer = styled('div')(() => {
|
const StyledEditorContainer = styled('div')(() => {
|
||||||
return {
|
return {
|
||||||
height: 'calc(100vh - 60px)',
|
height: 'calc(100vh - 60px)',
|
||||||
@@ -63,8 +64,12 @@ const Page: NextPageWithLayout = () => {
|
|||||||
currentPage!.addBlock({ flavour: 'affine:frame' }, pageId);
|
currentPage!.addBlock({ flavour: 'affine:frame' }, pageId);
|
||||||
// If this is a first page in workspace, init an introduction markdown
|
// If this is a first page in workspace, init an introduction markdown
|
||||||
if (isFirstPage) {
|
if (isFirstPage) {
|
||||||
editor.clipboard.importMarkdown(exampleMarkdown, `${frameId}`);
|
editor.clipboard
|
||||||
|
.importMarkdown(exampleMarkdown, `${frameId}`)
|
||||||
|
.then(() => {
|
||||||
currentWorkspace!.setPageMeta(currentPage!.id, { title });
|
currentWorkspace!.setPageMeta(currentPage!.id, { title });
|
||||||
|
currentPage!.resetHistory();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
currentPage!.resetHistory();
|
currentPage!.resetHistory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ Let us know what you think of this latest version.
|
|||||||
2. More complete Markdown support and improved keyboard shortcuts;
|
2. More complete Markdown support and improved keyboard shortcuts;
|
||||||
3. New features such as dark mode; Switch between view styles using the ☀ and 🌙.
|
3. New features such as dark mode; Switch between view styles using the ☀ and 🌙.
|
||||||
4. Clean and modern UI/UX design.
|
4. Clean and modern UI/UX design.
|
||||||
|
5. You can self-host locally with Docker.
|
||||||
|
|
||||||
|
```basic
|
||||||
|
docker run -d -v [YOUR_PATH]:/app/data -p 3000:3000 ghcr.io/toeverything/affine-self-hosted:alpha-abbey-wood
|
||||||
|
```
|
||||||
|
|
||||||
**Looking for Markdown syntax or keyboard shortcuts?**
|
**Looking for Markdown syntax or keyboard shortcuts?**
|
||||||
|
|
||||||
@@ -23,15 +28,21 @@ Let us know what you think of this latest version.
|
|||||||
- Copy and paste **images** into your pages, resize them and add captions
|
- Copy and paste **images** into your pages, resize them and add captions
|
||||||
- Add horizontal line dividers to your text with `---` and `***`
|
- Add horizontal line dividers to your text with `---` and `***`
|
||||||
- Changes are saved **locally**, but we still recommend you export your data to avoid data loss
|
- Changes are saved **locally**, but we still recommend you export your data to avoid data loss
|
||||||
- Insert code blocks with syntax highlighting support using ```
|
- Insert code blocks with syntax highlighting support using `````
|
||||||
|
|
||||||
### Playground:
|
### Playground:
|
||||||
|
|
||||||
[] Try a horizontal line: `---`
|
[] Try a horizontal line: `---`
|
||||||
|
|
||||||
[] What about a code block? ```
|
[] What about a code block? `````
|
||||||
|
|
||||||
console.log('Hello world');
|
```javascript
|
||||||
|
console.log('Hello world');
|
||||||
|
```
|
||||||
|
|
||||||
|
[] Can you resize this image?
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
**How about page management?**
|
**How about page management?**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user