Skip to content

Instantly share code, notes, and snippets.

View madeas's full-sized avatar

Madeas Studio madeas

View GitHub Profile
@madeas
madeas / textarea-autosize.css
Last active May 22, 2018 12:09
textarea autosize on css+js
.custom-css-textarea {
width: 100%;
min-height: 150px;
box-sizing: border-box;
/* box-sizing: padding-box; */
overflow:hidden;
/* stylization */
padding:5px;
}
@madeas
madeas / alignment.min.css
Last active April 9, 2018 06:46
chatemplate/alignment.min.css
/*!
* alignment.min.css - https://gist.github.com/madeas/99085531e003d0fa02152f03f7b9df0d
* Version - 1.0.3
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*
* Copyright (c) 2018 Andrej Sharapov
*
* Normalizing styles have been helped along thanks to the fine work of
* Andrej Sharapov https://madeas.ru/
*/
@madeas
madeas / layout
Last active April 19, 2018 13:50
fragment jsfiddle-layouts.css
<!-- jsfiddle-layouts.css -->
<div class="rec">
<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>
@madeas
madeas / layout active
Last active April 21, 2018 12:57
fragment jsfiddle-layouts.css
<!-- jsfiddle-layouts.css -->
<div class="rec">
<em>Recommended layout</em>
<div class="layout">
<label>
<input name="editor_mode" type="radio" value="grid_1">
<span class="gridMode active grid_1"></span>
Classic
</label>
</div>
@madeas
madeas / layout .invers
Created April 19, 2018 14:10
fragment jsfiddle-layouts.css
<!-- 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>
@madeas
madeas / feedback.html
Last active April 26, 2018 08:36
Feedback form
<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="[email protected]" x-autocompletetype="email">
</div>
<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="[email protected]">
</div>
<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="[email protected]">
<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) {
<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="[email protected]">