Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updates

various files.
  • Loading branch information...
commit 8857e9be5b15e202e420ac31776e1759f0b517cc 1 parent 9f0dc2f
@krogsgard authored
View
79 happy-child/functions.php
@@ -0,0 +1,79 @@
+<?php
+
+/* Child theme setup function
+ *****************************
+ **************************
+ ***********************
+ *********************
+ */
+
+add_action( 'after_setup_theme', 'happychild_theme_setup', 11 );
+
+function happychild_theme_setup() {
+
+
+
+
+/* Add the search form to the secondary menu. Uncommenting this action will put a searchform at the end of the
+ * secondary menu
+ */
+
+ // add_action( "{$prefix}_close_menu_secondary", 'get_search_form' );
+
+/* To unregister sidebars currently in the parent theme, do so with the following action. Also remember to
+ * uncomment the corresponding function further down this functionsfile
+ */
+
+ // add_action( 'widgets_init', 'happy_unregister_sidebars', 11 );
+
+/* For sites that may require a page have its own custom stylesheet, such as a landing page or form page where main site styles
+ * are not wanted, enable the following feature, and then you can create stylesheet for custom pages
+ */
+
+ // add_theme_support( 'post-stylesheets' );
+
+/*
+ // add image sizes for this site
+ add_image_size( 'tiny', 80, 80, true );
+ add_image_size( 'wide-thumb', 220, 120, true );
+ add_image_size( 'feature', 940, 370, true );
+
+*/
+
+}
+
+/* End setup function. All functions go after this. Actions and filters should go above
+ ************************************************************************************
+ ***********************************************************************************
+ *********************************************************************************
+ *******************************************************************************
+ *****************************************************************************
+ ***************************************************************************
+ *************************************************************************
+ ***********************************************************************
+ *********************************************************************
+ * Start functions after this. All actions and filters should go above
+ */
+
+
+/**
+ * Adds custom image sizes for use
+ * typically with feature widget areas
+ * to add a custom image size, follow the method below
+ * make the names applicable to the application
+ *
+ */
+
+
+/**
+ * Unregisters some of the core framework sidebars that the theme doesn't use.
+ *
+ * @since 0.1.0
+ */
+
+function happy_unregister_sidebars() {
+ unregister_sidebar( 'header' );
+ unregister_sidebar( 'after-singular' );
+}
+
+
View
BIN  happy-child/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
16 happy-child/style.css
@@ -0,0 +1,16 @@
+/**
+ * Theme Name: Happy Sample Child
+ * Theme URI: http://happyloops.com
+ * Description: A child theme of the Happy parent theme.
+ * Version: 0.1
+ * Author: Brian Krogsgard
+ * Author URI: http://krogsgard.com
+ * Tags: theme-options, threaded-comments, microformats, translation-ready, rtl-language-support, one-column, two-columns, three-columns, fixed-width, custom-colors
+ * License: GNU General Public License v2.0
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.html
+ * Template: happy
+ */
+
+
+@import "../happy/style.css";
+
View
7 happy/functions.php
@@ -65,6 +65,10 @@ function happy_theme_setup() {
add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'link', 'quote', 'video' ) );
+ /* Register support for custom backgrounds */
+
+ add_theme_support( 'custom-background' );
+
/* Wraps <blockquote> around quote posts. */
add_filter( 'the_content', 'happy_quote_content' );
@@ -186,12 +190,11 @@ function happy_scripts() {
$protocol = is_ssl() ? 'https' : 'http';
- wp_enqueue_style( 'happy-fonts', "$protocol://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic", array(), null );
+ wp_enqueue_style( 'happy-fonts', "$protocol://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic", array(), null );
}
-
/**
* Registers new sidebars for the theme.
*
View
73 happy/includes/custom-header.php
@@ -22,7 +22,7 @@
function happy_custom_header_setup() {
$args = array(
// Text color and image (empty to use none).
- 'default-text-color' => '444',
+ 'header-text' => false,
'default-image' => '',
// Set height and width, with a maximum value for the width.
@@ -39,7 +39,7 @@ function happy_custom_header_setup() {
// Callbacks for styling the header and the admin preview.
'wp-head-callback' => 'happy_header_style',
- 'admin-head-callback' => 'happy_admin_header_style',
+ 'admin-head-callback' => '',
'admin-preview-callback' => 'happy_admin_header_image',
);
@@ -48,46 +48,6 @@ function happy_custom_header_setup() {
add_action( 'after_setup_theme', 'happy_custom_header_setup' );
/**
- * Styles the header text displayed on the blog.
- *
- * get_header_textcolor() options: 444 is default, hide text (returns 'blank'), or any hex value.
- *
- * @since Twenty Twelve 1.0
- */
-function happy_header_style() {
- $text_color = get_header_textcolor();
-
- // If no custom options for text are set, let's bail
- if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) )
- return;
-
- // If we get this far, we have custom styles.
- ?>
- <style type="text/css">
- <?php
- // Has the text been hidden?
- if ( ! display_header_text() ) :
- ?>
- .site-title,
- .site-description {
- position: absolute !important;
- clip: rect(1px 1px 1px 1px); /* IE7 */
- clip: rect(1px, 1px, 1px, 1px);
- }
- <?php
- // If the user has set a custom color for the text, use that.
- else :
- ?>
- .site-title a,
- .site-description {
- color: #<?php echo $text_color; ?> !important;
- }
- <?php endif; ?>
- </style>
- <?php
-}
-
-/**
* Styles the header image displayed on the Appearance > Header admin panel.
*
* @since Twenty Twelve 1.0
@@ -98,27 +58,6 @@ function happy_admin_header_style() {
.appearance_page_custom-header #headimg {
border: none;
}
- #headimg h1,
- #headimg h2 {
- line-height: 1.6;
- margin: 0;
- padding: 0;
- }
- #headimg h1 {
- font-size: 30px;
- }
- #headimg h1 a {
- color: #515151;
- text-decoration: none;
- }
- #headimg h1 a:hover {
- color: #21759b;
- }
- #headimg h2 {
- color: #777;
- font: normal 13px/1.8 "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", sans-serif;
- margin-bottom: 24px;
- }
#headimg img {
max-width: <?php echo get_theme_support( 'custom-header', 'max-width' ); ?>px;
}
@@ -135,14 +74,6 @@ function happy_admin_header_style() {
function happy_admin_header_image() {
?>
<div id="headimg">
- <?php
- if ( ! display_header_text() )
- $style = ' style="display:none;"';
- else
- $style = ' style="color:#' . get_header_textcolor() . ';"';
- ?>
- <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
- <h2 id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
View
6 happy/searchform.php
@@ -8,13 +8,11 @@
* @subpackage Template
*/
?>
- <div class="search">
+ <div class="s">
- <form method="get" class="search-form" action="<?php echo trailingslashit( esc_url( home_url( '/' ) ) ); ?>">
- <div>
+ <form method="get" class="searchform" action="<?php echo trailingslashit( esc_url( home_url( '/' ) ) ); ?>">
<input class="search-text" type="text" name="s" value="<?php if ( is_search() ) echo esc_attr( get_search_query() ); else esc_attr_e( 'Search this site...', 'happy' ); ?>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
<input class="search-submit button" name="submit" type="submit" value="<?php esc_attr_e( 'Search', 'happy' ); ?>" />
- </div>
</form><!-- .search-form -->
</div><!-- .search -->
View
28 happy/style.css
@@ -21,4 +21,32 @@
position: relative;
bottom: 0;
left: 45%;
+}
+
+.pa-image {
+ float: left;
+ margin-bottom: 8px;
+ margin-bottom: .5rem;
+}
+.pa-copy {
+ float: left;
+ width: 92px;
+ width: 5.75rem;
+ font-size: 11px;
+ font-size: .6875rem;
+ margin-bottom: 8px;
+ margin-bottom: .5rem;
+ font-weight: normal;
+ color: #666;
+ text-decoration: none;
+ margin-left: 7px;
+ margin-left: .4375rem;
+}
+
+.pa-id {
+ font-size: 11px;
+ font-size: .6875rem;
+ color: #666;
+ text-decoration: none;
+ clear: both;
}
View
179 happy/style.dev.css
@@ -88,7 +88,7 @@ body {
margin: 0;
padding: 2% 0 0 0;
background: #f5f5f5;
- font-family: 'Ubuntu', sans-serif;
+ font-family: 'Source Sans Pro', sans-serif;
color:#444;
}
@@ -96,7 +96,7 @@ body {
width: 71.25em;
margin: 0 auto;
background: #fff;
- box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.27);
}
.wrap {
overflow: hidden;
@@ -200,8 +200,8 @@ del {
hr {
border: 0;
width: 100%;
- color: #bbb1a4;
- background-color: #bbb1a4;
+ color: #ddd;
+ background-color: #ddd;
height: 1px;
}
@@ -219,17 +219,19 @@ a:hover {
/* set link styles for various places */
.entry-content a,
+.entry-summary a,
.byline a,
.entry-meta a,
.sidebar a {
- color: #004466;
+ color: #3388bb;
}
.entry-content a:hover,
+.entry-summary a:hover,
.byline a:hover,
.entry-meta a:hover,
.sidebar a:hover {
- color: #3388bb;
+ color: #004466;
text-decoration: underline;
}
@@ -423,6 +425,10 @@ input[type="text"] {
display: block;
}
+fieldset {
+ border: none;
+}
+
textarea {
display: block;
}
@@ -570,12 +576,13 @@ video {
/* buttons - originally from the twentytwelve theme */
.button,
.menu-toggle,
-input[type="submit"] {
+input[type="submit"],
+.pagination .page-numbers {
padding: 6px 10px;
- padding: 0.428571429rem 0.714285714rem;
- font-size: 11px;
- font-size: 0.785714286rem;
- line-height: 1.428571429;
+ padding: 0.375rem 0.625rem;
+ font-size: 12px;
+ font-size: 0.75rem;
+ line-height: 1.5
font-weight: normal;
color: #7c7c7c;
background-color: #e6e6e6;
@@ -598,6 +605,7 @@ input[type="submit"] {
.button:hover
.menu-toggle:hover,
+.pagination a:hover,
input[type="submit"]:hover {
color: #5e5e5e;
background-color: #ebebeb;
@@ -613,6 +621,7 @@ input[type="submit"]:hover {
.menu-toggle:active,
.menu-toggle.toggled-on,
input[type="submit"]:active,
+.pagination .current,
input[type="submit"].toggled-on {
color: #777;
background-color: #e1e1e1;
@@ -624,6 +633,68 @@ input[type="submit"].toggled-on {
background-image: linear-gradient(top, #ebebeb, #e1e1e1);
box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4;
border: none;
+}
+
+/* Search form */
+.s {
+ float: left;
+ width: 13em;
+ margin:0 1.5em 0 0;
+}
+
+.searchform label,
+.search-form label {
+ float: left;
+}
+.searchform input[type="text"],
+.search-form input[type="text"] { /* default WP (or Hybrid Core) search class */
+ clear: both;
+ float: left;
+ width: 65%;
+ height: 32px;
+ height: 2rem;
+ margin:0;
+ padding: 6px 10px;
+ padding: 0.375rem 0.625rem;
+ font-size: 12px;
+ font-size: 0.75rem;
+ color: #aaa;
+ border: 1px solid #dfdfdf;
+ border-top-left-radius: 15px;
+ border-bottom-left-radius: 15px;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+
+.searchform input[type="text"]:focus,
+.search-form input[type="text"]:focus { /* default WP (or Hybrid Core) search class */
+ color: #999;
+ background: #fefefe;
+ border-color: #cfcfcf;
+ height: 32px;
+ height: 2rem;
+ padding: 6px 10px;
+ padding: 0.375rem 0.625rem;
+ border-top-left-radius: 15px;
+ border-bottom-left-radius: 15px;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+ border: 1px solid #dfdfdf;
+}
+
+.searchform input[type="submit"],
+.search-form input[type="submit"] {
+ float:left;
+ border-left: none;
+ height: 32px;
+ height: 2rem;
+ padding: 6px 10px;
+ padding: 0.375rem 0.625rem;
+ border-top-left-radius: 0px;
+ border-bottom-left-radius: 0px;
+ border-top-right-radius: 15px;
+ border-bottom-right-radius: 15px;
+ margin: 0;
}
/* #main */
@@ -786,8 +857,8 @@ http://qrayg.com/experiment/cssmenus/
float: left;
display: block;
text-decoration: none;
- padding: 16px;
- padding: 1rem;
+ padding: 16px 24px;
+ padding: 1rem 1.5rem;
height: 1%;
}
@@ -888,38 +959,7 @@ http://qrayg.com/experiment/cssmenus/
.main-small-secondary-navigation .menu > ul {
margin: 0 auto;
padding: 0;
-}
-
-
-
-/* Search form */
-div.search {
- float: left;
- width: 10em;
- margin:0 1.5em 0 0;
-}
-
-.search-form input[type="text"] {
- width: 99%;
- margin:0.25em 0 0;
- padding: 0.25em 0 0.25em 1em;
- font-size: 0.75em;
- color: #aaa;
- border: 1px solid #dfdfdf;
-}
-
-.search-form input[type="text"]:focus {
- color: #999;
- background: #fefefe;
- border-color: #cfcfcf;
- padding: 0.25em 0 0.25 1em;
-}
-
-.search-form input[type="submit"] {
-}
-
-
-
+}
/* end-header */
@@ -1027,8 +1067,8 @@ http://qrayg.com/experiment/cssmenus/
float: left;
display: block;
text-decoration: none;
- padding: 16px;
- padding: 1rem;
+ padding: 16px 24px;
+ padding: 1rem 1.5rem;
height: 1%;
}
@@ -1102,9 +1142,18 @@ http://qrayg.com/experiment/cssmenus/
#content {
width: 70%; /* standard 720px width */
- margin: 0;
- padding: 0;
- background: none;
+ margin: 0;
+}
+
+.layout-default .hfeed,
+.layout-2c-l .hfeed { /* increase the margin on the actual page content */
+ margin: 16px 0 16px 24px;
+ margin: 1rem 0 1rem 1.5rem;
+}
+
+.layout-2c-r .hfeed { /* increase the margin on the actual page content */
+ margin: 16px 24px 16px 0;
+ margin: 1rem 1.5rem 1rem 0;
}
.page-template-front-page #content {
@@ -1119,7 +1168,6 @@ http://qrayg.com/experiment/cssmenus/
}
.singular .hentry {
margin: 0;
- padding: 0;
}
.blog .hfeed .hentry,
@@ -1142,6 +1190,17 @@ http://qrayg.com/experiment/cssmenus/
*/
margin: 0 0 0.5em 1em;
}
+
+.format-gallery.hentry .thumbnail {
+ border: 4px solid #fff;
+ box-shadow:
+ 0 0 0 1px #ccc,
+ 5px 5px 0 0 #fff,
+ 5px 5px 0 1px #ccc,
+ 10px 10px 0 0 #fff,
+ 10px 10px 0 1px #ccc;
+ margin: 0 0 1em 1em;
+}
.sticky .thumbnail {
}
@@ -1239,7 +1298,7 @@ http://qrayg.com/experiment/cssmenus/
.pagination .page-numbers {
display: inline-block;
- padding: 0.5em 0.75em;
+ padding: 0.25em 0.75em;
margin: 0 0.75em 0 0;
}
.pagination a.page-numbers {
@@ -1500,8 +1559,8 @@ http://qrayg.com/experiment/cssmenus/
float: left;
display: block;
text-decoration: none;
- padding: 16px;
- padding: 1rem;
+ padding: 16px 24px;
+ padding: 1rem 1.5rem;
height: 1%;
}
@@ -1522,8 +1581,7 @@ http://qrayg.com/experiment/cssmenus/
}
#sidebar-subsidiary .wrap {
- padding: 16px;
- padding: 1rem;
+ padding: 1.5em;
border-top: 1px solid #ddd;
}
@@ -1741,13 +1799,15 @@ http://qrayg.com/experiment/cssmenus/
@media (min-width: 45.5em) and (max-width: 71.24999999em) {
- #container { width: 98%; }
+ #container,
+ #footer .wrap { width: 98%; }
}
@media (min-width: 30em) and (max-width: 45.49999em) {
- #container { width: 98%; }
+ #container,
+ #footer .wrap { width: 98%; }
#content,
.layout-1c #content,
@@ -1804,7 +1864,8 @@ http://qrayg.com/experiment/cssmenus/
@media (min-width: 1em) and (max-width: 29.9999em) {
- #container { width: 98%; }
+ #container,
+ #footer .wrap { width: 98%; }
#main .wrap {
padding: 1em .5em;
Please sign in to comment.
Something went wrong with that request. Please try again.