From 2107363492ed0b63ea51165513f9d1e6498cbc0a Mon Sep 17 00:00:00 2001 From: Dave Roberts Date: Mon, 9 Oct 2023 15:54:16 +0100 Subject: [PATCH] Redone to use popover Also modified popovers to allow for scrolling --- src/frontend/components/popover/_popover.scss | 23 +++++- views/topic.tt | 71 +++++++++++++++++-- 2 files changed, 88 insertions(+), 6 deletions(-) diff --git a/src/frontend/components/popover/_popover.scss b/src/frontend/components/popover/_popover.scss index 62a4d9348..6cb63db26 100644 --- a/src/frontend/components/popover/_popover.scss +++ b/src/frontend/components/popover/_popover.scss @@ -72,8 +72,29 @@ top: 1.5rem; max-width: 100%; margin-top: 0.375rem; - overflow-y: auto; + overflow-y: scroll; border-color: $brand-secundary; + max-height: 15rem; + + &::-webkit-scrollbar { + width: 0.5rem; + } + + &::-webkit-scrollbar-track { + background-color: $white; + } + + &::-webkit-scrollbar-thumb { + background-color: $brand-secundary; + } + + &::-webkit-scrollbar-corner { + background-color: transparent; + } + + &::-webkit-scrollbar-button { + display: none; + } } .popover.show { diff --git a/views/topic.tt b/views/topic.tt index 45a0a314a..58ab90f9f 100644 --- a/views/topic.tt +++ b/views/topic.tt @@ -17,7 +17,7 @@
-
+
[% @@ -41,7 +41,71 @@ value = topic.description filter = "html" help_text = "Use Markdown for formatting" - rows = 5; + rows = 5 + popover_body = ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MarkdownHTML
+
# Heading 1
+
+

Heading 1

+
+
## Heading 2
+
+

Heading 2

+
+
- bullet
+- bullet
+  - bullet
+  - bullet
+
+
    +
  • bullet
  • +
  • bullet +
      +
    • bullet
    • +
    • bullet
    • +
    +
  • +
+
+
*italic*
+
italic
+
**bold**
+
bold
+
[link](https://www.google.com)
+
link
' + popover_title = "Markdown Help"; %]
@@ -64,9 +128,6 @@
-
- [% INCLUDE snippets/markdown.tt %] -