Skip to content

Commit af21db1

Browse files
committed
Merge - Fix #35
2 parents 8f63504 + 6327156 commit af21db1

File tree

6 files changed

+156
-47
lines changed

6 files changed

+156
-47
lines changed

assets/style/config/_colors.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$primary: #e9af4d;
1+
$primary: #32C3EF;
22
$lightgrey: #efefef;
33
$grey: #999;
44
$darkgrey: #333;

assets/style/config/_type.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
@import url(http://fonts.googleapis.com/css?family=Source+Serif+Pro:400,600,700);
2-
31
$serif: 'Source Serif Pro';
4-
$sans: 'Lato';
2+
$sans: 'Open Sans';

assets/style/style.scss

+70-10
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,38 @@ a.button,
4141
a.button:visited,
4242
input[type='submit'] {
4343
background: $primary;
44-
color: $darkgrey;
44+
border: 3px solid white;
45+
color: white;
46+
font-family: $sans;
4547

4648
&:hover {
4749
background: darken($primary, 10%);
4850
color: $darkgrey;
4951
}
5052
}
5153

52-
.site-header {
53-
background-image: url('assets/images/header.jpg');
54-
background-repeat: no-repeat;
55-
background-size: cover;
56-
background-position: center 60%;
54+
a.fl-button,
55+
.fl-builder-content a.fl-button {
56+
57+
&,
58+
&:visited{
59+
background-color: $primary;
60+
border: 3px solid white;
61+
color: white;
62+
font-family: $sans;
63+
border-radius: 0;
64+
}
65+
66+
&:hover{
67+
background-color: darken($primary,10%);
68+
}
69+
}
70+
a.fl-button *,
71+
a.fl-button:visited *,
72+
.fl-builder-content a.fl-button *,
73+
.fl-builder-content a.fl-button:visited * {
74+
color: white;
75+
border-radius: 0;
5776
}
5877

5978
.site-logo {
@@ -65,14 +84,16 @@ input[type='submit'] {
6584
}
6685

6786
.site-title{
87+
margin-bottom: 0;
88+
6889
a {
6990
color: #fff;
7091
line-height: .8;
7192
font-weight: 800;
72-
font-size: 1.2em;
93+
font-size: 1em;
94+
line-height: 1;
7395
margin: 0;
7496
padding: 0;
75-
text-transform: uppercase;
7697
transition: 200ms opacity linear;
7798

7899
&:hover{
@@ -85,14 +106,51 @@ input[type='submit'] {
85106
.site-description {
86107
color: #fff;
87108
color: rgba(#fff,.8);
88-
font-size: 1.3em;
109+
font-size: 1.1em;
89110
font-weight: 500;
111+
font-family: $sans;
90112
}
91113

92114
.main-navigation-container {
93115
background: transparent;
94116
}
95117

118+
h1,h2,h3,h4,h5,h6{
119+
font-weight: 700;
120+
letter-spacing: -.02em;
121+
}
122+
123+
h1{
124+
font-size: 2.4em;
125+
}
126+
127+
h2{
128+
font-size: 1.3em;
129+
}
130+
131+
h3{
132+
font-size: 1.2em;
133+
}
134+
135+
h4{
136+
font-size: 1.1em;
137+
margin-bottom: 1em;
138+
font-weight: bold;
139+
}
140+
141+
h5{
142+
font-size: 1.1em;
143+
text-transform: uppercase;
144+
margin-bottom: 1em;
145+
font-weight: bold;
146+
}
147+
148+
h6{
149+
font-size: 1em;
150+
margin-bottom: 0;
151+
font-weight: bold;
152+
}
153+
96154
.main-navigation {
97155
background: #fff;
98156
background: linear-gradient( to bottom, rgba(#fff,.8), #fff );
@@ -102,9 +160,11 @@ input[type='submit'] {
102160

103161
a {
104162
color: $darkgrey;
105-
font-weight: 800;
163+
font-weight: 700;
106164
text-transform: uppercase;
107165
font-family: $sans;
166+
font-size: 14px;
167+
padding: 20px 10px;
108168
}
109169

110170
&:hover,

functions.php

+16-32
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,23 @@
44
* Enqueues child theme stylesheet, loading first the parent theme stylesheet.
55
*/
66
function enqueue_child_theme_styles() {
7+
78
wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' );
89
wp_enqueue_style( 'praise-fonts', praise_fonts_url() );
9-
}
10-
11-
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles' );
12-
13-
require_once get_template_directory() . '/inc/colorcase.php';
10+
wp_dequeue_style( 'rock' );
1411

15-
// Custom Header
16-
$args = array(
17-
'flex-width' => true,
18-
'width' => 0,
19-
'flex-height' => true,
20-
'height' => 250,
21-
'default-image' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',
22-
);
12+
}
2313

24-
add_theme_support( 'custom-header', $args );
14+
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', 5 );
2515

26-
function praise_custom_header() {
27-
?>
28-
<style type="text/css" id="custom-header-css">
29-
.site-header { background-image: url('<?php header_image() ?>'); }
30-
</style>
31-
<?php
32-
}
16+
require_once get_stylesheet_directory() . '/inc/custom-header.php';
3317

34-
add_action( 'wp_head', 'praise_custom_header' );
18+
require_once get_template_directory() . '/inc/colorcase.php';
3519

3620
/**
3721
* Returns the Google font stylesheet URL, if available.
3822
*
39-
* The use of Work Sans and Martel by default is localized. For languages
23+
* The use of Open Sans and Source Serif Pro by default is localized. For languages
4024
* that use characters not supported by the font, the font can be disabled.
4125
*
4226
* @return string $fonts_url Font stylesheet or empty string if disabled.
@@ -45,25 +29,25 @@ function praise_fonts_url() {
4529
$fonts_url = '';
4630

4731
/* Translators: If there are characters in your language that are not
48-
* supported by Work Sans, translate this to 'off'. Do not translate
32+
* supported by Open Sans, translate this to 'off'. Do not translate
4933
* into your own language.
5034
*/
51-
$work_sans = _x( 'on', 'Work Sans font: on or off', 'rock' );
35+
$open_sans = _x( 'on', 'Open Sans font: on or off', 'rock' );
5236

5337
/* Translators: If there are characters in your language that are not
54-
* supported by Martel, translate this to 'off'. Do not translate into your
38+
* supported by Source Serif Pro, translate this to 'off'. Do not translate into your
5539
* own language.
5640
*/
57-
$martel = _x( 'on', 'Martel font: on or off', 'rock' );
41+
$source_serif_pro = _x( 'on', 'Source Serif Pro font: on or off', 'rock' );
5842

59-
if ( 'off' !== $work_sans || 'off' !== $martel ) {
43+
if ( 'off' !== $open_sans || 'off' !== $source_serif_pro ) {
6044
$font_families = array();
6145

62-
if ( 'off' !== $work_sans )
63-
$font_families[] = 'Work Sans:400,700,800';
46+
if ( 'off' !== $open_sans )
47+
$font_families[] = 'Open Sans:400,500,700,800';
6448

65-
if ( 'off' !== $martel )
66-
$font_families[] = 'Martel:400,200,300,600,700,800,900';
49+
if ( 'off' !== $source_serif_pro )
50+
$font_families[] = 'Source Serif Pro:400,700';
6751

6852
$query_args = array(
6953
'family' => urlencode( implode( '|', $font_families ) ),

inc/custom-header.php

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/**
3+
* Sample implementation of the Custom Header feature
4+
* http://codex.wordpress.org/Custom_Headers
5+
*
6+
* @package praise
7+
*/
8+
9+
/**
10+
* Setup the WordPress core custom header feature.
11+
*
12+
* @uses praise_header_style()
13+
* @uses praise_admin_header_style()
14+
* @uses praise_admin_header_image()
15+
*/
16+
function praise_custom_header_setup() {
17+
add_theme_support( 'custom-header', apply_filters( 'praise_custom_header_args', array(
18+
'default-image' => get_stylesheet_directory_uri() . '/assets/images/header.jpg',
19+
'default-text-color' => 'ffffff',
20+
'width' => 1500,
21+
'height' => 300,
22+
'flex-height' => true,
23+
'wp-head-callback' => 'praise_header_style'
24+
) ) );
25+
}
26+
add_action( 'after_setup_theme', 'praise_custom_header_setup' );
27+
28+
if ( ! function_exists( 'praise_header_style' ) ) :
29+
/**
30+
* Styles the header image and text displayed on the blog
31+
*
32+
* @see praise_custom_header_setup().
33+
*/
34+
function praise_header_style() {
35+
36+
?>
37+
<style type="text/css" id="praise-header-image">
38+
.site-header{
39+
background-image: url("<?php header_image(); ?>");
40+
}
41+
42+
<?php if( get_header_image() === get_stylesheet_directory_uri() . '/assets/images/header.jpg' ){ ?>
43+
.site-header{
44+
background-size: cover;
45+
background-position: bottom center;
46+
}
47+
<?php } ?>
48+
</style>
49+
<?php
50+
51+
// If the header text option is untouched, let's bail.
52+
if ( display_header_text() ) {
53+
return;
54+
// If the header text has been hidden.
55+
} else {
56+
?>
57+
<style type="text/css" id="praise-header-css">
58+
.site-title,
59+
.site-description {
60+
clip: rect(1px, 1px, 1px, 1px);
61+
position: absolute;
62+
}
63+
</style>
64+
<?php
65+
}
66+
}
67+
endif; // praise_header_style

style.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)