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
$(document).ready(function () { | |
let arA = document.querySelectorAll('a'); | |
arA.forEach(element => { | |
if (element.getAttribute('href') === '#') { | |
element.addEventListener('click', function (e) { | |
e.preventDefault(); | |
}); | |
} | |
}); |
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
// install | |
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f | |
// node node_modules/jpegtran-bin/lib/install.js | |
// node node_modules/gifsicle/lib/install.js | |
// node node_modules/zopflipng-bin/lib/install.js | |
// node node_modules/mozjpeg/lib/install.js | |
// node node_modules/giflossy/lib/install.js | |
// node node_modules/pngquant-bin/lib/install.js | |
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
.buorg { | |
background-color: rgba(0,0,0,1)!important; | |
color: white!important; | |
border-bottom: 1px solid white!important; | |
} | |
.buorg #buorgul { | |
background: #3266CC; | |
} |
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
/** | |
* Очистка хеша из url при перезагрузке: | |
*/ | |
var loc = window.location.href, | |
index = loc.indexOf('#'); | |
if (index > 0) { | |
window.location = loc.substring(0, index); | |
} |
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
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1); | |
function _Check404Error(){ | |
if (defined('ERROR_404') && ERROR_404 == 'Y') { | |
global $APPLICATION; | |
$APPLICATION->RestartBuffer(); | |
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/header.php'; | |
include $_SERVER['DOCUMENT_ROOT'] . '/404.php'; | |
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/footer.php'; | |
} | |
} |
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
//local/php_interface/init.php | |
AddEventHandler('main', 'OnEpilog', '_Check404Error', 1); | |
function _Check404Error(){ | |
if (defined('ERROR_404') && ERROR_404 == 'Y') { | |
global $APPLICATION; | |
$APPLICATION->RestartBuffer(); | |
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/header.php'; | |
include $_SERVER['DOCUMENT_ROOT'] . '/404.php'; | |
include $_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/footer.php'; | |
} |
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
В result_modifier.php шаблона вставляем: | |
<? | |
/** | |
* Находим предыдущий и следующий элемент портфолио. | |
*/ | |
// сортировку берем из параметров компонента | |
$arSort = array( | |
$arParams["SORT_BY1"] => $arParams["SORT_ORDER1"], | |
$arParams["SORT_BY2"] => $arParams["SORT_ORDER2"], |
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
<nav class="marketing-header__nav"> | |
<a href="#section-01" class="marketing-header__nav-item">btn</a> | |
<!-- /.marketing-header__nav-item --> | |
</nav> | |
<div id="section-01" class="productdev-unit"> | |
<div class="pellicle o-08"><a href="#section-01" class="pellicle__btn-down o-09">btn</a></div> |
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
<?php | |
$arSelect = array("ID", "NAME", "PREVIEW_PICTURE", "PREVIEW_TEXT", "DETAIL_TEXT", "PROPERTY_MAP_X", "PROPERTY_MAP_Y"); | |
$arFilter = array("IBLOCK_ID" => 11, "ACTIVE" => "Y"); | |
if (CModule::IncludeModule("iblock")) { | |
$res = CIBlockElement::GetList(array(), $arFilter, false, array("nPageSize" => 50), $arSelect); | |
while ($ob = $res->GetNextElement()) { | |
$arFields = $ob->GetFields(); | |
var_dump($arFields); | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Parcel Sandbox</title> | |
<meta charset="UTF-8" /> | |
<script | |
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" | |
crossorigin="anonymous" | |
></script> | |
<script src="https://unpkg.com/popper.js@1"></script> |