From: opi <opi@no-log.org>
Date: Wed, 27 May 2015 13:36:36 +0000 (+0200)
Subject: Ajout des infos de budget total et en cours via des underlay.
X-Git-Url: https://nos-oignons.net/gitweb/website.git/commitdiff_plain/c747c6fbba567d13f15766bc75cacce81cf160aa?hp=0416c2beeca33336f84fcd744a93c1e83c8bb1d9

Ajout des infos de budget total et en cours via des underlay.
---

diff --git a/Donnez.html b/Donnez.html
index 5f74a6b..6c8ed5f 100644
--- a/Donnez.html
+++ b/Donnez.html
@@ -9,8 +9,8 @@
 </p>
 
 <h3>État de la trésorerie</h3>
-<div class="progress-bar-wrapper">
-    <div class="progress-bar" style='width: [[!inline pagenames="data/pourcentage-budget" raw="yes"]];'></div>
+<div class="progress-bar-wrapper" data-total='[[!inline pagenames="data/budget-total" raw="yes"]]'>
+    <div class="progress-bar" style='width: [[!inline pagenames="data/pourcentage-budget" raw="yes"]];' data-current='[[!inline pagenames="data/budget-current" raw="yes"]]'></div>
 </div>
 <p>
 Un oignon correspond à 1 mois de fonctionnement.
diff --git a/local.css b/local.css
index e6349f7..bf876b1 100644
--- a/local.css
+++ b/local.css
@@ -382,7 +382,7 @@ thead td {
 
 /* Progress bar */
 .progress-bar-wrapper {
-  margin: 1em auto;
+  margin: 2em auto;
   height: 85px;
   width: 600px;
   background: lightGrey url(assets/progress_bar.png) top left repeat-x;
@@ -391,6 +391,7 @@ thead td {
   position: relative;
 }
   .progress-bar-wrapper .progress-bar {
+    position: absolute;
     height: 85px;
     background: grey url(assets/progress_bar.png) bottom left repeat-x;
     /* animate progress bar */
@@ -404,10 +405,24 @@ thead td {
   @-moz-keyframes progress-bar { 0% { width: 0; } }
   keyframes progress-bar { 0% { width: 0; } }
 
-  .progress-bar-wrapper:after {
+  /* Current amount */
+  .progress-bar-wrapper .progress-bar:after {
+    content: attr(data-current);
+    display: block;
+    position: absolute;
+    top: -22px;
+    right: 0;
+    background: #fff;
+    color: #ccc;
+    font-size: 0.9em;
+  }
+
+  /* Temperature bar */
+  .progress-bar-wrapper:before {
     content: " ";
     display: block;
     position: absolute;
+    z-index: 1;
     bottom: -5px;
     left: -1px;
     height: 5px;
@@ -423,6 +438,18 @@ thead td {
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff0000', endColorstr='#66ff00',GradientType=1 ); /* IE6-9 */
   }
 
+  /* Annual budget */
+  .progress-bar-wrapper:after {
+    content: attr(data-total);
+    display: block;
+    position: absolute;
+    top: -22px;
+    right: 0;
+    background: #fff;
+    color: #ccc;
+    font-size: 0.9em;
+  }
+
 
 
 /* FDN Form */