changeset 2460:3cb8898fd743

fixes #67, adds displaying of alerts, also adds a few mixins
author sharky93 <rishabhr123@gmail.com>
date Mon, 09 Sep 2013 17:10:15 +0530
parents a66fcc5ce02b
children f43a75cccab0
files MoinMoin/themes/basic/static/css/basic.css MoinMoin/themes/basic/static/custom-less/basic.less MoinMoin/themes/basic/templates/layout.html
diffstat 3 files changed, 107 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/static/css/basic.css	Mon Sep 09 06:10:58 2013 +0530
+++ b/MoinMoin/themes/basic/static/css/basic.css	Mon Sep 09 17:10:15 2013 +0530
@@ -4208,6 +4208,82 @@
     display: none !important;
   }
 }
+.moin-flash {
+  padding: 15px 35px 15px 15px;
+  margin-bottom: 20px;
+  color: #c09853;
+  background-color: #fcf8e3;
+  border: 1px solid #fbeed5;
+  border-radius: 4px;
+}
+.moin-flash h4 {
+  margin-top: 0;
+  color: inherit;
+}
+.moin-flash hr {
+  border-top-color: #f8e5be;
+}
+.moin-flash .alert-link {
+  font-weight: bold;
+  color: #a47e3c;
+}
+.moin-flash .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  color: inherit;
+}
+.moin-flash > p,
+.moin-flash > ul {
+  margin-bottom: 0;
+}
+.moin-flash > p + p {
+  margin-top: 5px;
+}
+.moin-flash-hint {
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+  color: #468847;
+}
+.moin-flash-hint hr {
+  border-top-color: #c9e2b3;
+}
+.moin-flash-hint .alert-link {
+  color: #356635;
+}
+.moin-flash-info {
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+  color: #3a87ad;
+}
+.moin-flash-info hr {
+  border-top-color: #a6e1ec;
+}
+.moin-flash-info .alert-link {
+  color: #2d6987;
+}
+.moin-flash-warning {
+  background-color: #f2dede;
+  border-color: #eed3d7;
+  color: #b94a48;
+}
+.moin-flash-warning hr {
+  border-top-color: #e6c1c7;
+}
+.moin-flash-warning .alert-link {
+  color: #953b39;
+}
+.moin-flash-error {
+  background-color: #f2dede;
+  border-color: #eed3d7;
+  color: #b94a48;
+}
+.moin-flash-error hr {
+  border-top-color: #e6c1c7;
+}
+.moin-flash-error .alert-link {
+  color: #953b39;
+}
 .moin-user-action-special {
   position: relative;
   display: block;
--- a/MoinMoin/themes/basic/static/custom-less/basic.less	Mon Sep 09 06:10:58 2013 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/basic.less	Mon Sep 09 17:10:15 2013 +0530
@@ -1,5 +1,25 @@
 @import "bootstrap.less";
 
+.moin-flash {
+  .alert;
+}
+
+.moin-flash-hint {
+  .alert-success;
+}
+
+.moin-flash-info {
+  .alert-info;
+}
+
+.moin-flash-warning {
+  .alert-danger;
+}
+
+.moin-flash-error {
+  .alert-danger;
+}
+
 .moin-user-action-special {
   .list-group-item;
   width: 100%;
--- a/MoinMoin/themes/basic/templates/layout.html	Mon Sep 09 06:10:58 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Mon Sep 09 17:10:15 2013 +0530
@@ -100,6 +100,17 @@
         </div> <!-- row-topnavbar -->
 
         <div class="row">
+            <div class="col-lg-12">
+                    {% for category, msg in get_flashed_messages(with_categories=true) %}
+                    <div class="moin-flash moin-flash-{{ category }}">
+                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
+                        {{ msg }}
+                    </div>
+                    {% endfor %}
+            </div>
+        </div>
+
+        <div class="row">
             <div class="col-lg-2">
                 <div class="moin-sidebar">
                     {% set navibar_items = theme_supp.navibar(item_name) %}