From f8ad4d326d3816fc5168b47ab2d1f01e90c11593 Mon Sep 17 00:00:00 2001 From: Agus Makmun Date: Thu, 2 Mar 2023 08:34:01 +0700 Subject: [PATCH] fix: issue #168 (dark mode looks horrible) --- martor/__init__.py | 4 +- martor/static/martor/css/martor-admin.css | 129 +++++++++++++----- martor/static/martor/css/martor-admin.min.css | 6 +- .../martor/css/martor.bootstrap.min.css | 4 +- .../static/martor/css/martor.semantic.min.css | 4 +- martor/static/martor/js/martor.bootstrap.js | 4 +- .../static/martor/js/martor.bootstrap.min.js | 4 +- martor/static/martor/js/martor.semantic.js | 4 +- .../static/martor/js/martor.semantic.min.js | 4 +- 9 files changed, 110 insertions(+), 53 deletions(-) diff --git a/martor/__init__.py b/martor/__init__.py index 79c88440c..4f4da4946 100644 --- a/martor/__init__.py +++ b/martor/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -__VERSION__ = "1.6.18" -__RELEASE_DATE__ = "15-Feb-2023" +__VERSION__ = "1.6.19" +__RELEASE_DATE__ = "02-Mar-2023" __AUTHOR__ = "Agus Makmun (Summon Agus)" __AUTHOR_EMAIL__ = "summon.agus@gmail.com" diff --git a/martor/static/martor/css/martor-admin.css b/martor/static/martor/css/martor-admin.css index 34ac2b65e..42010255f 100644 --- a/martor/static/martor/css/martor-admin.css +++ b/martor/static/martor/css/martor-admin.css @@ -22,58 +22,74 @@ body { } #branding h1 { - margin: 0!important; -} - -body, h1, h2, h3, h4, h5, -button, input, optgroup, select { - font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; -} - -h1, h2, h3, h4, h5 { - font-weight: bold!important; - line-height: unset!important; + margin: 0 !important; +} + +body, +h1, +h2, +h3, +h4, +h5, +button, +input, +optgroup, +select { + font-family: "Roboto", "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} + +h1, +h2, +h3, +h4, +h5 { + font-weight: bold !important; + line-height: unset !important; } h1 { - margin: 0 0 20px!important; - font-weight: 300!important; - font-size: 20px!important; - color: #333!important; + margin: 0 0 20px !important; + font-weight: 300 !important; + font-size: 20px !important; + color: #333 !important; } h2 { - font-size: 16px!important; - margin: 1em 0 .5em 0!important; + font-size: 16px !important; + margin: 1em 0 .5em 0 !important; } h2.subhead { - font-weight: normal!important; - margin-top: 0!important; + font-weight: normal !important; + margin-top: 0 !important; } h3 { - font-size: 14px!important; - margin: .8em 0 .3em 0!important; - color: #333!important; - font-weight: bold!important; + font-size: 14px !important; + margin: .8em 0 .3em 0 !important; + color: #333 !important; + font-weight: bold !important; } h4 { - font-size: 12px!important; - margin: 1em 0 .8em 0!important; - padding-bottom: 3px!important; + font-size: 12px !important; + margin: 1em 0 .8em 0 !important; + padding-bottom: 3px !important; } h5 { - font-size: 10px!important; - margin: 1.5em 0 .5em 0!important; - color: #333!important; - text-transform: uppercase!important; - letter-spacing: 1px!important; -} - -.button, input[type=submit], input[type=button], .submit-row input, a.button { + font-size: 10px !important; + margin: 1.5em 0 .5em 0 !important; + color: #333 !important; + text-transform: uppercase !important; + letter-spacing: 1px !important; +} + +.button, +input[type=submit], +input[type=button], +.submit-row input, +a.button { padding: 5px 15px; } @@ -89,8 +105,9 @@ nav.sticky caption { fieldset .form-row>div { width: 100%; } + fieldset .form-row .main-martor { - display: grid!important; + display: grid !important; } .submit-row a.deletelink { @@ -102,10 +119,50 @@ fieldset .form-row .main-martor { background: none; color: unset; padding: 0; - font-weight: 300!important; + font-weight: 300 !important; } /* fix issue: #152 */ .js-inline-admin-formset .form-row:not(.empty-form) { display: revert; } + +/* fix issue: #168 */ +@media (prefers-color-scheme: dark) { + body { + color: #fff; + background: #121212 !important; + } + + h1, + h3, + h5 { + color: #fff !important; + } + + /* bootstrap */ + .modal-help-guide .modal-content { + background: #121212 !important; + } + + .modal-help-guide .modal-title { + color: #333 !important; + font-size: unset !important; + margin: 0 !important; + } + + .modal-help-guide .table.markdown-reference { + background: #fff; + color: #fff; + } + + /* semantic-ui */ + .modal-help-guide .content { + background: #121212 !important; + } + + .tab-martor-menu .item, + .martor-toolbar .ui.basic.buttons .button { + color: #fff !important; + } +} \ No newline at end of file diff --git a/martor/static/martor/css/martor-admin.min.css b/martor/static/martor/css/martor-admin.min.css index fc299ddb8..a6e8b5d26 100644 --- a/martor/static/martor/css/martor-admin.min.css +++ b/martor/static/martor/css/martor-admin.min.css @@ -1,8 +1,8 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ -:root{--primary:#79aec8;--secondary:#417690}body{margin:0;padding:0;font-size:14px;color:#333;background:#fff}#container{-webkit-box-sizing:unset;box-sizing:unset}#branding h1{margin:0 !important}body,h1,h2,h3,h4,h5,button,input,optgroup,select{font-family:"Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif}h1,h2,h3,h4,h5{font-weight:bold !important;line-height:unset !important}h1{margin:0 0 20px !important;font-weight:300 !important;font-size:20px !important;color:#333 !important}h2{font-size:16px !important;margin:1em 0 .5em 0 !important}h2.subhead{font-weight:normal !important;margin-top:0 !important}h3{font-size:14px !important;margin:.8em 0 .3em 0 !important;color:#333 !important;font-weight:bold !important}h4{font-size:12px !important;margin:1em 0 .8em 0 !important;padding-bottom:3px !important}h5{font-size:10px !important;margin:1.5em 0 .5em 0 !important;color:#333 !important;text-transform:uppercase !important;letter-spacing:1px !important}.button,input[type=submit],input[type=button],.submit-row input,a.button{padding:5px 15px}nav.sticky caption{caption-side:unset}.ui.tabular.menu+.attached:not(.top).segment,.ui.tabular.menu+.attached:not(.top).segment+.attached:not(.top).segment{width:auto}fieldset .form-row>div{width:100%}fieldset .form-row .main-martor{display:grid !important}.submit-row a.deletelink{height:unset}.table.markdown-reference h2{font-size:1.5em;background:0;color:unset;padding:0;font-weight:300 !important}.js-inline-admin-formset .form-row:not(.empty-form){display:revert} +:root{--primary:#79aec8;--secondary:#417690}body{margin:0;padding:0;font-size:14px;color:#333;background:#fff}#container{-webkit-box-sizing:unset;box-sizing:unset}#branding h1{margin:0!important}body,h1,h2,h3,h4,h5,button,input,optgroup,select{font-family:"Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif}h1,h2,h3,h4,h5{font-weight:bold!important;line-height:unset!important}h1{margin:0 0 20px!important;font-weight:300!important;font-size:20px!important;color:#333!important}h2{font-size:16px!important;margin:1em 0 .5em 0!important}h2.subhead{font-weight:normal!important;margin-top:0!important}h3{font-size:14px!important;margin:.8em 0 .3em 0!important;color:#333!important;font-weight:bold!important}h4{font-size:12px!important;margin:1em 0 .8em 0!important;padding-bottom:3px!important}h5{font-size:10px!important;margin:1.5em 0 .5em 0!important;color:#333!important;text-transform:uppercase!important;letter-spacing:1px!important}.button,input[type=submit],input[type=button],.submit-row input,a.button{padding:5px 15px}nav.sticky caption{caption-side:unset}.ui.tabular.menu+.attached:not(.top).segment,.ui.tabular.menu+.attached:not(.top).segment+.attached:not(.top).segment{width:auto}fieldset .form-row>div{width:100%}fieldset .form-row .main-martor{display:grid!important}.submit-row a.deletelink{height:unset}.table.markdown-reference h2{font-size:1.5em;background:none;color:unset;padding:0;font-weight:300!important}.js-inline-admin-formset .form-row:not(.empty-form){display:revert}@media (prefers-color-scheme:dark){body{color:#fff;background:#121212!important}h1,h3,h5{color:#fff!important}.modal-help-guide .modal-content{background:#121212!important}.modal-help-guide .modal-title{color:#333!important;font-size:unset!important;margin:0!important}.modal-help-guide .table.markdown-reference{background:#fff;color:#fff}.modal-help-guide .content{background:#121212!important}.tab-martor-menu .item,.martor-toolbar .ui.basic.buttons .button{color:#fff!important}} \ No newline at end of file diff --git a/martor/static/martor/css/martor.bootstrap.min.css b/martor/static/martor/css/martor.bootstrap.min.css index 1b088e3eb..005cb6156 100644 --- a/martor/static/martor/css/martor.bootstrap.min.css +++ b/martor/static/martor/css/martor.bootstrap.min.css @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ diff --git a/martor/static/martor/css/martor.semantic.min.css b/martor/static/martor/css/martor.semantic.min.css index 302cd757c..9109fb01b 100644 --- a/martor/static/martor/css/martor.semantic.min.css +++ b/martor/static/martor/css/martor.semantic.min.css @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ diff --git a/martor/static/martor/js/martor.bootstrap.js b/martor/static/martor/js/martor.bootstrap.js index 477d755ce..154c2949b 100644 --- a/martor/static/martor/js/martor.bootstrap.js +++ b/martor/static/martor/js/martor.bootstrap.js @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ diff --git a/martor/static/martor/js/martor.bootstrap.min.js b/martor/static/martor/js/martor.bootstrap.min.js index 7ae6d92a0..a63d275e8 100644 --- a/martor/static/martor/js/martor.bootstrap.min.js +++ b/martor/static/martor/js/martor.bootstrap.min.js @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ diff --git a/martor/static/martor/js/martor.semantic.js b/martor/static/martor/js/martor.semantic.js index 5cc5ceb69..faedd6e77 100644 --- a/martor/static/martor/js/martor.semantic.js +++ b/martor/static/martor/js/martor.semantic.js @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/ diff --git a/martor/static/martor/js/martor.semantic.min.js b/martor/static/martor/js/martor.semantic.min.js index b7b260e3e..c0de1db85 100644 --- a/martor/static/martor/js/martor.semantic.min.js +++ b/martor/static/martor/js/martor.semantic.min.js @@ -1,7 +1,7 @@ /** - * Name : Martor v1.6.18 + * Name : Martor v1.6.19 * Created by : Agus Makmun (Summon Agus) - * Release date : 15-Feb-2023 + * Release date : 02-Mar-2023 * License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 * Repository : https://github.com/agusmakmun/django-markdown-editor **/