Giter Site home page Giter Site logo

wp-primer-theme's People

Contributors

christianc1 avatar fjarrett avatar fjarrett-godaddy avatar garand avatar tobeycodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-primer-theme's Issues

Add source maps

It's sometimes taking me a while to find where a particular style is affecting a class. If we add source maps I can see in the chrome dev tools which file and which line it is controlled on

Update dependencies

We should look into updating dependencies like Grunt, BrowserSync as they are a couple of years old

Load Zurb from Bower or NPM

When people have made changes to the CSS they have either:

  1. Overridden default variables
  2. Overridden style completely

This creates duplicate effort, you can change some styles in the correct place but since they were overwritten elsewhere already in the wrong way you have the then do it twice.

If we load Zurb as a dependency and only include CSS in the theme that has changed then it'll be easier to manage in the long run (less files, less code, etc)

Extend Readme with caching plugins suggestions

Can you suggest some caching plugins on the page?
eg: W3 Total Cache, ...

Important Things to Note:
We don't minify and concatenate JavaScript files. Why?
Because you shouldn't do this in themes you distribute. Let caching plugins handle it.

Default color scheme being overwritten by secondary color scheme

When "default" is selected, the "blue" color scheme is also loaded and overrides the default css.

 * Update colors
 *
 * @action primer_colors
 */
function activation_colors() {
    return array(
                array(
                    'name'    => 'header_textcolor',
                    'default' => '#fff',
                    'css'     => array(
                        '.side-masthead .site-description, .hero-widget, header .main-navigation-container .menu li a, .main-navigation-container .menu li.current-menu-item > a, .main-navigation-container .menu li.current-menu-item > a:hover, .side-masthead .site-title a, .side-masthead .site-title a:hover, .hero-widget h2.widget-title' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'background_color',
                    'default' => '#fff',
                ),
                array(
                    'name'    => 'header_backgroundcolor',
                    'label'   => __( 'Header Background Color', 'primer' ),
                    'default' => '#d24343',
                    'css'     => array(
                        '.side-masthead, header .main-navigation-container .menu li.menu-item-has-children:hover > ul, .main-navigation-container, .menu-main-menu-container, .main-navigation, .main-navigation .sub-menu' => array(
                            'background-color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'link_color',
                    'label'   => __( 'Link Color', 'primer' ),
                    'default' => '#3fba73',
                    'css'     => array(
                        'a, a:visited, .entry-footer a, .sticky .entry-title a:before, .footer-widget-area .footer-widget .widget a' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'main_text_color',
                    'label'   => __( 'Main Text Color', 'primer' ),
                    'default' => '#212121',
                    'css'     => array(
                        '.site-content, .site-content h1, .site-content h2, .site-content h3, .site-content h4, .site-content h5, .site-content h6, .site-content p, .site-content blockquote, legend' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'secondary_text_color',
                    'label'   => __( 'Secondary Text Color', 'primer' ),
                    'default' => '#999999',
                    'css'     => array(
                        '.side-masthead .social-menu a, .entry-meta li, .side-masthead .social-menu a:hover' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'button_color',
                    'label'   => __( 'Button Color', 'primer' ),
                    'default' => '#3fba73',
                    'css'     => array(
                        '.cta, button, a.button, a.button:visited, input[type="button"], input[type="reset"], input[type="submit"]:not(.search-submit), a.fl-button' => array(
                            'background-color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'w_text_color',
                    'label'   => __( 'Widget Text Color', 'primer' ),
                    'default' => '#c5c3c6',
                    'css'     => array(
                        '.footer-widget-area, .footer-widget .widget-title, .site-footer, .footer-widget-area .footer-widget .widget, .footer-widget-area .footer-widget .widget-title' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'w_background_color',
                    'label'   => __( 'Widget Background Color', 'primer' ),
                    'default' => '#303d4c',
                    'css'     => array(
                        '.site-footer' => array(
                            'background-color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'footer_textcolor',
                    'label'   => __( 'Footer Text Color', 'primer' ),
                    'default' => '#fff',
                    'css'     => array(
                        '.site-info-wrapper a, .site-info .social-menu a' => array(
                            'color' => '%1$s',
                        ),
                    ),
                ),
                array(
                    'name'    => 'footer_backgroundcolor',
                    'label'   => __( 'Footer Background Color', 'primer' ),
                    'default' => '#2c3845',
                    'css'     => array(
                        '.site-info-wrapper, .footer-nav, .site-info-wrapper' => array(
                            'background-color' => '%1$s',
                        ),
                    ),
                ),
            );
}
add_filter( 'primer_colors', 'activation_colors' );



/**
 *
 * Add custom color schemes for Activation theme.
 *
 */
function activation_color_schemes() {
    return array(
        'blue' => array(
            'label'  => esc_html__( 'Blue', 'activation' ),
            'colors' => array(
                'header_textcolor'         => '#ffffff',
                'header_backgroundcolor'   => '#00b0f1',
                'background_color'         => '#ffffff',
                'link_color'               => '#00B0F1',
                'main_text_color'          => '#202223',
                'secondary_text_color'     => '#ffffff',
                'button_color'             => '#97d321',
                'w_text_color'             => '#c5c3c6',
                'w_background_color'       => '#353535',
                'footer_textcolor'         => '#ffffff',
                'footer_backgroundcolor'   => '#212121',

            ),
        ),
    );
}
add_filter( 'primer_color_schemes', 'activation_color_schemes' );```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.