Skip to content

Conversation

seandreassen
Copy link
Member

Added landing page with automatically changing slides. Admin users can add or edit existing slides with new text or images.

@seandreassen seandreassen linked an issue Sep 3, 2025 that may be closed by this pull request
@seandreassen seandreassen changed the title Landing page feat: Landing page Sep 3, 2025
Copy link
Member

@ZeroWave022 ZeroWave022 left a comment

Choose a reason for hiding this comment

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

We should also consider adding the possibility to add "banners" at the top of the screen, informing about some temporary state (e.g. the workshop being closed for the winter or summer vacations). Slides should be named slides in Norwegian as well, and then we can use the name banner for both languages for this temporary state information at the top of the screen.

It is up to you whether banners should be a part of this PR. If you don't know what banner I'm talking about, you can go to the old website and try to enable a banner in the admin panel

Copy link
Member

Choose a reason for hiding this comment

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

We do not use all of the width available, so the event titles and such are truncated very early. If you want to, you can tinker a bit more with it so we use more of the space. If not, we can leave it for a later PR.

Is having a carousel filling the whole screen a good idea? If so, I think the animation speed on the image change should be reduced, as it is very aggressive atm

Comment on lines +22 to +27
onSuccess: async (_data, variables) => {
toast.success(
variables.active
? t.successfullyChangedToActive
: t.successfullyChangedToInactive,
);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
onSuccess: async (_data, variables) => {
toast.success(
variables.active
? t.successfullyChangedToActive
: t.successfullyChangedToInactive,
);
onSuccess: async () => {

<Checkbox
checked={changeSlideActive.variables?.active ?? slide.active}
onCheckedChange={(value) => {
changeSlideActive.mutate({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
changeSlideActive.mutate({
const promise = changeSlideActive.mutateAsync({

changeSlideActive.mutate({
id: slide.id,
active: value !== 'indeterminate' ? value : false,
});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
});
});
toast.promise(promise, {
loading: 't.changingToActive',
success: slide.active
? t.successfullyChangedToInactive
: t.successfullyChangedToActive,
error: 't.errorChangingActiveState',
});

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.

feat: Landing Page
2 participants