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

adding Session Widget to pages: index + sessions #31

Closed
wants to merge 1 commit into from

Conversation

naskio
Copy link

@naskio naskio commented Apr 6, 2023

Screenshot 2023-04-06 at 13 27 50

The idea is to add a Session widget (last session), with a dynamic countdown (changes on refresh)

related to issues:

Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Hi Medhi, sorry for the late review.
I like the idea and how the screenshot looks.
I would just simplify things a little bit.

date && date >= new Date() ? "Upcoming Session" : "Previous Session";
---

<div class="card border p-3 bg-light">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you move all of this to be inline with the sessions.astro page?
I don't think this really needs to be its own component. I don't think we will have many use-cases to ever re-use it.

</div>
</div>

<script is:inline src="https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is moment.js still cool?
We can most likely use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat instead.
And just hide the element if the browser doesn't support that API.

@nojaf
Copy link
Collaborator

nojaf commented Jan 9, 2024

We've recently changed the website a bit and I've included your proposal.
Thanks again Mehdi!

@nojaf nojaf closed this Jan 9, 2024
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