diff --git a/plugins/change-password/index.php b/plugins/change-password/index.php index 1cce443fd..14c441c20 100644 --- a/plugins/change-password/index.php +++ b/plugins/change-password/index.php @@ -23,7 +23,7 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin { $this->UseLangs(true); // start use langs folder - $this->addCss('style.less'); +// $this->addCss('style.css'); $this->addJs('js/ChangePasswordUserSettings.js'); // add js file $this->addJsonHook('ChangePassword', 'ChangePassword'); $this->addTemplate('templates/SettingsChangePassword.html'); diff --git a/plugins/ckeditor/ckeditor.less b/plugins/ckeditor/ckeditor.less deleted file mode 100644 index d8e75ab9f..000000000 --- a/plugins/ckeditor/ckeditor.less +++ /dev/null @@ -1,217 +0,0 @@ -/*.cke_button__sourcedialog_label { - display: none !important; -}*/ - -.cke_chrome { - border: 1px solid #ccc !important; -} - -.cke_toolgroup { - padding-right: 0 !important; - background: #FBFBFB !important; -} - -.cke_toolgroup, .cke_combo_button { - border: 1px solid #A6A6A6 !important; -} - -.cke_top { - padding: 2px; - box-shadow: none !important; - border-bottom: 1px solid #b6b6b6 !important; - background: #F0F0F0 !important; -} - -.cke_combo_on a.cke_combo_button, -.cke_combo_off a.cke_combo_button:hover, -.cke_combo_off a.cke_combo_button:focus, -.cke_combo_off a.cke_combo_button:active { - padding: 1px !important; - margin-left: 0 !important; -} - -.cke_toolgroup a.cke_button:last-child:after, -.cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after { - border: none !important; - height: 0 !important; - width: 0 !important; - margin: 0 !important; - padding: 0 !important; -} - -.cke_button_on { - background: #ddd !important; -} - -.cke_combo { - margin-top: 1px !important; -} - -.cke_combo__fontsize { - margin-left: 3px !important; - .cke_combo_text { - width: 40px !important; - } -} - -.cke_combo_text { - line-height: 24px !important; - padding-left: 8px !important; -} - -.cke_combo_button { - background: #FBFBFB !important; -} - -.cke_source { - font-family: var(--fontMono) !important; - padding: 10px !important; - padding-right: 0 !important; - box-shadow: none !important; -} - -.cke_plain { - - background-color: #fff; - outline: none; - overflow: auto; - z-index: 1; - margin: 0; - border: 0; - - padding: 10px; - padding-right: 0; - white-space: pre-wrap; - font-family: var(--fontMono), monospace; - font-size: 13px; - line-height: 16px; - color: #333; - resize: none; - - border-radius: 0; - box-shadow: none; - box-sizing: border-box; -} - -.cke_plain:focus, .cke_source:focus { - border: 0; -} - -.b-compose .cke_chrome { - border-right: 0; - border-left: 0; - border-bottom: 0; - box-shadow: none; -} - -.cke_wysiwyg_div { - - padding: 10px !important; - font-family: var(--fontSans); - font-size: 13px; - line-height: 16px; - color: #333; - - ul { - padding-left: 40px; - li { - list-style-type: disc !important; - } - } - - ol { - padding-left: 40px; - li { - list-style-type: decimal !important; - } - } - - pre, code { - margin: 0; - padding: 0; - background: #fff; - border: none; - border-radius: 0; - font-family: var(--fontMono); - display: block; - word-break: normal; - word-wrap: break-word; - background-color: #f9f9f9; - } - - code { - display: inline; - padding: 2px 5px; - } - - pre { - padding: 5px 10px; - border-radius: 5px; - background-color: #f9f9f9; - } - - pre > code { - padding: 0; - } - - blockquote { - border: 0; - border-left: solid 2px #444; - margin: 5px 0 5px 5px; - padding-left: 5px; - } - - blockquote p { - margin: 0 0 10px; - font-size: 14px; - line-height: 20px; - } - - img { - vertical-align: bottom; - } - - a { - color: blue; - text-decoration: underline; - - &:visited { - color: #609; - } - &:active { - color: red; - } - } -} - -.cke_dialog { - - a:hover { - text-decoration: none; - } - - .cke_dialog_ui_labeled_content { - margin-top: 5px; - margin-bottom: 5px; - } - - .cke_dialog_ui_input_select, .cke_dialog_ui_input_text, .cke_dialog_ui_input_textarea { - - box-shadow: none; - border-radius: 2px; - - &:focus { - outline: 0; - border: 1px solid #999; - } - } - - .cke_dialog_ui_input_select, .cke_dialog_ui_input_text { - height: 25px; - line-height: 25px; - } -} - -.RL-PopupsCompose[data-wysiwyg*=Forced] .cke_button__plain { - display: none; -} diff --git a/plugins/ckeditor/index.php b/plugins/ckeditor/index.php index f885cd5cd..528a66b56 100644 --- a/plugins/ckeditor/index.php +++ b/plugins/ckeditor/index.php @@ -32,7 +32,7 @@ class CKEditorPlugin extends \RainLoop\Plugins\AbstractPlugin } if (\is_file("{$path}/ckeditor.js")) { - $this->addCss('ckeditor.less'); + $this->addCss('style.css'); $this->addJs('ckeditor.js'); } } diff --git a/plugins/ckeditor/style.css b/plugins/ckeditor/style.css new file mode 100644 index 000000000..a1c50a8fb --- /dev/null +++ b/plugins/ckeditor/style.css @@ -0,0 +1,217 @@ +/*.cke_button__sourcedialog_label { + display: none; +}*/ + +.cke_chrome { + border: 1px solid #ccc; +} + +.cke_toolgroup { + padding-right: 0; + background: #FBFBFB; +} + +.cke_toolgroup, .cke_combo_button { + border: 1px solid #A6A6A6; +} + +.cke_top { + padding: 2px; + box-shadow: none; + border-bottom: 1px solid #b6b6b6; + background: #F0F0F0; +} + +.cke_combo_on a.cke_combo_button, +.cke_combo_off a.cke_combo_button:hover, +.cke_combo_off a.cke_combo_button:focus, +.cke_combo_off a.cke_combo_button:active { + padding: 1px; + margin-left: 0; +} + +a.cke_button:last-child::after, +a.cke_button.cke_button_disabled:hover:last-child::after { + border: none; + height: 0; + width: 0; + margin: 0; + padding: 0; +} + +.cke_button_on { + background: #ddd; +} + +.cke_combo { + margin-top: 1px; +} + +.cke_combo__fontsize { + margin-left: 3px; +} + +.cke_combo__fontsize .cke_combo_text { + width: 40px; +} + +.cke_combo_text { + line-height: 24px; + padding-left: 8px; +} + +.cke_combo_button { + background: #FBFBFB; +} + +.cke_source { + font-family: var(--fontMono); + padding: 10px; + padding-right: 0; + box-shadow: none; +} + +.cke_plain { + + background-color: #fff; + outline: none; + overflow: auto; + z-index: 1; + margin: 0; + border: 0; + + padding: 10px; + padding-right: 0; + white-space: pre-wrap; + font-family: var(--fontMono), monospace; + font-size: 13px; + line-height: 16px; + color: #333; + resize: none; + + border-radius: 0; + box-shadow: none; + box-sizing: border-box; +} + +.cke_plain:focus, .cke_source:focus { + border: 0; +} + +.b-compose .cke_chrome { + border-right: 0; + border-left: 0; + border-bottom: 0; + box-shadow: none; +} + +.cke_wysiwyg_div { + padding: 10px; + font-family: var(--fontSans); + font-size: 13px; + line-height: 16px; + color: #333; +} + +.cke_wysiwyg_div ul { + padding-left: 40px; +} +.cke_wysiwyg_div ul li { + list-style-type: disc; +} + +.cke_wysiwyg_div ol { + padding-left: 40px; +} +.cke_wysiwyg_div ol li { + list-style-type: decimal; +} + +.cke_wysiwyg_div pre, +.cke_wysiwyg_div code { + margin: 0; + padding: 0; + background: #fff; + border: none; + border-radius: 0; + font-family: var(--fontMono); + display: block; + word-break: normal; + word-wrap: break-word; + background-color: #f9f9f9; + } + +.cke_wysiwyg_div code { + display: inline; + padding: 2px 5px; +} + +.cke_wysiwyg_div pre { + padding: 5px 10px; + border-radius: 5px; + background-color: #f9f9f9; +} + +.cke_wysiwyg_div pre > code { + padding: 0; +} + +.cke_wysiwyg_div blockquote { + border: 0; + border-left: solid 2px #444; + margin: 5px 0 5px 5px; + padding-left: 5px; +} + +.cke_wysiwyg_div blockquote p { + margin: 0 0 10px; + font-size: 14px; + line-height: 20px; +} + +.cke_wysiwyg_div img { + vertical-align: bottom; +} + +.cke_wysiwyg_div a { + color: blue; + text-decoration: underline; +} +.cke_wysiwyg_div a:visited { + color: #609; +} +.cke_wysiwyg_div a:active { + color: red; +} + +.cke_dialog a:hover { + text-decoration: none; +} + +.cke_dialog_ui_labeled_content { + margin-top: 5px; + margin-bottom: 5px; +} + +.cke_dialog_ui_input_select, +.cke_dialog_ui_input_text, +.cke_dialog_ui_input_textarea { + box-shadow: none; + border-radius: 2px; +} +.cke_dialog_ui_input_select:focus, +.cke_dialog_ui_input_text:focus, +.cke_dialog_ui_input_textarea:focus { + outline: 0; + border: 1px solid #999; +} + +.cke_dialog_ui_input_select, +.cke_dialog_ui_input_text { + height: 25px; + line-height: 25px; +} + +.RL-PopupsCompose[data-wysiwyg*=Forced] .cke_button__plain { + display: none; +} diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php index 0e1885b10..a8b46be07 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Themes.php @@ -40,7 +40,8 @@ trait Themes $rDirH = \opendir($sDir); if ($rDirH) { while (($sFile = \readdir($rDirH)) !== false) { - if ('.' !== $sFile[0] && \is_dir($sDir . '/' . $sFile) && \file_exists($sDir . '/' . $sFile . '/styles.less')) { + if ('.' !== $sFile[0] && \is_dir($sDir . '/' . $sFile) + && (\file_exists("{$sDir}/{$sFile}/styles.css") || \file_exists("{$sDir}/{$sFile}/styles.less"))) { if ('Default' === $sFile) { $bDefault = true; } else if ('Clear' === $sFile) { @@ -59,7 +60,8 @@ trait Themes $rDirH = \opendir($sDir); if ($rDirH) { while (($sFile = \readdir($rDirH)) !== false) { - if ('.' !== $sFile[0] && \is_dir($sDir . '/' . $sFile) && \file_exists($sDir . '/' . $sFile . '/styles.less')) { + if ('.' !== $sFile[0] && \is_dir($sDir . '/' . $sFile) + && (\file_exists("{$sDir}/{$sFile}/styles.css") || \file_exists("{$sDir}/{$sFile}/styles.less"))) { $aCache[] = $sFile . '@custom'; } } @@ -104,14 +106,17 @@ trait Themes $aResult = array(); - $sThemeFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sTheme.'/styles.less'; + $sThemeCSSFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sTheme.'/styles.css'; + $sThemeLessFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sTheme.'/styles.less'; - if (\is_file($sThemeFile)) { - $aResult[] = '@base: "' - . ($bCustomTheme ? \RainLoop\Utils::WebPath() : \RainLoop\Utils::WebVersionPath()) - . 'themes/'.$sTheme.'/";'; + $sBase = ($bCustomTheme ? \RainLoop\Utils::WebPath() : \RainLoop\Utils::WebVersionPath()) + . "themes/{$sTheme}/"; - $aResult[] = \file_get_contents($sThemeFile); + if (\is_file($sThemeCSSFile)) { + $aResult[] = \preg_replace('/(url\(["\']?)(\\.)?([a-z])/', "\$1{$sBase}\$3", \str_replace('@{base}', $sBase, \file_get_contents($sThemeCSSFile))); + } else if (\is_file($sThemeLessFile)) { + $aResult[] = "@base: \"{$sBase}\";"; + $aResult[] = \file_get_contents($sThemeLessFile); } $aResult[] = $this->Plugins()->CompileCss($bAdmin); diff --git a/snappymail/v/0.0.0/themes/A/styles.less b/snappymail/v/0.0.0/themes/A/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/A/styles.less rename to snappymail/v/0.0.0/themes/A/styles.css index eee43e381..11677a7b3 100644 --- a/snappymail/v/0.0.0/themes/A/styles.less +++ b/snappymail/v/0.0.0/themes/A/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #48525C; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #fff; diff --git a/snappymail/v/0.0.0/themes/Blurred/styles.less b/snappymail/v/0.0.0/themes/Blurred/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Blurred/styles.less rename to snappymail/v/0.0.0/themes/Blurred/styles.css index 3f65603bc..1450c1050 100644 --- a/snappymail/v/0.0.0/themes/Blurred/styles.less +++ b/snappymail/v/0.0.0/themes/Blurred/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #563c55; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); --main-bg-size: cover; // LOADING diff --git a/snappymail/v/0.0.0/themes/Clear/styles.less b/snappymail/v/0.0.0/themes/Clear/styles.css similarity index 100% rename from snappymail/v/0.0.0/themes/Clear/styles.less rename to snappymail/v/0.0.0/themes/Clear/styles.css diff --git a/snappymail/v/0.0.0/themes/DarkShine/styles.less b/snappymail/v/0.0.0/themes/DarkShine/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/DarkShine/styles.less rename to snappymail/v/0.0.0/themes/DarkShine/styles.css index efd7d77bd..3c7d9d1d2 100644 --- a/snappymail/v/0.0.0/themes/DarkShine/styles.less +++ b/snappymail/v/0.0.0/themes/DarkShine/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #AD455C; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); --main-bg-size: cover; // LOADING diff --git a/snappymail/v/0.0.0/themes/Default/styles.less b/snappymail/v/0.0.0/themes/Default/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Default/styles.less rename to snappymail/v/0.0.0/themes/Default/styles.css index b427a9661..6daa4988b 100644 --- a/snappymail/v/0.0.0/themes/Default/styles.less +++ b/snappymail/v/0.0.0/themes/Default/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #48525C; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #ddd; diff --git a/snappymail/v/0.0.0/themes/Xv/styles.less b/snappymail/v/0.0.0/themes/Linen/styles.css similarity index 95% rename from snappymail/v/0.0.0/themes/Xv/styles.less rename to snappymail/v/0.0.0/themes/Linen/styles.css index f5a75fc9b..65704e307 100644 --- a/snappymail/v/0.0.0/themes/Xv/styles.less +++ b/snappymail/v/0.0.0/themes/Linen/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #eee; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #000; diff --git a/snappymail/v/0.0.0/themes/Love/styles.less b/snappymail/v/0.0.0/themes/Love/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Love/styles.less rename to snappymail/v/0.0.0/themes/Love/styles.css index 205c72c7c..908e4277a 100644 --- a/snappymail/v/0.0.0/themes/Love/styles.less +++ b/snappymail/v/0.0.0/themes/Love/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #B3274E; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #fff; diff --git a/snappymail/v/0.0.0/themes/Snow/styles.less b/snappymail/v/0.0.0/themes/Snow/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Snow/styles.less rename to snappymail/v/0.0.0/themes/Snow/styles.css index e0cc0e904..79ab7e8d3 100644 --- a/snappymail/v/0.0.0/themes/Snow/styles.less +++ b/snappymail/v/0.0.0/themes/Snow/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #48525C; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #fff; diff --git a/snappymail/v/0.0.0/themes/Linen/styles.less b/snappymail/v/0.0.0/themes/Squares/styles.css similarity index 95% rename from snappymail/v/0.0.0/themes/Linen/styles.less rename to snappymail/v/0.0.0/themes/Squares/styles.css index f5a75fc9b..65704e307 100644 --- a/snappymail/v/0.0.0/themes/Linen/styles.less +++ b/snappymail/v/0.0.0/themes/Squares/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #eee; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #000; diff --git a/snappymail/v/0.0.0/themes/SquaresDark/styles.less b/snappymail/v/0.0.0/themes/SquaresDark/styles.css similarity index 98% rename from snappymail/v/0.0.0/themes/SquaresDark/styles.less rename to snappymail/v/0.0.0/themes/SquaresDark/styles.css index 872728b25..ece5e9d0b 100644 --- a/snappymail/v/0.0.0/themes/SquaresDark/styles.less +++ b/snappymail/v/0.0.0/themes/SquaresDark/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #fff; --main-bg-color: #48525C; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #ddd; diff --git a/snappymail/v/0.0.0/themes/Stripes/styles.less b/snappymail/v/0.0.0/themes/Stripes/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Stripes/styles.less rename to snappymail/v/0.0.0/themes/Stripes/styles.css index 948c5f63d..f811562ac 100644 --- a/snappymail/v/0.0.0/themes/Stripes/styles.less +++ b/snappymail/v/0.0.0/themes/Stripes/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #010101; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #fff; diff --git a/snappymail/v/0.0.0/themes/Wood/styles.less b/snappymail/v/0.0.0/themes/Wood/styles.css similarity index 96% rename from snappymail/v/0.0.0/themes/Wood/styles.less rename to snappymail/v/0.0.0/themes/Wood/styles.css index 73f910e04..99db6bd83 100644 --- a/snappymail/v/0.0.0/themes/Wood/styles.less +++ b/snappymail/v/0.0.0/themes/Wood/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #F4D59F; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #000; diff --git a/snappymail/v/0.0.0/themes/Squares/styles.less b/snappymail/v/0.0.0/themes/Xv/styles.css similarity index 95% rename from snappymail/v/0.0.0/themes/Squares/styles.less rename to snappymail/v/0.0.0/themes/Xv/styles.css index f5a75fc9b..65704e307 100644 --- a/snappymail/v/0.0.0/themes/Squares/styles.less +++ b/snappymail/v/0.0.0/themes/Xv/styles.css @@ -3,7 +3,7 @@ // MAIN --main-color: #333; --main-bg-color: #eee; - --main-bg-image: url("@{base}images/background.jpg"); + --main-bg-image: url("images/background.jpg"); // LOADING --loading-color: #000;