Commits

Matthew Marshall committed a7d3c4f

Small tweak to front page.

  • Participants
  • Parent commits 3af585b

Comments (0)

Files changed (2)

htdocs/static/freehg.css

 div.page_body pre {margin:0pt;}
 div.page_body .linenr {color:#555; padding-right:2px;}
 
-.box {background-color:#d9d9d9;}
+.box {background-color:#d9d9d9;}
+
+dd p {margin:0pt;}

templates/frontpage.html

                 </p>
             </div>
     {% endfor %}
-
+    <span class="more-options-placeholder"></span>
     {% if user.is_authenticated %}
         <input type='submit' name='createrepo' value='Create repository for {{user.username}}' />
     {% endif %}
 <script type="text/javascript">
 $(document).ready(function (){
     $('fieldset').each(function(){
-        if ($(this).children('.form-row:not(.required, .errors)')
-                .hide().length) {
-            $(this).append(
-                $('<a href="#" class="showmore">Show more options</'+'a>').click(function(){
+        if ($(this).children('.form-row:not(.required, .errors)').hide().length) {
+            var elem = $('<a href="#" class="showmore" style="display:block;margin-bottom:12px;>Show more options</'+'a>').click(function(){
                 $(this).hide();
                 $(this).siblings('.form-row:hidden').show();
-            }));
+            });
+            if ($(this).children('.more-options-placeholder')){
+                $(this).children('.more-options-placeholder').replaceWith(elem);
+            } else {
+                $(this).append(elem);
+            }
         }
     });