Skip to content

Sort cities by country? #96

Description

@qrush

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

  • Reformat _config.yml to use new data structure
  • Add countries to existing cities
  • Nest cities into countries in _layouts/default.html
  • Change generator in Rakefile for cities to include country on input and on output into _config.yml

Activity

  1. aquaranto commented on Feb 4, 2013

    @aquaranto
    Member

    Or maybe have expandable sections for each country?

  2. qrush commented on Feb 4, 2013

    @qrush
    MemberAuthor

    Sure, either works. @jameschildress what say you?

  3. jahio commented on Feb 4, 2013

    @jahio

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

  4. justinxreese commented on Feb 4, 2013

    @justinxreese
    Member

    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.

  5. anoldguy commented on Feb 4, 2013

    @anoldguy
    Contributor

    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?

  6. justinxreese commented on Feb 4, 2013

    @justinxreese
    Member

    @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

    • Atlanta
    • Austin
    • Buffalo
    • Birmingham

    Canada

    • Toronto
    • Windsor

    China

    • Beijing
  7. jahio commented on Feb 4, 2013

    @jahio

    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.

  8. qrush commented on Feb 6, 2013

    @qrush
    MemberAuthor

    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 %}
    
  9. anoldguy commented on Feb 6, 2013

    @anoldguy
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions