Cn compilation fix
This commit is contained in:
parent
40b1706f6f
commit
32b5cadebb
5 changed files with 58 additions and 42 deletions
1
content/themes/ldc/css/cn-inline-buttons.min.css
vendored
Normal file
1
content/themes/ldc/css/cn-inline-buttons.min.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.cn-cookie-activate{display:flex;flex-direction:row;font-size:calc(.9rem + .1vw) !important;background-color:#fff;padding:.6rem 1rem;border-radius:1rem;justify-content:center;align-items:center;border-width:2px;border-style:solid;border-color:#000}.cn-cookie-activate.w-100{max-width:inherit !important}.cn-cookie-activate span{font-size:calc(.9rem + .1vw) !important}@media screen and (min-width: 500px),print and (min-width: 500px){.cn-cookie-activate span{font-size:calc(.9rem + .1vw) !important}}@media screen and (min-width: 500px),print and (min-width: 500px){.cn-cookie-activate{font-size:calc(.9rem + .1vw) !important}}@media screen and (min-width: 768px),print and (min-width: 768px){.cn-cookie-activate{flex-direction:row}}.cn-cookie-activate button{font-size:.9rem !important;height:fit-content;padding:.8rem .6rem;border-width:.1rem;border-radius:1rem}@media screen and (min-width: 500px),print and (min-width: 500px){.cn-cookie-activate button{font-size:calc(.9rem + .1vw) !important}}@media screen and (min-width: 768px),print and (min-width: 768px){.cn-cookie-activate button{font-size:calc(.9rem - .1vw) !important}}@media screen and (min-width: 1024px),print and (min-width: 1024px){.cn-cookie-activate button{font-size:.9rem !important}}.cn-cookie-activate>span{margin-bottom:.9rem;display:flex;flex-direction:column;color:#e11c1b;font-weight:bold}@media screen and (min-width: 500px),print and (min-width: 500px){.cn-cookie-activate>span{margin-bottom:initial}}.cn-cookie-activate>span>small{color:initial;font-weight:initial;opacity:.5}.cn-cookie-activate.d-none{display:none}.justify-content-center{justify-content:center !important}
|
||||
|
|
@ -106,7 +106,7 @@ function load_js_css()
|
|||
wp_enqueue_style('cookie', get_template_directory_uri() . $_style_cookies, [], filemtime(get_template_directory() . $_style_cookies));
|
||||
$_js_cookies = '/js/ldcweb-cn.min.js';
|
||||
wp_enqueue_script('cookie', get_template_directory_uri() . $_js_cookies, [], null, filemtime(get_template_directory() . $_js_cookies));
|
||||
$_style_inline_cookies = '/css/cn-inline-buttons.css';
|
||||
$_style_inline_cookies = '/css/cn-inline-buttons.min.css';
|
||||
wp_enqueue_style('inline-cookie', get_template_directory_uri() . $_style_inline_cookies, [], filemtime(get_template_directory() . $_style_inline_cookies));
|
||||
$_js_inline_cookies = '/js/cn-inline-buttons.js';
|
||||
wp_enqueue_script('inline-cookie', get_template_directory_uri() . $_js_inline_cookies, ['cookie'], filemtime(get_template_directory() . $_js_inline_cookies), true);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prod": "npm run cookieNotice",
|
||||
"cookieNotice": "npx sass --style=compressed --no-source-map ./sass/_cookies-notice.scss css/cookies-ldc.min.css && cp node_modules/@ldc-web/cookie-notice/dist/browser/cookie-cn.js js/ldcweb-cn.min.js"
|
||||
"cookieNotice": "npx sass --style=compressed --no-source-map ./sass/_cn-inline-buttons.scss css/cn-inline-buttons.min.css && npx sass --style=compressed --no-source-map ./sass/_cookies-notice.scss css/cookies-ldc.min.css && cp node_modules/@ldc-web/cookie-notice/dist/browser/cookie-cn.js js/ldcweb-cn.min.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -1,65 +1,65 @@
|
|||
<?php
|
||||
global $tp;
|
||||
if(empty($brands)) {
|
||||
$brands = get_field('brands');
|
||||
}
|
||||
global $tp;
|
||||
if (empty($brands)) {
|
||||
$brands = get_field('brands');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if(!empty($brands)) : ?>
|
||||
<?php if (!empty($brands)) : ?>
|
||||
|
||||
|
||||
<?php $b_1 = 1; ?>
|
||||
<?php foreach($brands as $b) : ?>
|
||||
<?php $b_1 = 1; ?>
|
||||
<?php foreach ($brands as $b) : ?>
|
||||
|
||||
<div class="brands fw <?php if($b['bg'] == 1) : ?>brands_bg<?php endif; ?>">
|
||||
<div class="brands fw <?php if ($b['bg'] == 1) : ?>brands_bg<?php endif; ?>">
|
||||
|
||||
<?php
|
||||
set_query_var('text_block', $b['text_block']);
|
||||
get_template_part('partials/text-block');
|
||||
set_query_var('text_block', $b['text_block']);
|
||||
get_template_part('partials/text-block');
|
||||
?>
|
||||
|
||||
<?php if(!empty($b['list'])) : ?>
|
||||
<?php $b_2 = 1; ?>
|
||||
<?php foreach($b['list'] as $bl) : ?>
|
||||
<div class="brand" id="brand_<?php echo $b_1.'_'.$b_2 ?>">
|
||||
<?php if (!empty($b['list'])) : ?>
|
||||
<?php $b_2 = 1; ?>
|
||||
<?php foreach ($b['list'] as $bl) : ?>
|
||||
<div class="brand" id="brand_<?php echo $b_1 . '_' . $b_2 ?>">
|
||||
<div class="brand__wrapper wrapper">
|
||||
<div class="brand__container">
|
||||
<div class="brand__info">
|
||||
<?php if(!empty($bl['logo']['image'])) : ?>
|
||||
<a class="brand__logo" target="_blank" title="<?php echo $bl['logo']['image']['alt']; ?>" <?php if(!empty($bl['logo']['link']['url'])) : ?>href="<?php echo $bl['logo']['link']['url']; ?>"<?php endif; ?>>
|
||||
<?php if (!empty($bl['logo']['image'])) : ?>
|
||||
<a class="brand__logo" target="_blank" title="<?php echo $bl['logo']['image']['alt']; ?>" <?php if (!empty($bl['logo']['link']['url'])) : ?>href="<?php echo $bl['logo']['link']['url']; ?>" <?php endif; ?>>
|
||||
<img src="<?php echo $bl['logo']['image']['url']; ?>" alt="<?php echo $bl['logo']['image']['alt']; ?>">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!empty($bl['title'])) : ?>
|
||||
<?php if (!empty($bl['title'])) : ?>
|
||||
<h3 class="brand__title subtitle"><?php echo $bl['title']; ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!empty($bl['text'])) : ?>
|
||||
<?php if (!empty($bl['text'])) : ?>
|
||||
<div class="brand__text description"><?php echo $bl['text']; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="brand__media">
|
||||
<?php if(!empty($bl['video'])) : ?>
|
||||
<?php if (!empty($bl['video'])) : ?>
|
||||
<div class="brand__video">
|
||||
<div class="brand__video-btn play-button"></div>
|
||||
<?php
|
||||
$videoType = getVideoType($bl['video']);
|
||||
$videoUrl = getVideoEmbedUrl($bl['video']);
|
||||
$videoType = getVideoType($bl['video']);
|
||||
$videoUrl = getVideoEmbedUrl($bl['video']);
|
||||
?>
|
||||
<div class="cn-<?= esc_attr($videoType); ?>" data-src="<?= esc_url($videoUrl); ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!empty($bl['service']['url'])) : ?>
|
||||
<?php if (!empty($bl['service']['url'])) : ?>
|
||||
<a class="brand__link" href="<?php echo $bl['service']['url']; ?>" target="_blank"><?php echo $bl['service']['title']; ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!empty($bl['subscribe']['url'])) : ?>
|
||||
<?php if (!empty($bl['subscribe']['url'])) : ?>
|
||||
<a class="brand__link" href="<?php echo $bl['subscribe']['url']; ?>" target="_blank"><?php echo $bl['subscribe']['title']; ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(!empty($bl['button']['url'])) : ?>
|
||||
<?php if (!empty($bl['button']['url'])) : ?>
|
||||
<a class="brand__btn btn" href="<?php echo $bl['button']['url']; ?>" target="_blank"><?php echo $bl['button']['title']; ?> <i class="btn__icon btn__icon_arrow-right"></i></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
@ -70,8 +70,8 @@
|
|||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php $b_1++; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php $b_1++; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
|
@ -1,3 +1,21 @@
|
|||
$large_screen: 1366px;
|
||||
$big_screen: 1200px;
|
||||
$desktop: 1024px;
|
||||
$tablet: 768px;
|
||||
$mobile: 500px;
|
||||
$xmobile: 320px;
|
||||
|
||||
@mixin min-width($width) {
|
||||
@media screen and (min-width: $width), print and (min-width: $width) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
@mixin max-width($width) {
|
||||
@media screen and (max-width: $width), print and (max-width: $width) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
.cn-cookie-activate {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
@ -19,22 +37,19 @@
|
|||
// * Prevent weird theme override
|
||||
span {
|
||||
font-size: calc(0.9rem + 0.1vw) !important;
|
||||
@include media(">phone") {
|
||||
@include min-width($mobile) {
|
||||
font-size: calc(0.9rem + 0.1vw) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@include media(">phone") {
|
||||
max-width: 80%;
|
||||
@include min-width($mobile) {
|
||||
// * Prevent weird theme override
|
||||
font-size: calc(0.9rem + 0.1vw) !important;
|
||||
}
|
||||
@include media(">tablet") {
|
||||
@include min-width($tablet) {
|
||||
flex-direction: row;
|
||||
max-width: 70%;
|
||||
}
|
||||
@include media(">desktop") {
|
||||
max-width: 50%;
|
||||
@include min-width($desktop) {
|
||||
}
|
||||
|
||||
button {
|
||||
|
|
@ -44,15 +59,15 @@
|
|||
padding: 0.8rem 0.6rem;
|
||||
border-width: 0.1rem;
|
||||
border-radius: 1rem;
|
||||
@include media(">phone") {
|
||||
@include min-width($mobile) {
|
||||
// * Prevent weird theme override
|
||||
font-size: calc(0.9rem + 0.1vw) !important;
|
||||
}
|
||||
@include media(">tablet") {
|
||||
@include min-width($tablet) {
|
||||
// * Prevent weird theme override
|
||||
font-size: calc(0.9rem - 0.1vw) !important;
|
||||
}
|
||||
@include media(">desktop") {
|
||||
@include min-width($desktop) {
|
||||
// * Prevent weird theme override
|
||||
font-size: 0.9rem !important;
|
||||
}
|
||||
|
|
@ -65,7 +80,7 @@
|
|||
color: #e11c1b;
|
||||
font-weight: bold;
|
||||
|
||||
@include media(">phone") {
|
||||
@include min-width($mobile) {
|
||||
margin-bottom: initial;
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue