Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Last active December 28, 2016 03:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpataki/45645a0ec29d5668d2ab to your computer and use it in GitHub Desktop.
Save danielpataki/45645a0ec29d5668d2ab to your computer and use it in GitHub Desktop.
Christmas 2015 Post
#page:before {
margin:21px;
background-image: url("images/new_year_background.png");
position:fixed;
top:0px;
left:0px;
width:100%;
height:100%;
display:block;
content: " ";
opacity: 0.5
}
<?php
/*
Plugin Name: Christmas Awesome 2015
Version: 24.12.2105
Description: A compendium of Christmas Cheer for WordPress
Author: Daniel Pataki
Author URI: http://danielpataki.com
Plugin URI: http://danielpataki.com
Text Domain: christmas-awesome-2015
*/
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
/*
Theme Name: Twenty Sixteen Christmas Edition
Theme URI: http://danielpataki.com
Description: A small child theme for Twenty Sixteen bringing Christmas cheer to all
Author: Daniel Pataki
Author URI: http://danielpataki.com
Template: twentysixteen
Version: 24.12.2015
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentysixteen-chirstmas-edition
*/
if( get_the_time( 'n' ) == 12 && in_array( get_the_time( 'd' ), array( 24, 25 ) ) && !is_search() ) {
ch2015_santa_icon();
}
function ch2015_santa_icon() {
?>
<div class="santa">
<div class="circles"></div>
<div class="snow"></div>
<div class="hat">
<div class="hat-end"></div>
</div>
<div class="face">
<div class="eyes"></div>
<div class="mouth"></div>
</div>
<div class="dirty-overflow">
<div class="body"></div>
</div>
</div>
<?php
}
.santa {
background:#3ac6f4;
width:120px;
height:120px;
border-radius:50%;
position:relative;
top:50%;
margin-top:22px;
}
.santa .snow {
width: 2px;
height: 2px;
background: white;
border-radius: 50%;
position: absolute;
left: 18px;
top: 44px;
}
.santa .snow:after {
width: 6px;
height: 6px;
content: "";
display: inline-block;
background: white;
border-radius: 50%;
position: absolute;
top: -14px;
left: 0px;
}
.santa .snow:before {
width: 4px;
height: 4px;
content: "";
display: inline-block;
background: white;
border-radius: 50%;
position: absolute;
bottom: -12px;
left: -11px;
}
.santa .hat {
width: 64px;
height: 31px;
border-radius: 200px 200px 0 0;
background: #ef4753;
margin: 0 auto;
top: -11px;
position: relative;
left: 5px;
z-index:20;
}
.santa .hat:after {
width: 60px;
height: 15px;
border-radius: 20px;
content: "";
display: block;
background: white;
position: relative;
top: 22px;
left: -3px;
}
.santa .face {
width: 54px;
height: 57px;
background: white;
border-radius: 0px 0px 50px 50px;
margin: 0 auto;
position: relative;
z-index: 20;
top: -6px;
}
.santa .face .eyes {
background:#f1ddd5;
width:45px;
height:15px;
margin:0 auto;
position:relative;
left:-1px;
text-align: center;
top:4px;
padding-top: 0px;
}
.santa .face .eyes:after, righteye {
width: 8px;
height: 6px;
background: transparent;
box-shadow: 0px -2px #793623;
content: "";
display:inline-block;
margin:0 auto;
border-radius: 50%;
}
.santa .face .eyes:before, lefteye {
width: 8px;
height: 6px;
background: transparent;
box-shadow: 0px -2px #793623;
content: "";
display:inline-block;
margin:0 auto;
border-radius: 50%;
margin-right:5px;
}
.santa .mouth {
background:#a31f2b;
border-radius:50%;
width:6px;
height:6px;
position:absolute;
bottom:20px;
right:17px;
}
.santa .body {
width: 93px;
height: 84px;
background: #ef4753;
border-radius: 90px 90px 0px 0px;
position: absolute;
bottom: 0;
right: 0;
left: 0;
margin: 0 auto;
text-align:center;
z-index:10;
}
.santa .body:after {
width: 5px;
height: 5px;
background: white;
border-radius: 50%;
display: inline-block;
position: absolute;
top: 68px;
z-index: 50;
content: "";
left: 0;
right: 0;
margin: 0 auto;
}
.santa .body:before {
width: 5px;
height: 5px;
background: white;
border-radius: 50%;
display: inline-block;
position: absolute;
top: 55px;
z-index: 50;
content: "";
left: 0;
right: 0;
margin: 0 auto;
}
.santa .hat .hat-end {
width: 13px;
height: 32px;
content: "";
background: #ef4753;
display: inline-block;
position: absolute;
right: 0px;
top: 15px;
border-radius: 0px 11px 0px 0px;
}
.santa .hat .hat-end:after {
width: 15px;
height: 15px;
border-radius: 50%;
background: white;
content: "";
display: inline-block;
top: 30px;
position: absolute;
left: 0px;
z-index: 11;
}
.circles {
background: #a31f2b;
height: 60px;
width: 60px;
border-radius: 50%;
z-index: 9;
position: absolute;
right: -6px;
top: 12px;
}
.circles:after {
background:white;
width:40px;
height:40px;
right:0;
top:50px;
content:"";
border-radius:50%;
}
.dirty-overflow {
overflow: hidden;
width: 120px;
height: 76px;
border-radius: 0px 0px 105px 105px;
position: absolute;
left: 0;
bottom: 0;
}
.christmas-footer{
padding:255px 0 44px 0;
text-align: center;
}
.scene {
width: 150px;
height: 76px;
margin: 0 auto;
position:relative;
z-index: 0;
}
.home_base {
position:absolute;
bottom: 0px;
background-color: #d75f3d;
width:125px;
left:14px;
height: 40px;
}
.triangle {
left: 8px;
position:absolute;
width: 0px;
height: 0px;
border-left: 18px solid transparent;
border-right: 18px solid transparent;
border-bottom: 36px solid #ffffff;
}
.parallelogram {
left: 34px;
position:absolute;
width: 102px;
height: 36px;
-webkit-transform: skew(26deg);
-moz-transform: skew(26deg);
-o-transform: skew(26deg);
background-color: #ffffff;
}
.door {
background-color: #742e1a;
z-index: 1;
width: 15px; height: 25px;
position: absolute;
bottom: 0px; left:65px;
}
.window_one {
background-color: #f9eb32;
z-index: 1;
width: 15px; height: 15px;
position: absolute;
bottom: 10px; left:32px;
-webkit-animation: light 1.8s linear;
-webkit-animation-iteration-count: infinite;
}
.window_two {
background-color: #f9eb32;
z-index: 1;
width: 15px; height: 15px;
position: absolute;
bottom: 10px; left:95px;
-webkit-animation: light 1.4s linear;
-webkit-animation-iteration-count: infinite;
-moz-animation: light 1.4s linear;
-moz-animation-iteration-count: infinite;
-ms-animation: light 1.4s linear;
-ms-animation-iteration-count: infinite;
animation: light 1.4s linear;
animation-iteration-count: infinite;
}
.christmas_tree {
right: -20px;
position:absolute;
bottom: 0px;
width: 0px;
height: 0px;
border-left: 25px solid transparent;
border-right: 25px solid transparent;
border-bottom: 70px solid #639da8;
}
.mountain_one {
position:absolute;
bottom: 0;
z-index: -1;
width: 0px;
height: 0px;
border-left: 160px solid transparent;
border-right: 160px solid transparent;
border-bottom: 220px solid #75b7c3;
}
.sub_mountain_one {
position:absolute;
top: 0px;
left:-30px;
z-index: -1;
width: 0px;
height: 0px;
border-left: 30px solid transparent;
border-right: 30px solid transparent;
border-bottom: 40px solid #eee;
}
.sub_mountain_two {
position:absolute;
top: 0px;
left:-20px;
z-index: -1;
width: 0px;
height: 0px;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 40px solid #eee;
}
.mountain_two {
position:absolute;
left: -175px;
bottom: 0;
z-index: -1;
width: 0px;
height: 0px;
border-left: 160px solid transparent;
border-right: 160px solid transparent;
border-bottom: 330px solid #75b7c3;
}
.fireplace {
background-color: #d75f3d;
z-index: 1;
width: 15px; height: 25px;
position: absolute;
top: -10px; right:30px;
}
.fireplace_top {
background-color: #ffffff;
z-index: 1;
width: 20px; height: 5px;
position: absolute;
top: -15px; right:28px;
}
@-webkit-keyframes light {
0% {background-color: #f9eb32;}
70% {background-color: #f9ac32;}
10% {background-color: #f99032;}
}
@-moz-keyframes light {
0% {background-color: #f9eb32;}
70% {background-color: #f9ac32;}
10% {background-color: #f99032;}
}
@-ms-keyframes light {
0% {background-color: #f9eb32;}
70% {background-color: #f9ac32;}
10% {background-color: #f99032;}
}
.christmas-from {
color:#639da8;
font-weight:300;
font-size:20px;
}
.christmas-message {
padding:5px;
color:#639da8;
font-weight:300;
font-size:55px;
padding-top:20px;
}
<div class="christmas-footer">
<div class="scene">
<div class="fireplace">&nbsp;</div>
<div class="fireplace_top">&nbsp;</div>
<div class="triangle">&nbsp;</div>
<div class="parallelogram">&nbsp;</div>
<div class="door">&nbsp;</div>
<div class="window_one">&nbsp;</div>
<div class="window_two">&nbsp;</div>
<div class="home_base">&nbsp;</div>
<div class="christmas_tree"></div>
<div class="christmas_tree" style="left:-140px;"></div>
<div class="mountain_one"><div class="sub_mountain_one">&nbsp;</div></div>
<div class="mountain_two"><div class="sub_mountain_two">&nbsp;</div></div>
</div>
<div class='christmas-message'>Merry Christmas</div>
<a href="https://premium.wpmudev.org/blog" class='christmas-from'>From the WPMU DEV</a>
</div>
body {
background-image: url('images/snow-1.png'), url('images/snow-2.png'), url('images/snow-3.png');
-webkit-animation: snow 20s linear infinite;
-moz-animation: snow 20s linear infinite;
-ms-animation: snow 20s linear infinite;
animation: snow 20s linear infinite;
}
@keyframes snow {
0% {background-position: 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}
@-moz-keyframes snow {
0% {background-position: 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}
@-webkit-keyframes snow {
0% {background-position: 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}
@-ms-keyframes snow {
0% {background-position: 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment