This file contains 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 ($_SERVER["REQUEST_METHOD"] == "POST") { | |
if (isset($_POST['formData'])) {$formData = $_POST['formData'];} | |
if (isset($_POST['email'])) {$email = $_POST['email'];} | |
if (isset($_POST['name'])) {$name = $_POST['name'];} | |
if (isset($_POST['phone'])) {$phone = $_POST['phone'];} | |
if (isset($_POST['message'])) {$message = $_POST['message'];} | |
$to = "your@email.ru"; /*Укажите ваш адрес электронной почты*/ | |
$headers = "Content-type: text/plain; charset = utf-8"; | |
$subject = "$formData"; |
This file contains 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
User-agent: * | |
Host: website.ru | |
Sitemap: /sitemap.xml |
This file contains 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
# Пример файла robots.txt для настройки гипотетического сайта https://site.ru | |
User-agent: * | |
Disallow: /admin/ | |
Disallow: /plugins/ | |
Disallow: /search/ | |
Disallow: /cart/ | |
Disallow: */?s= | |
Disallow: *sort= | |
Disallow: *view= | |
Disallow: *utm= |
This file contains 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
class bootstrap_4_walker_nav_menu extends Walker_Nav_menu { | |
function start_lvl( &$output, $depth ){ // ul | |
$indent = str_repeat("\t",$depth); // indents the outputted HTML | |
$submenu = ($depth > 0) ? ' sub-menu' : ''; | |
$output .= "\n$indent<ul class=\"dropdown-menu$submenu depth_$depth\">\n"; | |
} | |
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ){ // li a span | |
This file contains 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
<nav class="navbar navbar-expand-md navbar-dark bg-dark"> | |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarDropdown" aria-controls="navbarDropdown" aria-expanded="false" aria-label="Toggle navigation"> | |
<span class="navbar-toggler-icon"></span> | |
</button> | |
<a class="navbar-brand" href="<?php echo esc_url( home_url('/') ); ?>"><?php bloginfo('name'); ?></a> | |
<div class="collapse navbar-collapse" id="navbarDropdown"> | |
<?php | |
wp_nav_menu( array( | |
'theme_location' => 'navbar', | |
'container' => false, |
This file contains 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
*, | |
::after, | |
::before { | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
html, | |
body { | |
height: 100%; |
This file contains 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
// !!! важен порядок положения параметров !!! | |
// все значения указываются без px | |
// Задаем стандартные js переменные canvas & element | |
const | |
canvas = document.getElementById('canvas'), // получаем указатель на холстрисования | |
elem = canvas.getContext('2d'); // получаем указатель на контекст | |
canvas.width = canvas.width; // очищение области - 1 вариант |
This file contains 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
Options All -ExecCGI -Indexes -Includes +FollowSymLinks | |
DirectoryIndex index.html | |
AddDefaultCharset utf-8 | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# RewriteCond %{HTTPS} !on | |
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] |
This file contains 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
User-agent: * | |
Host: website.ru | |
Sitemap: https://site.ru/sitemap.xml |
This file contains 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
<!doctype html> | |
<html lang='ru-RU' itemscope itemtype='http://schema.org/WebPage' prefix='og: http://ogp.me/ns#'> | |
<!-- <html lang='en-EN' itemscope itemtype='http://schema.org/WebPage' prefix='og: http://ogp.me/ns#'> --> | |
<head> | |
<meta charset='utf-8'> | |
<meta name='viewport' content='width=device-width, initial-scale=1, minimal-ui, shrink-to-fit=no' /> | |
<!-- <meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=10.0,minimal-ui"> --> | |
<meta name='description' content=''> |