diff --git a/app/cybercode/settings.py b/app/cybercode/settings.py index ca31e50..84d81a0 100644 --- a/app/cybercode/settings.py +++ b/app/cybercode/settings.py @@ -139,7 +139,7 @@ customColorPalette = [ }, ] -# CKEDITOR_5_CUSTOM_CSS = 'css/ckeditor-font-color.css' # optional +# CKEDITOR_5_CUSTOM_CSS = 'app/static/cybercode/styles/editor.css' # optional # CKEDITOR_5_FILE_STORAGE = "path_to_storage.CustomStorage" # optional CKEDITOR_5_CONFIGS = { 'simple': { @@ -148,6 +148,7 @@ CKEDITOR_5_CONFIGS = { 'default': { 'toolbar': ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'imageUpload', ], + 'contentsCss': ['/static/cybercode/styles/editor.css'], 'language': 'ru', }, diff --git a/app/static/cybercode/styles/editor.css b/app/static/cybercode/styles/editor.css new file mode 100644 index 0000000..1fa226c --- /dev/null +++ b/app/static/cybercode/styles/editor.css @@ -0,0 +1,21 @@ +/*!* Пример кастомизации *!*/ +/*.ck-content {*/ +/* font-family: 'Arial', sans-serif;*/ +/* font-size: 48px;*/ +/* line-height: 1.6;*/ +/* color: #333;*/ +/*}*/ + +/*.ck-content h2 {*/ +/* color: #2c3e50;*/ +/* font-size: 24px;*/ +/* margin-top: 20px;*/ +/* margin-bottom: 10px;*/ +/*}*/ + +/*.ck-content p {*/ +/* color: #3498db;*/ +/* font-size: 24px;*/ +/* margin-top: 20px;*/ +/* margin-bottom: 10px;*/ +/*}*/ \ No newline at end of file diff --git a/app/static/cybercode/styles/style.css b/app/static/cybercode/styles/style.css index 77b03e3..5d52436 100644 --- a/app/static/cybercode/styles/style.css +++ b/app/static/cybercode/styles/style.css @@ -511,4 +511,18 @@ a.service-slide { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; -} \ No newline at end of file +} + +.ck-content h1 { + font-size: 2.5em; + margin-top: 1.5em; + margin-bottom: 0.5em; + color: #333; + font-weight: bold; +} +.ck-content p { + margin-top: 1em; + margin-bottom: 1em; + text-indent: 20px; +} + diff --git a/app/templates/base.html b/app/templates/base.html index 6fbd136..c0d7c36 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -19,6 +19,7 @@ + {% block title %}