Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<title>Title</title>
</head>
<body>
<header id="masthead" class="site-header" role="banner">
@mrHiker
mrHiker / view_design_on_html.html
Created September 14, 2017 09:38
view_design_on_html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body{
height: 2160px;
background-position: center;
background-repeat: no-repeat;
@mrHiker
mrHiker / numbers_with_nouns_in_Russian.php
Created September 12, 2017 16:15
php: Окончания русских существительных в зависимости от количества
<?
$f = get_field('floors',$id_active);
$f = $f % 100;
if ($f > 19) {
$f = $f % 10;
}
switch ($f) {
case 1: {
echo 'этаж';
@mrHiker
mrHiker / function.php
Created April 10, 2015 13:17
WordPress new sidebar (widget area)
function spotechnology_widgets_init() {
register_sidebar( array(
'name' => __( 'Основная колонка', 'spotechnology' ),
'id' => 'main-col-widget',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="hidden">',
'after_title' => '</h1>',
) );
@mrHiker
mrHiker / function.php
Created April 10, 2015 13:16
WordPress new sidebar (widget area)
function spotechnology_widgets_init() {
register_sidebar( array(
'name' => __( 'Основная колонка', 'spotechnology' ),
'id' => 'main-col-widget',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="hidden">',
'after_title' => '</h1>',
) );
@mrHiker
mrHiker / functions.php
Created April 10, 2015 13:12
Wordpress Custom Widget
// Additing Action hook widgets_init
add_action( 'widgets_init', 'buffercode_widget');
function buffercode_widget() {
register_widget( 'buffercode_widget_info' );
}
class buffercode_widget_info extends WP_Widget {
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});