From eb3fcec3573c1af7f163759b280e64d29d76bde4 Mon Sep 17 00:00:00 2001 From: Artemy Date: Thu, 9 Feb 2023 17:15:34 +0300 Subject: [PATCH] feat: description --- src/App.jsx | 20 +++++++++++++++----- src/components/button.jsx | 4 ++-- src/components/menu.jsx | 14 +++++++------- src/index.css | 12 +++++++----- src/pages/create.jsx | 6 +++--- src/pages/note.jsx | 14 +++++++------- src/pages/notes.jsx | 6 +++--- src/pages/pubError.jsx | 6 +++--- src/pages/pubNote.jsx | 6 +++--- src/pages/pubNoteSafe.jsx | 6 +++--- 10 files changed, 53 insertions(+), 41 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index eee1c8b..f416cfb 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -9,6 +9,7 @@ import Notes from "./pages/notes"; import PubNote from "./pages/pubNote"; import PubError from "./pages/pubError"; import PubNoteSafe from "./pages/pubNoteSafe"; +import ReactMarkdown from "react-markdown"; function App() { Storage.prototype.setObj = function (key, obj) { @@ -33,11 +34,20 @@ function App() { - AnoPaper позволяет анонимно сохранять и опубликовывать заметки. - Заметки поддерживают формат markdown. Публичные заметки доступны - только по ссылке. Записки которые не публичны записываются - только локально и не отправляются на сервер. +
+ + {`## Anopaper - сервис анонимных записок + \rAnoPaper позволяет анонимно сохранять и публиковать заметки. + \r----- + \r### Функционал: + + \r* Заметки поддерживают формат markdown. Например запись: \`### Заголовок 3-го уровня\` будет выглядеть так: + \r> ### Заголовок 3-го уровня + + \r* Публичные заметки доступны только по ссылке. + \r* При переходе по ссылке заметка исчезает, прочесть ее можно только один раз. + \r* Не публичные заметки сохраняются локально и не отправляются на сервер.`} +
} /> diff --git a/src/components/button.jsx b/src/components/button.jsx index 0f1ccf4..f4bf34a 100644 --- a/src/components/button.jsx +++ b/src/components/button.jsx @@ -13,7 +13,7 @@ function Button(props) { ); } -function IconWithButton(props) { +function IconWithText(props) { if (props.reverse) { return (
@@ -30,4 +30,4 @@ function IconWithButton(props) { ); } -export { Button, IconWithButton }; +export { Button, IconWithText }; diff --git a/src/components/menu.jsx b/src/components/menu.jsx index 63cdb17..b80c5ae 100644 --- a/src/components/menu.jsx +++ b/src/components/menu.jsx @@ -1,4 +1,4 @@ -import { Button, IconWithButton } from "./button"; +import { Button, IconWithText } from "./button"; import { MagnifyingGlassCircleIcon, PencilIcon, @@ -10,29 +10,29 @@ function Menu() { return (
); diff --git a/src/index.css b/src/index.css index b540960..bd6bd48 100644 --- a/src/index.css +++ b/src/index.css @@ -25,7 +25,7 @@ } .md blockquote{ - @apply border-l-4 pl-2 rounded-lg; + @apply border-l-4 pl-2 rounded-lg ml-4 mt-2 mb-2; @apply bg-zinc-200 border-zinc-400; @apply dark:bg-zinc-800 dark:border-zinc-600; } @@ -35,19 +35,19 @@ } .md ul{ - @apply list-disc list-inside; + @apply list-disc list-inside ml-4; } .md li ul { - @apply list-disc list-inside ml-2; + @apply list-disc list-inside; } .md ol{ - @apply list-decimal list-inside; + @apply list-decimal list-inside ml-4; } .md li ol{ - @apply list-decimal list-inside ml-2; + @apply list-decimal list-inside ml-4; } .md code { @@ -64,4 +64,6 @@ .md img { @apply w-96 ease-[cubic-bezier(.69,.58,.32,1.69)] hover:scale-105 rounded-2xl hover:drop-shadow-2xl transition duration-500 lg:ml-5; } + + .md p { display: inline; } } \ No newline at end of file diff --git a/src/pages/create.jsx b/src/pages/create.jsx index 4d366a0..0c858d2 100644 --- a/src/pages/create.jsx +++ b/src/pages/create.jsx @@ -1,4 +1,4 @@ -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; import { ChevronDoubleRightIcon } from "@heroicons/react/24/outline"; import { CheckBox } from "../components/checkbox"; import { useState } from "react"; @@ -74,14 +74,14 @@ function CreateNote() { className="m-5" href={publicState ? "/notes/save-local" : "/notes/publish"} > - } > Отправить - +
diff --git a/src/pages/note.jsx b/src/pages/note.jsx index a3700d3..309488b 100644 --- a/src/pages/note.jsx +++ b/src/pages/note.jsx @@ -2,7 +2,7 @@ import ReactMarkdown from "react-markdown"; import { useParams } from "react-router-dom"; import printDate from "../components/utils"; import { ChevronDoubleLeftIcon, TrashIcon } from "@heroicons/react/24/outline"; -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; function Note() { let params = useParams(); @@ -13,13 +13,13 @@ function Note() { return (
@@ -48,11 +48,11 @@ function Note() { localStorage.setObj("Notes", notesObj); }} > - } > Удалить - +
@@ -62,13 +62,13 @@ function Note() { return (
Заметки не существует.
diff --git a/src/pages/notes.jsx b/src/pages/notes.jsx index a8554ef..dd9e987 100644 --- a/src/pages/notes.jsx +++ b/src/pages/notes.jsx @@ -1,4 +1,4 @@ -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; import { ChevronDoubleRightIcon } from "@heroicons/react/24/outline"; import printDate from "../components/utils"; @@ -22,14 +22,14 @@ function Notes() {
{printDate(val[1].time)}
diff --git a/src/pages/pubError.jsx b/src/pages/pubError.jsx index 0f03e34..ed1e668 100644 --- a/src/pages/pubError.jsx +++ b/src/pages/pubError.jsx @@ -1,18 +1,18 @@ import printDate from "../components/utils"; import { ChevronDoubleLeftIcon } from "@heroicons/react/24/outline"; -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; function PubError() { return (
diff --git a/src/pages/pubNote.jsx b/src/pages/pubNote.jsx index 2a48a34..68f6286 100644 --- a/src/pages/pubNote.jsx +++ b/src/pages/pubNote.jsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { useParams } from "react-router-dom"; import printDate from "../components/utils"; import { ChevronDoubleLeftIcon } from "@heroicons/react/24/outline"; -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; function PubNote() { let params = useParams(); @@ -37,13 +37,13 @@ function PubNote() { return (
diff --git a/src/pages/pubNoteSafe.jsx b/src/pages/pubNoteSafe.jsx index 32b1de8..cd34450 100644 --- a/src/pages/pubNoteSafe.jsx +++ b/src/pages/pubNoteSafe.jsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { useParams } from "react-router-dom"; import printDate from "../components/utils"; import { ChevronDoubleLeftIcon } from "@heroicons/react/24/outline"; -import { Button, IconWithButton } from "../components/button"; +import { Button, IconWithText } from "../components/button"; import { CopyToClipboard } from "../components/copytocb"; function PubNoteSafe() { @@ -41,13 +41,13 @@ function PubNoteSafe() { return (
{note?.code === 1 && (