diff --git a/web/src/components/events/DateList.tsx b/web/src/components/events/DateList.tsx index 690f58f..d6c5685 100644 --- a/web/src/components/events/DateList.tsx +++ b/web/src/components/events/DateList.tsx @@ -20,10 +20,10 @@ const DateListItem = ({ occurrence }: { occurrence: EventOccurrence }) => {
{formatExtendedDateTime(occurrence.start, true)} - + {" "} {formatDate(occurrence.start, timeFormat)} -   + {" "} {occurrence.venue?.preposition + " " ?? ""} {occurrence.venue?.url && ( @@ -50,13 +50,19 @@ export const DateList = ({ event }: { event: EventFragment }) => { // TODO: end date/time? // TODO: past occurrences? + const [showAllDates, setShowAllDates] = useState(false); + function toggleDates() { + setShowAllDates(!showAllDates) + } + return (
-

- Kommende datoer{" "} - ({futureOccurrences.length}) -

-
    +
    + Dato + Tid + Sted +
    +
      {futureOccurrences.map((occurrence) => ( { /> ))}
    + {futureOccurrences.length > 4 && (
    + +
    )} {/*
    setShowPast(!showPast)}> {showPast ? "Skjul" : "Vis"} tidligere
    diff --git a/web/src/components/events/EventDetails.tsx b/web/src/components/events/EventDetails.tsx index 7689f39..e4911e1 100644 --- a/web/src/components/events/EventDetails.tsx +++ b/web/src/components/events/EventDetails.tsx @@ -27,48 +27,54 @@ export const EventDetails = ({ event }: { event: EventFragment }) => { return (
    -
    - Pris -
      - {event.free && ( -
    • - Gratis -
    • - )} - {event.priceRegular && ( -
    • - Ordinær{" "} - {formatPrice(event.priceRegular)} -
    • - )} - {event.priceStudent && ( -
    • - Student{" "} - {formatPrice(event.priceStudent)} -
    • - )} - {event.priceMember && ( -
    • - Medlem{" "} - {formatPrice(event.priceMember)} -
    • - )} -
    -
    - {event.organizers.length !== 0 && ( -
    -
    Arrangeres av
    {" "} - +
    +
    +

    Pris

    +
      + {event.free && ( +
    • + Gratis +
    • + )} + {event.priceRegular && ( +
    • + Ordinær{" "} + {formatPrice(event.priceRegular)} +
    • + )} + {event.priceStudent && ( +
    • + Student{" "} + {formatPrice(event.priceStudent)} +
    • + )} + {event.priceMember && ( +
    • + Medlem{" "} + {formatPrice(event.priceMember)} +
    • + )} +
    - )} - {event.facebookUrl && ( - - Gå til Facebook-event - - - )} + {event.organizers.length !== 0 && ( +
    +

    Arrangeres av

    {" "} + +
    + )} + {event.facebookUrl && ( + + )} +
    +
    + +
    -
    ); }; diff --git a/web/src/components/events/dateList.module.scss b/web/src/components/events/dateList.module.scss index cf75adf..4f95a8f 100644 --- a/web/src/components/events/dateList.module.scss +++ b/web/src/components/events/dateList.module.scss @@ -1,28 +1,48 @@ -.dateWrapper { - margin-top: var(--spacing-m); -} - .dateList { list-style: none; - margin-top: var(--spacing-xs); + + &[data-showall=true] { + .date { + display: block; + } + } } .date { - display: inline-block; - width: 14em; + display: block; + width: 100%; font-family: var(--font-serif); - font-size: var(--font-size-caption); + font-size: var(--font-size-body); position: relative; line-height: 1.4; - padding: 0 2rem 1rem 0; + padding: var(--spacing-s) 0; + border-bottom: var(--border); + + display: none; + + &:nth-of-type(1), &:nth-of-type(2), &:nth-of-type(3), &:nth-of-type(4) { + display: block; + } } +.header { + border-bottom: var(--border); + padding-bottom: var(--spacing-xs); + margin-bottom: 0 !important; + font-family: var(--font-main); + font-size: var(--font-size-caption); +} + +.header, .time { width: 100%; + display: grid; + grid-template-columns: 3fr 1fr 2fr; + gap: var(--spacing-m); } .day { - display: block; + display: inline-block; &:first-letter { text-transform: capitalize; @@ -36,4 +56,8 @@ .venue { display: inline-block; font-style: italic; +} + +.showMore { + margin-top: var(--spacing-s); } \ No newline at end of file diff --git a/web/src/components/events/eventDetails.module.scss b/web/src/components/events/eventDetails.module.scss index a845f6e..a7f5033 100644 --- a/web/src/components/events/eventDetails.module.scss +++ b/web/src/components/events/eventDetails.module.scss @@ -1,20 +1,36 @@ .eventDetails { background: var(--color-background-secondary); margin: 0 calc(var(--spacing-sitepadding-inline)*-1) var(--spacing-sitepadding-block); - padding: var(--spacing-s) var(--spacing-sitepadding-inline) var(--spacing-m); + padding: var(--spacing-m) var(--spacing-sitepadding-inline) var(--spacing-m); + font-family: var(--font-serif); + + h2 { + font-family: var(--font-main); + margin-bottom: var(--spacing-xs); + } } .content { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(3, 1fr); column-gap: var(--spacing-gap-column); + row-gap: var(--spacing-gap-row); margin-bottom: var(--spacing-gap-row); align-items: flex-start; } +.info { + display: grid; + grid-template-columns: 1fr; + column-gap: var(--spacing-gap-column); + row-gap: var(--spacing-m); + align-items: flex-start; + justify-content: flex-start; +} + .priceList { list-style: none; - max-width: 10rem; + max-width: 13rem; } .priceItem { @@ -35,8 +51,24 @@ width: 7rem; } +.dateList { + grid-column: span 2; +} + @media (max-width: 800px) { .content { grid-template-columns: repeat(2, 1fr); } + + .info, .dateList { + grid-column: 1 / -1; + } + + .dateList { + order: 1; + } + + .info { + order: 2; + } } \ No newline at end of file diff --git a/web/src/components/events/eventHeader.module.scss b/web/src/components/events/eventHeader.module.scss index f02e5ac..632e808 100644 --- a/web/src/components/events/eventHeader.module.scss +++ b/web/src/components/events/eventHeader.module.scss @@ -19,6 +19,7 @@ .image { grid-column: span 2; + margin-bottom: -.4rem; img { max-width: 100%; @@ -33,7 +34,7 @@ margin: var(--spacing-xs) 0 var(--spacing-l); } -@media (max-width: 800px) { +@media (max-width: 1000px) { .eventHeader { grid-template-columns: 1fr; } diff --git a/web/src/css/button.scss b/web/src/css/button.scss index c6e3ed6..34d6e7c 100644 --- a/web/src/css/button.scss +++ b/web/src/css/button.scss @@ -26,8 +26,8 @@ button, &.cta { padding: calc(var(--spacing-xs)*1.5) calc(var(--spacing-s)*1.5); - display: flex; - justify-content: space-between; + display: inline-flex; + gap: 2rem; font-size: var(--font-size-body); >div { font-size: var(--font-size-lead); diff --git a/web/src/css/variables.scss b/web/src/css/variables.scss index 5979fb1..406ba37 100644 --- a/web/src/css/variables.scss +++ b/web/src/css/variables.scss @@ -75,14 +75,14 @@ --border-s: 1px solid var(--color-chateauBlue-05); } -@media (min-width: 1800px) { +@media (min-width: 1400px) { :root { --spacing-sitepadding-block: 2.4rem; --spacing-sitepadding-inline: 6rem; } } -@media (min-width: 2000px) { +@media (min-width: 1800px) { :root { --spacing-sitepadding-block: 3rem; --spacing-sitepadding-inline: 10rem;