From 63f404013bbdf47605a7b6d687bd9fb8d5fc7d91 Mon Sep 17 00:00:00 2001 From: rotimi_best Date: Wed, 30 Dec 2020 22:29:01 +0200 Subject: [PATCH] Ask page --- src/components/Tailwindcss.svelte | 5 +++ src/components/TextEditor.svelte | 5 ++- src/routes/_layout.svelte | 12 ++--- src/routes/ask.svelte | 49 ++++++++++++++++++-- src/routes/discussion/[id].svelte | 75 ++++++++++++++++--------------- 5 files changed, 98 insertions(+), 48 deletions(-) diff --git a/src/components/Tailwindcss.svelte b/src/components/Tailwindcss.svelte index 2ef9624e..e1caaebd 100644 --- a/src/components/Tailwindcss.svelte +++ b/src/components/Tailwindcss.svelte @@ -2,4 +2,9 @@ @tailwind base; @tailwind components; @tailwind utilities; + + h1, h2, h3, h4, h5, h6 { + font-size: revert; + font-weight: revert; + } diff --git a/src/components/TextEditor.svelte b/src/components/TextEditor.svelte index 4ab6e6eb..907fc65e 100644 --- a/src/components/TextEditor.svelte +++ b/src/components/TextEditor.svelte @@ -2,7 +2,8 @@ import marked from 'marked'; let isWriteMode = true; - let value = ``; + export let value = ``; + export let placeholder = ``; const activeClassName = 'border-b-2 border-blue-700';; const handleTabClick = tab => event => { @@ -52,7 +53,7 @@ {#if isWriteMode} {:else} diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte index 9eb496d6..eba050a8 100644 --- a/src/routes/_layout.svelte +++ b/src/routes/_layout.svelte @@ -8,12 +8,12 @@ - {discussion.title} @@ -37,27 +35,27 @@

{discussion.title}

-
- - Placeholder -

- {discussion.author.name} -

-

- 12h ago -

-
-
-
- {@html marked(discussion.question)} -
-
- -
+
+ + Placeholder +

+ {discussion.author.name} +

+

+ 12h ago +

+
+
+
+ {@html marked(discussion.question)} +
+
+ +
- {discussion.comments.length} ответы + {discussion.comments.length} ответы
{#each discussion.comments as comment} @@ -91,5 +89,8 @@ {/each}
- +