| @@ -14,7 +14,7 @@ | |||||
| margin-top: var(--section-headline-margin); | margin-top: var(--section-headline-margin); | ||||
| } | } | ||||
| h5, h6, .like-h6 { | |||||
| h5, .like-h5, h6, .like-h6 { | |||||
| margin-top: -0.3em; | margin-top: -0.3em; | ||||
| font-size: var(--font-size-copy); | font-size: var(--font-size-copy); | ||||
| font-family: var(--font-korb); | font-family: var(--font-korb); | ||||
| @@ -116,7 +116,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| h6 { | |||||
| h6, .like-h6 { | |||||
| font-size: 18px; | font-size: 18px; | ||||
| margin-top: 4px; | margin-top: 4px; | ||||
| text-decoration: underline; | text-decoration: underline; | ||||
| @@ -126,7 +126,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| h5, .details { | |||||
| h5, .like-h5, .details { | |||||
| font-weight: 600; | font-weight: 600; | ||||
| } | } | ||||
| @@ -31,7 +31,11 @@ export class IHKSearchTiles { | |||||
| this.allResultButton.classList.add("all-button-wrapper"); | this.allResultButton.classList.add("all-button-wrapper"); | ||||
| this.buttonString = '<div class="btn has-icon icon-small-arrow-right-simple">Alle Suchergebnisse</div>'; | this.buttonString = '<div class="btn has-icon icon-small-arrow-right-simple">Alle Suchergebnisse</div>'; | ||||
| this.allResultButton.innerHTML = this.buttonString; | 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(); | this.searchButton.click(); | ||||
| }); | }); | ||||
| @@ -111,7 +115,27 @@ export class IHKSearchTiles { | |||||
| // find tile a and shorten the text if needed | // find tile a and shorten the text if needed | ||||
| let itemTitles = tiles.getElementsByClassName('item-title'); | let itemTitles = tiles.getElementsByClassName('item-title'); | ||||
| self.shortenTileText(itemTitles); | 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 | // add the "all results" button | ||||
| const searchWrapper = tiles.closest('.search'); | |||||
| if (searchWrapper) { | |||||
| searchWrapper.classList.add('has-button-wrapper'); | |||||
| } | |||||
| tiles.insertAdjacentElement("afterend", self.allResultButton); | tiles.insertAdjacentElement("afterend", self.allResultButton); | ||||
| } | } | ||||
| } | } | ||||
| @@ -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); | const textBox = createElement('div', ['text-box'], '', teaser); | ||||
| createElement('div', ['title','like-h4'], headline, textBox); | createElement('div', ['title','like-h4'], headline, textBox); | ||||
| createElement('p', [], copy, textBox); | createElement('p', [], copy, textBox); | ||||
| @@ -11,6 +11,7 @@ | |||||
| padding-right: calc(var(--section-padding) / 2); | padding-right: calc(var(--section-padding) / 2); | ||||
| } | } | ||||
| .container > .like-h2, | |||||
| .container > h2 { | .container > h2 { | ||||
| margin-top: var(--section-headline-margin); | margin-top: var(--section-headline-margin); | ||||
| } | } | ||||
| @@ -218,4 +219,4 @@ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||
| @@ -154,7 +154,7 @@ | |||||
| margin-top: 0; | margin-top: 0; | ||||
| } | } | ||||
| h2 { | |||||
| h2, .like-h2 { | |||||
| margin-top: 0 !important; | margin-top: 0 !important; | ||||
| } | } | ||||
| @@ -230,7 +230,7 @@ | |||||
| } | } | ||||
| &[data-type="hero"] .image-box + .text-box { | &[data-type="hero"] .image-box + .text-box { | ||||
| h3, h4, .like-h4 { | |||||
| h3, .like-h3, h4, .like-h4 { | |||||
| position: relative; | position: relative; | ||||
| font-size: 20px; | font-size: 20px; | ||||
| margin-top: 0; | margin-top: 0; | ||||
| @@ -370,14 +370,14 @@ | |||||
| } | } | ||||
| a.teaser { | a.teaser { | ||||
| h3, h4, .like-h4 { | |||||
| h3, .like-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, .like-h4 { | |||||
| h3, .like-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; | ||||
| @@ -617,7 +617,7 @@ | |||||
| height: 14px; | height: 14px; | ||||
| } | } | ||||
| h3, h4, .like-h4 { | |||||
| h3, .like-h3, h4, .like-h4 { | |||||
| color: var(--theme-color-link-hover); | color: var(--theme-color-link-hover); | ||||
| } | } | ||||
| } | } | ||||
| @@ -638,7 +638,7 @@ | |||||
| } | } | ||||
| .magazine-article .teasers, .magazine-start .teasers, .teasers.magazine-style { | .magazine-article .teasers, .magazine-start .teasers, .teasers.magazine-style { | ||||
| h2 { | |||||
| h2, .like-h2 { | |||||
| text-transform: uppercase; | text-transform: uppercase; | ||||
| font-size: var(--font-size-h4); | font-size: var(--font-size-h4); | ||||
| margin-bottom: 1.2em; | margin-bottom: 1.2em; | ||||