[cpif] r226 - in trunk/frontend-web: . skins/default

svn at argo.es svn at argo.es
Tue Jul 3 00:12:50 CEST 2007


Author: alvaro
Date: Tue Jul  3 00:12:50 2007
New Revision: 226

Log:
Soporte de avatares


Added:
   trunk/frontend-web/skins/default/avatar.html
Modified:
   trunk/frontend-web/skins.py
   trunk/frontend-web/skins/default/body_show_thread_entry.html
   trunk/frontend-web/skins/default/body_show_thread_entry_anonymous.html
   trunk/frontend-web/skins/default/header.html

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Tue Jul  3 00:12:50 2007
@@ -10,6 +10,7 @@
     'header':         'header.html',
     'body_thread':    'body_show_thread.html',
     'body_thread_anonymous':    'body_show_thread_anonymous.html',
+    'avatar':         'avatar.html',
     'thread_entry':   'body_show_thread_entry.html',
     'thread_entry_anonymous':   'body_show_thread_entry_anonymous.html',
     'thread_first':   'body_show_thread_first.html',
@@ -121,9 +122,21 @@
         aux = available_skins[self._skin]['thread_entry']
       else:
         aux = available_skins[self._skin]['thread_entry_anonymous']
+      if avatar:
+        d = {
+            "avatar": "/static/avatars/%s" % avatar[0],
+            "author": author,
+            "width" : avatar[1][0],
+            "height": avatar[1][1]
+        }
+        avatar = available_skins[self._skin]['avatar'] % d
+      else:
+        avatar = ""
+
       aux = aux % {"msg_num":msg_num, "author":author,
           "date":hourdate(date,self._tz),
           "text":text,"format":format,
+          "avatar": avatar,
         }
       self.set_text(aux)
 

Added: trunk/frontend-web/skins/default/avatar.html
==============================================================================
--- (empty file)
+++ trunk/frontend-web/skins/default/avatar.html	Tue Jul  3 00:12:50 2007
@@ -0,0 +1 @@
+<div class="avatar"><img src="%(avatar)s" alt="Avatar de %(author)s" width="%(width)s" height="%(height)s"/></div>

Modified: trunk/frontend-web/skins/default/body_show_thread_entry.html
==============================================================================
--- trunk/frontend-web/skins/default/body_show_thread_entry.html	(original)
+++ trunk/frontend-web/skins/default/body_show_thread_entry.html	Tue Jul  3 00:12:50 2007
@@ -1,6 +1,7 @@
 <div class="%(format)s" id="m%(msg_num)s">
   <a name="m%(msg_num)s"></a>
   <div class="autor">Autor: %(author)s<br />
+  %(avatar)s
   </div>
   <div class="texto">
     <div class="fecha">

Modified: trunk/frontend-web/skins/default/body_show_thread_entry_anonymous.html
==============================================================================
--- trunk/frontend-web/skins/default/body_show_thread_entry_anonymous.html	(original)
+++ trunk/frontend-web/skins/default/body_show_thread_entry_anonymous.html	Tue Jul  3 00:12:50 2007
@@ -1,6 +1,7 @@
 <div class="%(format)s" id="m%(msg_num)s">
   <a name="m%(msg_num)s"></a>
   <div class="autor">Autor: %(author)s<br />
+  %(avatar)s
   </div>
   <div class="texto">
     <div class="fecha">

Modified: trunk/frontend-web/skins/default/header.html
==============================================================================
--- trunk/frontend-web/skins/default/header.html	(original)
+++ trunk/frontend-web/skins/default/header.html	Tue Jul  3 00:12:50 2007
@@ -79,6 +79,12 @@
             padding:5px;
             border: 1px dotted;
           }
+          #contenido .avatar {
+            margin-top: 0.5em;
+            width: 154px:
+            height: 154px;
+            padding: 2px;
+          }
           #contenido .hilo .responder {
             font-size:0.9em;
             border-top: 1px solid #ffa31a;



More information about the cpif mailing list