Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Created January 10, 2017 20:07
Show Gist options
  • Save danielpataki/cbea8009110a48b5021725c0cd0ae323 to your computer and use it in GitHub Desktop.
Save danielpataki/cbea8009110a48b5021725c0cd0ae323 to your computer and use it in GitHub Desktop.
Simple theme for customizer project
<?php
add_action( 'wp_enqueue_scripts', 'cd_assets' );
function cd_assets() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700' );
}
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'after_setup_theme', 'cd_setup' );
function cd_setup() {
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
}
<!DOCTYPE html>
<html>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body>
<?php wp_head() ?>
<?php get_header() ?>
<div id="container">
<div id="intro">
<h1><?php bloginfo( 'site_title' ) ?></h1>
<h2><?php bloginfo( 'description' ) ?></h2>
<a href="" class='button'>Come On In</a>
</div>
</div>
<?php get_footer() ?>
/*
Theme Name: Customizer Demo
Theme URI: http://danielpataki.com
Description: An example theme that shows how the theme customizer works
Author: Daniel Pataki
Author URI: http://danielpataki.com
Version: 1.0.0
*/
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body,html {
height:100%;
font-family: Source Sans Pro
}
body {
background: #43C6E4;
}
#container {
height:100%;
display: flex;
align-items: center;
}
#intro {
width:400px;
margin:0 auto;
background: #fff;
border-radius:22px;
padding:33px;
text-align: center;
box-shadow:1px 1px 1px 0px rgba(0,0,0,0.1)
}
#intro h1 {
font-size:44px;
font-weight:700;
}
#intro h2 {
color: #aaa;
font-style: italic;
}
#intro .button {
background: #D23F35;
border-radius: 4px;
color:#fff;
display: inline-block;
padding:11px 22px;
text-decoration: none;
margin-top:22px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment