Przeglądaj źródła

develop components

master
FlorianEisenmenger 8 miesięcy temu
rodzic
commit
1f990e7f0f
7 zmienionych plików z 61 dodań i 45 usunięć
  1. +0
    -1
      gfi-ihk-2024/stories/components/accordion/AccordionComponent.js
  2. +3
    -0
      gfi-ihk-2024/stories/components/accordion/accordion.scss
  3. +6
    -6
      gfi-ihk-2024/stories/sections/event-teaser-large-slider/eventteaserlargeslider.scss
  4. +39
    -28
      gfi-ihk-2024/stories/sections/social/social.js
  5. +1
    -1
      gfi-ihk-2024/stories/sections/social/social.scss
  6. +10
    -9
      gfi-ihk-2024/stories/sections/teasers/teasers.scss
  7. +2
    -0
      gfi-ihk-2024/stories/sections/video-stage/video-stage.scss

+ 0
- 1
gfi-ihk-2024/stories/components/accordion/AccordionComponent.js Wyświetl plik

@@ -18,7 +18,6 @@ export const createAccordion =
} }


const ul = createElement('ul', type === 'regular' ? ['linklist'] : [], null, accordion); const ul = createElement('ul', type === 'regular' ? ['linklist'] : [], null, accordion);
ul.role = "tablist";


if (type === 'regular') { if (type === 'regular') {
items.map((item) => { items.map((item) => {


+ 3
- 0
gfi-ihk-2024/stories/components/accordion/accordion.scss Wyświetl plik

@@ -47,12 +47,15 @@
background-color: var(--theme-color-secondary-dimmed); background-color: var(--theme-color-secondary-dimmed);
} }
*/ */
/*
&.open { &.open {
.accordion-toggler { .accordion-toggler {
background-color: var(--theme-color-secondary-dimmed); background-color: var(--theme-color-secondary-dimmed);
color: var(--theme-color-secondary-intensed); color: var(--theme-color-secondary-intensed);
} }
} }

*/
} }
} }




+ 6
- 6
gfi-ihk-2024/stories/sections/event-teaser-large-slider/eventteaserlargeslider.scss Wyświetl plik

@@ -23,7 +23,7 @@
left: 0 !important; left: 0 !important;
transform: none !important; transform: none !important;
} }
}
}


&.single-slide { &.single-slide {
.controls { .controls {
@@ -132,7 +132,7 @@
background-color: transparent; background-color: transparent;
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
} }
.slider-tabs, .tabs { .slider-tabs, .tabs {
position: absolute; position: absolute;
@@ -189,7 +189,7 @@
} }
} }
} }
.prev, .next { .prev, .next {
position: absolute; position: absolute;
top: -94px; top: -94px;
@@ -202,7 +202,7 @@
right:auto; right:auto;
border-radius: 24px; border-radius: 24px;
background: var(--theme-color-primary-dimmed-04); background: var(--theme-color-primary-dimmed-04);
--button-hover-shadow-opacity: 0.4;
--button-hover-shadow-opacity: 0.4;
--button-hover-shadow-size: 6px ; --button-hover-shadow-size: 6px ;
@media(max-width: 1470px) { @media(max-width: 1470px) {
left:auto; left:auto;
@@ -216,7 +216,7 @@
top: -80px; top: -80px;
} }
@media(max-width: 767px) { @media(max-width: 767px) {
} }
&:before { &:before {
@include icon-small-arrow-right-simple; @include icon-small-arrow-right-simple;
@@ -241,7 +241,7 @@
opacity: 0.4; opacity: 0.4;
box-shadow: 0 0 0 6px var(--theme-color-primary-dimmed-04); box-shadow: 0 0 0 6px var(--theme-color-primary-dimmed-04);
} }
} }


.prev { .prev {


+ 39
- 28
gfi-ihk-2024/stories/sections/social/social.js Wyświetl plik

@@ -1,8 +1,8 @@
import $ from 'jquery';
import $ from "jquery";


class IHKSocialBox { class IHKSocialBox {
constructor(socialBox) { constructor(socialBox) {
this.box = socialBox.addClass('initiated')
this.box = socialBox.addClass("initiated");


this.checkHtmlFragmentCookiesAreSet(socialBox); this.checkHtmlFragmentCookiesAreSet(socialBox);
this.checkIframe(); this.checkIframe();
@@ -10,22 +10,25 @@ class IHKSocialBox {


checkIframe() { checkIframe() {
setTimeout(() => { setTimeout(() => {
const iframe = this.box.find('iframe');
const iframe = this.box.find("iframe");
if (iframe.length) { if (iframe.length) {
iframe.attr('tabindex', '-1');
iframe.attr("tabindex", "-1");
} else { } else {
this.checkIframe(); this.checkIframe();
} }
}, 1000)
}, 1000);
} }


checkHtmlFragmentCookiesAreSet(socialBox) { checkHtmlFragmentCookiesAreSet(socialBox) {
if (socialBox.data("useconsent")) {
return;
}
let socialMediaProtectionText = socialBox.data("socialmediaprotection"); let socialMediaProtectionText = socialBox.data("socialmediaprotection");
let socialMediaType = socialBox.data("socialmediatype"); let socialMediaType = socialBox.data("socialmediatype");
let cookieBot = socialBox.data("usecookiebot"); let cookieBot = socialBox.data("usecookiebot");


if(socialBox.find('iframe').length > 0) {
let iframeElement = socialBox.find('iframe')[0];
if (socialBox.find("iframe").length > 0) {
let iframeElement = socialBox.find("iframe")[0];
this.checkIframeCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, iframeElement, socialBox); this.checkIframeCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, iframeElement, socialBox);
} else { } else {
this.checkEmbedCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, socialBox); this.checkEmbedCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, socialBox);
@@ -38,7 +41,12 @@ class IHKSocialBox {
} }
if (document.cookie.indexOf("social-media-consent-" + socialMediaType) === -1) { if (document.cookie.indexOf("social-media-consent-" + socialMediaType) === -1) {
this.hideIframeElement(iframeElement); this.hideIframeElement(iframeElement);
let textWithCheckbox = '<div class="social-media-protection-text-with-checkbox"> <input name="socialMediaType" type="checkbox" id=' + socialMediaType + '> <label id="textElement">' + socialMediaProtectionText + '</label> </div>';
let textWithCheckbox =
'<div class="social-media-protection-text-with-checkbox"> <input name="socialMediaType" type="checkbox" id=' +
socialMediaType +
'> <label for="' + socialMediaType + '">' +
socialMediaProtectionText +
"</label> </div>";


$(socialBoxElement).append(textWithCheckbox); $(socialBoxElement).append(textWithCheckbox);


@@ -48,14 +56,17 @@ class IHKSocialBox {
} }


checkEmbedCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, socialBoxElement) { checkEmbedCookieIsSet(socialMediaProtectionText, socialMediaType, cookieBot, socialBoxElement) {
let scriptElements = socialBoxElement.find('script');
let imageElements = socialBoxElement.find('img');
let scriptElements = socialBoxElement.find("script");
let imageElements = socialBoxElement.find("img");
if (cookieBot) { if (cookieBot) {
$(scriptElements).data("cookieconsent", "marketing"); $(scriptElements).data("cookieconsent", "marketing");
$(imageElements).data("cookieconsent", "marketing"); $(imageElements).data("cookieconsent", "marketing");
} }
if (document.cookie.indexOf("social-media-consent-" + socialMediaType) === -1) { if (document.cookie.indexOf("social-media-consent-" + socialMediaType) === -1) {
let textWithCheckbox = '<div class="social-media-protection-text-with-checkbox"> <input name="socialMediaType" type="checkbox"> <label id="textElement">' + socialMediaProtectionText + '</label> </div>';
let textWithCheckbox =
'<div class="social-media-protection-text-with-checkbox"> <input name="socialMediaType" id="' + socialMediaType + '" type="checkbox"> <label for="' + socialMediaType + '">' +
socialMediaProtectionText +
"</label> </div>";


$(textWithCheckbox).appendTo(socialBoxElement); $(textWithCheckbox).appendTo(socialBoxElement);


@@ -80,17 +91,17 @@ class IHKSocialBox {
expirationDate.setDate(expirationDate.getDate() + expirationDays); expirationDate.setDate(expirationDate.getDate() + expirationDays);


// Checkbox wurde angeklickt, Cookie setzen // Checkbox wurde angeklickt, Cookie setzen
document.cookie = "social-media-consent-" + socialMediaType + "=true; expires=" + expirationDate.toUTCString() + ";";
document.cookie =
"social-media-consent-" + socialMediaType + "=true; expires=" + expirationDate.toUTCString() + ";";


console.log("Cookie wurde gesetzt!");
// Finde alle Elemente mit dem selben socialMediaType // Finde alle Elemente mit dem selben socialMediaType
let self = this; let self = this;
$(`[data-socialmediatype=${socialMediaType}]`).each(function () { $(`[data-socialmediatype=${socialMediaType}]`).each(function () {
let currentBox = $(this); let currentBox = $(this);
currentBox.find(".social-media-protection-text-with-checkbox").hide(); currentBox.find(".social-media-protection-text-with-checkbox").hide();
let scriptElements = currentBox.find('script');
let imageElements = currentBox.find('img');
let iframeElements = currentBox.find('iframe');
let scriptElements = currentBox.find("script");
let imageElements = currentBox.find("img");
let iframeElements = currentBox.find("iframe");


self.showElements(scriptElements); self.showElements(scriptElements);
self.showElements(imageElements); self.showElements(imageElements);
@@ -108,16 +119,16 @@ class IHKSocialBox {


showElement(htmlFragment) { showElement(htmlFragment) {
let $element = $(htmlFragment); let $element = $(htmlFragment);
let elementType = $element.prop('tagName').toLowerCase();
let dataSrc = $element.attr('data-src');
if (typeof dataSrc === 'undefined') {
dataSrc = $element.attr('src');
let elementType = $element.prop("tagName").toLowerCase();
let dataSrc = $element.attr("data-src");
if (typeof dataSrc === "undefined") {
dataSrc = $element.attr("src");
} }
if (elementType === 'script') {
$element.attr('src', dataSrc);
if (elementType === "script") {
$element.attr("src", dataSrc);
$element.show(); $element.show();
} else if (elementType === 'img' || elementType === 'iframe') {
$element.attr('src', dataSrc);
} else if (elementType === "img" || elementType === "iframe") {
$element.attr("src", dataSrc);
$element.show(); $element.show();
} }
} }
@@ -125,8 +136,8 @@ class IHKSocialBox {


export default IHKSocialBox; export default IHKSocialBox;


$('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
$('.social-box:not(.initiated)').each(function () {
$("body").on("ihk-init dynamic-component-loaded gfi-dynamic-init", function () {
$(".social-box:not(.initiated)").each(function () {
new IHKSocialBox($(this)); new IHKSocialBox($(this));
})
})
});
});

+ 1
- 1
gfi-ihk-2024/stories/sections/social/social.scss Wyświetl plik

@@ -8,7 +8,7 @@ section.social {
} }
} }


h2 {
h2, .like-h2 {
margin-bottom: 0.4em; margin-bottom: 0.4em;
} }




+ 10
- 9
gfi-ihk-2024/stories/sections/teasers/teasers.scss Wyświetl plik

@@ -51,7 +51,7 @@
} }


&[data-type="hero"]{ &[data-type="hero"]{
.image-box ~ .text-box {
.image-box ~ .text-box, .image-box ~ .text-box .title {
.magazine-indicator{ .magazine-indicator{
top: -16px; top: -16px;
} }
@@ -59,7 +59,7 @@
} }


.image-box ~ .text-box { .image-box ~ .text-box {
h4{
h4, .like-h4 {
position: relative; position: relative;
.magazine-indicator{ .magazine-indicator{
top: -40px; top: -40px;
@@ -158,7 +158,8 @@
margin-top: 0 !important; margin-top: 0 !important;
} }


&[data-type="hero"] .teaser:not(.video-teaser-wrapper) .image-box ~ .text-box h4 {
&[data-type="hero"] .teaser:not(.video-teaser-wrapper) .image-box ~ .text-box h4,
&[data-type="hero"] .teaser:not(.video-teaser-wrapper) .image-box ~ .text-box .like-h4 {
background-color: var(--theme-grey-light); background-color: var(--theme-grey-light);
} }
} }
@@ -224,12 +225,12 @@
margin-left: 10px; margin-left: 10px;
} }


h4 {
h4, .like-h4 {
margin-top: 0; margin-top: 0;
} }


&[data-type="hero"] .image-box + .text-box { &[data-type="hero"] .image-box + .text-box {
h3, h4 {
h3, h4, .like-h4 {
position: relative; position: relative;
font-size: 20px; font-size: 20px;
margin-top: 0; margin-top: 0;
@@ -369,14 +370,14 @@
} }


a.teaser { a.teaser {
h3, h4 {
h3, h4, .like-h4 {
text-decoration: underline; text-decoration: underline;
text-underline-offset: 0.09em; text-underline-offset: 0.09em;
text-decoration-thickness: 0.08em; text-decoration-thickness: 0.08em;
} }
} }


h3, h4 {
h3, h4, .like-h4 {
margin: 16px 0 14px; margin: 16px 0 14px;
color: var(--theme-color-link); color: var(--theme-color-link);
transition: 0.3s ease; transition: 0.3s ease;
@@ -562,7 +563,7 @@
.image-box ~ .text-box { .image-box ~ .text-box {
padding-top: 16px; padding-top: 16px;


h4 {
h4, .like-h4 {
position: absolute; position: absolute;
bottom: 100%; bottom: 100%;
z-index: 1; z-index: 1;
@@ -616,7 +617,7 @@
height: 14px; height: 14px;
} }


h3, h4 {
h3, h4, .like-h4 {
color: var(--theme-color-link-hover); color: var(--theme-color-link-hover);
} }
} }


+ 2
- 0
gfi-ihk-2024/stories/sections/video-stage/video-stage.scss Wyświetl plik

@@ -28,6 +28,7 @@
object-fit: cover; object-fit: cover;
background: green; background: green;
} }

.video--controls { .video--controls {
position: absolute; position: absolute;
left: 20px; left: 20px;
@@ -36,6 +37,7 @@
gap: 20px; gap: 20px;
z-index: 10; z-index: 10;
} }

.video--play-pause, .video--play-pause,
.video--mute-unmute { .video--mute-unmute {
display: block; display: block;


Ładowanie…
Anuluj
Zapisz