Kaynağa Gözat

link refactoring

master
FlorianEisenmenger 23 saat önce
ebeveyn
işleme
6e5b06d638
10 değiştirilmiş dosya ile 79 ekleme ve 25 silme
  1. +4
    -2
      gfi-ihk-2024/stories/atoms/event-teaser/EventTeaserComponent.js
  2. +11
    -1
      gfi-ihk-2024/stories/atoms/event-teaser/event-teaser.scss
  3. +5
    -2
      gfi-ihk-2024/stories/components/document-list/DocumentListComponent.js
  4. +8
    -0
      gfi-ihk-2024/stories/components/document-list/document-list.scss
  5. +4
    -2
      gfi-ihk-2024/stories/components/event-teaser-large/EventTeaserLargeComponent.js
  6. +11
    -1
      gfi-ihk-2024/stories/components/event-teaser-large/event-teaser-large.scss
  7. +7
    -6
      gfi-ihk-2024/stories/components/howto-list/HowToListComponent.js
  8. +7
    -3
      gfi-ihk-2024/stories/components/howto-list/howto-list.scss
  9. +14
    -8
      gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js
  10. +8
    -0
      gfi-ihk-2024/stories/components/mini-teaser/miniteaser.scss

+ 4
- 2
gfi-ihk-2024/stories/atoms/event-teaser/EventTeaserComponent.js Dosyayı Görüntüle

@@ -6,7 +6,7 @@ export const createEventTeaser = ({
event = EventTeaserData, event = EventTeaserData,
isExtended = false, isExtended = false,
}) => { }) => {
const a = createElement('a', ['event-teaser']);
const a = createElement('div', ['event-teaser']);
const dateBox = createElement('div', ['date-box'], null, a); const dateBox = createElement('div', ['date-box'], null, a);
const textBox = createElement('div', ['text-box', 'date-wrapper'], null, a); const textBox = createElement('div', ['text-box', 'date-wrapper'], null, a);


@@ -36,7 +36,9 @@ export const createEventTeaser = ({
} }
} }


a.href = event.link;
const teaserLink = createElement('a', ['teaser--link'], '', a);
teaserLink.href = event.link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');


return a; return a;
} }

+ 11
- 1
gfi-ihk-2024/stories/atoms/event-teaser/event-teaser.scss Dosyayı Görüntüle

@@ -1,13 +1,14 @@
@import '../../_global/styles/mixins'; @import '../../_global/styles/mixins';
@import '../../_global/styles/vars'; @import '../../_global/styles/vars';


.event-teaser, .events-list a:not(.btn) {
.event-teaser {
background-color: white; background-color: white;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
transition: 0.3s ease; transition: 0.3s ease;
text-decoration: none; text-decoration: none;
position: relative;
@include focus-visible; @include focus-visible;


&:hover { &:hover {
@@ -154,4 +155,13 @@
} }
} }
} }

.teaser--link {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
}
} }

+ 5
- 2
gfi-ihk-2024/stories/components/document-list/DocumentListComponent.js Dosyayı Görüntüle

@@ -7,8 +7,8 @@ export const createDocumentList = ({
}) => { }) => {
const section = createElement('section', ['document-list']); const section = createElement('section', ['document-list']);
docs.map((doc) => { docs.map((doc) => {
const a = createElement('a', ['document-list-item', doc.icon], null, section);
a.href = doc.link;
const a = createElement('div', ['document-list-item', doc.icon], null, section);
// a.href = doc.link;


if (doc.imageSrc && doc.imageSrc.length > 0) { if (doc.imageSrc && doc.imageSrc.length > 0) {
const imageBox = createElement('div', ['image-box'], null, a); const imageBox = createElement('div', ['image-box'], null, a);
@@ -28,6 +28,9 @@ export const createDocumentList = ({
if (doc.details && doc.details.length > 0) { if (doc.details && doc.details.length > 0) {
createElement('p', ['details'], doc.details, textBox); createElement('p', ['details'], doc.details, textBox);
} }
const teaserLink = createElement('a', ['teaser--link'], '', a);
teaserLink.href = doc.link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');
}) })


return section; return section;

+ 8
- 0
gfi-ihk-2024/stories/components/document-list/document-list.scss Dosyayı Görüntüle

@@ -141,4 +141,12 @@
.kicker { .kicker {
margin-top: -4px; margin-top: -4px;
} }
.teaser--link {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
}
} }

+ 4
- 2
gfi-ihk-2024/stories/components/event-teaser-large/EventTeaserLargeComponent.js Dosyayı Görüntüle

@@ -11,7 +11,7 @@ export const createEventTeaserLarge = ({
target: '_self', target: '_self',
}, },
}) => { }) => {
const a = createElement('a', ['event-teaser-large']);
const a = createElement('div', ['event-teaser-large']);
if (widemode) { if (widemode) {
a.classList.add('widemode'); a.classList.add('widemode');
} }
@@ -46,7 +46,9 @@ export const createEventTeaserLarge = ({
blueBox.classList.add('background-image'); blueBox.classList.add('background-image');
} }


a.href = event.link;
const teaserLink = createElement('a', ['teaser--link'], '', a);
teaserLink.href = event.link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');


return a; return a;
} }

+ 11
- 1
gfi-ihk-2024/stories/components/event-teaser-large/event-teaser-large.scss Dosyayı Görüntüle

@@ -1,7 +1,7 @@
@import '../../_global/styles/mixins'; @import '../../_global/styles/mixins';
@import '../../_global/styles/vars'; @import '../../_global/styles/vars';


.event-teaser-large, .events-list-large a:not(.btn) {
.event-teaser-large {
background-color: white; background-color: white;
border-radius: 16px; border-radius: 16px;
overflow: hidden; overflow: hidden;
@@ -11,6 +11,7 @@
text-decoration: none; text-decoration: none;
min-height:400px; min-height:400px;
flex-wrap: wrap; flex-wrap: wrap;
position: relative;
&:not(.widemode){ &:not(.widemode){
flex-wrap: wrap; flex-wrap: wrap;
align-content: baseline; align-content: baseline;
@@ -270,4 +271,13 @@
} }
} }
} }

.teaser--link {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
}
} }

+ 7
- 6
gfi-ihk-2024/stories/components/howto-list/HowToListComponent.js Dosyayı Görüntüle

@@ -15,15 +15,16 @@ export const createHowToList =
const ul = createElement('ul', [], null, div); const ul = createElement('ul', [], null, div);
listItems.map((item) => { listItems.map((item) => {
const li = createElement('li', [], null, ul); const li = createElement('li', [], null, ul);
const a = createElement('a', [], null, li);
createElement('div', ['icon-box', item.icon], null, a);
createElement('h3', [], item.headline, a);
createElement('p', [], item.text, a);
createElement('span', [], item.more, a);
a.href = item.link;
createElement('div', ['icon-box', item.icon], null, li);
createElement('h3', [], item.headline, li);
createElement('p', [], item.text, li);
createElement('span', [], item.more, li);
if (item.copy && item.copy.length > 0) { if (item.copy && item.copy.length > 0) {
createElement('p', [], item.copy, li); createElement('p', [], item.copy, li);
} }
const teaserLink = createElement('a', ['teaser--link'], '', li);
teaserLink.href = item.link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');
}) })
return div; return div;
} }

+ 7
- 3
gfi-ihk-2024/stories/components/howto-list/howto-list.scss Dosyayı Görüntüle

@@ -44,9 +44,13 @@
padding: 0 0 32px 0; padding: 0 0 32px 0;
position: relative; position: relative;
} }
a {
display: block;
text-decoration: none;
.teaser--link {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
} }
h3 { h3 {
margin-top: 0; margin-top: 0;


+ 14
- 8
gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js Dosyayı Görüntüle

@@ -10,17 +10,20 @@ export const createMiniTeaser = ({
buttonlabel = 'IHK-Newsletter sichern', buttonlabel = 'IHK-Newsletter sichern',
backgroundImage = null, backgroundImage = null,
}) => { }) => {
if (type === 'standard') { if (type === 'standard') {
const tile = createElement('a', ['tile', 'mini-teaser', type], null);
tile.href = link;
const tile = createElement('div', ['tile', 'mini-teaser', type], null);
// tile.href = link;
const textBox = createElement('div', ['text-box'], null, tile); const textBox = createElement('div', ['text-box'], null, tile);
createElement('div', ['category','like-h5'], category, textBox); createElement('div', ['category','like-h5'], category, textBox);
createElement('div', ['title','like-h4'], title, textBox); createElement('div', ['title','like-h4'], title, textBox);
const teaserLink = createElement('a', ['teaser--link'], '', tile);
teaserLink.href = link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');
return tile; return tile;
}else{
const tile = createElement('a', ['tile', 'mini-teaser', type], null);
tile.href = link;
} else {
const tile = createElement('div', ['tile', 'mini-teaser', type], null);
// tile.href = link;
if (backgroundImage && backgroundImage.length > 0) { if (backgroundImage && backgroundImage.length > 0) {
tile.style = 'background-image: url(' + backgroundImage + ');'; tile.style = 'background-image: url(' + backgroundImage + ');';
tile.classList.add('background-image'); tile.classList.add('background-image');
@@ -30,11 +33,14 @@ export const createMiniTeaser = ({
createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox); createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox);
createElement('div', ['title','like-h4'], title, textBox); createElement('div', ['title','like-h4'], title, textBox);
textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel,iconPosition: 'icon-right', icon: null, preventClick: false})) textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel,iconPosition: 'icon-right', icon: null, preventClick: false}))
}else{
} else {
createElement('div', ['title', 'noicon', 'like-h4'], title, textBox); createElement('div', ['title', 'noicon', 'like-h4'], title, textBox);
textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null, preventClick: false})) textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null, preventClick: false}))
} }
const teaserLink = createElement('a', ['teaser--link'], '', tile);
teaserLink.href = link;
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text');

return tile; return tile;
} }
} }

+ 8
- 0
gfi-ihk-2024/stories/components/mini-teaser/miniteaser.scss Dosyayı Görüntüle

@@ -154,6 +154,14 @@
padding:0; padding:0;
margin:0; margin:0;
} }
.teaser--link {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 10;
}
} }






Yükleniyor…
İptal
Kaydet