improving gradient
parent
cf58570c2e
commit
a060cf0f51
|
@ -96,10 +96,16 @@ $j(document).ready(function(){
|
|||
|
||||
{% ifequal status 'ACTIVE' %}
|
||||
<div class="thermometer">
|
||||
<div class="cover" style="width:{% widthratio work.percent_of_goal 100 298 %}px;">
|
||||
<div class="cover" style="width: {{ cover_width }}%;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="pledged-info noborder">
|
||||
<div class="campaign-status-info">
|
||||
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
|
||||
</div>
|
||||
<div class="campaign-status-info">
|
||||
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
|
||||
</div>
|
||||
<div class="campaign-status-info">
|
||||
{% if work.last_campaign.supporters_count == 1 %}
|
||||
<span>1</span> ungluer
|
||||
|
@ -107,12 +113,6 @@ $j(document).ready(function(){
|
|||
<span> {{ work.last_campaign.supporters_count }}</span> ungluers
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="campaign-status-info">
|
||||
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
|
||||
</div>
|
||||
<div class="campaign-status-info">
|
||||
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
|
||||
</div>
|
||||
<div class="campaign-status-info">
|
||||
<span>{{ countdown }}</span> to go
|
||||
</div>
|
||||
|
|
|
@ -162,6 +162,7 @@ def work(request, work_id, action='display'):
|
|||
|
||||
logger.info("pledged: {0}".format(pledged))
|
||||
countdown = ""
|
||||
cover_width = 0
|
||||
|
||||
try:
|
||||
assert not (work.last_campaign_status() == 'ACTIVE' and work.first_ebook())
|
||||
|
@ -188,6 +189,11 @@ def work(request, work_id, action='display'):
|
|||
countdown = "%s minutes" % str(time_remaining.seconds/60 + 1)
|
||||
else:
|
||||
countdown = "Seconds"
|
||||
|
||||
if work.percent_of_goal() < 100:
|
||||
cover_width = 100 - work.percent_of_goal()
|
||||
else:
|
||||
cover_width = 0
|
||||
|
||||
if action == 'preview':
|
||||
work.last_campaign_status = 'ACTIVE'
|
||||
|
@ -251,6 +257,7 @@ def work(request, work_id, action='display'):
|
|||
'claimstatus': claimstatus,
|
||||
'rights_holder_name': rights_holder_name,
|
||||
'countdown': countdown,
|
||||
'cover_width': cover_width
|
||||
})
|
||||
|
||||
def new_edition(request, work_id, edition_id, by=None):
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -109,8 +109,8 @@
|
|||
position: relative;
|
||||
|
||||
/* looks better if we start the gradient a little closer to the success color */
|
||||
@greener-than-alert: #DC5D4E;
|
||||
|
||||
@greener-than-alert: #CF6944;
|
||||
|
||||
background: -webkit-gradient(linear, left top, right top, from(@call-to-action), to(@greener-than-alert));
|
||||
background: -webkit-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||
background: -moz-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||
|
@ -124,7 +124,17 @@
|
|||
&.successful {
|
||||
border-color: @bright-blue;
|
||||
background: @pale-blue;
|
||||
}
|
||||
}
|
||||
|
||||
.cover {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
.border-radius(0, 10px, 10px, 0);
|
||||
width: 50px;
|
||||
height: 14px;
|
||||
margin-top: -7px;
|
||||
background: lighten(@blue-grey, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
|
|
Loading…
Reference in New Issue