Skip to content

Instantly share code, notes, and snippets.

View Padilo300's full-sized avatar
🏠
Working from home

Konstantin Padilo300

🏠
Working from home
View GitHub Profile
@Padilo300
Padilo300 / CSS
Created December 6, 2017 16:18
JavaScript Date (Работа с датами || расписание на js || график два через два)
#calendarMainWrap{
width: 950px;
outline: 2px solid #000;
background-color: #fff;
padding: 3px 5px;
}
.month{
width: 100%;
text-align: center;
}
@Padilo300
Padilo300 / _media-queries.scss
Created December 11, 2017 10:10 — forked from anthonyshort/_media-queries.scss
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@Padilo300
Padilo300 / _variables.sass
Created December 11, 2017 10:24 — forked from sioniks/_variables.sass
media sass
// standart project
$information-large-devise: "only screen and (max-width : 1600px)"
$information-medium-devise: "only screen and (max-width : 1200px)"
$information-small-devise: "only screen and (max-width : 992px)"
$information-esmall-devise: "only screen and (max-width : 768px)"
$information-custom-devise: "all and (max-width : 480px)"
$landscape: "screen and (max-width: 992px)"
//mobile first
$landscape2: "only screen and (max-width: 720px) and (orientation: landscape)"
@Padilo300
Padilo300 / html
Last active January 29, 2018 14:16
Показать нужный select в зависимости какой выбор был сделан
<select id="Dest" class="Validate_Required " name="Dest" aria-required="true" onChange="Selected(this)">
<option value="0" selected="selected">-</option>
<option value="1">Компьютеры и периферийное оборудование</option>
<option value="2">Корпоративный портал и электронная почта</option>
<option value="3">Оборудование для мероприятий</option>
</select>
<div id='Label1' style='display: none;'>
Перечисляешь "Компьютеры и периферийное оборудование"
@Padilo300
Padilo300 / PHP вычислить возраст по дате рождения.
Created January 29, 2018 14:14
PHP вычислить возраст по дате рождения.
function calculate_age($birthday) {
$birthday_timestamp = strtotime($birthday);
$age = date('Y') - date('Y', $birthday_timestamp);
if (date('md', $birthday_timestamp) > date('md')) {
$age--;
}
return $age;
}
//вызов функции
@Padilo300
Padilo300 / Убрать родные стили жёлтого фона при автозаполнении "input".
Created January 31, 2018 13:01
Chrome ебаный. Убрать родные стили жёлтого фона при автозаполнении формы , именно "input". Стили прописать в сам input прям в html. (В коментариях просить прощения, за css в нутри html!.)
<input type="text" name="email" placeholder="введите email" value="" style="
-webkit-text-fill-color: #ссс;
-webkit-box-shadow: 0 0 0px 1000px transparent inset;
transition: background-color 5000s ease-in-out 1s;
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(0,174,255,0.04) 50%,rgba(255,255,255,0) 51%,rgba(0,174,255,0.03) 100%);
">
@Padilo300
Padilo300 / Анимированные шестерни
Created February 7, 2018 16:43
анимированные шестерни css
body {
background: #000;
}
i {
display: block;
position: absolute;
width: 30px;
height: 30px;
top: 30px;
@Padilo300
Padilo300 / Экспорт html таблицы в XLS файл index.html
Last active February 18, 2018 10:55 — forked from insin/index.html
Экспорт html таблицы в XLS файл
<!DOCTYPE html>
<html>
<head>
<title>tableToExcel Demo</title>
<script src="tableToExcel.js"></script>
</head>
<body>
<h1>tableToExcel Demo</h1>
<p>Exporting the W3C Example Table</p>
@Padilo300
Padilo300 / Плавная прокрутка на якорь
Created February 14, 2018 10:28
Плавная прокрутка на якорь
$(document).ready(function() {
$("a.scrollto").click(function() {
var elementClick = $(this).attr("href")
var destination = $(elementClick).offset().top;
jQuery("html:not(:animated),body:not(:animated)").animate({
scrollTop: destination
}, 800);
return false;
});
});
@Padilo300
Padilo300 / CSS прокрутка вверх
Created February 19, 2018 20:11
Кнопка прокрутки страницы вверх.
.text-block {
width: 250px;
margin: 50px;
}
#go-top {
position: fixed;
bottom: 25px;
right: 70px;
text-align: center;