|
|
@@ -98,7 +98,10 @@ def home(request):
|
|
98
|
98
|
maxJSS = (counter.lastReset.delta.total_seconds() /
|
|
99
|
99
|
(24 * 3600))
|
|
100
|
100
|
# Defining CSS attributes for the counter
|
|
101
|
|
- counter.CSSclass = "default"
|
|
|
101
|
+ if counter.id == myCounter.id:
|
|
|
102
|
+ counter.CSSclass = 'primary'
|
|
|
103
|
+ else:
|
|
|
104
|
+ counter.CSSclass = 'default'
|
|
102
|
105
|
# Computing the total number of likes for this counter
|
|
103
|
106
|
counter.likeCount = Like.objects.filter(
|
|
104
|
107
|
reset=counter.lastReset).count()
|
|
|
@@ -107,7 +110,7 @@ def home(request):
|
|
107
|
110
|
|
|
108
|
111
|
counter.lastReset.formatted_delta = format_timedelta(
|
|
109
|
112
|
counter.lastReset.delta, locale='fr', threshold=1)
|
|
110
|
|
- counter.isHidden = "hidden"
|
|
|
113
|
+ counter.isHidden = 'hidden'
|
|
111
|
114
|
|
|
112
|
115
|
# Now we sort the counters according to a reddit-like ranking formula
|
|
113
|
116
|
# We take into account the number of likes of a reset and its recentness
|