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 | |
| // ключи только в нижнем регистре | |
| // если нет какой-то языковой версии, то просто удаляем из массива вместе с ключом | |
| return [ | |
| [ | |
| 'keys' => ['doclister', 'доклистер', 'doc lister', 'док листер', 'дитто', 'ditto', 'dito', 'дито'], | |
| 'doc_links' => [ | |
| 'ru' => '<a href="https://github.com/evocms-community/docs/tree/master/ru/04_%D0%9A%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D1%8B/DocLister">DocLister</a>', | |
| 'en' => '<a href="https://github.com/evocms-community/docs/tree/master/en/04_Extras/DocLister">DocLister</a>', |
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
| 1. Получаем хэш-код коммита, к которому хотим вернуться. | |
| 2. Заходим в папку репозитория и пишем в консоль: | |
| $ git reset --hard a3775a5485af0af20375cedf46112db5f813322a | |
| $ git push --force |
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
| console.warn('УДАЛИ МЕНЯ!'); | |
| ;(function () { | |
| var mySwipe = { | |
| inWork: false, | |
| xDown: null, | |
| yDown: null, | |
| xStart: null, | |
| yStart: null, | |
| event: null, | |
| currentDirection: null, |
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
| function declOfNum(number, titles) { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } | |
| use: | |
| declOfNum(count, ['найдена', 'найдено', 'найдены']); |
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
| export default function locationParams(specific = null, value = null) { | |
| let result = {}, | |
| loc = location.search.length ? location.search.slice(1).split('&') : null; | |
| if (loc) { | |
| loc.forEach(function (item) { | |
| item = item.split('='); | |
| if (item.length > 1 && item[0] && item[1]) result[item[0]] = item[1]; | |
| }); | |
| result = !value && specific && specific in result ? result[specific] : result; | |
| } |
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
| function locationParams(specific, value) { | |
| var result = {}, | |
| loc = location.search.length ? location.search.slice(1).split('&') : null; | |
| if (loc) { | |
| loc.forEach(function (item) { | |
| item = item.split('='); | |
| if (item.length > 1 && item[0] && item[1]) result[item[0]] = item[1]; | |
| }); | |
| result = !value && specific && specific in result ? result[specific] : result; | |
| } |