This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- og --> | |
<meta property="og:title" content="[[*pagetitle]]"> | |
<meta property="og:site_name" content="[[++site_name]]"> | |
<meta property="og:url" content="[[!++site_url]][[!*uri]]"> | |
<meta property="og:description" content="[[*description]]"> | |
<meta property="og:type" content="website"> | |
<meta property="og:image" content="[[++template_path]]img/logo.png"> | |
<!-- og x--> | |
<!-- schema --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="pdopage"> | |
<div class="rows"> | |
[[!pdoPage? | |
&parents=`[[*id]]` | |
&element=`pdoResources` | |
&limit=`1` | |
&ajaxMode=`default` | |
&tpl=`resources` | |
&tplPageWrapper=`@INLINE | |
<nav aria-label="Page navigation example"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Микро слайдуля | |
var | |
step = 4, // Количество слайдов для показа | |
time = 4000, // Через какой время менять слайды | |
portfolio_slider = $('#portfolio_slider ._slider_elems'), //Слайдер | |
start = 0, //Текущий активный элемент | |
length = $('#portfolio_slider ._slider_elems > *').length //Количество слайдов | |
function portfolio_slider_function(){ | |
stop = start+step |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.header__menu a').each(function () { | |
var location = window.location.href; | |
var link = this.href; | |
var result = location.match(link); | |
if(result != null) { | |
$(this).addClass('menu__links--active'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<directoryBrowse enabled="false" /> | |
<defaultDocument> | |
<files> | |
<clear /> | |
<add value="index.php" /> | |
<add value="Default.htm" /> | |
<add value="Default.asp" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
switch($modx->event->name) { | |
# Добавление или удаление товара, расчёт полной цены | |
case 'OnSHKbeforeCartLoad': # Перед загрузкой корзины, чтобы отследить изменение количества товара, события далее их не могут уловить (: | |
case 'OnSHKaddProduct': # Добавление товара | |
case 'OnSHKAfterRemoveProduct': # Удаление товара | |
# Если пользователь залогинен | |
$modx->log('Чего то добавили'); | |
$iId = $modx->user->get('id'); | |
if ($iId > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://docs.modx.pro/komponentyi/msearch2/snippetyi/mfilter2 | |
// https://masonry.desandro.com/methods.html | |
$('#mse2_results').masonry({ | |
// options | |
itemSelector: '.item4', | |
singleMode: false, | |
percentPosition: true, | |
horizontalOrder: true | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Исправление подключения js для валидатора html | |
//Создаём новый плагин "validate_html_fix", подключаем обработчик события OnWebPagePrerender и далее код плагина | |
<?php | |
$content = &$modx->resource->_output; | |
$content = str_replace('type="text/javascript"','', $content); | |
$modx->Event->output($content); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*_____________________ VeryLazy ______________________*/ | |
function VeryLazy(){ | |
$(document).find('.home ._block').each(function(index, element){ | |
if ($(document).scrollTop() > $(this).offset().top - $(window).height()){ | |
$(this).addClass('active').find('img[data-src]').each(function() { | |
if ($('html').hasClass('webp') && $(this).data().webp) | |
$(this).attr('src', $(this).data().webp) | |
else | |
$(this).attr('src', $(this).data().src) | |
}) |