Skip to content

Instantly share code, notes, and snippets.

'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'); // будем работать с файловой системой
const webpack = require('webpack');
path = require('path');
const HtmlWebPackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: './src/index.js',
output: {
path: __dirname + '/dist',
filename: 'main.js'
webpack = require('webpack');
path = require('path');
const HtmlWebPackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: './src/index.js',
output: {
path: __dirname + '/dist',
$(document).ready(function(){
var toggle = 1;
$(".backstage-working-process-btn").click(function(){
toggle++;
if ( (toggle%2)==0){
$('.backstage-working-process-btn').css( {'transform': 'rotate(180deg)'});
$(".backstage-working-process").fadeIn(1000, function(){});
}
else{
$('.backstage-working-process-btn').css({'transform': 'rotate(0deg)'});
<?php
include 'safemysql.class.php';
$db = new safeMysql();
//выполняем запрос и получаем данные для вывода
// $sql = "SELECT * FROM shortmd";
// $data = $db->getAll("SELECT * FROM shortmd");
if (isset($_POST['personal'])) {
echo 'isset';
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Шаблон</title>
</head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<!-- Greeter.vue -->
<template lang="pug">
div Hello, {{ name }}!
</template>
<script>
export default {
props: ['name'],
};
$( "#l2" ).mouseover(function() {
var state;
if(state === false) {
$('#bg-1').attr('src', 'video-bg/Mp4/Huppa.mp4');
$('#bg-2').attr('src', 'video-bg/Webm/Huppa.webm');
$("video")[1].load();
state = true;
}
});
<?php
if (!empty($_POST["phone_form"])) {
$name_form = $_POST['name_form'];
$phone_form = $_POST['phone_form'];
$msg_form = $_POST['msg_form'];
$subject = "Заявка с сайта 77 из формы";
$message .= "Имя: {$name_form}</p>";
$message .= "<p>Телефон: {$phone_form}</p>";
$message .= "<p>Сообщение: {$msg_form}</p>";
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
less = require('gulp-less'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
cssmin = require('gulp-minify-css'),
imagemin = require('gulp-imagemin'),
pngquant = require('imagemin-pngquant'),