Module: check_mk
Branch: master
Commit: 5303d0e1a727b0e1025f79317c48c661624cd3e2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5303d0e1a727b0…
Author: Kenneth Okoh <ko(a)mathias-kettner.de>
Date: Sat Mar 9 14:40:22 2019 +0100
GUI CSS: Decoupled styles for quicksearch and wiki from the classic theme (CMK-1171)
Change-Id: Ib30a69d9379d1f2d1aea92d3d5bcfe5834797cb5
---
web/htdocs/themes/facelift/scss/_main.scss | 12 ---
web/htdocs/themes/facelift/scss/_sidebar.scss | 121 ++++++++++++++++++++++++++
web/htdocs/themes/facelift/theme.scss | 36 +++++++-
3 files changed, 155 insertions(+), 14 deletions(-)
diff --git a/web/htdocs/themes/facelift/scss/_main.scss
b/web/htdocs/themes/facelift/scss/_main.scss
index f3c6f30..dcb6e0b 100644
--- a/web/htdocs/themes/facelift/scss/_main.scss
+++ b/web/htdocs/themes/facelift/scss/_main.scss
@@ -93,10 +93,6 @@ div.snapin select {
div.snapin textarea {
width: 100% !important; }
-#mk_side_search_field {
- width: 100% !important;
- height: 100% !important; }
-
select:not([multiple]) {
-webkit-appearance: none !important;
-moz-appearance: none !important;
@@ -1031,9 +1027,6 @@ table.cmc_stats, table.mkeventd_performance, table.performance {
clear: both;
margin: 8px 0px 16px; }
-#mk_side_search img, #wiki_search img {
- display: none; }
-
div.statebullet {
border-radius: 50%;
box-shadow: none; }
@@ -1090,11 +1083,6 @@ div#side_footer span#msg_label {
font-size: $theme-font-size-global;
}
-#mk_side_search, #wiki_search {
- width: 100%; }
- #mk_side_search input, #mk_side_search select, #mk_side_search textarea,
#mk_side_search #mk_side_search_field, #wiki_search input, #wiki_search select,
#wiki_search textarea, #wiki_search #mk_side_search_field {
- box-sizing: border-box; }
-
.checkbox label::before {
box-shadow: none;
border: 1px solid $theme-color-table-border-dark;
diff --git a/web/htdocs/themes/facelift/scss/_sidebar.scss
b/web/htdocs/themes/facelift/scss/_sidebar.scss
index e69de29..d3a463d 100644
--- a/web/htdocs/themes/facelift/scss/_sidebar.scss
+++ b/web/htdocs/themes/facelift/scss/_sidebar.scss
@@ -0,0 +1,121 @@
+/*
++------------------------------------------------------------------+
+| ____ _ _ __ __ _ __ |
+| / ___| |__ ___ ___| | __ | \/ | |/ / |
+| | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+| | |___| | | | __/ (__| < | | | | . \ |
+| \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+| |
+| Copyright Mathias Kettner 2012 mk(a)mathias-kettner.de |
++------------------------------------------------------------------+
+
+This file is part of Check_MK.
+The official homepage is at
http://mathias-kettner.de/check_mk.
+
+check_mk is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation in version 2. check_mk is distributed
+in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more de-
+ails. You should have received a copy of the GNU General Public
+License along with GNU Make; see the file COPYING. If not, write
+to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+Boston, MA 02110-1301 USA.
+*/
+
+/*-------------------------------------------------------------------------.
+| ____ _ _ _ |
+| / ___|(_) __| | ___| |__ __ _ _ __ |
+| \___ \| |/ _` |/ _ \ '_ \ / _` | '__| |
+| ___) | | (_| | __/ |_) | (_| | | |
+| |____/|_|\__,_|\___|_.__/ \__,_|_| |
+| |
++--------------------------------------------------------------------------+
+| Styling for the sidebar and its snapins. |
+'-------------------------------------------------------------------------*/
+
+
+// Styles for wiki and quicksearch sidebar snapins
+#snapin_container_wiki div.content {
+ font-weight: bold;
+ color: #fff;
+}
+
+#snapin_container_wiki div.content p {
+ font-weight: normal;
+}
+
+/* TODO: Reproduce this html element */
+#wiki_navigation {
+ text-align: left;
+}
+
+#mk_side_search, #wiki_search {
+ width: 100%;
+ padding: 0;
+}
+
+#mk_side_search img, #wiki_search img {
+ display: none; }
+
+#mk_side_search input, #wiki_search input {
+ float: left;
+ margin: 0;
+ font-size: 11px;
+ background-repeat: no-repeat;
+}
+
+#mk_side_search input {
+ width: 100%;
+ height: 100%;
+}
+
+#wiki_search input {
+ width: 194px;
+ height: 25px;
+}
+
+#mk_side_search input, #mk_side_search select, #mk_side_search textarea,
+#mk_side_search #mk_side_search_field, #wiki_search input, #wiki_search select,
+#wiki_search textarea, #wiki_search #mk_side_search_field {
+ box-sizing: border-box;
+}
+
+#mk_side_clear, #wiki_side_clear {
+ clear: both;
+}
+
+#mk_side_search div.topic {
+ margin-top: 3px;
+ margin-left: 2px;
+ font-size: 125%;
+}
+
+#mk_search_results {
+ position: relative;
+ float: left;
+ width: 223px;
+ font-size: 80%;
+ color: #000;
+ background-color: #dfdfdf;
+ border: 1px solid #fff;
+}
+
+#mk_search_results a {
+ display: block;
+ width: 217px;
+ padding-left: 5px;
+ color: #000;
+ text-align: left;
+ text-decoration: none;
+}
+
+#mk_search_results a:hover, #mk_search_results a.active {
+ background-color: #bfbfbf;
+}
+
+#mk_search_results div.error, #mk_search_results div.warning {
+ padding: 2px;
+ font-size: 12px;
+}
diff --git a/web/htdocs/themes/facelift/theme.scss
b/web/htdocs/themes/facelift/theme.scss
index dc53629..e22fa20 100644
--- a/web/htdocs/themes/facelift/theme.scss
+++ b/web/htdocs/themes/facelift/theme.scss
@@ -1,6 +1,38 @@
// This theme is based on the classic theme, so first load the whole
-// classic themen and then the overrides.
-@import "../classic/theme.scss";
+// classic theme and then the overrides.
+/* Instead of an import, copy all classic theme imports to stepwise
+ decouple the facelift and classic theme by transferring the
+ modularized scss files and then getting rid of the overriding
+ _main.scss
+ */
+@import "~select2/dist/css/select2";
+
+@import "../classic/scss/_check_mk.scss";
+@import "../classic/scss/_pages.scss";
+@import "../classic/scss/_status.scss";
+@import "../classic/scss/_bi.scss";
+@import "../classic/scss/_dashboard.scss";
+@import "../classic/scss/_login.scss";
+@import "../classic/scss/_logwatch.scss";
+@import "../classic/scss/_prediction.scss";
+@import "../classic/scss/_views.scss";
+@import "../classic/scss/_wato.scss";
+@import "../classic/scss/_mobile.scss";
+@import "../classic/scss/_sidebar.scss";
+
+// CEE specific files
+@import "../../../../enterprise/web/htdocs/themes/classic/scss/_graphs.scss";
+@import
"../../../../enterprise/web/htdocs/themes/classic/scss/_reporting.scss";
+@if $ENTERPRISE = "yes" {
+ @include graphs;
+ @include reporting;
+}
+
+//@import "../../../../managed/web/htdocs/themes/classic/scss/_managed.scss";
+//@if $MANAGED = "yes" {
+// @include managed;
+//}
+
@import "scss/_variables.scss";
@import "scss/_main.scss";