[DRE-commits] [SCM] Tracking the Debian/Ruby wheezy transition branch, master, updated. cdc33471cffe452cb3a7ef90b15a71eba4fe2fcc

Antonio Terceiro terceiro at softwarelivre.org
Wed Mar 30 18:31:17 UTC 2011


The following commit has been merged in the master branch:
commit cdc33471cffe452cb3a7ef90b15a71eba4fe2fcc
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Wed Mar 30 11:30:59 2011 -0700

    Display percentage in a text label

diff --git a/index.html b/index.html
index d6952bb..efae1a7 100644
--- a/index.html
+++ b/index.html
@@ -7,6 +7,7 @@
   <body>
     <h1>Debian/Ruby Wheezy Transition</h1>
     <div id='progressbar'>
+      <div id='progress-label'></div>
       <div id='progress'>&nbsp;</div>
     </div>
     <p>
diff --git a/progressbar.js b/progressbar.js
index a66c7a1..6638530 100644
--- a/progressbar.js
+++ b/progressbar.js
@@ -1,7 +1,9 @@
 var data = wheezy_transition_data;
 var progress = document.getElementById('progress');
+var progress_label = document.getElementById('progress-label')
 
 data.total = data.pending + data.done;
-var progress_percent = Math.floor(100.0 * parseFloat(data.done) / parseFloat(data.total));
+var progress_percent = Math.floor(100.0 * parseFloat(data.done) / parseFloat(data.total)) + '%';
 
-progress.style.width = progress_percent + '%';
+progress.style.width = progress_percent;
+progress_label.innerHTML = progress_percent;
diff --git a/style.css b/style.css
index c95a599..f4c7614 100644
--- a/style.css
+++ b/style.css
@@ -1,10 +1,24 @@
+body {
+  font-family: sans-serif;
+  font-size: 14px;
+}
+
 #progressbar {
   height: 40px;
   border: 1px solid #555573;
   background: #ef6969;
+  position: relative;
 }
 #progress {
   width: 50%;
   height: 100%; 
   background: #4e9a06;
 }
+#progress-label {
+  z-index: 10;
+  position: absolute;
+  left: 50%;
+  font-weight: bold;
+  font-size: 32px;
+  color: white;
+}

-- 
Tracking the Debian/Ruby wheezy transition



More information about the Pkg-ruby-extras-commits mailing list