Pug - это препроцессор HTML и шаблонизатор, который был написан на JavaScript для Node.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
| const mix = require('laravel-mix'); | |
| const path = require('path'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Mix Asset Management | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Mix provides a clean, fluent API for defining some Webpack build steps | |
| | for your Laravel application. By default, we are compiling the Sass | |
| | file for the application as well as bundling up all the JS files. |
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 | |
| // Previous month | |
| return Model::where('created_at', '>=', Carbon::now()->startOfMonth()->subMonth()) | |
| ->where('created_at', '<=', Carbon::now()->startOfMonth()->subMonth()->endOfMonth()) | |
| ->get(); | |
| // Current Month | |
| return Model::where('created_at', '>=', Carbon::now()->startOfMonth() |
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
| //* Remove first image from single post | |
| function remove_first_image ($content) { | |
| if (!is_page() && !is_feed() && !is_home()){ | |
| $content = preg_replace("/<img[^>]+\>/i", "", $content, 1); | |
| } return $content; | |
| } | |
| add_filter('the_content', 'remove_first_image'); |
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 | |
| if ( have_posts() ) : // если имеются записи в блоге. | |
| query_posts('cat=3'); // указываем ID рубрик, которые необходимо вывести. | |
| while (have_posts()) : the_post(); // запускаем цикл обхода материалов блога | |
| ?> | |
| <?php the_post_thumbnail(array(100, 100)); ?> | |
| <? endwhile; // завершаем цикл. | |
| endif; | |
| /* Сбрасываем настройки цикла. Если ниже по коду будет идти еще один цикл, чтобы не было сбоя. */ | |
| wp_reset_query(); |
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
| /* Small Devices, Tablets */ | |
| @media only screen and (max-width : 768px) { | |
| .animated { | |
| /*CSS transitions*/ | |
| -o-transition-property: none !important; | |
| -moz-transition-property: none !important; | |
| -ms-transition-property: none !important; | |
| -webkit-transition-property: none !important; | |
| transition-property: none !important; | |
| /*CSS transforms*/ |