Browse Source

Fix buttons and custom colours.

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

28
app/setup.php

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

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

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

Loading…
Cancel
Save