From e7a58b9d57d77a83dd1879feafbaccef5d367587 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 3 Mar 2010 23:52:11 -0600 Subject: Donor page rework for list formatting Instead of doing slicing and ugly table-based layout, move to a CSS-based organization of the donor list. Shoot for 4 columns but should degrade gracefully to fewer, and will look just fine with no CSS at all (one big tall list). Signed-off-by: Dan McGee --- media/arch.css | 12 ++++++++++++ public/views.py | 8 +------- templates/public/donate.html | 39 +++++++++++---------------------------- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/media/arch.css b/media/arch.css index 37a1acf..83d239e 100644 --- a/media/arch.css +++ b/media/arch.css @@ -373,3 +373,15 @@ form#newsform input[type=text] { form#newsform textarea { width: 100%; } + +/* donate page styles */ +ul#donorlist { + width: 100%; +} +ul#donorlist li { + float: left; + /* max 4 columns, but possibly fewer if screen size doesn't allow for more */ + width: 25%; + min-width: 20em; +} + diff --git a/public/views.py b/public/views.py index a80c30e..912801f 100644 --- a/public/views.py +++ b/public/views.py @@ -39,14 +39,8 @@ def userlist(request, type='Developers'): context_instance=RequestContext(request)) def donate(request): - donor_count = Donor.objects.count() - donors = Donor.objects.order_by('name') - splitval = donor_count / 4 context = { - 'slice1': donors[:splitval], - 'slice2': donors[(splitval):(splitval*2)], - 'slice3': donors[(splitval*2):(donor_count-splitval)], - 'slice4': donors[(donor_count-splitval):donor_count], + 'donors': Donor.objects.order_by('name'), } return render_to_response('public/donate.html', context, context_instance=RequestContext(request)) diff --git a/templates/public/donate.html b/templates/public/donate.html index 6595413..a14f20e 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -36,40 +36,23 @@

Sponsors and Contributions

We'd like to thank Velocity Network for contributing space in a server rack, bandwidth, and electricity for our main server for the last couple of years.

+
velocity network - it's about time -
+

We also wish to extend a special Thank You to SevenL Networks for their generous and ongoing contribution of a dedicated Arch Linux server. You too can have a dedicated Arch Linux server hosted by SevenL...head over to their website for more details.

+
We would like to express our thanks to SevenL Networks for their generous contribution -
+

More thanks go to AirVM.com for contributing a VMWare-based Virtual Machine.

+
AirVM.com - Your Green Technology Partner -
+

Past Donors

- - - - - - - -
- {% for donor in slice1 %} - {{ donor.name }}
- {% endfor %} -
- {% for donor in slice2 %} - {{ donor.name }}
- {% endfor %} -
- {% for donor in slice3 %} - {{ donor.name }}
- {% endfor %} -
- {% for donor in slice4 %} - {{ donor.name }}
- {% endfor %} -
+ +
-

{% endblock %} -- cgit v1.2.3-24-g4f1b