Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/refactor to single page #24

Merged
merged 36 commits into from
Dec 19, 2018
Merged

Conversation

stacytalbot
Copy link
Contributor

@stacytalbot stacytalbot commented Dec 18, 2018

  • Update Citation text in the footer to match Charlottes new design in Trello
  • Bold the first paragraph in the header
  • Refactor the whole site down from 5 pages to 1
  • Remove the 'page name' from the site title because it is now only one page and this can't be updated via js
  • Delete all files no longer used
  • Leave in code for cartoDB in case it is reinstated at a later date

@stacytalbot stacytalbot requested a review from Levia December 18, 2018 15:30
aichi_targets = generateImageUrls @aichi_targets
sdgs = generateImageUrls @sdgs

@habitatData = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could extract this into a serialiser to improve the readability of the controller.
If not the whole hash, at least the map key seems the most suitable part for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Levia my first serializer - be gentle

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 🤔 🤔

@@ -67,6 +87,14 @@ def load_global
@sdgs = YAML.load(File.open("#{Rails.root}/lib/data/content/sdgs.yml", 'r'))
end

def generateImageUrls targets
targets['list'].each do |target|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use map instead of each so you won't need to return targets at the end. map returns the modified array.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i don't return targets, it doesn't work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see the point now. That's fine then!

end

private
def content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please just add an extra line between private and the defitions? Also removing the indentation so it's at the same level as the public methods :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already has that on mine locally?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh - i was looking in the wrong file haha, too many carols in here

@Levia Levia merged commit eab337b into develop Dec 19, 2018
@Levia Levia deleted the feature/refactor-to-single-page branch December 19, 2018 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants