OpenHack / openhack.github.com

Community site for OpenHack nights.
http://openhack.github.com
MIT License
94 stars 122 forks source link

Sort cities by country? #96

Open qrush opened 11 years ago

qrush commented 11 years ago

Seems like this would be easier for organization of the sidebar.

aquaranto commented 11 years ago

Or maybe have expandable sections for each country?

qrush commented 11 years ago

Sure, either works. @jameschildress what say you?

jahio commented 11 years ago

I like the expandable sections by country option myself, but either is a good move in my opinion. So +1

justinxreese commented 11 years ago

I don't like the sound of the expanding menu because the bulk of the cities are in the US and will therefor require an extra click.

I'd support a nested menu though. Same idea with no clicks.

anoldguy commented 11 years ago

Thoughts...

  1. Yes, that's a UX issue, and I don't know how to solve it.
  2. Ethnocentricity, man... How do we put all of the countries on an equal footing and solve the UX issue?

What would a nested menu look like? Do you have a mockup?

justinxreese commented 11 years ago

@anoldguy Just a really simple mockup here in the comments section, because either way the actual look of this is still to be determined.

The countries are the top level sorted by number of cities inside or alphabetically.

US

Canada

China

jahio commented 11 years ago

regarding point number 2 on ethnocentricity, I personally see nothing wrong with going either by number of openhacks per country or alphabetizing by country. Either way has a logical reason behind it and therefore no need for anyone to feel that some one's not on equal footing. It's just numbers and/or letters.

qrush commented 11 years ago

So we can use this data structure in _config.yml:

---
countries:
 USA:
  - atlanta:
      name: Atlanta, GA
  - buffalo:
      name: Atlanta, GA
 Canada:
  - waterloo:
      name: Waterloo, ON
  - toronto:
      name: Toronto, ON

Looping through it is dumb, but works:

{% for country in site.countries %}
  {{ country.first }}

  {% for city in country.last %}
    {{ city.first.first }}
    {{ city.first.last.name }}
  {% endfor %}
{% endfor %}
anoldguy commented 11 years ago

Looks like a good 80/20, and fixes the issue we have. If you don't tackle it, I'll try to get to it tomorrow.