Moved Submit button to header, styled button
authorJef van Schendel <jefvanschendel@gmail.com>
Fri, 8 Jul 2011 13:53:45 +0000 (15:53 +0200)
committerJef van Schendel <jefvanschendel@gmail.com>
Fri, 8 Jul 2011 13:53:45 +0000 (15:53 +0200)
mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/base.html
mediagoblin/templates/mediagoblin/user_pages/user.html

index 9dc6444bf60c7c8080b646f583709faa264e5baa..1cc26cade63fca3c6a01b65e7e29fed9af87b10d 100644 (file)
@@ -56,6 +56,23 @@ label {
   margin-bottom:40px;
 }
 
+.header_submit{
+  background-color:#aaa;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(##D2D2D2), to(#aaa)); 
+  background-image: -webkit-linear-gradient(top, #D2D2D2, #aaa); 
+  background-image:    -moz-linear-gradient(top, #D2D2D2, #aaa); 
+  background-image:     -ms-linear-gradient(top, #D2D2D2, #aaa); 
+  background-image:      -o-linear-gradient(top, #D2D2D2, #aaa); 
+  background-image:         linear-gradient(top, #D2D2D2, #aaa);
+  box-shadow:0px 0px 4px #000;
+  color:#272727;
+  border-radius:5px 5px 5px 5px;
+  padding:5px 8px;
+  text-decoration:none;
+  border:medium none;
+  font-family:'Carter One',arial,serif;
+}
+
 .mediagoblin_footer {
   width:100%;
   height:26px;
index b71fca24328448d5aa7890879d082fd894d6d1a1..d6890ac0ee957158baa41dc837f27576bf928287 100644 (file)
             <div class="grid_16">
               {% block mediagoblin_logo %}
                 <a class="mediagoblin_logo" href="{{ request.urlgen('index') }}"></a>
-              {% endblock %}{% block mediagoblin_header_title %}{% endblock %}
+              {% endblock %}
+              {% if request.user %}
+              <a class="header_submit" href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit media</a>
+              {% endif %}
+              {% block mediagoblin_header_title %}{% endblock %}
               <div class="mediagoblin_header_right">
                 {% if request.user %}
                   <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
index 97a882c6ace84bea32f4478622fea8a9c13d83f3..9d99ac53640e0e8f04657d4541f28fbb05f3ecf8 100644 (file)
 
 {% block mediagoblin_content -%}
   {% if user %}
-    <h1>{{ user.username }}'s profile</h1>
-
-    <div class="grid_6 alpha">
-    {% include "mediagoblin/utils/profile.html" %}
-
-    {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
-       <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
-                       user.username }}">Edit profile</a>
-    {% endif %}
-
-    {% if request.user['_id'] == user['_id'] %}
-      <p>
-        <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a> 
-      </p>
-    {% endif %}
+   <h1>{{ user.username }}'s profile</h1>
+   <div class="grid_6 alpha">
+     {% include "mediagoblin/utils/profile.html" %}
+     {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
+        <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
+                        user.username }}">Edit profile</a>
+     {% endif %}
+   </div>
+   <div class="grid_10 omega">
+     {% set pagination_base_url = user_gallery_url %}
+     {% include "mediagoblin/utils/object_gallery.html" %}
+     <div class="clear"></div>
+     <p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p>
+      <a href={{ request.urlgen(
+                     'mediagoblin.user_pages.atom_feed',
+                     user=user.username) }}>atom feed</a>
+      {% else %}
+      {# This *should* not occur as the view makes sure we pass in a user. #}
+      <p>Sorry, no such user found.<p/>
     </div>
-    <div class="grid_10 omega">
-
-    {% set pagination_base_url = user_gallery_url %}
-    {% include "mediagoblin/utils/object_gallery.html" %}
-
-    <div class="clear"></div>
-
-    <p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p>
-
-    <a href={{ request.urlgen(
-                   'mediagoblin.user_pages.atom_feed',
-                   user=user.username) }}>atom feed</a>
-  {% else %}
-    {# This *should* not occur as the view makes sure we pass in a user. #}
-    <p>Sorry, no such user found.<p/>
   {% endif %}
-  
-    </div>
 {% endblock %}