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
| <style> | |
| /* ---------------------------------------------- /* | |
| * Mouse animate icon | |
| /* ---------------------------------------------- */ | |
| .mouse-icon { | |
| border: 2px solid #000; | |
| border-radius: 16px; | |
| height: 40px; | |
| width: 24px; | |
| display: block; |
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
| /*========== Desktop First Method ==========*/ | |
| /* Large Devices, Wide Screens */ | |
| @media only screen and (max-width : 1200px) { | |
| } | |
| /* Medium Devices, Desktops */ | |
| @media only screen and (max-width : 992px) { |
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
| sass/ | |
| | | |
| |– base/ | |
| | |– _reset.scss # Reset/normalize | |
| | |– _typography.scss # Typography rules | |
| | ... # Etc… | |
| | | |
| |– components/ | |
| | |– _buttons.scss # Buttons | |
| | |– _carousel.scss # Carousel |
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 | |
| $custom_fields = get_post_custom($post->ID); | |
| foreach ( $custom_fields as $field_key => $field_values ) { | |
| if(!isset($field_values[0])) continue; | |
| if(in_array($field_key,array("_edit_lock", "_edit_last", "_thumbnail_id"))) continue; | |
| echo "<strong>$field_key:</strong> $field_values[0] <br>"; | |
| } |
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 gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| minifycss = require('gulp-minify-css'), | |
| jshint = require('gulp-jshint'), | |
| uglify = require('gulp-uglify'), | |
| rename = require('gulp-rename'), | |
| clean = require('gulp-clean'), | |
| concat = require('gulp-concat'), | |
| notify = require('gulp-notify'), |
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) header и footer перемещаем в отдельные файлы header.php и footer.php | |
| на их местах в index.php вставляем команды: | |
| <?php get_header();?> // подключаем header | |
| <?php get_footer();?> // подкючаем footer | |
| 2) в header.php после всех стилей добавляем функцию <?php wp_head();?>. В footer.php после всех скриптов добавляем <?php wp_footer();?> | |
| 3) ко всем локальным путям добавляем функцию по образцу: | |
| <link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/css/main.css"> | |
| <script src="<?php echo get_template_directory_uri();?>/js/main.js"></script> | |
| <img src="<?php echo get_template_directory_uri();?>/img/photo.jpg" alt="my-photo"> | |
| 4) удалить admin bar. В файл functions.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
| { | |
| "name": "foo", | |
| "version": "1.0.0", | |
| "description": "foo project", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "npm run serve | npm run watch-css", | |
| "serve": "./node_modules/.bin/http-server -p 8080", | |
| "build-css": "./node_modules/node-sass/bin/node-sass app/sass/style.scss -o app/css/ && ./node_modules/postcss-cli/bin/postcss --use autoprefixer app/css/style.css -d app/css/", | |
| "watch-css": "nodemon -e scss -x 'npm run build-css'" |
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
| 'use strict'; | |
| // Требует node.js и пакета mkdirp | |
| // Пакет mkdirp: https://www.npmjs.com/package/mkdirp#install — установить глобально или прописать установку в package.json, в секции devDependencies | |
| // Использование: | |
| // - поместить этот файл в корень проекта | |
| // - исправить пути к генерируемым папкам и файлам, если блоки проекта лежат не в ./src/blocks/ | |
| // - в терминале, будучи в корневой папке проекта, выполнить node createBlock.js [имя блока] [доп. расширения через пробел] | |
| const fs = require('fs'); // будем работать с файловой системой |
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
| $(".scroll-next").click(function() { | |
| var cls = $(this).closest(".section").next().offset().top; | |
| $("html, body").animate({scrollTop: cls}, "slow"); | |
| }); |