From 2c9d5f4f30fb04c33c6be4945008b4fa8b37d71a Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Sat, 24 Oct 2020 14:38:49 +0200 Subject: [PATCH 1/4] Patch djangocms icons for d120 --- d120/settings.py | 6 +++++ .../link/default/link.html | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 d120/templates/djangocms_bootstrap4/link/default/link.html diff --git a/d120/settings.py b/d120/settings.py index f76cc6d..3e5271a 100644 --- a/d120/settings.py +++ b/d120/settings.py @@ -289,3 +289,9 @@ # application-specific-cookies CSRF_COOKIE_NAME = 'djangocms_csrftoken' SESSION_COOKIE_NAME = 'djangocms_sessionid' + +### ICONS ### + +DJANGOCMS_ICON_SETS = ( + ('fontawesome4', 'fa', 'Font Awesome 4', 'lastest'), +) diff --git a/d120/templates/djangocms_bootstrap4/link/default/link.html b/d120/templates/djangocms_bootstrap4/link/default/link.html new file mode 100644 index 0000000..9e4e42d --- /dev/null +++ b/d120/templates/djangocms_bootstrap4/link/default/link.html @@ -0,0 +1,26 @@ +{% load cms_tags %}{% spaceless %} + {# this needs to be in one line for rendering purpose #} + + {% if instance.icon_left %} + + {% endif %} + {% for plugin in instance.child_plugin_instances %} + {% render_plugin plugin %} + {% empty %} + {{ instance.name }} + {% endfor %} + + {% if instance.icon_right %} + + {% endif %} + +{% endspaceless %} \ No newline at end of file From ea785fa72bcfacf1670111209d8381b20faf7a9e Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Sat, 24 Oct 2020 17:32:18 +0200 Subject: [PATCH 2/4] Fix admin icon assets --- d120/templates/admin/djangocms_icon/includes/assets.html | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 d120/templates/admin/djangocms_icon/includes/assets.html diff --git a/d120/templates/admin/djangocms_icon/includes/assets.html b/d120/templates/admin/djangocms_icon/includes/assets.html new file mode 100644 index 0000000..cf2629c --- /dev/null +++ b/d120/templates/admin/djangocms_icon/includes/assets.html @@ -0,0 +1,2 @@ +{% load staticfiles %} + \ No newline at end of file From b24f2d3ddefb2baa0cd0ce4c864bfe3bdf2bbfa3 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Sat, 24 Oct 2020 17:53:37 +0200 Subject: [PATCH 3/4] Add website CSS to ckeditor --- d120/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/d120/settings.py b/d120/settings.py index 3e5271a..75d40e9 100644 --- a/d120/settings.py +++ b/d120/settings.py @@ -275,6 +275,12 @@ 'skin': 'moono-lisa', 'toolbar': 'CMS', 'stylesSet': format_lazy('default:{}', reverse_lazy('admin:cascade_texteditor_config')), + 'contentsCss': [ + '/static/vendor/bootstrap/dist/css/bootstrap.min.css', + '/static/vendor/font-awesome/css/font-awesome.min.css', + '/static/vendor/typeface-libre-franklin/index.css', + '/static/d120/css/custom.css', + ], } CMSPLUGIN_CASCADE = { From 8c27a66bbaead4eac4a7b6f2e667ad9a4c865f74 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Sat, 24 Oct 2020 17:58:58 +0200 Subject: [PATCH 4/4] Re-add padding to ckeditor body --- d120/static/d120/css/custom.css | 3 +++ d120/templates/admin/djangocms_icon/includes/assets.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/d120/static/d120/css/custom.css b/d120/static/d120/css/custom.css index 1be6cc2..1b70708 100644 --- a/d120/static/d120/css/custom.css +++ b/d120/static/d120/css/custom.css @@ -5,6 +5,9 @@ body { color: #444444; overflow-y: scroll; } +body.cke_editable { + margin: 8px; +} a:hover { color: #111111; } diff --git a/d120/templates/admin/djangocms_icon/includes/assets.html b/d120/templates/admin/djangocms_icon/includes/assets.html index cf2629c..372dd0f 100644 --- a/d120/templates/admin/djangocms_icon/includes/assets.html +++ b/d120/templates/admin/djangocms_icon/includes/assets.html @@ -1,2 +1,2 @@ {% load staticfiles %} - \ No newline at end of file +