diff --git a/src/main/resources/assets/styles/_timeline.scss b/src/main/resources/assets/styles/_timeline.scss index 9b9f61030..5d3d3418c 100644 --- a/src/main/resources/assets/styles/_timeline.scss +++ b/src/main/resources/assets/styles/_timeline.scss @@ -3,6 +3,7 @@ display: grid; grid-template-columns: repeat(12, 1fr); margin-top: 4rem; + margin-bottom: 5rem; .title-ingress-wrapper { grid-column: 2 / span 10; @@ -28,7 +29,6 @@ grid-column: 3 / span 8; flex-wrap: wrap; gap: 0.75rem; - margin-top: 5rem; margin-bottom: 4rem; width: 740px; diff --git a/src/main/resources/lib/types/partTypes/timeline.ts b/src/main/resources/lib/types/partTypes/timeline.ts index d0b8ab657..ba5e93b84 100644 --- a/src/main/resources/lib/types/partTypes/timeline.ts +++ b/src/main/resources/lib/types/partTypes/timeline.ts @@ -2,6 +2,7 @@ export interface TimelineProps { title: string ingress: string timelineElements: TimelineElement[] + showFilter: boolean showMoreButtonText: string countYear: number } diff --git a/src/main/resources/site/parts/timeline/timeline.ts b/src/main/resources/site/parts/timeline/timeline.ts index f73429d43..b79298559 100644 --- a/src/main/resources/site/parts/timeline/timeline.ts +++ b/src/main/resources/site/parts/timeline/timeline.ts @@ -50,6 +50,7 @@ function renderPart(req: XP.Request) { title: timelineConfig.title, ingress: timelineConfig.ingress, timelineElements, + showFilter: timelineConfig.showFilter, showMoreButtonText: showMoreText ?? 'Vis flere år', countYear: timelineConfig.numberOfYear ?? 10, } diff --git a/src/main/resources/site/parts/timeline/timeline.tsx b/src/main/resources/site/parts/timeline/timeline.tsx index 088ad6410..02cf08f01 100644 --- a/src/main/resources/site/parts/timeline/timeline.tsx +++ b/src/main/resources/site/parts/timeline/timeline.tsx @@ -15,7 +15,7 @@ import { sanitize } from '/lib/ssb/utils/htmlUtils' import { usePaginationKeyboardNavigation } from '/lib/ssb/utils/customHooks/paginationHooks' function Timeline(props: TimelineProps) { - const { timelineElements, countYear, showMoreButtonText, title, ingress } = props + const { timelineElements, countYear, showMoreButtonText, title, ingress, showFilter } = props const [selectedTag, setSelectedTag] = useState('all') const [timelineCount, setTimeLineCount] = useState(countYear) const [keyboardNavigation, setKeyboardNavigation] = useState(false) @@ -251,7 +251,7 @@ function Timeline(props: TimelineProps) { return (