<div class="news-article-press-release">
<div class="news-article-press-release__content">
<div class="news-article-press-release__content__header">
<span class="news-article-press-release__content__meta__text">19 August 2018</span>
</div>
<a href="http://via.placeholder.com/20x20" class="news-article-press-release__content__text">Non officia minim magna proident fugiat Lorem aliquip ex proident ea. Non officia minim magna proident fugiat Lorem aliquip ex proident ea.</a>
<div class="news-article-press-release__content__footer">
<span>
<span class="news-article-press-release__content__category__text">category 1 | </span>
<span class="news-article-press-release__content__category__text">category 2</span>
<span class="news-article-press-release__content__format">Content format 1</span>
</span>
</div>
</div>
<div class="news-article-press-release__icons">
<div class="news-article-press-release__icons__icon--share">
<a href="#">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M13.9375 12.375c-.662 0-1.264.239-1.744.622l-5.623-3.46c.034-.174.055-.353.055-.537 0-.184-.021-.363-.055-.537l5.623-3.46c.48.383 1.082.622 1.744.622 1.553 0 2.813-1.259 2.813-2.813 0-1.553-1.26-2.812-2.813-2.812-1.553 0-2.813 1.259-2.813 2.812 0 .115.021.223.034.334l-5.752 3.54a2.7954 2.7954 0 0 0-1.594-.498C2.2595 6.188.9995 7.447.9995 9s1.26 2.813 2.813 2.813c.592 0 1.141-.186 1.594-.499l5.752 3.54c-.013.111-.034.219-.034.334 0 1.553 1.26 2.812 2.813 2.812 1.553 0 2.813-1.259 2.813-2.812 0-1.554-1.26-2.813-2.813-2.813" fill="#006FEE" fill-rule="evenodd"/>
</svg>
</a>
</div>
<div class="news-article-press-release__icons__icon--download">
<a href="#" data-js-download-icon>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="#006FEE" fill-rule="evenodd">
<path d="M9.2376-.0001v8.527l-2.198-.671-1.127 1.507 3.497 5.31h1.669l3.497-5.31-1.128-1.507-2.21.676v-8.532z"/>
<path d="M18 11.0942v7H2v-7H0v8l1 1h18l1-1v-8z"/>
</g>
</svg>
</a>
</div>
</div>
</div>
/* @news-article-press-release */
.news-article-press-release {
display: flex;
flex-direction: column;
position: relative;
background-color: white;
width: 100%;
@include poly-padding-y;
@media screen and (max-width: #{$medium-screen - 1 }) {
&::after {
content: '';
width: 92%;
height: 1px;
border-bottom: 1px solid black;
position: absolute;
bottom: 0;
left: 4%;
}
}
@media screen and (min-width: $medium-screen) {
flex-direction: row;
align-items: center;
}
&__content {
flex-grow: 1;
@include poly-padding-right--small;
@media screen and (min-width: $medium-screen) {
border-bottom: 1px solid black;
}
&__text {
font: 900 12px/18px "Biryani", sans-serif;
@include poly-margin-bottom--small;
@include poly-padding-right--small;
@include themify($themes) {
color: themed('ctaColor');
}
}
&__category {
margin-bottom: 0;
}
&__header,
&__footer {
display: flex;
> span {
font: 200 14px/28px "Quicksand", sans-serif;
letter-spacing: 1px;
@include poly-margin-right--small;
&:last-child{
margin-right:0;
}
}
.select2-container {
width: 50px !important;
.select2-selection--single {
height: 28px;
.select2-selection__rendered {
border-bottom: none;
height: 28px;
padding: 0 0 0 6px;
font: 400 12px/24px "Biryani", sans-serif;
letter-spacing: 0;
@include themify($themes) {
color: themed('ctaColor');
}
}
.select2-selection__arrow {
top: 6px;
right: 8px;
width: 10px;
height: 10px;
b {
width: 9px;
height: 9px;
}
}
}
&.select2-container--open {
.select2-selection--single {
border-radius: 0;
@include themify($themes) {
background-color: themed('ctaColor');
}
.select2-selection__rendered {
color: white;
}
.select2-selection__arrow b {
background-image: $down-arrow-white-svg;
}
}
}
}
.select2-dropdown {
border-radius: 0;
@include themify($themes) {
background-color: themed('ctaColor');
color: white;
}
.select2-results__option {
padding: 1em 6px 7px;
margin: 0;
font: 400 12px/10px "Biryani", sans-serif;
letter-spacing: 0;
&[data-selected="true"] {
display: none;
}
}
.select2-results__option--highlighted[data-selected] {
@include themify($themes) {
background-color: darken(themed('ctaColor'), 10%);
}
color: white;
}
&::before {
display: none;
}
}
}
&__header {
color: $red-ribbon;
margin-bottom: 3px;
height: 28px;
}
&__footer {
@include poly-padding-y--small;
justify-content: space-between;
flex-direction: column;
@media screen and (max-width: #{$medium-screen - 1 }) {
> span {
display: flex;
}
}
@media screen and (min-width: $medium-screen) {
flex-direction: row;
}
}
&__languages {
float: right;
@media screen and (max-width: #{$medium-screen - 1 }) {
position: absolute;
bottom: 0.5em;
right: 1em;
}
@media screen and (min-width: $medium-screen) {
@include poly-margin-left;
}
}
&__format {
// @include poly-margin-left;
}
}
&__icons {
display: flex;
flex-direction: row;
justify-content: flex-start;
height: 80%;
@media screen and (max-width: #{$medium-screen - 1 }) {
width: 100%;
height: unset;
}
@media screen and (min-width: $medium-screen) {
border-left: 1px solid black;
flex-direction: column;
justify-content: center;
@include poly-padding-left--small;
}
div {
width: 44px;
height: 30px;
padding: 5px 10px 0;
@media screen and (min-width: $medium-screen) {
padding: 10px;
height: 44px;
}
@include themify($themes) {
svg {
fill: themed('ctaColor');
&:hover {
fill: darken(themed('ctaColor'), 10%);
}
}
}
}
}
}
/* news-article-press-release */
$(document).ready(function () {
var $newsArticlePressRelease = $('.news-article-press-release', $newsArticlePressRelease);
var $languageSelector = $('[data-js-language-selector]', $newsArticlePressRelease);
if ($('.events-list--documents').length < 1) {
$languageSelector.select2({
dropdownParent: $('.news-article-press-release__content__languages'),
minimumResultsForSearch: Infinity
});
}
$languageSelector.on('select2:select', function(e) {
var $selectedLanguage = $(e.currentTarget).find('option:selected').val();
var $getParent = $(e.currentTarget).closest('.news-article-press-release')
var $downloadIcon = $('[data-js-download-icon]', $getParent);
$downloadIcon.attr('href', $selectedLanguage + '.pdf');
});
})