Skip to content

Commit 94487d8

Browse files
author
Cosmin
authored
Merge pull request #8 from c0sm1n87/master
color schemes
2 parents 4bd1fd3 + 5712e14 commit 94487d8

File tree

5 files changed

+108
-88
lines changed

5 files changed

+108
-88
lines changed

footer.php

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,40 @@
44
*
55
* Contains the closing of the #content div and all content after.
66
*
7-
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
7+
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
88
*
99
* @package Shapely
1010
*/
1111

1212
?>
1313

14-
</div><!-- row -->
15-
</div><!-- #main -->
16-
</section><!-- section -->
17-
18-
<?php shapely_footer_callout(); ?>
19-
20-
<footer id="colophon" class="site-footer footer bg-dark" role="contentinfo">
21-
<div class="container footer-inner">
22-
<div class="row">
23-
<?php get_sidebar( 'footer' ); ?>
24-
</div>
25-
26-
<div class="row">
27-
<div class="site-info col-sm-6">
28-
<div class="copyright-text"><?php echo wp_kses_post(get_theme_mod( 'shapely_footer_copyright' )); ?></div>
29-
<div class="footer-credits"><?php shapely_footer_info(); ?></div>
30-
</div><!-- .site-info -->
31-
<div class="col-sm-6 text-right">
32-
<?php shapely_social_icons(); ?>
33-
</div>
34-
</div>
35-
</div>
36-
37-
<a class="btn btn-sm fade-half back-to-top inner-link" href="#top"><i class="fa fa-angle-up"></i></a>
38-
</footer><!-- #colophon -->
14+
</div><!-- row -->
15+
</div><!-- #main -->
16+
</section><!-- section -->
17+
18+
<?php shapely_footer_callout(); ?>
19+
20+
<footer id="colophon" class="site-footer footer bg-dark" role="contentinfo">
21+
<div class="container footer-inner">
22+
<div class="row">
23+
<?php get_sidebar( 'footer' ); ?>
24+
</div>
25+
26+
<div class="row">
27+
<div class="site-info col-sm-6">
28+
<div
29+
class="copyright-text"><?php echo wp_kses_post( get_theme_mod( 'shapely_footer_copyright' ) ); ?></div>
30+
<div class="footer-credits"><?php shapely_footer_info(); ?></div>
31+
</div><!-- .site-info -->
32+
<div class="col-sm-6 text-right">
33+
<?php shapely_social_icons(); ?>
34+
</div>
35+
</div>
36+
</div>
37+
38+
<a class="btn btn-sm fade-half back-to-top inner-link" href="#top"><i class="fa fa-angle-up"></i></a>
39+
</footer><!-- #colophon -->
40+
</div>
3941
</div><!-- #page -->
4042

4143
<?php wp_footer(); ?>

functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ function shapely_scripts() {
222222
//Add custom theme css
223223
wp_enqueue_style( 'shapely-style', get_stylesheet_uri() );
224224

225-
226225
wp_enqueue_script( 'shapely-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
227226

228227
wp_enqueue_script( 'shapely-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160115', true );

inc/customizer.php

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function shapely_customizer( $wp_customize ) {
109109
'sanitize_callback' => 'shapely_sanitize_checkbox',
110110
) );
111111

112-
if(class_exists('Epsilon_Control_Toggle')){
112+
if ( class_exists( 'Epsilon_Control_Toggle' ) ) {
113113
$wp_customize->add_control( new Epsilon_Control_Toggle(
114114
$wp_customize,
115115
'top_callout',
@@ -135,22 +135,22 @@ function shapely_customizer( $wp_customize ) {
135135
'sanitize_callback' => 'shapely_sanitize_checkbox',
136136
) );
137137

138-
if(class_exists('Epsilon_Control_Toggle')){
138+
if ( class_exists( 'Epsilon_Control_Toggle' ) ) {
139139
$wp_customize->add_control( new Epsilon_Control_Toggle(
140140
$wp_customize,
141141
'hide_post_title',
142142
array(
143-
'type' => 'mte-toggle',
144-
'label' => esc_html__( 'Title in blog post', 'shapely' ),
145-
'section' => 'wpseo_breadcrumbs_customizer_section',
143+
'type' => 'mte-toggle',
144+
'label' => esc_html__( 'Title in blog post', 'shapely' ),
145+
'section' => 'wpseo_breadcrumbs_customizer_section',
146146
)
147147
)
148148
);
149149
} else {
150150
$wp_customize->add_control( 'hide_post_title', array(
151-
'label' => esc_html__( 'Title in blog post', 'shapely' ),
152-
'section' => 'wpseo_breadcrumbs_customizer_section',
153-
'type' => 'checkbox',
151+
'label' => esc_html__( 'Title in blog post', 'shapely' ),
152+
'section' => 'wpseo_breadcrumbs_customizer_section',
153+
'type' => 'checkbox',
154154
) );
155155
}
156156

@@ -232,6 +232,66 @@ function shapely_customizer( $wp_customize ) {
232232
'section' => 'shapely_footer_section',
233233
) );
234234

235+
if ( class_exists( 'Epsilon_Control_Color_Scheme' ) ) {
236+
$wp_customize->add_setting( 'shapely_color_scheme',
237+
array(
238+
'sanitize_callback' => 'sanitize_text_field',
239+
'default' => 'default',
240+
'transport' => 'postMessage',
241+
) );
242+
243+
$wp_customize->add_control( new Epsilon_Control_Color_Scheme(
244+
$wp_customize,
245+
'shapely_color_scheme',
246+
array(
247+
'label' => esc_html__( 'Color scheme', 'newsmag-pro' ),
248+
'description' => esc_html__( 'Select a color scheme', 'newsmag-pro' ),
249+
'choices' => array(
250+
array(
251+
'id' => 'purple',
252+
'name' => 'Default',
253+
'colors' => array(
254+
'accent' => '#745cf9',
255+
'text' => '#666666',
256+
'content-widget-title' => '#0e1015',
257+
'footer-bg' => '#0e1015',
258+
'footer-widget-title' => '#ffffff',
259+
'footer-links' => '#ffffff'
260+
),
261+
),
262+
array(
263+
'id' => 'yellow',
264+
'name' => 'Yellow',
265+
'colors' => array(
266+
'accent' => '#FFC107',
267+
'text' => '#666666',
268+
'content-widget-title' => '#0e1015',
269+
'footer-bg' => '#0e1015',
270+
'footer-widget-title' => '#ffffff',
271+
'footer-links' => '#ffffff'
272+
),
273+
),
274+
array(
275+
'id' => 'green',
276+
'name' => 'Green',
277+
'colors' => array(
278+
'accent' => '#2ecc71',
279+
'text' => '#666666',
280+
'content-widget-title' => '#0e1015',
281+
'footer-bg' => '#0e1015',
282+
'footer-widget-title' => '#ffffff',
283+
'footer-links' => '#ffffff'
284+
),
285+
),
286+
),
287+
'priority' => 0,
288+
'default' => 'purple',
289+
'section' => 'colors',
290+
)
291+
)
292+
);
293+
}
294+
235295
}
236296

237297
add_action( 'customize_register', 'shapely_customizer' );
@@ -277,16 +337,6 @@ function shapely_sanitize_hexcolor( $color ) {
277337
return $color;
278338
}
279339

280-
281-
/**
282-
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
283-
*/
284-
function shapely_customize_preview_js() {
285-
wp_enqueue_script( 'shapely_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), false, true );
286-
}
287-
288-
add_action( 'customize_preview_init', 'shapely_customize_preview_js' );
289-
290340
/**
291341
* Add CSS for custom controls.
292342
*/

js/customizer.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

style.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,11 @@ a {
10471047
transition: all 0.3s ease;
10481048
-webkit-transition: all 0.3s ease;
10491049
-moz-transition: all 0.3s ease;
1050-
cursor: poitner;
1050+
cursor: pointer;
1051+
}
1052+
1053+
a:visited {
1054+
color: #745cf9;
10511055
}
10521056

10531057
.image-bg a {
@@ -2830,9 +2834,14 @@ iframe {
28302834
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
28312835
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
28322836
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
2837+
margin-bottom: 10px;
2838+
}
2839+
2840+
.cast-shadow.img-responsive {
2841+
margin: 10px auto;
28332842
}
28342843

2835-
/*!---------- 20. PORTOFLIO ----------*/
2844+
/*!---------- 20. PORTFOLIO ----------*/
28362845

28372846
.project {
28382847
transition: all 0.3s ease;
@@ -3173,6 +3182,6 @@ footer.bg-dark a {
31733182
left: 0 !important;
31743183
}
31753184

3176-
#secondary .customize-partial-edit-shortcut button, #secondary .widget .customize-partial-edit-shortcut button {
3185+
#colophon .customize-partial-edit-shortcut button, #colophon .widget .customize-partial-edit-shortcut button, #secondary .customize-partial-edit-shortcut button, #secondary .widget .customize-partial-edit-shortcut button {
31773186
left: -30px !important;
31783187
}

0 commit comments

Comments
 (0)