Procházet zdrojové kódy

css from develop

master
FlorianEisenmenger před 3 měsíci
rodič
revize
84be057ca8
6 změnil soubory, kde provedl 46 přidání a 11 odebrání
  1. +1
    -1
      gfi-ihk-2024/stories/components/contact/contact.scss
  2. +2
    -2
      gfi-ihk-2024/stories/components/document-list/document-list.scss
  3. +25
    -1
      gfi-ihk-2024/stories/components/search-form/search-form.js
  4. +10
    -0
      gfi-ihk-2024/stories/components/teaser/TeaserComponent.js
  5. +2
    -1
      gfi-ihk-2024/stories/sections/events/events.scss
  6. +6
    -6
      gfi-ihk-2024/stories/sections/teasers/teasers.scss

+ 1
- 1
gfi-ihk-2024/stories/components/contact/contact.scss Zobrazit soubor

@@ -14,7 +14,7 @@
margin-top: var(--section-headline-margin);
}

h5, h6, .like-h6 {
h5, .like-h5, h6, .like-h6 {
margin-top: -0.3em;
font-size: var(--font-size-copy);
font-family: var(--font-korb);


+ 2
- 2
gfi-ihk-2024/stories/components/document-list/document-list.scss Zobrazit soubor

@@ -116,7 +116,7 @@
}
}

h6 {
h6, .like-h6 {
font-size: 18px;
margin-top: 4px;
text-decoration: underline;
@@ -126,7 +126,7 @@
}
}

h5, .details {
h5, .like-h5, .details {
font-weight: 600;
}



+ 25
- 1
gfi-ihk-2024/stories/components/search-form/search-form.js Zobrazit soubor

@@ -31,7 +31,11 @@ export class IHKSearchTiles {
this.allResultButton.classList.add("all-button-wrapper");
this.buttonString = '<div class="btn has-icon icon-small-arrow-right-simple">Alle Suchergebnisse</div>';
this.allResultButton.innerHTML = this.buttonString;
this.allResultButton.addEventListener("click", () => {
this.allResultButton.addEventListener("click", (e) => {
if(this.allResultButton.classList.contains("no-results")) {
e.preventDefault();
return;
}
this.searchButton.click();
});

@@ -111,7 +115,27 @@ export class IHKSearchTiles {
// find tile a and shorten the text if needed
let itemTitles = tiles.getElementsByClassName('item-title');
self.shortenTileText(itemTitles);

const hasHits = tiles.querySelectorAll('.tile').length > 0;

// Zustand je nach Ergebnis setzen
if (!hasHits) {
self.allResultButton.innerHTML = '<div class="btn disabled">Keine Inhalte gefunden</div>';
self.allResultButton.classList.add('no-results');
self.allResultButton.querySelector('.btn').setAttribute('disabled', 'true');

} else {
self.allResultButton.innerHTML = '<div class="btn has-icon icon-small-arrow-right-simple">Alle Suchergebnisse</div>';
self.allResultButton.classList.remove('no-results');
self.allResultButton.querySelector('.btn').removeAttribute('disabled');
}

// add the "all results" button
const searchWrapper = tiles.closest('.search');
if (searchWrapper) {
searchWrapper.classList.add('has-button-wrapper');
}

tiles.insertAdjacentElement("afterend", self.allResultButton);
}
}


+ 10
- 0
gfi-ihk-2024/stories/components/teaser/TeaserComponent.js Zobrazit soubor

@@ -70,6 +70,16 @@ export const createTeaser = ({
}
}

else if (type === 'picto' || type === 'pictoHero') {
const imageBox = createElement('div', ['image-box', 'chart'], null, teaser);
const pictoBox = createElement('div', ['picto-box', ...(type === 'pictoHero' ? ['hero'] : [])], null, imageBox);
const iconBox = createElement('div', ['icon'], null, pictoBox);
iconBox.classList.add(picto);
if (pictoText) {
createElement('span', ['picto-title'], chartTitle, pictoBox);
}
}

const textBox = createElement('div', ['text-box'], '', teaser);
createElement('div', ['title','like-h4'], headline, textBox);
createElement('p', [], copy, textBox);


+ 2
- 1
gfi-ihk-2024/stories/sections/events/events.scss Zobrazit soubor

@@ -11,6 +11,7 @@
padding-right: calc(var(--section-padding) / 2);
}

.container > .like-h2,
.container > h2 {
margin-top: var(--section-headline-margin);
}
@@ -218,4 +219,4 @@
}
}
}
}
}

+ 6
- 6
gfi-ihk-2024/stories/sections/teasers/teasers.scss Zobrazit soubor

@@ -154,7 +154,7 @@
margin-top: 0;
}

h2 {
h2, .like-h2 {
margin-top: 0 !important;
}

@@ -230,7 +230,7 @@
}

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

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

h3, h4, .like-h4 {
h3, .like-h3, h4, .like-h4 {
margin: 16px 0 14px;
color: var(--theme-color-link);
transition: 0.3s ease;
@@ -617,7 +617,7 @@
height: 14px;
}

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

.magazine-article .teasers, .magazine-start .teasers, .teasers.magazine-style {
h2 {
h2, .like-h2 {
text-transform: uppercase;
font-size: var(--font-size-h4);
margin-bottom: 1.2em;


Načítá se…
Zrušit
Uložit