modules: [
'vue-yandex-maps/nuxt',
],
yandexMaps: {
apikey: '...',
},import { YandexMap, YandexMapDefaultSchemeLayer, YandexMapDefaultFeaturesLayer } from 'vue-yandex-maps'
import type { YMap, YMapMarkerProps, LngLat, LngLatBounds } from '@yandex/ymaps3-types'<YandexMap
:settings="{
location: {
center: [37.617644, 55.755819],
zoom: 9,
},
}"
width="100%"
height="500px"
>
<YandexMapDefaultSchemeLayer />
<YandexMapDefaultFeaturesLayer />
</YandexMap>import navigationCSS from '/node_modules/swiper/modules/navigation-element.css?url'
import scrollbarCSS from '/node_modules/swiper/modules/scrollbar-element.css?url'Object.assign(swiperMain, {
modules: [Navigation, Scrollbar, Thumbs],
injectStylesUrls: [
navigationCSS,
scrollbarCSS
]
})html {
&.overflow {
overflow: hidden;
margin-right: var(--scrollbar-width, 0);
}
}const getScrollbarWidth = function () {
const $scrollDiv = document.createElement('div');
$scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
document.body.appendChild($scrollDiv);
const scrollBarWidth = $scrollDiv.offsetWidth - $scrollDiv.clientWidth;
document.body.removeChild($scrollDiv);
return scrollBarWidth;
};const $html = $('html');
if ($html.is('.overflow')) {
$html.removeClass('overflow');
$html.css('--scrollbar-width', '');
} else {
$html.addClass('overflow');
$html.css('--scrollbar-width', `${getScrollbarWidth()}px`);
}function add_to_rss($query) {
if (is_admin()) {
return $query;
}
$include = array();
if ( $query->is_main_query() && is_feed() ) {
$posts = get_posts(array(
'post_type' => 'post',
'meta_query' => array(
array(
'key' => 'добавить_в_rss',
'value' => '1',
'compare' => '=',
),
),
));
foreach($posts as $post) {
$include[] = $post->ID;
}
$query->set('post__in', $include);
}
return $query;
}
add_filter( 'pre_get_posts', 'add_to_rss' );<?php
wp_register_style('fonts', 'https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700&subset=cyrillic', false, null);
wp_enqueue_style('fonts');
?>