FlorianEisenmenger 10 месяцев назад
Родитель
Сommit
3d8025b890
11 измененных файлов: 48 добавлений и 12 удалений
  1. +12
    -0
      gfi-ihk-2024/stories/_global/styles/main.scss
  2. +3
    -1
      gfi-ihk-2024/stories/components/election-result-list-item/ElectionResultListItemComponent.js
  3. +2
    -1
      gfi-ihk-2024/stories/components/gallery/gallery.js
  4. +3
    -1
      gfi-ihk-2024/stories/components/teaser/TeaserComponent.js
  5. +3
    -1
      gfi-ihk-2024/stories/components/video/VideoComponent.js
  6. +3
    -1
      gfi-ihk-2024/stories/sections/election-detail/ElectionDetailComponent.js
  7. +3
    -1
      gfi-ihk-2024/stories/sections/marketingheader/MarketingHeaderComponent.js
  8. +11
    -3
      gfi-ihk-2024/stories/sections/marketingheader/marketingheader.scss
  9. +3
    -1
      gfi-ihk-2024/stories/sections/slider/SliderComponent.js
  10. +2
    -1
      gfi-ihk-2024/stories/sections/slider/slider.js
  11. +3
    -1
      gfi-ihk-2024/stories/sections/timeline/TimelineComponent.js

+ 12
- 0
gfi-ihk-2024/stories/_global/styles/main.scss Просмотреть файл

@@ -140,3 +140,15 @@ img {
display: none; display: none;
} }


// Only for Screenreaders
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

+ 3
- 1
gfi-ihk-2024/stories/components/election-result-list-item/ElectionResultListItemComponent.js Просмотреть файл

@@ -13,7 +13,9 @@ export const createElectionResultListItem =
topBox.href = '#'; topBox.href = '#';
const imageBox = createElement('div', ['image-box'], null, topBox); const imageBox = createElement('div', ['image-box'], null, topBox);
createImage(image, 310, 310, '', [], imageBox); createImage(image, 310, 310, '', [], imageBox);
createElement('span', ['copyright'], name, imageBox);
const copy = createElement('span', ['copyright'], name, imageBox);
copy.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], name, imageBox);
createElement('h3', [], name, topBox); createElement('h3', [], name, topBox);


const textBox = createElement('div', ['text-box'], null, electionResultListItem); const textBox = createElement('div', ['text-box'], null, electionResultListItem);


+ 2
- 1
gfi-ihk-2024/stories/components/gallery/gallery.js Просмотреть файл

@@ -71,7 +71,8 @@ class IHKGallery {
const a = $('<a href="' + first.data('full') + '" />').attr('data-index', 0).appendTo(first); const a = $('<a href="' + first.data('full') + '" />').attr('data-index', 0).appendTo(first);
const img = $('<img alt="' + first.attr("alt") + '" />').appendTo(a); const img = $('<img alt="' + first.attr("alt") + '" />').appendTo(a);
if (first.data('copyright')) { if (first.data('copyright')) {
$('<span class="copyright">' + first.data('copyright') + '</span>').appendTo(a);
$('<span class="copyright" aria-hidden="true">' + first.data('copyright') + '</span>').appendTo(a);
$('<span class="sr-only">' + first.data('copyright') + '</span>').appendTo(a);
} }


first.find('.image-description').appendTo(this.wrapper); first.find('.image-description').appendTo(this.wrapper);


+ 3
- 1
gfi-ihk-2024/stories/components/teaser/TeaserComponent.js Просмотреть файл

@@ -55,7 +55,9 @@ export const createTeaser = ({
createImage(src, imageWidth, imageHeight, 'Teaser-Bild', [], imageBox); createImage(src, imageWidth, imageHeight, 'Teaser-Bild', [], imageBox);


if (copyright && copyright.length > 0) { if (copyright && copyright.length > 0) {
createElement('span', ['copyright'], copyright, imageBox);
const copy = createElement('span', ['copyright'], copyright, imageBox);
copy.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], copyright, imageBox);
} }
} }
else if ((type === 'chart' && chartTitle && chartTitle.length > 0) || ((!imageSrc || imageSrc.length === 0) && type !== 'text' && chartTitle && chartTitle.length > 0)) { else if ((type === 'chart' && chartTitle && chartTitle.length > 0) || ((!imageSrc || imageSrc.length === 0) && type !== 'text' && chartTitle && chartTitle.length > 0)) {


+ 3
- 1
gfi-ihk-2024/stories/components/video/VideoComponent.js Просмотреть файл

@@ -17,7 +17,9 @@ export const createVideo = ({
} }


if (copyright && copyright.length > 0) { if (copyright && copyright.length > 0) {
createElement('span', ['copyright'], copyright, videoBox);
const copy = createElement('span', ['copyright'], copyright, videoBox);
copy.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], copyright, videoBox);
} }
if (caption && caption.length > 0) { if (caption && caption.length > 0) {
createElement('figcaption', [], caption, figure); createElement('figcaption', [], caption, figure);


+ 3
- 1
gfi-ihk-2024/stories/sections/election-detail/ElectionDetailComponent.js Просмотреть файл

@@ -46,7 +46,9 @@ export const createElectionDetail =


const imageContainer = createElement('div', ['election-detail--image-container'], null, text); const imageContainer = createElement('div', ['election-detail--image-container'], null, text);
createImage(image, 545, 526, '', [], imageContainer); createImage(image, 545, 526, '', [], imageContainer);
createElement('span', ['copyright'], name, imageContainer);
const copyright = createElement('span', ['copyright'], name, imageContainer);
copyright.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], name, imageContainer);
const textbox = createElement('div', ['text-box'], null, text); const textbox = createElement('div', ['text-box'], null, text);
createElement('h1', [], name, textbox); createElement('h1', [], name, textbox);
createElement('p', ['subheadline'], subheadline, textbox); createElement('p', ['subheadline'], subheadline, textbox);


+ 3
- 1
gfi-ihk-2024/stories/sections/marketingheader/MarketingHeaderComponent.js Просмотреть файл

@@ -108,7 +108,9 @@ export const createMarketingHeader =
if (slideData.imageSrc && slideData.imageSrc.length > 0) { if (slideData.imageSrc && slideData.imageSrc.length > 0) {
const imageBox = createElement('div', ['image-box'], null, outer); const imageBox = createElement('div', ['image-box'], null, outer);
createImage(slideData.imageSrc, 900, 600, 'Slide ' + index, [], imageBox); createImage(slideData.imageSrc, 900, 600, 'Slide ' + index, [], imageBox);
createElement('span', ['copyright'], 'Copyright-Angabe', imageBox);
const copyright = createElement('span', ['copyright'], 'Copyright-Angabe', imageBox);
copyright.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], 'Copyright-Angabe', imageBox);
if (contextBoxContentImg) { if (contextBoxContentImg) {
const contentBoxImg = createElement('div', ['context-box', 'context-box--image'], null, imageBox); const contentBoxImg = createElement('div', ['context-box', 'context-box--image'], null, imageBox);
createImage(contextBoxContentImg, 200, 50, '', [], contentBoxImg); createImage(contextBoxContentImg, 200, 50, '', [], contentBoxImg);


+ 11
- 3
gfi-ihk-2024/stories/sections/marketingheader/marketingheader.scss Просмотреть файл

@@ -24,6 +24,14 @@ section.marketingheader{
height:auto; height:auto;
} }
} }
.copyright {
@media(max-width: 900px) {
left: calc(100% - 30px);
}
@media(max-width: 767px) {
left: calc(100% - 20px);
}
}
} }
} }
.text-box{ .text-box{
@@ -516,7 +524,7 @@ section.marketingheader{
} }
.rotation { .rotation {
padding:0; padding:0;
@media screen and (max-width: 1000px) {
@media screen and (max-width: 999px) {
.slide:not(.text-only) .text-box { .slide:not(.text-only) .text-box {
padding: 16px 0; padding: 16px 0;
} }
@@ -840,14 +848,14 @@ section.marketingheader{
min-width: 324px; min-width: 324px;
} }
} }
@media (min-width: 1001px) {
@media (min-width: 1000px) {
.slider .text-box:not(:first-child)::before { .slider .text-box:not(:first-child)::before {
border-top-right-radius: 16% 50% !important; border-top-right-radius: 16% 50% !important;
border-bottom-right-radius: 16% 50% !important; border-bottom-right-radius: 16% 50% !important;
margin: -15% -8% -15% 20px; margin: -15% -8% -15% 20px;
} }
} }
@media (max-width:1000px){
@media (max-width:999px){
.slider{ .slider{
background-color: white; background-color: white;


+ 3
- 1
gfi-ihk-2024/stories/sections/slider/SliderComponent.js Просмотреть файл

@@ -23,7 +23,9 @@ export const createSlider =
const imageBox = createElement('div', ['image-box'], null, outer); const imageBox = createElement('div', ['image-box'], null, outer);
createImage(slideData.imageSrc, 900, 600, 'Slide ' + index, [], imageBox); createImage(slideData.imageSrc, 900, 600, 'Slide ' + index, [], imageBox);
if (slideData.copyright && slideData.copyright.length > 0) { if (slideData.copyright && slideData.copyright.length > 0) {
createElement('span', ['copyright'], slideData.copyright, imageBox);
const copy = createElement('span', ['copyright'], slideData.copyright, imageBox);
copy.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], slideData.copyright, imageBox);
} }
if (contextBoxContentImg) { if (contextBoxContentImg) {
const contentBoxImg = createElement('div', ['context-box', 'context-box--image'], null, imageBox); const contentBoxImg = createElement('div', ['context-box', 'context-box--image'], null, imageBox);


+ 2
- 1
gfi-ihk-2024/stories/sections/slider/slider.js Просмотреть файл

@@ -428,7 +428,8 @@ class IHKSlider {
nextItem.append(loadedImage.clone()); nextItem.append(loadedImage.clone());
// Copyright für Next-Wrapper // Copyright für Next-Wrapper
if (ib.attr('data-copyright')) { if (ib.attr('data-copyright')) {
$('<span class="copyright">').html(ib.attr('data-copyright')).appendTo(nextItem);
$('<span class="copyright" aria-hidden="true">').html(ib.attr('data-copyright')).appendTo(nextItem);
$('<span class="sr-only">').html(ib.attr('data-copyright')).appendTo(nextItem);
} }
const prevItem = t.prevWrapper.find('[data-index="' + index + '"]').removeClass('preload').find('.image-box'); const prevItem = t.prevWrapper.find('[data-index="' + index + '"]').removeClass('preload').find('.image-box');
prevItem.append(loadedImage.clone()); prevItem.append(loadedImage.clone());


+ 3
- 1
gfi-ihk-2024/stories/sections/timeline/TimelineComponent.js Просмотреть файл

@@ -56,7 +56,9 @@ export const createTimeline = ({
createElement('span', [], item.image.caption, caption); createElement('span', [], item.image.caption, caption);
} }
if (item.image.copyright) { if (item.image.copyright) {
createElement('span', ['copyright'], item.image.copyright, caption);
const copyright = createElement('span', ['copyright'], item.image.copyright, caption);
copyright.setAttribute("aria-hidden", "true");
createElement('span', ['sr-only'], item.image.copyright, caption);
} }
} }
} }


Загрузка…
Отмена
Сохранить