Permalink
Browse files

Gist style updated.

  • Loading branch information...
1 parent 879d6cc commit fd4e606d6023968215dcf1bd2cb07f3eed65f573 @livid committed Aug 2, 2010
Showing with 21 additions and 6 deletions.
  1. +2 −1 README
  2. +14 −2 static/css/desktop/style.css
  3. +5 −3 v2ex/templatetags/filters.py
View
@@ -13,4 +13,5 @@ Features:
- HTML5
- Built-in MapReduce tasks for optimizing community data
- Built-in OAuth Twitter client for tweeting and syncing topics/replies
-- Built-in Notes feature
+- Built-in Notes feature
+- Gravatar support
@@ -618,5 +618,17 @@ table.grid td.left {
border-left: none;
}
-.gist { font-size:11px; width:636px; font-family: Monaco,Arial, "MS Trebuchet", sans-serif;}
-.cell .gist { width:576px; }
+.gist { font-size: 11px; font-family: "Panic Sans", "Menlo", "DejaVu Sans Mono", "Luxi Mono", "Courier New", Monaco, "Hiragino Sans GB", STHeiti !important; }
+
+.gist-file {
+ -moz-border-radius: 4px; -webkit-border-radius: 4px;
+ border: 2px solid #999;
+ -moz-box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
+}
+
+.gist-file .gist-data {
+ -moz-border-radius: 4px 4px 0px 0px; -webkit-border-radius: 4px;
+}
+
+.cell .gist { max-width: 576px; }
@@ -11,6 +11,7 @@ def timezone(value, offset):
return value + timedelta(hours=offset)
register.filter(timezone)
+# auto convert img.ly/abcd links to image tags
def imgly(value):
imgs = re.findall('(http://img.ly/[a-zA-Z0-9]+)\s?', value)
if (len(imgs) > 0):
@@ -23,6 +24,7 @@ def imgly(value):
return value
register.filter(imgly)
+# auto convert @username to clickable links
def mentions(value):
ms = re.findall('(@[a-zA-Z0-9\_]+\.?)\s?', value)
if (len(ms) > 0):
@@ -40,7 +42,7 @@ def mentions(value):
def avatar(value,arg):
default = "http://v2ex.com/static/img/avatar_" + str(arg) + ".png"
if type(value).__name__ != 'Member':
- return '<img src="' + default + '" />'
+ return '<img src="' + default + '" border="0" />'
if arg == 'large':
number_size = 73
member_avatar_url = value.avatar_large_url
@@ -61,5 +63,5 @@ def avatar(value,arg):
# github gist script support
def gist(value):
- return re.sub(r'(http://gist.github.com/[\d]+)',r'<script src="\1.js"></script>',value)
-register.filter(gist)
+ return re.sub(r'(http://gist.github.com/[\d]+)', r'<script src="\1.js"></script>', value)
+register.filter(gist)

0 comments on commit fd4e606

Please sign in to comment.