Athons / wiki

💻 Hackathon Wiki - Created by @bahorn
https://hack.athon.uk
MIT License
21 stars 36 forks source link

Added a 'past' key to events.yml #222

Closed bahorn closed 3 years ago

bahorn commented 4 years ago

This allows us to filter events from the homepage that have already happened.

Ideally, it'd just have it figure it out with JS, but the dates aren't ISO so it's a bit of a hassle to fix this right now.

AksanDotDev commented 4 years ago

Would moving to fully qualified ISO dates not be a cleaner solution, and make the information more usable down the line?

robzwolf commented 4 years ago

I agree with @AksanDotDev, ISO-8601 dates is definitely a cleaner and better solution long-term which we might as well take the opportunity to implement now.

Also I think we should add a section for past events in this season so that events aren’t immediately gone forever as soon as the weekend is up. Thoughts?

bahorn commented 4 years ago

Yeah, ISO dates are the better solution.

https://hack.athon.uk/events/list/ is meant to be the full list of events, but adding something like:

## Past Events

<div class="hack-list">
{% for season in extra.hackathon_seasons %}
{% if season.past == False %}

    {% for hackathon in season.hackathons %}
        {% if hackathon.past == True %}
            {% include 'events/card.md' %}
        {% endif %}
    {% endfor %}

{% endif %}
{% endfor %}

To the homepage would show the events that just happened this season.

robzwolf commented 4 years ago

Yep – but that would still require manual updating of the event rather than having it automatically hide (I’m aware this is what we currently do). How difficult would it be to have it dynamically show/hide client-side?

bahorn commented 4 years ago

That was what i mentioned in the initial comment.

Basically, need to convert the dates to ISO then add a little bit of JS to selectively hide events.

bahorn commented 3 years ago

Closing the stale PR. Some variation of this was added a few weeks ago just to help get events that already happened off the front page.

What i'm going to look at doing is separating the events data into a new repository, and setup a scheduled action to run weekly or so to trigger a rebuild.