Skip to content

Commit

Permalink
Merge 7f0a94a into 0429046
Browse files Browse the repository at this point in the history
  • Loading branch information
jdungan committed Aug 13, 2017
2 parents 0429046 + 7f0a94a commit 6b24e97
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion auctions/templates/addon/base.html
Expand Up @@ -33,7 +33,9 @@

<div id="widget-input-header">
<a href="https://{{current_site.domain}}" target="_blank">
<img id="widget-header-logo" src="{% static "img/codesy_300dpi_323x80.png" %}" width="161" height="40"></img>
<img id={% if active_issue %} "widget-header-invert"{% else %}"widget-header-logo"{% endif %}
src="{% static "img/codesy_300dpi_323x80.png" %}" width="161" height="40">
</img>
</a>
</div>

Expand Down
9 changes: 8 additions & 1 deletion auctions/views.py
Expand Up @@ -38,12 +38,19 @@ def _get_bid(self, url):
except:
return None

def _issue_exists(self, url):
try:
return True
except:
return False

def _url_path_only(self, url):
return urldefrag(url)[0]

def get_context_data(self, **kwargs):
url = self._url_path_only(self.request.GET['url'])
bid = self._get_bid(url)
active_issue = self._issue_exists(url)
if bid is None:
return dict({'bid': bid, 'url': url})

Expand All @@ -64,7 +71,7 @@ def get_context_data(self, **kwargs):
self.template_name = 'addon/bid_closed.html'
return dict({'claims': claims})
else:
return dict({'bid': bid, 'url': url})
return dict({'bid': bid, 'url': url, 'active_issue': active_issue})

def post(self, *args, **kwargs):
"""
Expand Down
4 changes: 4 additions & 0 deletions static/css/codesy-widget.css
Expand Up @@ -63,6 +63,10 @@ body {
font-size: 14px;
}

#widget-header-invert {
filter: invert(75%);
}

.codesy_confirm{
font-size: 0.75em;
margin: 0.25em
Expand Down

0 comments on commit 6b24e97

Please sign in to comment.