From 47f7631daa8e9200afeb7a719ace037061d4b46a Mon Sep 17 00:00:00 2001 From: LRVT <21357789+l4rm4nd@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:21:04 +0100 Subject: [PATCH] fix: remove tinymce and use svg logo --- README.md | 2 +- myapp/static/assets/img/logo.svg | 1074 +++++++++++++++++++++++ myapp/static/assets/js/main.js | 90 +- myapp/templates/base.html | 2 +- myapp/templates/registration/login.html | 2 +- 5 files changed, 1085 insertions(+), 85 deletions(-) create mode 100755 myapp/static/assets/img/logo.svg diff --git a/README.md b/README.md index 247744e..847415c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
Django web application to store and manage vouchers, coupons, loyalty and gift cards digitally
diff --git a/myapp/static/assets/img/logo.svg b/myapp/static/assets/img/logo.svg new file mode 100755 index 0000000..da29af9 --- /dev/null +++ b/myapp/static/assets/img/logo.svg @@ -0,0 +1,1074 @@ + \ No newline at end of file diff --git a/myapp/static/assets/js/main.js b/myapp/static/assets/js/main.js index e45c33d..0640c83 100644 --- a/myapp/static/assets/js/main.js +++ b/myapp/static/assets/js/main.js @@ -1,11 +1,11 @@ -/** -* Template Name: NiceAdmin -* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -* Updated: Apr 20 2024 with Bootstrap v5.3.3 -* Author: BootstrapMade.com -* License: https://bootstrapmade.com/license/ -*/ - +/** +* Template Name: NiceAdmin +* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ +* Updated: Apr 20 2024 with Bootstrap v5.3.3 +* Author: BootstrapMade.com +* License: https://bootstrapmade.com/license/ +*/ + (function() { "use strict"; @@ -187,80 +187,6 @@ const useDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; const isSmallScreen = window.matchMedia('(max-width: 1023.5px)').matches; - tinymce.init({ - selector: 'textarea.tinymce-editor', - plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons accordion', - editimage_cors_hosts: ['picsum.photos'], - menubar: 'file edit view insert format tools table help', - toolbar: "undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl", - autosave_ask_before_unload: true, - autosave_interval: '30s', - autosave_prefix: '{path}{query}-{id}-', - autosave_restore_when_empty: false, - autosave_retention: '2m', - image_advtab: true, - link_list: [{ - title: 'My page 1', - value: 'https://www.tiny.cloud' - }, - { - title: 'My page 2', - value: 'http://www.moxiecode.com' - } - ], - image_list: [{ - title: 'My page 1', - value: 'https://www.tiny.cloud' - }, - { - title: 'My page 2', - value: 'http://www.moxiecode.com' - } - ], - image_class_list: [{ - title: 'None', - value: '' - }, - { - title: 'Some class', - value: 'class-name' - } - ], - importcss_append: true, - file_picker_callback: (callback, value, meta) => { - /* Provide file and text for the link dialog */ - if (meta.filetype === 'file') { - callback('https://www.google.com/logos/google.jpg', { - text: 'My text' - }); - } - - /* Provide image and alt text for the image dialog */ - if (meta.filetype === 'image') { - callback('https://www.google.com/logos/google.jpg', { - alt: 'My alt text' - }); - } - - /* Provide alternative source and posted for the media dialog */ - if (meta.filetype === 'media') { - callback('movie.mp4', { - source2: 'alt.ogg', - poster: 'https://www.google.com/logos/google.jpg' - }); - } - }, - height: 600, - image_caption: true, - quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable', - noneditable_class: 'mceNonEditable', - toolbar_mode: 'sliding', - contextmenu: 'link image table', - skin: useDarkMode ? 'oxide-dark' : 'oxide', - content_css: useDarkMode ? 'dark' : 'default', - content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }' - }); - /** * Initiate Bootstrap validation check */ diff --git a/myapp/templates/base.html b/myapp/templates/base.html index dd1b4a7..00d8259 100644 --- a/myapp/templates/base.html +++ b/myapp/templates/base.html @@ -70,7 +70,7 @@