mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 11:31:42 +03:00
feat: update landing page
This commit is contained in:
parent
0cf010d1c1
commit
6e8f33dc2c
@ -1,10 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import {
|
||||
useRef,
|
||||
useEffect,
|
||||
useState,
|
||||
ReactElement,
|
||||
PropsWithChildren,
|
||||
ReactElement,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { styled } from '@/styles';
|
||||
import { EditorHeader } from '@/components/header';
|
||||
@ -16,6 +16,7 @@ import type { NextPageWithLayout } from '../..//_app';
|
||||
import WorkspaceLayout from '@/components/workspace-layout';
|
||||
import { useRouter } from 'next/router';
|
||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||
|
||||
const StyledEditorContainer = styled('div')(() => {
|
||||
return {
|
||||
height: 'calc(100vh - 60px)',
|
||||
@ -63,8 +64,12 @@ const Page: NextPageWithLayout = () => {
|
||||
currentPage!.addBlock({ flavour: 'affine:frame' }, pageId);
|
||||
// If this is a first page in workspace, init an introduction markdown
|
||||
if (isFirstPage) {
|
||||
editor.clipboard.importMarkdown(exampleMarkdown, `${frameId}`);
|
||||
currentWorkspace!.setPageMeta(currentPage!.id, { title });
|
||||
editor.clipboard
|
||||
.importMarkdown(exampleMarkdown, `${frameId}`)
|
||||
.then(() => {
|
||||
currentWorkspace!.setPageMeta(currentPage!.id, { title });
|
||||
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;
|
||||
3. New features such as dark mode; Switch between view styles using the ☀ and 🌙.
|
||||
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?**
|
||||
|
||||
@ -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
|
||||
- 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
|
||||
- Insert code blocks with syntax highlighting support using ```
|
||||
- Insert code blocks with syntax highlighting support using `````
|
||||
|
||||
### Playground:
|
||||
|
||||
[] 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?
|
||||
|
||||
![](https://cdn.affine.pro/694fdbab78e0da3ed7922eba7d506dcf12f57308e1904dd694f53eb2.jpg)
|
||||
|
||||
**How about page management?**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user