Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
faff8af
Begin creating new event card component
robines Nov 17, 2025
7490aa6
Set all anchor tags' text-decoration to none
robines Nov 17, 2025
0a6ded6
Merge branch 'master' into robin/new-event-card
robines Nov 29, 2025
37a5ee9
Merge branch 'master' into robin/new-event-card
robines Dec 7, 2025
a07854c
Merge branch 'master' into robin/new-event-card
robines Dec 7, 2025
d850d1f
Use NewBadge. biome
robines Dec 7, 2025
6d96da2
adjust z-index
robines Dec 7, 2025
5377406
Add box shadow to event badge
robines Dec 7, 2025
608a531
Use placeholder image
robines Dec 7, 2025
bbb0c19
Merge branch 'robin/new-event-card' of github.com:Samfundet/Samfundet…
robines Dec 7, 2025
391c618
Start badge and CTA logic, display location. Tweak styling
robines Dec 14, 2025
1bfcd3d
Merge branch 'master' into robin/new-event-card
robines Dec 14, 2025
c49a13b
Merge branch 'master' into robin/new-event-card
robines Dec 14, 2025
c5ef8ea
Rename NewEventCard to EventCard
robines Dec 14, 2025
75664c8
Make Badge inline-flex, add outline-white theme
robines Dec 14, 2025
e7973ad
Merge branch 'master' into robin/new-event-card
robines Dec 14, 2025
b17220f
Remove a tag color specification in themes
robines Dec 14, 2025
684b87b
Fix merge: add back Block example in ComponentPage
robines Dec 14, 2025
195766d
Block: slightly decrease opacity of footer gradient and decrease header
robines Dec 14, 2025
f2a21cf
Block: Improve gradients through easing
robines Dec 14, 2025
03c5cc8
BlockImage: Use background-image instead of img element
robines Dec 14, 2025
929d249
Use Block components in EventCard
robines Dec 14, 2025
b9a3c71
Block: Add white theme
robines Dec 14, 2025
5400a20
Add text shadow to bottom text and show event category
robines Dec 14, 2025
e1f833f
Update location class name
robines Dec 14, 2025
7c71eaa
biome
robines Dec 14, 2025
96263a7
Merge branch 'master' into robin/new-event-card
robines Dec 14, 2025
d9909a1
Show translated event category
robines Dec 14, 2025
775f646
Simplify fake events creation in ComponentPage
robines Dec 14, 2025
09c551e
Set letter-spacing for BlockTitle
robines Dec 14, 2025
7a6fc8c
Update component page
robines Dec 20, 2025
8742344
Change "free" badge to green theme
robines Dec 20, 2025
19f211f
Round edges more, sharpen on hover
robines Dec 20, 2025
4b0b0e3
Nesten utsolgt -> Få billetter igjen
robines Dec 20, 2025
1b43345
Switch out Buy ticket arrow icon
robines Dec 20, 2025
3165bba
Create EventCardContainer. Allow more customization of EventCard/Block
robines Dec 20, 2025
08d33be
Fix biome & stylelint
robines Dec 21, 2025
0dfa750
Return fewer events for "Hva skjer?"
robines Dec 21, 2025
fa83cb7
Use new EventCard on homepage
robines Dec 21, 2025
9535d2a
Merge branch 'master' into robin/homepage-use-new-eventcard
robines Dec 21, 2025
f9b1bed
Merge branch 'master' into robin/homepage-use-new-eventcard
robines Jan 10, 2026
189a0e3
Add slight text shadow to CTA
robines Jan 10, 2026
238f3c9
Make block footer gradient slightly less intense
robines Jan 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/samfundet/homepage/homepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate() -> dict[str, Any]: # noqa: C901
carousel(
title_nb='Hva skjer?',
title_en="What's happening?",
events=list(upcoming_events[:10]),
events=list(upcoming_events[:4]),
)
)

Expand Down
33 changes: 17 additions & 16 deletions frontend/src/Components/Block/Block.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $transition-duration: 0.4s;
}

.inner_content {
padding: 1rem;
padding: 0.75rem 1rem;
z-index: 2;
position: relative;
}
Expand Down Expand Up @@ -136,22 +136,23 @@ $transition-duration: 0.4s;
bottom: 0;
background: linear-gradient(to bottom,
hsla(0, 0%, 0%, 0) 0%,
hsla(0, 0%, 0%, 0.01) 8.1%,
hsla(0, 0%, 0%, 0.039) 15.5%,
hsla(0, 0%, 0%, 0.083) 22.5%,
hsla(0, 0%, 0%, 0.14) 29%,
hsla(0, 0%, 0%, 0.207) 35.3%,
hsla(0, 0%, 0%, 0.282) 41.2%,
hsla(0, 0%, 0%, 0.36) 47.1%,
hsla(0, 0%, 0%, 0.44) 52.9%,
hsla(0, 0%, 0%, 0.518) 58.8%,
hsla(0, 0%, 0%, 0.593) 64.7%,
hsla(0, 0%, 0%, 0.66) 71%,
hsla(0, 0%, 0%, 0.717) 77.5%,
hsla(0, 0%, 0%, 0.761) 84.5%,
hsla(0, 0%, 0%, 0.79) 91.9%,
hsla(0, 0%, 0%, 0.8) 100%
hsla(0, 0%, 0%, 0.009) 8.1%,
hsla(0, 0%, 0%, 0.035) 15.5%,
hsla(0, 0%, 0%, 0.074) 22.5%,
hsla(0, 0%, 0%, 0.125) 29%,
hsla(0, 0%, 0%, 0.184) 35.3%,
hsla(0, 0%, 0%, 0.25) 41.2%,
hsla(0, 0%, 0%, 0.32) 47.1%,
hsla(0, 0%, 0%, 0.39) 52.9%,
hsla(0, 0%, 0%, 0.46) 58.8%,
hsla(0, 0%, 0%, 0.526) 64.7%,
hsla(0, 0%, 0%, 0.585) 71%,
hsla(0, 0%, 0%, 0.636) 77.5%,
hsla(0, 0%, 0%, 0.675) 84.5%,
hsla(0, 0%, 0%, 0.701) 91.9%,
hsla(0, 0%, 0%, 0.71) 100%
);

}


Expand Down
1 change: 1 addition & 0 deletions frontend/src/Components/EventCard/EventCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
align-items: center;
gap: 0.25rem;
white-space: nowrap;
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
}

.details {
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/Pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { type ReactNode, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { toast } from 'react-toastify';
import { EventCardContainer } from '~/Components';
import { EventCarousel, LargeCard } from '~/Pages/HomePage/components';
import { getHomeData } from '~/api';
import type { HomePageDto, HomePageElementDto } from '~/dto';
import { useTitle } from '~/hooks';
import { KEY } from '~/i18n/constants';
import { dbT } from '~/utils';
import styles from './HomePage.module.scss';
import { Splash } from './components/Splash/Splash';

Expand All @@ -31,7 +33,11 @@ export function HomePage() {
function renderElement(key: number, element: HomePageElementDto): ReactNode {
switch (element.variation) {
case 'carousel': {
if (element.events.length > 0) return <EventCarousel key={key} element={element} />;
if (element.events.length > 0) {
return (
<EventCardContainer title={dbT(element, 'title')} events={element.events} key={key} />
);
}
return <div key={key} />;
}
case 'large-card':
Expand Down