diff --git a/app/static/css/editor.css b/app/static/css/editor.css new file mode 100644 index 0000000..77eeaf3 --- /dev/null +++ b/app/static/css/editor.css @@ -0,0 +1,22 @@ +.editor div { + display: flex; flex-direction: row; + flex-wrap: wrap; align-items: center; + margin-bottom: 5px; +} +.editor button { + height: 25px; margin: 0 0px; padding: 0 3px; + border: 1px solid #00000000; border-radius: 2px; + cursor: pointer; + background: #ffffff; +} +.editor button > img { + opacity: .7; +} +.editor button:hover, +.editor button:focus { + border-color: #000000ff; +} +.editor button:hover > img, +.editor button:focus > img { + opacity: 1; +} diff --git a/app/static/icons/editor/code-braces.svg b/app/static/icons/editor/code-braces.svg new file mode 100644 index 0000000..a989b54 --- /dev/null +++ b/app/static/icons/editor/code-braces.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/comment-alert-outline.svg b/app/static/icons/editor/comment-alert-outline.svg new file mode 100644 index 0000000..cfc9e47 --- /dev/null +++ b/app/static/icons/editor/comment-alert-outline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-bold.svg b/app/static/icons/editor/format-bold.svg new file mode 100644 index 0000000..9998b23 --- /dev/null +++ b/app/static/icons/editor/format-bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-header-1.svg b/app/static/icons/editor/format-header-1.svg new file mode 100644 index 0000000..2227cfd --- /dev/null +++ b/app/static/icons/editor/format-header-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-header-2.svg b/app/static/icons/editor/format-header-2.svg new file mode 100644 index 0000000..a513b7d --- /dev/null +++ b/app/static/icons/editor/format-header-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-header-3.svg b/app/static/icons/editor/format-header-3.svg new file mode 100644 index 0000000..6d7b0d8 --- /dev/null +++ b/app/static/icons/editor/format-header-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-italic.svg b/app/static/icons/editor/format-italic.svg new file mode 100644 index 0000000..4ca4220 --- /dev/null +++ b/app/static/icons/editor/format-italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-list-bulleted.svg b/app/static/icons/editor/format-list-bulleted.svg new file mode 100644 index 0000000..3eb8f96 --- /dev/null +++ b/app/static/icons/editor/format-list-bulleted.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-list-numbered.svg b/app/static/icons/editor/format-list-numbered.svg new file mode 100644 index 0000000..1b11dd8 --- /dev/null +++ b/app/static/icons/editor/format-list-numbered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-quote-close.svg b/app/static/icons/editor/format-quote-close.svg new file mode 100644 index 0000000..22e40c8 --- /dev/null +++ b/app/static/icons/editor/format-quote-close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-strikethrough.svg b/app/static/icons/editor/format-strikethrough.svg new file mode 100644 index 0000000..972b17b --- /dev/null +++ b/app/static/icons/editor/format-strikethrough.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/format-underline.svg b/app/static/icons/editor/format-underline.svg new file mode 100644 index 0000000..cd4aa0a --- /dev/null +++ b/app/static/icons/editor/format-underline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/editor/link-variant.svg b/app/static/icons/editor/link-variant.svg new file mode 100644 index 0000000..51f81d5 --- /dev/null +++ b/app/static/icons/editor/link-variant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/images/3864.png b/app/static/images/3864.png deleted file mode 100644 index 5eadf61..0000000 Binary files a/app/static/images/3864.png and /dev/null differ diff --git a/app/static/images/calc.png b/app/static/images/calc.png deleted file mode 100644 index 2822c3b..0000000 Binary files a/app/static/images/calc.png and /dev/null differ diff --git a/app/static/images/default_avatar.png b/app/static/images/default_avatar.png index 4e38bee..6e96673 100644 Binary files a/app/static/images/default_avatar.png and b/app/static/images/default_avatar.png differ diff --git a/app/static/images/laptop.png b/app/static/images/laptop.png deleted file mode 100644 index a6afed9..0000000 Binary files a/app/static/images/laptop.png and /dev/null differ diff --git a/app/templates/widgets/editor.html b/app/templates/widgets/editor.html index f51c3ae..2b8c80c 100644 --- a/app/templates/widgets/editor.html +++ b/app/templates/widgets/editor.html @@ -1,10 +1,28 @@ {% macro text_editor(field, label=True) %} -
+
{{ field.label if label }} -
Widgets. Lots of widgets :3 For lightscript
+
+ + + + + + + + + + + + + + + + + +
{{ field() }} {% for error in field.errors %} - {{ error }} + {{ error }} {% endfor %}
{% endmacro %} diff --git a/app/utils/render.py b/app/utils/render.py index d846e3c..35a04d1 100644 --- a/app/utils/render.py +++ b/app/utils/render.py @@ -18,6 +18,7 @@ def render(*args, styles=[], scripts=[], **kwargs): 'css/navbar.css', 'css/header.css', 'css/container.css', + 'css/editor.css', 'css/form.css', 'css/footer.css', 'css/flash.css',