Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/loader-utils-1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi authored Jun 6, 2024
2 parents add7fa0 + b804adb commit 46fc746
Show file tree
Hide file tree
Showing 128 changed files with 3,564 additions and 568 deletions.
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CR: TMS-628
Severa-ID: 2108
Severa-kuvaus:
Task: https://hiondigital.atlassian.net/browse/TMS-

<!--- Provide a general summary of your changes in the Title above -->

Expand Down
98 changes: 98 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,104 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.3.5] - 2024-05-20

- TMS-1028: Add social-media link column to footer

## [1.3.4] - 2024-05-14

- TMS-1029: Change contacts-blocks width

## [1.3.3] - 2024-03-26

- TMS-1013: Add event weekly entry dates to event partial
- TMS-1021: Remove image carousel modal max-height

## [1.3.2] - 2024-03-18

- TMS-1017: Add image alt-text to imported news single-article

## [1.3.1] - 2024-02-01

- TMS-980: Add redipress_include_search to include component contents in search results

## [1.3.0] - 2023-11-21

- TMS-974: Recurring event layout changes
- TMS-935: Archive filter accessibility fixes

## [1.2.0] - 2023-10-23

- TMS-970: Add image meta to call-to-action and content-columns components

## [1.1.0] - 2023-10-12

- TMS-981: Change past exhibition order to sort by end_date
- TMS-936: Image carousel accessibility fixes

## [1.0.9] - 2023-10-09

- TMS-978: Remove manual-event styles

## [1.0.8] - 2023-10-04

- TMS-978: Reduce single manual-event description line-height & margin

## [1.0.7] - 2023-09-28
- TMS-948:
- Fix related articles image on single article page
- Fix mobile nav colors

## [1.0.6] - 2023-09-18
- TMS-948: Fix form text color

## [1.0.5] - 2023-09-05

- TMS-972:
- Increase exhibition archive querys posts_per_page value to prevent exhibitions not showing
- Fix lobby-display exhibition query
- Fix exhibition archive year-filter dropdown

## [1.0.4] - 2023-09-04

- TMS-972:
- Change main-exhibitions to show in the start of exhibition archive listing
- Change ongoing exhibition order to descending in exhibition archive
- Fix pagination for past exhibitions in exhibition-archive

## [1.0.3] - 2023-08-28

- TMS-948:
- Show exhibitions without start or end-date as ongoing exhibitions
- Allow custom HTML-block and component only for super-admin users
- Change exhibition-archive styles
- Add description-field to digital exhibitions

## [1.0.2] - 2023-08-15
- TMS-948:
- Style fixes: change contacts from 3 columns to 2,
- Make video-block & component narrower
- Change button bg-color to red
- Add divider-block & component
- Add exhibition-carousel component

## [1.0.1] - 2023-07-06
- Change favicon file

## [1.0.0] - 2023-07-06
- Added Aulanäyttö-template
- Remove Manual Event CPT changes, since now we have a plugin for Manual events
- Added grey background-color to color options
- Changed Archived exhibitions name to Digital exhibitions & add some checks if digital exhibitions are empty
- Added link-field to single Digital exhibition
- Allow exhibitions lift-component on all page templates
- Change primary font-family & font-weight
- Added bottom border to cta-component, left border to 'upcoming'-badge on exhibitions

## [0.2.0] - 2023-06-08

- TMS-948: Add Manual Event CPT and special page template for combining manual and API events.

## [0.1.0] - 2023-06-05

- TMS-948: Add Archived exhibitions repeater fields to settings and create a tab & listing for them with other exhibitions
Expand Down
Binary file removed assets/fonts/Adelon-Bold.ttf
Binary file not shown.
Binary file removed assets/fonts/Adelon-Medium.ttf
Binary file not shown.
Binary file removed assets/fonts/Adelon-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/AdelonSerial-Bold.otf
Binary file not shown.
Binary file removed assets/fonts/AdelonSerial-Medium.otf
Binary file not shown.
Binary file removed assets/fonts/AdelonSerial.otf
Binary file not shown.
Binary file added assets/fonts/BebasNeue-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Inter-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Inter-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Inter-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Inter-SemiBold.ttf
Binary file not shown.
Binary file added assets/fonts/Poppins-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Poppins-Light.ttf
Binary file not shown.
Binary file added assets/fonts/Poppins-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Poppins-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Poppins-SemiBold.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Light.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/RobotoSlab-Bold.ttf
Binary file not shown.
Binary file removed assets/fonts/RobotoSlab-Medium.ttf
Binary file not shown.
Binary file removed assets/fonts/RobotoSlab-Regular.ttf
Binary file not shown.
Binary file removed assets/fonts/RobotoSlab-SemiBold.ttf
Binary file not shown.
18 changes: 11 additions & 7 deletions assets/fonts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
import './fonts';

// Font families
import './Adelon-Bold.ttf';
import './Adelon-Medium.ttf';
import './Adelon-Regular.ttf';
import './RobotoSlab-Regular.ttf';
import './RobotoSlab-Medium.ttf';
import './RobotoSlab-SemiBold.ttf';
import './RobotoSlab-Bold.ttf';
import './Inter-Bold.ttf';
import './Inter-SemiBold.ttf';
import './Inter-Medium.ttf';
import './Inter-Regular.ttf';
import './Roboto-Regular.ttf';
import './Roboto-Medium.ttf';
import './Roboto-Bold.ttf';
import './Poppins-Regular.ttf';
import './Poppins-Medium.ttf';
import './Poppins-SemiBold.ttf';
import './Poppins-Bold.ttf';
Binary file added assets/images/aula/1st.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/2nd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/3rd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/basement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/food.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/full_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/hallway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/intest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/loc_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/map_2nd_floor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/map_3rd_floor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/map_basement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/map_groundfloor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/press.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/shop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/aula/v.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions assets/scripts/exhibition-carousel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/**
* Copyright (c) 2021. Geniem Oy
*/

import '@accessible360/accessible-slick';
import Common from '../../../tms-theme-base/assets/scripts/common';

// Use jQuery as $ within this file scope.
const $ = jQuery;

export default class ExhibitionCarousel {

cache() {
this.exhibition_carousels = $( '.exhibition-carousel' );
}

initCarousels() {
// Translations are defined in models/strings.php,
// and loaded to windows.s in lib/Assets.php.
const translations = window.s.gallery || {
next: 'Next',
previous: 'Previous',
close: 'Close',
goto: 'Go to slide',
};

const icons = {
prev: Common.makeIcon( 'chevron-left' ),
next: Common.makeIcon( 'chevron-right' ),
};

const prevSrText = `<span class="is-sr-only">${ translations.previous }</span>`;
const nextSrText = `<span class="is-sr-only">${ translations.next }</span>`;

const arrowClass = 'button button--icon exhibition-carousel__modal-control';

const buttons = {
prevArrow: Common.makeButton( icons.prev + prevSrText, `${ arrowClass } slick-prev` ),
nextArrow: Common.makeButton( icons.next + nextSrText, `${ arrowClass } slick-next` ),
};

$( this.exhibition_carousels ).each( ( n, element ) => {
this.constructCarousel( element, buttons, translations );
} );
}

/**
* Constructs the carousel, or two if we have sync defined.
*
* @param {HTMLElement} container Main carousel element.
* @param {Object} translations Translations.
* @return {*|jQuery|HTMLElement} Constructed main carousel.
*/
constructCarousel( container = undefined, translations = {} ) {
const $container = $( container );
const carousel = $container.find( '.exhibition-carousel__items--primary' );

const carouselOptions = {
prevArrow: $container.find( '.slick-prev' ),
nextArrow: $container.find( '.slick-next' ),
customPaging( slider, i ) {
const dotIcon = '<span class="slick-dot-icon" aria-hidden="true"></span>';
const srLabel = `<span class="is-sr-only">${ translations.goto } ${ i + 1 }</span>`;
return $( Common.makeButton( dotIcon + srLabel ) );
},
centerMode: true,
centerPadding: '1rem',
slidesToShow: 3,
arrowsPlacement: 'afterSlides',
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
},
},
{
breakpoint: 768,
centerMode: true,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
],
};

// Start the main carousel.
carousel.slick( carouselOptions );

carousel.on( 'setPosition', ( event, slick ) => {
// Transalate Slick Slider stuff
this.translateCarousels( translations );
} );

return carousel;
}

translateCarousels( translations ) {
$( '.slick-track' ).find( '.slick-slide' ).each( function() {
const thisElem = $( this );
let newStr = thisElem.attr( 'aria-label' ).replace( 'slide', translations.slide );

if ( newStr.includes( 'centered' ) ) {
newStr = newStr.replace( /\((.*?)\)/g, '' ).trim() + ' (' + translations.centered + ')';
thisElem.attr( 'aria-label', newStr );
}

// Clean up other than .slick-current slide
if ( ! thisElem.hasClass( 'slick-current' ) ) {
newStr = newStr.replace( /\((.*?)\)/g, '' ).trim();
}

thisElem.attr( 'aria-label', newStr );

} );

}

docReady() {
this.cache();
this.initCarousels();
}
}
Loading

0 comments on commit 46fc746

Please sign in to comment.