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
# Пример файла 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
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
<?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
<form id="form1" method="POST"> | |
<div class="form-row"> | |
<div class="col"> | |
<input type="hidden" name="formData" value="Заголовок формы"> | |
<input type="text" name="name" class="name form-control" placeholder="Представьтесь, пожалуйста"> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="recipient-mail" class="col-form-label">Ваш email:</label> | |
<input type="text" name="email" id="recipient-mail" class="email form-control" placeholder="example@mail.ru"> |
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
<script> | |
$(document).ready(function () { | |
$('form').submit(function () { | |
var formID = $(this).attr('id'); // Получение ID формы | |
var formNm = $('#' + formID); | |
$.ajax({ | |
type: 'POST', | |
url: 'feedback.php', // Обработчик формы отправки | |
data: formNm.serialize(), | |
success: function (data) { |
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
<form id="form1"> | |
<div class="form-row"> | |
<div class="col"> | |
<input type="hidden" name="formData" value="Заголовок формы"> | |
<input type="text" name="name" class="name form-control" placeholder="Представьтесь, пожалуйста"> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="recipient-mail" class="col-form-label">Ваш email:</label> | |
<input type="text" name="email" id="recipient-mail" class="email form-control" placeholder="example@mail.ru"> |
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
<form> | |
<div class="form-row"> | |
<div class="col"> | |
<input type="text" name="name" class="form-control" placeholder="Представьтесь, пожалуйста"> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="recipient-mail" class="col-form-label">Ваш email:</label> | |
<input type="email" name="email" id="recipient-mail" class="form-control" placeholder="example@mail.ru"> | |
</div> |
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
<form id="form5" method="POST" action="feedback.php"> | |
<div class="form-row"> | |
<div class="col"> | |
<input type="text" class="name form-control" name="name" required="required" placeholder="Представьтесь, пожалуйста" x-autocompletetype="name"> | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="recipient-mail" class="col-form-label">Ваш email:</label> | |
<input type="text" name="email" class="email form-control" id="recipient-mail" required="required" placeholder="example@mail.ru" x-autocompletetype="email"> | |
</div> |
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
<!-- jsfiddle-layouts.css --> | |
<div class="rec invers"> | |
<em>Recommended layout</em> | |
<div class="layout"> | |
<label> | |
<input name="editor_mode" type="radio" value="grid_4"> | |
<span class="gridMode grid_4"></span> | |
Right results | |
</label> | |
</div> |