changeset 212:172fef440a90 draft default tip

Code Cleanup in templates and CSS files.
author Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
date Sun, 22 Sep 2013 04:16:20 +0500
parents be08e004d8b9
children
files static/css/agora.css static/css/agora.less templates/base.djhtml templates/comments/form.html templates/snippet/rate_form.djhtml templates/snippet/rate_form_readonly.djhtml templates/snippet/snippet_details.djhtml
diffstat 7 files changed, 23 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/static/css/agora.css
+++ b/static/css/agora.css
@@ -1,4 +1,4 @@
-.inline-block{display:inline-block;zoom:1;*display:inline;}
+	.inline-block{display:inline-block;zoom:1;*display:inline;}
 .wrap{width:960px;margin:0 auto;}
 .center-align{text-align:center;}
 .right-float{float:right;}
@@ -597,12 +597,7 @@
 
 /* Comments and Rating CSS*/
 #comment
-{
-    /*#gradient(@offWhite, @lighterGrey);*/
-    max-width:700px;
-    border-left: 1px solid #e8e8e8;
-    margin: 5px;
-}
+{max-width:700px;border-left: 1px solid #e8e8e8;margin: 5px;}
 #comment-box
 {
     width: 500px;
@@ -638,7 +633,6 @@
     background: #e0e0e0;
     width: 97%;
     padding: 2px 0 2px 10px;
-
 }
 [ name=comment ]
 {
@@ -654,19 +648,4 @@
     background: white;
     padding: 2px;
 }
-.comment-body{padding-left: 15px;}
-#radio_votes{margin:5px;}
-#radio_votes ul{
-    list-style: none;
-    display:block;
-}
-#radio_votes ul li{
-    float:left;
-    font-weight: bold;
-    margin: 2px;
-}
-#rate_label{
-    float:left;
-    margin-right:3px;
-}
-.rate_radio{margin:2px;}
\ No newline at end of file
+.comment-body{padding-left: 15px;}
\ No newline at end of file
--- a/static/css/agora.less
+++ b/static/css/agora.less
@@ -484,18 +484,3 @@
     padding: 2px;
 }
 .comment-body{padding-left: 15px;}
-#radio_votes{margin:5px;}
-#radio_votes ul{
-    list-style: none;
-    display:block;
-}
-#radio_votes ul li{
-    float:left;
-    font-weight: bold;
-    margin: 2px;
-}
-#rate_label{
-    float:left;
-    margin-right:3px;
-}
-.rate_radio{margin:2px;}
--- a/templates/base.djhtml
+++ b/templates/base.djhtml
@@ -30,7 +30,7 @@
           rel="stylesheet/less" type="text/css" media="screen" />
     <script src="/static/js/less.min.js" type="text/javascript"></script>
     {% endif %}
-    <link rel="stylesheet" href="/static/css/jquery.rating.css" />
+    <link rel="stylesheet" href="/static/css/jquery.rating.css" type="text/css" />
     {% block extrahead %}{% endblock %}
   </head>
 
--- a/templates/comments/form.html
+++ b/templates/comments/form.html
@@ -18,7 +18,7 @@
         <!-- I have used node id over here so that I can show/hide comment field -->
         <div class = "comment-box" style="{% if node.id %}display:none {% else %} display:block {%endif%}" id = "{{ node.id }}"   >
         <h4>
-        {%if node.id%}
+        {%if node.id %}
         Reply:
         {%else%} Comment:
         {%endif%}
@@ -26,6 +26,6 @@
         {{form.comment}}
 
         <br/>
-        <input type="submit" value = "Submit" class = 'reply-button' >
+        <input type="submit" value = "Submit" class = 'reply-button' />
         </div>
     </form>
\ No newline at end of file
--- a/templates/snippet/rate_form.djhtml
+++ b/templates/snippet/rate_form.djhtml
@@ -1,12 +1,12 @@
 <div id = "radio_votes">
-<form action = "rating/process/"  method = "POST" id="rate_form">
-{% csrf_token%}
+<form action = "rating/process/"  method = "post" id="rate_form">
+{% csrf_token %}
 <table>
 <tr>
 <td><h3 id ="rate_label">Rate this Snippet:</h3></td>
 <td>
 {% for x in "12345" %}
-<input name="Rate" type="radio" class="star" value="{{ forloop.counter }}">
+<input name="Rate" type="radio" class="star" value="{{ forloop.counter }}" />
 {% endfor %}
 <input type="hidden" name="next" value="{{ request.get_full_path }}" />
 </td>
--- a/templates/snippet/rate_form_readonly.djhtml
+++ b/templates/snippet/rate_form_readonly.djhtml
@@ -1,10 +1,17 @@
 <div>
 <table>
 <tr><td>Total Votes:</td>
-	<td>{{ snippet.rating.votes }}</td>
-	<td>&nbsp &nbsp</td>
+	<td>{{ snippet.rating.votes }} &nbsp; &nbsp; </td>
 	<td>Rating:</td>
-    <td>{% for x in "12345" %}
-    	<input name="Rate" type="radio" class="star"  disabled = "disabled"  value="{{ forloop.counter }}"
-{% if score == forloop.counter %} checked = "checked" {% endif%} >{% endfor %}</td></tr></table>
+    <td>
+    	{% for x in "12345" %}
+    	<input name="Rate" type="radio" class="star"  disabled = "disabled"  
+    	value="{{ forloop.counter }}"
+		{% if score == forloop.counter %} 
+			checked = "checked" 
+		{% endif%} />
+		{% endfor %}
+	</td>
+</tr>
+</table>
 </div>
\ No newline at end of file
--- a/templates/snippet/snippet_details.djhtml
+++ b/templates/snippet/snippet_details.djhtml
@@ -43,8 +43,7 @@
 
 {% block content %}
 <div id="non-sidebar">
-    <div id="diff">
-    </div>
+    <div id="diff"></div>
 
     <h1>{{ snippet.get_title }}</h1>
     <div class="snippet-options">
@@ -74,13 +73,9 @@
             Language: {{ language }}
             &mdash;
             Number of views: {{ snippet.num_views }}
-
-            <strong>
             {%  load ratings %}
             {% include "snippet/rate_form_readonly.djhtml" %}
-        </strong>
-        
-        </div>
+         </div>
     </div><!-- closes .snippet-options -->
     <br />