Skip to content

Instantly share code, notes, and snippets.

View webdiller's full-sized avatar

Eugene Butkov webdiller

View GitHub Profile
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
width: 100% !important;
@webdiller
webdiller / jsconfig.json
Last active October 17, 2020 03:11
Установка корневой папки
{
"compilerOptions": {
"baseUrl": "src"
}
}
@webdiller
webdiller / .prettierrc
Last active April 14, 2021 02:31
Дефолтный prettierrc
{
"arrowParens": "avoid",
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": true,
"jsxSingleQuote": false,
"printWidth": 300,
"proseWrap": "preserve",
@webdiller
webdiller / gist:559cd6515f3a8ea98a1709220999847b
Created November 10, 2019 12:17
wordpress register_post_type
add_action( 'init', 'register_post_types' );
function register_post_types(){
register_post_type('films', array(
'label' => null,
'labels' => array(
'name' => 'Фильмы', // основное название для типа записи
'singular_name' => 'Фильм', // название для одной записи этого типа
'add_new' => 'Добавить фильм', // для добавления новой записи
'add_new_item' => 'Добавление фильма', // заголовка у вновь создаваемой записи в админ-панели.
'edit_item' => 'Редактирование фильма', // для редактирования типа записи
@webdiller
webdiller / gist:44f08310f01abbd4e64b219578bfc8b3
Created September 30, 2019 13:18
Disable e symbol on input:number
onkeydown="javascript: return event.keyCode == 69 ? false : true"
@webdiller
webdiller / disable-arrows.css
Created September 30, 2019 13:16
Disable arrows for input:number
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
input[type=number] {
-moz-appearance:textfield; /* Firefox */
}
@webdiller
webdiller / material-box-shadow-1.sass
Last active September 30, 2019 13:16
material box-shadow snippets
@mixin bxs()
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)
transition: all 0.3s cubic-bezier(.25,.8,.25,1)
&:hover
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)
@mixin bxs2()
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)
@mixin bxs3()
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<ul>
<li><a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-vk" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-google" aria-hidden="true"></i></a></li>
</ul>