<input type="file" accept="image/*" capture name="documents[]" />
# PHPStorm
.idea
# WordPress
*.log
/wp-*.php
/index.php
/xmlrpc.php
/license.txt
/readme.html
/sitemap.xml
/sitemap.xml.gz
/backup*
wp-admin/
wp-includes/
wp-content/*
!wp-content/themes/
wp-content/themes/*
!wp-content/plugins/
wp-content/plugins/*
!wp-content/themes/ei/
!wp-content/themes/ei-child/
!wp-content/plugins/realty-export
# Frontend tools
wp-content/themes/ei-child/node_modules/
$header-grad
в rgba и плясать от него. Сафари любой прозрачный градиент воспринимает как 0% черного (или белого? не помню). Короче, если, например, хотим сделать исчезающий красный, то пишем так:elem {
background-image: linear-gradient(to bottom, rgba(255, 0, 0, 1), rgba(255, 0, 0, 0));
/* ниже ваш цвет */
background-image: linear-gradient(to bottom, rgba(55, 60, 70, 1), rgba(55, 60, 70, 0));
}
$g = new \Google\Authenticator\GoogleAuthenticator();
$secret = $g->generateSecret();
echo '<img src="https://chart.googleapis.com/chart?'
.'cht=qr&chl=otpauth://totp/mysite%3Fsecret%3D'
.$secret.'&chs=200x200&chld=L|0" />';
Значение $secret сохраняется в БД и привязано к конкретному юзеру.$g = new \Google\Authenticator\GoogleAuthenticator();
if ($g->checkCode($secret, $code)) {
echo 'Welcome!'
} else {
echo 'Wrong code';
}
Примеры кода приведены для библиотеки версии 1.0.2. const getSrc = img => img.getAttribute('src');
// или
const getSrc = img => img.attributes.src.value;
const relativeOnly = f => img => {
const src = getSrc(img);
if (!/^https?:\/\//.test(src)) {
f(img, src);
}
};
document.querySelectorAll('img').forEach(relativeOnly((img, src) =>
img.outerHTML = `
<picture>
<source srcset="${src}" type="image/svg+xml">
${img.outerHTML}
</picture>`
));
const wrapImages = relativeOnly((img, src) => {
const picture = document.createElement('picture');
const source = document.createElement('source');
source.srcset = src;
source.type = 'image/svg+xml';
img.replaceWith(picture);
picture.append(source, img);
});
for (const n of document.getElementsByTagName('img')) {
wrapImages(n);
}
// или
Array.prototype.forEach.call(document.images, wrapImages);
'use strict';
let gulp = require('gulp'),
//css
// stylus = require('gulp-stylus'),
sass = require('gulp-sass'),
autoprefixer = require("gulp-autoprefixer"),
sourcemaps = require('gulp-sourcemaps'),
wait = require('gulp-wait'),
notify = require("gulp-notify"),
plumber = require("gulp-plumber"),
browserSync = require('browser-sync').create(),
replace = require('gulp-replace');
let siteUrl = 'http://wc-estore.host1670806.hostland.pro/';
let siteDir = '../wc-estore/';
gulp.task("scss", function () {
return gulp.src(siteDir + 'assets/scss/my.scss')
// .pipe(plumber())
.pipe(sourcemaps.init())
.pipe(wait(500))
.pipe(sass({
outputStyle: 'expanded'
}).on('error', notify.onError(function (error) {
return 'An error occurred while compiling sass.\nLook in the console for details.\n' + error;
})))
.pipe(autoprefixer({
cascade: false
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(siteDir + 'assets/css/'))
.pipe(browserSync.reload({stream: true}))
.pipe(notify("Change css"));
});
gulp.task("watch", function () {
gulp.watch(siteDir + 'assets/scss/**/*.scss', gulp.series('scss'));
});
gulp.task('browser-sync', function () {
browserSync.init({
proxy: {
target: siteUrl,
ws: true
},
reloadDelay: 2000
});
gulp.watch(siteDir + "**/*.php").on('change', browserSync.reload);
gulp.watch(siteDir + "**/*.css").on('change', browserSync.reload);
gulp.watch(siteDir + "**/*.js").on('change', browserSync.reload);
});
gulp.task('default', gulp.parallel('watch', 'browser-sync'));
<div data-proportion-h="1" style="widht:200px;"></div><!-- Высота 200px -->
<div data-proportion-h="2" style="widht:200px;"></div><!-- Высота 400px -->
<div data-proportion-h="0.5" style="widht:200px;"></div><!-- Высота 100px -->