Browse Source

Fix display of missing twist, and promoted message

Missing twists were shown "from @"
Sponsored messages showed time twice :s
master
The Dod 11 years ago
parent
commit
775dbfb35d
  1. 7
      templates/message.html
  2. 6
      templates/standard.html
  3. 2
      twister.py

7
templates/message.html

@ -9,7 +9,6 @@
{{^is_messages}} {{^is_messages}}
<span class="pull-right small"> <span class="pull-right small">
{{^is_promoted}}<a title="View twist details" href="{{site_root}}/twist/{{.}}/{{k}}">{{/is_promoted}}{{time}}{{^is_promoted}}</a>{{/is_promoted}} {{^is_promoted}}<a title="View twist details" href="{{site_root}}/twist/{{.}}/{{k}}">{{/is_promoted}}{{time}}{{^is_promoted}}</a>{{/is_promoted}}
{{#is_promoted}}<span class="pull-right small">{{time}}</span>{{/is_promoted}}
</span> </span>
{{/is_messages}} {{/is_messages}}
{{#is_messages}}<span class="pull-right small">{{time}}</span>{{/is_messages}} {{#is_messages}}<span class="pull-right small">{{time}}</span>{{/is_messages}}
@ -31,7 +30,11 @@
{{^username}} {{^username}}
<h5 class="media-heading"> <h5 class="media-heading">
<span class="pull-right small">{{time}}</span> <span class="pull-right small">{{time}}</span>
<a href="{{site_root}}/">@{{username}}</a> <abbr
title="&#10077;&#120289;&#120316;&#120303;&#120316;&#120305;&#120326; regrets
that this twist is not here [yet?].
Sorry for the wait&#10078;
&mdash; BOFH, polite Haiku edition">Nobody</abbr>
</h5> </h5>
{{/username}} {{/username}}
{{{message}}} {{{message}}}

6
templates/standard.html

@ -53,8 +53,8 @@
{{#subject}} {{#subject}}
<div class="media"> <div class="media">
<a class="pull-left thumbnail" href="{{site_root}}{{#username}}/user/{{.}}{{/username}}{{^username}}#{{/username}}" <a class="pull-left thumbnail" href="{{site_root}}{{#username}}/user/{{.}}{{/username}}{{^username}}#{{/username}}"
{{#username}}title="@{{usermame}}'s profile"{{/username}}> {{#username}}title="@{{username}}'s profile"{{/username}}>
<img class="media-object avatar" src="{{#avatar}}{{.}}{{/avatar}}{{^avatar}}/assets/img/twister-64.jpg{{/avatar}}" alt="{{fullname}}"> <img class="media-object avatar" src="{{#avatar}}{{.}}{{/avatar}}{{^avatar}}/assets/img/genericPerson.png{{/avatar}}" alt="{{fullname}}">
</a> </a>
<div class="media-body"> <div class="media-body">
{{#is_user}} {{#is_user}}
@ -72,7 +72,7 @@ title="&#10077;Let us make a toast
{{^is_promoted}}<span class="glyphicon glyphicon-user"></span>{{/is_promoted}} {{^is_promoted}}<span class="glyphicon glyphicon-user"></span>{{/is_promoted}}
{{fullname}} {{fullname}}
{{#url}}<small><a target="_blank" href="{{.}}">{{.}}</a></small>{{/url}}</h2> {{#url}}<small><a target="_blank" href="{{.}}">{{.}}</a></small>{{/url}}</h2>
{{{bio}}} <h4><small>{{{bio}}}</small></h4>
{{/is_user}} {{/is_user}}
{{#is_tag}} {{#is_tag}}
<h2 class="media-heading"> <h2 class="media-heading">

2
twister.py

@ -54,7 +54,7 @@ class Twister:
#"user":self.get_user_info('nobody'), #"user":self.get_user_info('nobody'),
"k":0, # maybe something needs this "k":0, # maybe something needs this
"lastk":0, # or this "lastk":0, # or this
"message":"Twist not found (maybe it's private?) &#128557;", "message":"Twist not found &#128557;",
"time":"Never" "time":"Never"
}) })
@functioncache(60,ignore_instance=True) @functioncache(60,ignore_instance=True)

Loading…
Cancel
Save