浏览代码

Add module contrast style

Denis K 9 年之前
父节点
当前提交
92481af629
共有 3 个文件被更改,包括 11 次插入1 次删除
  1. 1 0
      jet/modules.py
  2. 9 0
      jet/static/jet/css/_dashboard.scss
  3. 1 1
      jet/templates/jet/dashboard/module.html

+ 1 - 0
jet/modules.py

@@ -29,6 +29,7 @@ class DashboardModule(object):
     column = None
     order = None
     ajax_load = False
+    contrast = False
 
     class Media:
         css = ()

+ 9 - 0
jet/static/jet/css/_dashboard.scss

@@ -91,6 +91,15 @@
       box-shadow: 0 2px 0 0 $content-border2-color;
       overflow: hidden;
 
+      &.contrast {
+        background: $content-contrast2-background-color;
+        color: $content-contrast2-text-color;
+
+        .loading-indicator {
+          color: $content-contrast2-text-color;
+        }
+      }
+
       ul:not(.inline) {
         @extend .clear-list;
 

+ 1 - 1
jet/templates/jet/dashboard/module.html

@@ -25,7 +25,7 @@
         </span>
     </div>
 
-    <div class="dashboard-item-content">
+    <div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}">
         {% if module.ajax_load %}
             <div class="loading-indicator-wrapper">
                 <span class="icon-refresh loading-indicator"></span>