[extensions-web] Use the standard "extension details header" setup for extension on profiles.



commit 676081d4057f8c4ba63c871d503e199a4608e364
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Sep 26 14:52:50 2011 -0400

    Use the standard "extension details header" setup for extension on profiles.

 sweettooth/auth/templates/auth/profile.html        |   21 +++++++++++++++++++-
 .../extensions/templates/extensions/detail.html    |    2 +-
 .../extensions/templates/extensions/list.html      |    2 +-
 sweettooth/review/templates/review/review.html     |    2 +-
 sweettooth/static/css/sweettooth.css               |   11 +++------
 5 files changed, 27 insertions(+), 11 deletions(-)
---
diff --git a/sweettooth/auth/templates/auth/profile.html b/sweettooth/auth/templates/auth/profile.html
index a10c0b2..5450256 100644
--- a/sweettooth/auth/templates/auth/profile.html
+++ b/sweettooth/auth/templates/auth/profile.html
@@ -2,6 +2,7 @@
 {% block title %}{{ display_name }}'s Profile - {{ block.super }}{% endblock %}
 
 {% block body %}
+{% load thumbnail %}
 {% load gravatar %}
 <div class="profile">
   <h2>{{ display_name }}</h2>
@@ -10,7 +11,25 @@
   <h3> {{ display_name }} has authored </h3>
   <ul>
     {% for extension in extensions %}
-      <li><a href="{% url extensions-detail pk=extension.pk %}">{{ extension.name }}</a></li>
+    <li class="extension profile">
+      <div class="switch insensitive"></div>
+
+      {% if extension.icon %}
+      <img src="{{ extension.icon.url }}" class="icon">
+      {% endif %}
+
+      {% if extension.screenshot %}
+      {% thumbnail extension.screenshot "300x200" as th %}
+      <img src="{{ th.url }}" />
+      {% endthumbnail %}
+      {% endif %}
+
+      <h4 class="extension-name"><a href="{% url extensions-detail pk=extension.pk %}">{{ extension.name }}</a></h4>
+      <span class="author">by {{ extension.creator }}</span>
+      <p class="description">
+        {{ extension.description }}
+      </p>
+    </li>
     {% endfor %}
   </ul>
 
diff --git a/sweettooth/extensions/templates/extensions/detail.html b/sweettooth/extensions/templates/extensions/detail.html
index bca1dcd..2c15a40 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -47,7 +47,7 @@
       {% endblock %}
       {% endif %}
 
-      <h3 id="extension_name">{{ extension.name }}</h3>
+      <h3 class="extension-name" id="extension_name">{{ extension.name }}</h3>
       <span class="author">by <a href="{% url auth-profile user=extension.creator.username %}">{{ extension.creator }}</a></span>
       <p class="description" id="extension_description">
         {{ extension.description }}
diff --git a/sweettooth/extensions/templates/extensions/list.html b/sweettooth/extensions/templates/extensions/list.html
index 80a78fc..8339305 100644
--- a/sweettooth/extensions/templates/extensions/list.html
+++ b/sweettooth/extensions/templates/extensions/list.html
@@ -8,7 +8,7 @@
       <img src="{{ extension.icon.url }}" class="icon">
       {% endif %}
 
-      <h3><a href="{% url extensions-detail pk=extension.pk %}" class="title-link">{{ extension.name }}</a></h3>
+      <h3 class="extension-name"><a href="{% url extensions-detail pk=extension.pk %}" class="title-link">{{ extension.name }}</a></h3>
       <span class="author">by <a href="{% url auth-profile user=extension.creator.username %}">{{ extension.creator }}</a></span>
       <p class="description">
         {{ extension.description }}
diff --git a/sweettooth/review/templates/review/review.html b/sweettooth/review/templates/review/review.html
index 993346f..f7cc82c 100644
--- a/sweettooth/review/templates/review/review.html
+++ b/sweettooth/review/templates/review/review.html
@@ -20,7 +20,7 @@
     {% endthumbnail %}
     {% endif %}
 
-    <h3>{{ extension.name }}</h3>
+    <h3 class="extension-name">{{ extension.name }}</h3>
     <span class="author">by {{ extension.creator }}</span>
     <p class="description">
       {{ extension.description }}
diff --git a/sweettooth/static/css/sweettooth.css b/sweettooth/static/css/sweettooth.css
index 9a23183..ea9124f 100644
--- a/sweettooth/static/css/sweettooth.css
+++ b/sweettooth/static/css/sweettooth.css
@@ -141,18 +141,18 @@ li.extension {
     position: relative;
 }
 
-.extension h3 {
+.extension .extension-name {
     margin-left: 48px;
     font-size: 2em;
 }
 
-.extension h3, .extension h3 a {
+.extension .extension-name, .extension .extension-name a {
     display: inline;
     text-decoration: none;
     color: #000;
 }
 
-.extension h3 a:hover {
+.extension .extension-name a:hover {
     color: #445;
 }
 
@@ -457,10 +457,7 @@ input[type=submit], button {
     background: #EEEEEC;
     border: 1px solid #BABDB6;
     border-radius: 8px;
-    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-    clear: both;
-    padding: 20px;
-
+    padding: 10px;
     margin-top: 20px;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]