Make "add media to collection" a normal <img/>
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 13 Dec 2012 20:07:16 +0000 (21:07 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 13 Dec 2012 20:19:37 +0000 (21:19 +0100)
This button used to be a css style <a href=...> </a> (note:
No contents for the <a>). Using this approach has various
drawbacks. Most notably:
- Not clickable in text mode browsers
- Possibly getting marked as a hidden (spam) link
- No alt attribute

So replaced with a real <img/>.

I have no idea what to put in the alt attribute.

mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/user_pages/media.html

index f8a9e0146d9c305d7337f15b20b96042425e39cd..ac53f580097730669ea2afe1c402b5dab7e5da3e 100644 (file)
@@ -219,17 +219,6 @@ footer {
   font-family: 'Lato', sans-serif;
 }
 
-.button_collect {
-    background-image: url("../images/icon_collect.png"); 
-    background-repeat: no-repeat;
-    background-position:top center;
-    height: 30px;
-    width: 30px;
-    margin: 0px;
-    padding: 3px 3px 2px 3px;
-    position: relative;
-}
-
 .pagination {
 text-align: center;
 }
index 8c2a618dfa30411451acf7911b0193c2ce5d6882..cb06c7ba1f64ab85dfbd406c871142b1f6f8996c 100644 (file)
         <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', 
                                     user=media.get_uploader.username,
                                     media=media._id) }}"
-           class="button_action button_collect"
+           class="button_action"
            title="{% trans %}Add media to collection{% endtrans %}">
+          <img src="{{ request.staticdirect('/images/icon_collect.png') }}"
+               />
        </a>
       </p>
     {% endif %}