[Xfce4-commits] <moka:master> Improve css usage a bit.

Nick Schermer noreply at xfce.org
Sun Nov 20 14:30:11 CET 2011


Updating branch refs/heads/master
         to 571624237724b9c31e6fffdba31b9fb474192957 (commit)
       from ee8528458933e6a848112545e70633bd68f68b5d (commit)

commit 571624237724b9c31e6fffdba31b9fb474192957
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Apr 4 18:11:23 2011 +0200

    Improve css usage a bit.

 lib/views/announcements.erb                        |    4 +-
 lib/views/auth_login.erb                           |    2 +-
 lib/views/collection_new_release.erb               |    8 +++---
 lib/views/maintainer_profile.erb                   |   27 ++++++++++---------
 lib/views/project.erb                              |    2 +-
 .../project_branch_new_release_announcement.erb    |   12 ++++----
 lib/views/project_new_release.erb                  |    2 +-
 lib/views/project_new_release_tarball.erb          |    6 ++--
 lib/views/project_release_update.erb               |    8 +++---
 lib/views/stylesheet.sass                          |   22 +++++++++++-----
 10 files changed, 51 insertions(+), 42 deletions(-)

diff --git a/lib/views/announcements.erb b/lib/views/announcements.erb
index cf159b2..987315d 100644
--- a/lib/views/announcements.erb
+++ b/lib/views/announcements.erb
@@ -7,9 +7,9 @@
   <fieldset>
     <p><label for="text">Text:</label> <textarea id="text" name="text" class="message" style="height:5em;"><%= params[:text] %></textarea></p>
     <% if error(:text) %>
-      <p class="error"><span class="placeholder"> </span> <%= error(:text) %></p>
+      <p class="error quote"><%= error(:text) %></p>
     <% end %>
-    <p><span class="placeholder"> </span> <input type="submit" value="Publish"/></p>
+    <p class="quote"><input type="submit" value="Publish"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/auth_login.erb b/lib/views/auth_login.erb
index 1e2e827..99ce703 100755
--- a/lib/views/auth_login.erb
+++ b/lib/views/auth_login.erb
@@ -3,7 +3,7 @@
   <fieldset>
     <p><label for="username">Username:</label> <input type="text" id="username" name="username"/></p>
     <p><label for="password">Password:</label> <input type="password" id="password" name="password"/></p>
-    <p><span class="placeholder"> </span> <input type="submit" value="Log in"/></p>
+    <p class="quote"><input type="submit" value="Log in"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/collection_new_release.erb b/lib/views/collection_new_release.erb
index c769203..a8acb39 100755
--- a/lib/views/collection_new_release.erb
+++ b/lib/views/collection_new_release.erb
@@ -7,20 +7,20 @@
       <input type="text" id="version" name="version" value="<%= params[:version] %>" style="width:5em"/>
     </p>
     <% if error_set? :version %>
-      <p class="error"><span class="placeholder"> </span> <%= error :version %></p>
+      <p class="error quote"><%= error :version %></p>
     <% end %>
     <p>
       <label for="message">Message:</label>
       <textarea id="message" name="message" style="height:20em"><%= params[:message] %></textarea>
     </p>
     <% if env['identica'] %>
-      <p><span class="placeholder"> </span> <input type="checkbox" id="identica" name="identica" value="announce" checked="checked"/> Announce on <a href="http://identi.ca/xfce">identi.ca/xfce</a></p>
+      <p class="quote"><input type="checkbox" id="identica" name="identica" value="announce" checked="checked"/> Announce on <a href="http://identi.ca/xfce">identi.ca/xfce</a></p>
     <% end %>
     <% if env['mailinglists'] %>
       <% for list in env['mailinglists'].lists %>
-        <p><span class="placeholder"> </span> <input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @collection.mailinglists.include?(list) %>/> Announce on <%= list %></p>
+        <p class="quote"><input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @collection.mailinglists.include?(list) %>/> Announce on <%= list %></p>
       <% end %>
-      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
+      <p class="quote"><strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
     <% end %>
   </fieldset>
   <h2>Projects</h2>
diff --git a/lib/views/maintainer_profile.erb b/lib/views/maintainer_profile.erb
index 5f17138..aea8a9d 100755
--- a/lib/views/maintainer_profile.erb
+++ b/lib/views/maintainer_profile.erb
@@ -2,30 +2,31 @@
 <h2>Account data</h2>
 <form method="post">
   <% if error(:succeed) %>
-      <p class="message"><%= error(:succeed) %></p>
+      <p class="info"><%= error(:succeed) %></p>
   <% end %>
   <fieldset>
-    <p><label for="email">Email address:</label> <input type="text" id="email" name="email" value="<%= @maintainer.email %>"/></p>
-    <p><label for="realname">Real Name:</label> <input type="text" id="realname" name="realname" value="<%= @maintainer.realname %>"/></p>
-    <p><label for="pubkeys">SSH public-keys:</label> <textarea id="pubkeys" name="pubkeys" rows="5" wrap="off"><%= @maintainer.pubkeys %></textarea></p>
+    <p><label for="username">Login Name:</label> <input type="text" name="username" disabled="disabled" value="<%= @maintainer.username %>"/></p>
+    <p><label for="email">Email address:</label> <input type="text" name="email" value="<%= @maintainer.email %>"/></p>
+    <p><label for="realname">Real Name:</label> <input type="text" name="realname" value="<%= @maintainer.realname %>"/></p>
+    <p><label for="pubkeys">SSH public-keys:</label> <textarea name="pubkeys" rows="5" wrap="off"><%= @maintainer.pubkeys %></textarea></p>
     <hr />
-    <p>Leave the password fields empty if you don't want to set a new password. The password needs to be at least 6 characters long.</p>
+    <p class="quote">Leave the password fields empty if you don't want to set a new password. The password needs to be at least 6 characters long.</p>
     <% if error(:newpassword) %>
-    <p class="error"><%= error(:newpassword) %></p>
+    <p class="info"><%= error(:newpassword) %></p>
     <% end %>
-    <p><label for="new_password">New password:</label> <input type="password" id="new_password" name="new_password" value=""/></p>
-    <p><label for="new_password2">Confirm new password:</label> <input type="password" id="new_password2" name="new_password2" value=""/></p>
+    <p><label for="new_password">New password:</label> <input type="password" name="new_password" value=""/></p>
+    <p><label for="new_password2">Confirm new password:</label> <input type="password" name="new_password2" value=""/></p>
     <hr />
     <% if authentication_user.username == @maintainer.username %>
-    <p>Please enter your existing password to confirm account changes.</p>
+    <p class="quote">Please enter your existing password to confirm account changes.</p>
     <% else %>
-    <p>You are editing the account of someone else; enter your <strong>OWN</strong> password to confirm.</strong></p>
+    <p class="quote">You are editing the account of someone else; enter your <strong>OWN</strong> password to confirm.</strong></p>
     <% end %>
     <% if error(:password) %>
-    <p class="error"><%= error(:password) %></p>
+    <p class="info"><%= error(:password) %></p>
     <% end %>
-    <p><label for="password">Password:</label> <input type="password" id="password" name="password" value=""></p>
-    <p><span class="placeholder"> </span> <input type="submit" value="Save"/></p>
+    <p><label for="password">Password:</label> <input type="password" name="password" value=""></p>
+    <p class="quote"><input type="submit" value="Save"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/project.erb b/lib/views/project.erb
index 92d55c1..952276e 100755
--- a/lib/views/project.erb
+++ b/lib/views/project.erb
@@ -4,7 +4,7 @@
   <fieldset>
     <p><label for="website">Website:</label> <input type="text" id="website" name="website" style="width:60%" value="<%= @project.website %>"/></p>
     <p><label for="description">Description:</label> <textarea id="description" name="description" style="height:10em;"><%= @project.description %></textarea></p>
-    <p><span class="placeholder"> </span> <input type="submit" value="Save"/></p>
+    <p class="quote"><input type="submit" value="Save"/></p>
   </fieldset>
 </form>
 <h2>Classification</h2>
diff --git a/lib/views/project_branch_new_release_announcement.erb b/lib/views/project_branch_new_release_announcement.erb
index 8f36aee..d4dab51 100755
--- a/lib/views/project_branch_new_release_announcement.erb
+++ b/lib/views/project_branch_new_release_announcement.erb
@@ -5,20 +5,20 @@
 <form method="post">
   <fieldset>
     <p><label for="message">Release notes:</label> <textarea class="message" id="message" name="message" style="height:20em"></textarea></p>
-    <p><span class="placeholder"> </span> <strong>This message will appear below the download and project info, so you don't have to start it with a greeting.</strong></p>
+    <p class="quote"><strong>This message will appear below the download and project info, so you don't have to start it with a greeting.</strong></p>
     <% if env['feeds'] %>
-      <p><span class="placeholder"> </span> <input type="checkbox" id="feeds" name="feeds" value="announce" checked="checked"/> Update <a href="<%= env['feeds'].get_project_feed_url(@project) %>">news feed</a></p>
+      <p class="quote"><input type="checkbox" id="feeds" name="feeds" value="announce" checked="checked"/> Update <a href="<%= env['feeds'].get_project_feed_url(@project) %>">news feed</a></p>
     <% end %>
     <% if env['identica'] %>
-      <p><span class="placeholder"> </span> <input type="checkbox" id="identica" name="identica" value="announce" checked="checked"/> Announce on <a href="http://identi.ca/xfce">identi.ca/xfce</a></p>
+      <p class="quote"><input type="checkbox" id="identica" name="identica" value="announce" checked="checked"/> Announce on <a href="http://identi.ca/xfce">identi.ca/xfce</a></p>
     <% end %>
     <% if env['mailinglists'] %>
       <% for list in env['mailinglists'].lists %>
-        <p><span class="placeholder"> </span> <input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @project.mailinglists.include?(list) %>/> Announce on <%= list %></p>
+        <p class="quote"><input type="checkbox" name="mailinglists[<%= list %>]" value="announce" <%= 'checked="checked"' if @project.mailinglists.include?(list) %>/> Announce on <%= list %></p>
       <% end %>
-      <p><span class="placeholder"> </span> <strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
+      <p class="quote"><strong>Make sure to be subscribed to these mailinglists with <%= authentication_user.email %>. You can <a href="/maintainer/profile/<%= authentication_user.username %>">change your email address here</a>.</strong></p>
     <% end %>
-    <p><span class="placeholder"> </span> <input type="submit" value="Continue"/></p>
+    <p class="quote"><input type="submit" value="Continue"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/project_new_release.erb b/lib/views/project_new_release.erb
index 88cedf4..3ffcbe4 100755
--- a/lib/views/project_new_release.erb
+++ b/lib/views/project_new_release.erb
@@ -3,7 +3,7 @@
 <p><strong>Before releasing, please make sure the <a href="/project/<%= @project.name %>">project information</a> is up to date. Also make sure you are subscribed to the mailing lists with <a href="/maintainer/profile/<%= authentication_user.username %>"><%= authentication_user.email %></a> else the announcement will not be posted.</strong></p>
 <form method="get" action="/project/<%= @project.name %>/new-release/tarball">
   <fieldset>
-    <p><span class="placeholder"> </span> <input type="submit" value="I verified the information is correct"/></p>
+    <p class="quote"><input type="submit" value="I verified the information is correct"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/project_new_release_tarball.erb b/lib/views/project_new_release_tarball.erb
index d82d25d..9087118 100755
--- a/lib/views/project_new_release_tarball.erb
+++ b/lib/views/project_new_release_tarball.erb
@@ -4,13 +4,13 @@
   <fieldset>
     <p><label for="tarball">Tarball:</label> <input type="file" id="tarball" name="tarball" size="30"/></p>
     <% if error(:tarball) %>
-      <p class="error"><span class="placeholder"> </span> <%= error(:tarball) %></p>
+      <p class="error quote"><%= error(:tarball) %></p>
     <% end %>
     <p><label for="checksum">Checksum (SHA1):</label> <input type="text" id="checksum" name="checksum" size="40" value="<%= params[:checksum] %>"/></p>
     <% if error(:checksum) %>
-      <p class="error"><span class="placeholder"> </span> <%= error(:checksum) %></p>
+      <p class="error quote"><%= error(:checksum) %></p>
     <% end %>
-    <p><span class="placeholder"> </span> <input type="submit" value="Upload file and continue"/></p>
+    <p class="quote"><input type="submit" value="Upload file and continue"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/project_release_update.erb b/lib/views/project_release_update.erb
index 04cdd17..4ebefd4 100755
--- a/lib/views/project_release_update.erb
+++ b/lib/views/project_release_update.erb
@@ -2,16 +2,16 @@
 <h2>Tarball</h2>
 <form method="post" enctype="multipart/form-data">
   <fieldset>
-    <p><span class="placeholder">Filename:</span> <tt><%= @release.tarball_basename %></tt></p>
+    <p><label>Filename:</label> <tt><%= @release.tarball_basename %></tt></p>
     <p><label for="tarball">Tarball:</label> <input type="file" id="tarball" name="tarball"/></p>
     <% if env[:error][:tarball] %>
-      <p class="error"><span class="placeholder"> </span> <%= env[:error][:tarball] %></p>
+      <p class="error quote"><%= env[:error][:tarball] %></p>
     <% end %>
     <p><label for="checksum">Checksum (SHA1):</label> <input type="text" id="checksum" name="checksum" value="<%= params[:checksum] %>"/></p>
     <% if env[:error][:checksum] %>
-      <p class="error"><span class="placeholder"> </span> <%= env[:error][:checksum] %></p>
+      <p class="error quote"><%= env[:error][:checksum] %></p>
     <% end %>
-    <p><span class="placeholder"> </span> <input type="submit" value="Replace current tarball"/></p>
+    <p class="quote"><input type="submit" value="Replace current tarball"/></p>
   </fieldset>
 </form>
 <%= footer %>
diff --git a/lib/views/stylesheet.sass b/lib/views/stylesheet.sass
index 62016e1..fc46ce8 100755
--- a/lib/views/stylesheet.sass
+++ b/lib/views/stylesheet.sass
@@ -99,7 +99,7 @@ fieldset
   p 
     padding: 0em
 
-  label, span.placeholder
+  label
     display: block
     float: left
     min-width: 25%
@@ -107,18 +107,20 @@ fieldset
     padding-right: 0.5em
     line-height: 1.65em
 
+  p.quote
+    margin-left: 25%
+    padding-left: 0.5em
+    line-height: 1.65em
+
   label.inline
     display: inline-block
     float: none
     min-width: 0%
 
-  span.placeholder
-    height: 2em
-
   textarea
-    width: 60%
+    width: 70%
 
-  span.error, span.info
+  p.error, p.info
     padding-left: 1em
 
 hr
@@ -126,10 +128,16 @@ hr
   border: 0
   border-bottom: thin dotted rgb(0,50,150)
 
+pre
+  padding: 0.5em
+
+em, pre
+  background: #ddd
+
 .error
   color: red
 
-.message
+.info
   color: green
 
 .preview


More information about the Xfce4-commits mailing list