From 0b545255e2a11f56f85e57b897a362b3beeb35f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 27 Nov 2019 10:41:31 +0100 Subject: [PATCH] Add anchors to link to on same page --- .../Resources/Private/Assets/scss/_base.scss | 12 ++++++++++++ .../Resources/Private/Assets/scss/_variables.scss | 4 ++++ .../Private/Layouts/FluidStyledContent/Default.html | 1 + 3 files changed, 17 insertions(+) diff --git a/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_base.scss b/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_base.scss index 35e78632..70635dad 100644 --- a/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_base.scss +++ b/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_base.scss @@ -71,6 +71,18 @@ b, strong { a { color: inherit; + + &.anchor { + display: block; + height: 0; + padding-top: $header-height-mobile; + margin-top: -$header-height-mobile; + + @include mq($from: tablet) { + padding-top: $header-height-desktop; + margin-top: -$header-height-desktop; + } + } } ul { diff --git a/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_variables.scss b/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_variables.scss index 174f9ebe..f6c6f298 100644 --- a/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_variables.scss +++ b/public/typo3conf/ext/ep_events/Resources/Private/Assets/scss/_variables.scss @@ -15,3 +15,7 @@ $content-width-max: 1280px; // Default padding $padding-default: 16px; + +// Header height +$header-height-mobile: 100px; +$header-height-desktop: 160px; \ No newline at end of file diff --git a/public/typo3conf/ext/ep_events/Resources/Private/Layouts/FluidStyledContent/Default.html b/public/typo3conf/ext/ep_events/Resources/Private/Layouts/FluidStyledContent/Default.html index d2413b03..e7c8bbf6 100644 --- a/public/typo3conf/ext/ep_events/Resources/Private/Layouts/FluidStyledContent/Default.html +++ b/public/typo3conf/ext/ep_events/Resources/Private/Layouts/FluidStyledContent/Default.html @@ -1 +1,2 @@ +