Browse Source

Fix buttons and custom colours.

pull/11/head
Ned Zimmerman 7 years ago
parent
commit
95c48fb7e6
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 10
      app/admin.php
  2. 28
      app/setup.php
  3. 8
      resources/assets/styles/common/_global.scss

10
app/admin.php

@ -14,10 +14,6 @@ add_action('customize_register', function (\WP_Customize_Manager $wp_customize)
bloginfo('name');
}
]);
$wp_customize->add_section('pb_network_colors', [
'title' => __('Color Scheme', 'aldine'),
'priority' => 20,
]);
$wp_customize->add_setting('pb_network_primary_color', [
'type' => 'option',
'default' => '#b01109',
@ -27,7 +23,8 @@ add_action('customize_register', function (\WP_Customize_Manager $wp_customize)
'pb_network_primary_color',
[
'label' => __('Primary Color', 'aldine'),
'section' => 'pb_network_colors',
'section' => 'colors',
'description' => __('Used for links and primary elements.', 'aldine'),
'settings' => 'pb_network_primary_color',
]
));
@ -40,7 +37,8 @@ add_action('customize_register', function (\WP_Customize_Manager $wp_customize)
'pb_network_secondary_color',
[
'label' => __('Secondary Color', 'aldine'),
'section' => 'pb_network_colors',
'section' => 'colors',
'description' => __('Used for secondary elements.', 'aldine'),
'settings' => 'pb_network_secondary_color',
]
));

28
app/setup.php

@ -204,15 +204,15 @@ add_action('wp_head', function () {
.button.button-primary.button-outline {
color: <?= $primary ?>;
}
.button.button-primary:hover,
.button.button-primary:focus {
.button.button-primary.button-outline:hover,
.button.button-primary.button-outline:focus {
background: <?= $primary ?>;
}
@media (min-width: 960px) {
.home .main > .block-2,
.home .one-two + .block {
border-color: <?= $primary ?>;
}
.home .blocks.blocks-2 .widget_text:nth-child(2) {
border-color: <?= $primary ?>;
}
.home .blocks.blocks-4 .widget_text:nth-child(3) {
border-color: <?= $primary ?>;
}
<?php }
if ($secondary) { ?>
@ -232,17 +232,21 @@ if ($secondary) { ?>
.button.button-secondary.button-outline {
color: <?= $secondary ?>;
}
.button.button-secondary:hover,
.button.button-secondary:focus {
.button.button-secondary.button-outline:hover,
.button.button-secondary.button-outline:focus {
background: <?= $secondary ?>;
}
.home .block h3::before {
.home .widget h3::before,
.home .latest-books h3::before {
background-color: <?= $secondary ?>;
}
.home .one-two .block-2 {
.home .blocks.blocks-4 .widget_text:nth-child(2) {
background: <?= $secondary ?>;
}
<?php } ?>
.home .blocks.blocks-4 .widget_text:nth-child(2) .button:hover, .home .blocks.blocks-4 .widget_text:nth-child(2) .button:focus {
color: <?= $secondary ?>;
}
<?php } ?>
</style>
<?php }
});

8
resources/assets/styles/common/_global.scss

@ -46,6 +46,10 @@ a {
background-color: $brand-primary;
}
.b--primary {
border-color: $brand-primary;
}
.secondary {
color: $brand-secondary;
}
@ -54,10 +58,6 @@ a {
background-color: $brand-secondary;
}
.b--primary {
border-color: $brand-primary;
}
.b--secondary {
border-color: $brand-secondary;
}

Loading…
Cancel
Save