feat(docs): update home page

This commit is contained in:
himself65
2023-06-25 22:25:13 +08:00
parent d525bd9113
commit fb6de18b2f
6 changed files with 52 additions and 20 deletions

View File

@@ -42,10 +42,11 @@ export const Editor = (props: EditorProps): ReactElement => {
page.addBlock('affine:surface', {}, pageBlockId);
const noteBlockId = page.addBlock('affine:note', {}, pageBlockId);
const contentParser = new ContentParser(page);
const content = text.split('---\n')[2];
const content = text.split('---\n').splice(2).join('---\n');
assertExists(content);
console.log('metadata', title, content);
await contentParser.importMarkdown(content, noteBlockId);
page.awarenessStore.setReadonly(page, true);
page.awarenessStore.setFlag('enable_drag_handle', false);
},
[props.text]
)}

View File

@@ -0,0 +1,16 @@
export const Sidebar = () => {
return (
<div
className="h-screen text-black overflow-y-auto"
style={{
backgroundColor: '#f9f7f7',
}}
>
<a href="/">
<div className="flex items-center justify-center h-16 font-bold">
AFFiNE
</div>
</a>
</div>
);
};