liftux / wp-primer-theme Goto Github PK
View Code? Open in Web Editor NEWA modern WordPress theme based on Underscores.
A modern WordPress theme based on Underscores.
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
We should look into updating dependencies like Grunt, BrowserSync as they are a couple of years old
When people have made changes to the CSS they have either:
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)
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.
Need to be able to modify the heading output.
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' );```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.