This file contains 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
1. Установка MODx. Плагины: Ace, Collections, pdoTools, FormIt, phpThumbOf, TinyMCE / CKEditor, translit, MIGX, AutoTemplate. | |
Настройки: | |
Раздел: Дружественные URL | |
Транслитерация псевдонимов: russian; | |
Использовать дружественные URL: Да; | |
Строгий режим дружественных URL: Да; | |
Проверять на дублирование URI во всех контекстах: Да; | |
Использовать вложенные URL: Да; | |
Не забудьте также переименовать ht.access в .htaccess в корне сайта. | |
Раздел: Панель управления |
This file contains 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 | |
/* | |
*Плагин для отображения страниц на поддоменах из основного контекста web. | |
*/ | |
if($modx->context->key == 'mgr' || $modx->context->key == 'web') {return;} | |
if ($modx->event->name == 'OnPageNotFound') { | |
$alias = $modx->context->getOption('request_param_alias', 'q'); | |
if (!isset($_REQUEST[$alias])) {return;} | |
$request = $_REQUEST[$alias]; | |
$tmp = explode('/', $request); // получаем ссылку |
This file contains 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
const scrollToTop = () => { | |
const c = document.documentElement.scrollTop || document.body.scrollTop; | |
if (c > 0) { | |
window.requestAnimationFrame(scrollToTop); | |
window.scrollTo(0, c - c / 8); | |
} | |
}; | |
scrollToTop(); |
This file contains 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
<fieldset> | |
<legend>Работа со временем</legend> | |
<p><input type="checkbox"> создание пунктуальности (никогда не будете никуда опаздывать);<Br> | |
<input type="checkbox"> излечение от пунктуальности (никогда никуда не будете торопиться);<Br> | |
<input type="checkbox"> изменение восприятия времени и часов.</p> | |
</fieldset> |
This file contains 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
data(){ | |
return { | |
mobile:window.innerWidth <= 700 | |
} | |
}, | |
created(){ | |
addEventListener('resize', () => { | |
this.mobile = innerWidth <= 700 | |
}) | |
} |
This file contains 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
<marquee behavior="alternate" direction="left" bgcolor="#ffcc00"> | |
Lorem ipsum dolor sit amet... | |
</marquee> |
This file contains 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
const worker = new Worker('worker.js'); // Создаем воркера | |
// Код воркера должен находиться в отдельном файле | |
worker.onmessage = e => { // запуск функции по событию от воркера и передача внутрь ивента | |
console.log("Received: " + e.data) // данные полученные из ивента хранятся в data | |
}; | |
document.addEventListener('click', function() { | |
console.log('event'); | |
worker.postMessage("hello"); // вызов метода из воркера и передача в него данных |
This file contains 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
# Ensure vue-cli is installed and up to date | |
npm i -g vue-cli | |
# Initialize a bootstrap project in the directory 'my-project' | |
vue init bootstrap-vue/webpack-simple my-project | |
# Change into the directory | |
cd my-project | |
# Install dependencies | |
npm i | |
# Fire up the dev server with HMR | |
npm run dev |
This file contains 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 | |
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'Theme General Settings', | |
'menu_title' => 'Website settings', | |
'menu_slug' => 'theme-general-settings', | |
'capability' => 'edit_posts', | |
'redirect' => false |
NewerOlder