nhshackday / nhshackday.github.io

NHS Hack Day website
http://nhshackday.com
13 stars 22 forks source link

Site Cleanup #236

Closed blu3id closed 6 years ago

blu3id commented 6 years ago

Shamelessly stolen from the README.md:

Welcome to the new, new NHS Hack Day website. This is a rebuild of the older Jekyll site that was last refreshed in ?January 2016. There is little that has changed from a design perspective (there has been a metaphorical "lick of paint" for more consistent styling, better responsive/mobile design and some changes to how projects are displayed) but the underlying structure, templates and CSS have undergone a complete rebuild.

This PR supersedes @DeckOfPandas #232 because of merging issues and :waves-hands: magic staging only works from PRs from branches on the repository.

This should be a drop-in replacement for the current site i.e stuff that is accessible and linked on the current site should have been copied over. However many eyes checking would be appreciated, the biggest risks for broken bits and changes are:

If all works as intended there should be a link to a staging version of the site in the comments below.

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

davidmiller commented 6 years ago

The nine million files you've changed are too much for Github PR review :)

{% assign current_time = site.time | date: "%s" | to_integer %}
{% assign sorted = site.events | sort: 'date' | reverse %}
{% for post in sorted %}
    {% assign start = post.date | date: "%s" | plus: 86400 | to_integer %}
    {% unless start >= current_time %}

@blu3id can you talk me through the plus 24hours there.... It's supposed to appear in previous at midnight on the Sunday ?

davidmiller commented 6 years ago

(My apologies - closure was clicking close and comment instead of comment)

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

blu3id commented 6 years ago

@davidmiller Yes this is a dirty, filthy hatchet job of a hack on Jekyll on that page, which unsurprisingly you have found an error in despite my testing. This is because of edge cases it should probably be adding x2 days (172800).

Basically I need to fix this - I can't directly use post.end_date because this can sometimes be text in upcoming event.... so we can either change to 172800 which assumes all Hackdays are 2 days long? or I can pile further hatchet job logic in.... or do nothing as it just means event will also display as previous event on Saturday midnight while still being upcoming.

davidmiller commented 6 years ago

From @blu3id in a thread elsewhere:

And obv. this display logic is at site build time anyway so unless the site is updated over the weekend nothing happens.

You know, I had in fact forgotten this. Given that I'd be very tempted to just simplify the whole thing and have it be 'upcoming' or 'past' immediately that now is > start_date

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh

davidmiller commented 6 years ago

I'm planning to merge this tomorrow AM FWIW (just in case something goes wrong with deployment and prevents me from leaving the office shortly)

blu3id commented 6 years ago

My only thoughts with that were it may be that edits happen over the weekend and we want the current/upcoming event to stay on the homepage?

Edit: Nevermind. Thinking this through upcoming logic is separate (and equally as hatchet) to this list. Agree and will add change when not mobile.

multipurposebot commented 6 years ago

Latest Travis CI automatic staging build of this PR: https://236-pr-nhshackday-github-io-nhshackday.surge.sh