Skip to content

Commit

Permalink
Now displaying country for clan if not international.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronTraas committed May 27, 2019
1 parent 6b55382 commit 5f8565d
Show file tree
Hide file tree
Showing 253 changed files with 19 additions and 3 deletions.
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ All of the non-code contributors are listed in
Image rights
==================================================

All images included in this repository were created by the team, and are
included in the GPL license. The SVGs were all created in Inkscape.
All images except the flags included in this repository were created by the
team, and are included in the GPL license. The SVGs were all created in
Inkscape.

The flags included are from http://www.famfamfam.com/lab/icons/flags/, which
as of 5/27/2019 stated it required no attribution or license. We are
interpreting this to mean these are available in the public domain.

It was important to us to make sure the entirety of this application is
open source, and not subject to takedown request. We will not ever
Expand Down
2 changes: 1 addition & 1 deletion crtools/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.7"
__version__ = "2.3.0"
1 change: 1 addition & 0 deletions crtools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def __localize_strings(locale_id):
'labelClanStats' : _('Clan Stats'),
'labelClanName' : _('Clan Name'),
'labelClanScore' : _('Clan Score'),
'labelCountry' : _('Country'),
'labelDonationsPerWeek' : _('Donations/week'),
'labelRequiredTrophies' : _('Required Trophies'),
'labelWarTrophies' : _('War Trophies'),
Expand Down
1 change: 1 addition & 0 deletions crtools/crtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def enrich_member_with_history(config, fresh_member, historical_members, days_fr
enriched_member['last_donation_date'] = historical_member['last_donation_date']
enriched_member['donations_last_week'] = historical_member['donations_last_week']
enriched_member['days_inactive'] = (now - datetime.fromtimestamp(enriched_member['last_activity_date'])).days
enriched_member['days_inactive'] = enriched_member['days_inactive'] if enriched_member['days_inactive'] >= 0 else 0

if enriched_member['join_date'] == 0:
enriched_member['join_date_label'] = config['strings']['labelBeforeHistory']
Expand Down
5 changes: 5 additions & 0 deletions crtools/static/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
margin-bottom: 8px;
}

#hero .flag {
margin-left: 5px;
vertical-align: center;
}

@media (max-width: 700px) {
#hero > .section-wrap {
display: block;
Expand Down
Binary file added crtools/static/images/flags/ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/af.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/al.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/am.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/an.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/as.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/at.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/au.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/aw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/az.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/ba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/be.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crtools/static/images/flags/bm.png
Binary file added crtools/static/images/flags/bn.png
Binary file added crtools/static/images/flags/bo.png
Binary file added crtools/static/images/flags/br.png
Binary file added crtools/static/images/flags/bs.png
Binary file added crtools/static/images/flags/bt.png
Binary file added crtools/static/images/flags/bv.png
Binary file added crtools/static/images/flags/bw.png
Binary file added crtools/static/images/flags/by.png
Binary file added crtools/static/images/flags/bz.png
Binary file added crtools/static/images/flags/ca.png
Binary file added crtools/static/images/flags/catalonia.png
Binary file added crtools/static/images/flags/cc.png
Binary file added crtools/static/images/flags/cd.png
Binary file added crtools/static/images/flags/cf.png
Binary file added crtools/static/images/flags/cg.png
Binary file added crtools/static/images/flags/ch.png
Binary file added crtools/static/images/flags/ci.png
Binary file added crtools/static/images/flags/ck.png
Binary file added crtools/static/images/flags/cl.png
Binary file added crtools/static/images/flags/cm.png
Binary file added crtools/static/images/flags/cn.png
Binary file added crtools/static/images/flags/co.png
Binary file added crtools/static/images/flags/cr.png
Binary file added crtools/static/images/flags/cs.png
Binary file added crtools/static/images/flags/cu.png
Binary file added crtools/static/images/flags/cv.png
Binary file added crtools/static/images/flags/cx.png
Binary file added crtools/static/images/flags/cy.png
Binary file added crtools/static/images/flags/cz.png
Binary file added crtools/static/images/flags/de.png
Binary file added crtools/static/images/flags/dj.png
Binary file added crtools/static/images/flags/dk.png
Binary file added crtools/static/images/flags/dm.png
Binary file added crtools/static/images/flags/do.png
Binary file added crtools/static/images/flags/dz.png
Binary file added crtools/static/images/flags/ec.png
Binary file added crtools/static/images/flags/ee.png
Binary file added crtools/static/images/flags/eg.png
Binary file added crtools/static/images/flags/eh.png
Binary file added crtools/static/images/flags/england.png
Binary file added crtools/static/images/flags/er.png
Binary file added crtools/static/images/flags/es.png
Binary file added crtools/static/images/flags/et.png
Binary file added crtools/static/images/flags/europeanunion.png
Binary file added crtools/static/images/flags/fam.png
Binary file added crtools/static/images/flags/fi.png
Binary file added crtools/static/images/flags/fj.png
Binary file added crtools/static/images/flags/fk.png
Binary file added crtools/static/images/flags/fm.png
Binary file added crtools/static/images/flags/fo.png
Binary file added crtools/static/images/flags/fr.png
Binary file added crtools/static/images/flags/ga.png
Binary file added crtools/static/images/flags/gb.png
Binary file added crtools/static/images/flags/gd.png
Binary file added crtools/static/images/flags/ge.png
Binary file added crtools/static/images/flags/gf.png
Binary file added crtools/static/images/flags/gh.png
Binary file added crtools/static/images/flags/gi.png
Binary file added crtools/static/images/flags/gl.png
Binary file added crtools/static/images/flags/gm.png
Binary file added crtools/static/images/flags/gn.png
Binary file added crtools/static/images/flags/gp.png
Binary file added crtools/static/images/flags/gq.png
Binary file added crtools/static/images/flags/gr.png
Binary file added crtools/static/images/flags/gs.png
Binary file added crtools/static/images/flags/gt.png
Binary file added crtools/static/images/flags/gu.png
Binary file added crtools/static/images/flags/gw.png
Binary file added crtools/static/images/flags/gy.png
Binary file added crtools/static/images/flags/hk.png
Binary file added crtools/static/images/flags/hm.png
Binary file added crtools/static/images/flags/hn.png
Binary file added crtools/static/images/flags/hr.png
Binary file added crtools/static/images/flags/ht.png
Binary file added crtools/static/images/flags/hu.png
Binary file added crtools/static/images/flags/id.png
Binary file added crtools/static/images/flags/ie.png
Binary file added crtools/static/images/flags/il.png
Binary file added crtools/static/images/flags/in.png
Binary file added crtools/static/images/flags/io.png
Binary file added crtools/static/images/flags/iq.png
Binary file added crtools/static/images/flags/ir.png
Binary file added crtools/static/images/flags/is.png
Binary file added crtools/static/images/flags/it.png
Binary file added crtools/static/images/flags/jm.png
Binary file added crtools/static/images/flags/jo.png
Binary file added crtools/static/images/flags/jp.png
Binary file added crtools/static/images/flags/ke.png
Binary file added crtools/static/images/flags/kg.png
Binary file added crtools/static/images/flags/kh.png
Binary file added crtools/static/images/flags/ki.png
Binary file added crtools/static/images/flags/km.png
Binary file added crtools/static/images/flags/kn.png
Binary file added crtools/static/images/flags/kp.png
Binary file added crtools/static/images/flags/kr.png
Binary file added crtools/static/images/flags/kw.png
Binary file added crtools/static/images/flags/ky.png
Binary file added crtools/static/images/flags/kz.png
Binary file added crtools/static/images/flags/la.png
Binary file added crtools/static/images/flags/lb.png
Binary file added crtools/static/images/flags/lc.png
Binary file added crtools/static/images/flags/li.png
Binary file added crtools/static/images/flags/lk.png
Binary file added crtools/static/images/flags/lr.png
Binary file added crtools/static/images/flags/ls.png
Binary file added crtools/static/images/flags/lt.png
Binary file added crtools/static/images/flags/lu.png
Binary file added crtools/static/images/flags/lv.png
Binary file added crtools/static/images/flags/ly.png
Binary file added crtools/static/images/flags/ma.png
Binary file added crtools/static/images/flags/mc.png
Binary file added crtools/static/images/flags/md.png
Binary file added crtools/static/images/flags/me.png
Binary file added crtools/static/images/flags/mg.png
Binary file added crtools/static/images/flags/mh.png
Binary file added crtools/static/images/flags/mk.png
Binary file added crtools/static/images/flags/ml.png
Binary file added crtools/static/images/flags/mm.png
Binary file added crtools/static/images/flags/mn.png
Binary file added crtools/static/images/flags/mo.png
Binary file added crtools/static/images/flags/mp.png
Binary file added crtools/static/images/flags/mq.png
Binary file added crtools/static/images/flags/mr.png
Binary file added crtools/static/images/flags/ms.png
Binary file added crtools/static/images/flags/mt.png
Binary file added crtools/static/images/flags/mu.png
Binary file added crtools/static/images/flags/mv.png
Binary file added crtools/static/images/flags/mw.png
Binary file added crtools/static/images/flags/mx.png
Binary file added crtools/static/images/flags/my.png
Binary file added crtools/static/images/flags/mz.png
Binary file added crtools/static/images/flags/na.png
Binary file added crtools/static/images/flags/nc.png
Binary file added crtools/static/images/flags/ne.png
Binary file added crtools/static/images/flags/nf.png
Binary file added crtools/static/images/flags/ng.png
Binary file added crtools/static/images/flags/ni.png
Binary file added crtools/static/images/flags/nl.png
Binary file added crtools/static/images/flags/no.png
Binary file added crtools/static/images/flags/np.png
Binary file added crtools/static/images/flags/nr.png
Binary file added crtools/static/images/flags/nu.png
Binary file added crtools/static/images/flags/nz.png
Binary file added crtools/static/images/flags/om.png
Binary file added crtools/static/images/flags/pa.png
Binary file added crtools/static/images/flags/pe.png
Binary file added crtools/static/images/flags/pf.png
Binary file added crtools/static/images/flags/pg.png
Binary file added crtools/static/images/flags/ph.png
Binary file added crtools/static/images/flags/pk.png
Binary file added crtools/static/images/flags/pl.png
Binary file added crtools/static/images/flags/pm.png
Binary file added crtools/static/images/flags/pn.png
Binary file added crtools/static/images/flags/pr.png
Binary file added crtools/static/images/flags/ps.png
Binary file added crtools/static/images/flags/pt.png
Binary file added crtools/static/images/flags/pw.png
Binary file added crtools/static/images/flags/py.png
Binary file added crtools/static/images/flags/qa.png
Binary file added crtools/static/images/flags/re.png
Binary file added crtools/static/images/flags/ro.png
Binary file added crtools/static/images/flags/rs.png
Binary file added crtools/static/images/flags/ru.png
Binary file added crtools/static/images/flags/rw.png
Binary file added crtools/static/images/flags/sa.png
Binary file added crtools/static/images/flags/sb.png
Binary file added crtools/static/images/flags/sc.png
Binary file added crtools/static/images/flags/scotland.png
Binary file added crtools/static/images/flags/sd.png
Binary file added crtools/static/images/flags/se.png
Binary file added crtools/static/images/flags/sg.png
Binary file added crtools/static/images/flags/sh.png
Binary file added crtools/static/images/flags/si.png
Binary file added crtools/static/images/flags/sj.png
Binary file added crtools/static/images/flags/sk.png
Binary file added crtools/static/images/flags/sl.png
Binary file added crtools/static/images/flags/sm.png
Binary file added crtools/static/images/flags/sn.png
Binary file added crtools/static/images/flags/so.png
Binary file added crtools/static/images/flags/sr.png
Binary file added crtools/static/images/flags/st.png
Binary file added crtools/static/images/flags/sv.png
Binary file added crtools/static/images/flags/sy.png
Binary file added crtools/static/images/flags/sz.png
Binary file added crtools/static/images/flags/tc.png
Binary file added crtools/static/images/flags/td.png
Binary file added crtools/static/images/flags/tf.png
Binary file added crtools/static/images/flags/tg.png
Binary file added crtools/static/images/flags/th.png
Binary file added crtools/static/images/flags/tj.png
Binary file added crtools/static/images/flags/tk.png
Binary file added crtools/static/images/flags/tl.png
Binary file added crtools/static/images/flags/tm.png
Binary file added crtools/static/images/flags/tn.png
Binary file added crtools/static/images/flags/to.png
Binary file added crtools/static/images/flags/tr.png
Binary file added crtools/static/images/flags/tt.png
Binary file added crtools/static/images/flags/tv.png
Binary file added crtools/static/images/flags/tw.png
Binary file added crtools/static/images/flags/tz.png
Binary file added crtools/static/images/flags/ua.png
Binary file added crtools/static/images/flags/ug.png
Binary file added crtools/static/images/flags/um.png
Binary file added crtools/static/images/flags/us.png
Binary file added crtools/static/images/flags/uy.png
Binary file added crtools/static/images/flags/uz.png
Binary file added crtools/static/images/flags/va.png
Binary file added crtools/static/images/flags/vc.png
Binary file added crtools/static/images/flags/ve.png
Binary file added crtools/static/images/flags/vg.png
Binary file added crtools/static/images/flags/vi.png
Binary file added crtools/static/images/flags/vn.png
Binary file added crtools/static/images/flags/vu.png
Binary file added crtools/static/images/flags/wales.png
Binary file added crtools/static/images/flags/wf.png
Binary file added crtools/static/images/flags/ws.png
Binary file added crtools/static/images/flags/ye.png
Binary file added crtools/static/images/flags/yt.png
Binary file added crtools/static/images/flags/za.png
Binary file added crtools/static/images/flags/zm.png
Binary file added crtools/static/images/flags/zw.png
4 changes: 4 additions & 0 deletions crtools/templates/page.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<tbody>
<tr><th>{{strings.labelClanScore}}</th><td>{{clan.clanScore}}</td></tr>
<tr><th>{{strings.labelClanName}}</th><td>{{clan.name}}</td></tr>
{% if clan.location.isCountry == true %}
<tr><th>{{strings.labelCountry}}</th><td>{{clan.location.name}}<img class="flag" src="static/images/flags/{{clan.location.countryCode|upper}}.png" /></td></tr>
{% endif %}

<tr><th>{{strings.labelDonationsPerWeek}}</th><td>{{clan.donationsPerWeek}}</td></tr>
<tr><th>{{strings.labelRequiredTrophies}}</th><td>{{clan.requiredTrophies}}</td></tr>
<tr>
Expand Down

0 comments on commit 5f8565d

Please sign in to comment.