Giter Club home page Giter Club logo

godaddy-wordpress / primer Goto Github PK

View Code? Open in Web Editor NEW
134.0 23.0 36.0 16.72 MB

Primer is a powerful theme that brings clarity to your content in a fresh design. This is the parent for all themes in the GoDaddy Primer theme family.

Home Page: https://wordpress.org/themes/primer/

License: GNU General Public License v2.0

PHP 23.98% CSS 36.12% JavaScript 21.25% Makefile 0.35% HTML 2.16% Python 0.60% Shell 0.64% Latte 5.72% SCSS 9.18%
wordpress wordpress-theme godaddy wordpress-parent-theme

primer's Introduction

Primer

Contributors: godaddy, fjarrett, jonathanbardo, eherman24
Tags: custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, threaded-comments, three-columns, translation-ready, two-columns
Requires at least: 4.4
Tested up to: 5.4
Requires PHP: 5.6.0
Stable tag: 1.8.10
License: GPL-2.0
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Primer is a powerful theme that brings clarity to your content in a fresh design. This is the parent for all themes in the GoDaddy Primer theme family.

CircleCI License PHP >= 5.2 WordPress >= 4.4

Description

Features

  • Responsive Layout
  • Color Scheme Presets
  • Customize Colors
  • Customize Fonts
  • One, Two, and Three Column Layouts
  • Fixed & Fluid Widths
  • Header Image Widget Area
  • Social Links Menu
  • WooCommerce-Ready
  • Available in 29 Languages
  • RTL Language Support

Contributing

You can fork and contribute back to Primer by visiting our public repo on GitHub.

Installation

  1. In your admin panel, navigate to Appearance > Themes and click the Add New button.
  2. Type Primer in the search form and press the Enter key on your keyboard.
  3. Click the Activate button to begin using Primer on your website.
  4. In your admin panel, navigate to Appearance > Customize.
  5. Put the finishing touches on your website by adding a logo, header image, and custom colors.

Copyright

Primer WordPress theme, Copyright 2017 GoDaddy Operating Company, LLC. Primer is distributed under the terms of the GNU GPL.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Primer bundles the following third-party resources:

Genericons icon font, Copyright 2013 Automattic, Inc. License: GPL-2.0 (or later) Source: https://genericons.com/

Stock photography, WordPress.org License: Creative Commons Zero Source: https://wordpress.org/photos/photo/10461ffffc/

Changelog

1.8.10

1.8.9

  • New: Add Tested up to and Requires PHP headers to style.css @props evanherman
  • Fix: Fixed mobile pagination visibility. @props evanherman
  • Fix: Fixed the hero image on WooCommerce templates. @props evanherman
  • Tweak: Update node dependencies. @props evanherman
  • Tweak: Update PHP linting for improved coding standards. @props jrtashjian/evanherman
  • Tweak: Migrated build process to CircleCI. @props evanherman

1.8.8

  • Fix: Repaired the undefined $ error thrown in assets/js/admin/layouts.js breaking the block editor. @props evanherman
  • Remove: Unnecessary console.log() from assets/js/admin/editor-frame.js. @props evanherman

1.8.7

  • New: Introduce compatibility for Google Accelerated Mobile Pages. @props westonruter
  • Tweak: Introduce editor styles for Coblocks Form block. @props richtabor
  • Tweak: Introduce ability to add fullwidth alignment to blocks. @props richtabor

1.8.6

  • Tweak: Adjust shorthand array syntax to ensure backwards compatibility with PHP < 5.6. @props evanherman

1.8.5

  • New: Introduce styles for Gutenberg compatibility. @props evanherman
  • Tweak: Update navigation script to fix left side menu item click bug. @props evanherman

1.8.4

  • New: Introduce accessibility controls & styles for tab navigation through the main nav. @props evanherman
  • Tweak: Add default value of 1 to theme_mod use_featured_hero_image. @props evanherman

1.8.3

  • New: Introduce a privacy policy link in the footer, when set. @props evanherman
  • New: Introduce primer_privacy_policy_link filter to enable/disable the privacy policy link in footer. @props evanherman
  • New: Add styles for privacy policy link and cookie comment checkbox & label. @props evanherman
  • New: Add font previews to the customizer when selecting a font. @props evanherman
  • Tweak: Update primer_wc_shop_columns() to reference the shop page ID. @props evanherman

1.8.2

  • Fix: Comment counts showing an extra character. @props evanherman
  • Fix: Bump WooCommerce pagination template to 3.3.1. @props evanherman
  • Fix: WooCommerce pagination padding. @props evanherman

1.8.1

  • Fix: Prevent customizer title & tagline colors from updating when they are hidden. @props evanherman
  • Fix: Update translation files so translations load correctly. @props evanherman
  • Fix: Remove HTML markup in search results/author archive page titles. @props evanherman

1.8.0

  • New: Conditionally wrap site titles to improve SEO. @props evanherman, fjarrett
  • New: Added sr_RS (Serbian) translation. @props lukapaunovic
  • Fix: Remove reference to a missing search.svg icon. @props evanherman
  • Fix: Adjust site title width to prevent overlapping with the mobile menu button. @props evanherman
  • Fix: Conditionally load video header for WordPress 4.7 or later. @props evanherman, fjarrett
  • Fix: Added a missing @version docblock to the WooCommerce pagination template to prevent out of date template notices. @props evanherman
  • Fix: Backward compatibility issue when using Beaver Builder on PHP 5.3. @props evanherman, fjarrett
  • Fix: Fixed the tertiary sidebar visibility. @props evanherman, fjarrett

1.7.0

  • New: Enabled video headers and introduced styles to accommodate full width video headers. @props evanherman
  • New: Introduced new primer_pre_hero action. @props evanherman
  • New: Added aria labels on the 'Continue Reading' links for a11y improvements. @props evanherman
  • New: Introduced primer_wc_product_header_image filter. @props evanherman
  • Tweak: Improved WooCommerce styles. @props evanherman
  • Tweak: Tweak i18n functions, added translator comments. @props evanherman
  • Tweak: Introduced Ninja Form response message styles. @props evanherman
  • Fix: Ensure color schemes work with custom Primer child themes. @props evanherman
  • Fix: Tweaked the WooCommerce product template title. @props evanherman
  • Fix: Prevent WooCommerce single product images from hijacking the header image. @props evanherman

1.6.0

  • New: Hero Text widget designed for your site's front page @props jonathanbardo, fjarrett
  • Tweak: Improved posts pagination design based on core pagination @props fjarrett, evanherman
  • Tweak: The primer_paging_nav() function has been deprecated in favor of primer_pagination() @props fjarrett, evanherman
  • Tweak: The WooCommerce template overrides directory has been moved to templates/woocommerce/ @props fjarrett
  • Fix: Text overlap on WooCommerce Add to Cart buttons in certain languages @props fjarrett, evanherman
  • Fix: WooCommerce menu item appearing on older child themes without styles to support it @props fjarrett

1.5.1

  • Fix: Category and tag list display on posts @props fjarrett

1.5.0

  • New: Full compatibility with the WooCommerce plugin @props evanherman, fjarrett
  • New: Add Front Page Title setting to the Static Front Page section of the Customizer @props evanherman
  • New: Added Footer Copyright Text setting to the Site Identity section of the Customizer @props evanherman
  • New: Added Author Credit toggle to the Site Identity section of the Customizer @props evanherman
  • New: Developer documentation! @props evanherman
  • Tweak: Added nofollow attribute to theme author link in the footer @props evanherman
  • Tweak: Use core post navigation function @props evanherman
  • Fix: Display glitch when last main menu item is a submenu @props evanherman

1.4.2

  • Added word-wrap where text was overflowing @props evanherman
  • Updated translations @props jonathanbardo
  • Added font-family support for WooCommerce buttons @props fjarret

1.4.1

1.4.0

1.3.0

  • Initial release.

primer's People

Contributors

anthonyledesma avatar christianc1 avatar dependabot[bot] avatar evanherman avatar fjarrett-godaddy avatar frankiejarrett avatar garand avatar gmays avatar jmatson-godaddy avatar jonathanbardo avatar jrtashjian avatar richtabor avatar tobeycodes avatar westonruter avatar wpexplorer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

primer's Issues

404 Template

This template calls widgets directly instead of calling the active sidebar and outputs them into the main content region

screenshot 2016-07-03 20 25 14

Show color scheme as Custom when overridden

When a user selects a Color Scheme and then decides to override colors in it, the Scheme name should dynamically change to "- Custom -" to give a visual indication that they have diverged from the actual scheme they originally selected.

screen shot 2016-07-28 at 4 27 03 pm

Display color schemes as swatches instead of a dropdown

Similar to how we now use icons to represent Layouts, I think the same should be done for Color Schemes. WordPress admin color schemes are displayed this way today in user profiles, actually.

Reading a color scheme name from a list is pretty lame.

screen shot 2016-08-05 at 7 10 55 pm

Seeing them in a beautiful swatch stack is pretty awesome.

screen shot 2016-08-05 at 7 08 56 pm

Let's be awesome.

Depends on #61.

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' );```

CSS output with default

I think we can make the assumption that if we are using the default font and color scheme it is already being defined in the style.css so we do not need to output it.

Do you agree?

Allow users to create and save their own Color Schemes

Currently, users can only pick from a predetermined list of Color Schemes for their theme. A great enhancement would be to allow them to change all the colors in the palette and save it as a custom Color Scheme so they can switch between not only the predetermined schemes, but also their own.

A use-case might be a business that has a custom Color Scheme that matches their brand but they are having a special "Independence Day" promotion and they want to use red, white and blue colors for that week. Currently they would have to write down every color code in their custom Color Scheme in order to switch back easily after the promotion ends.
#42 is related.

Color helper functions

Color contrast would be a good example. If you have a background color and you want to have text on top that is light or dark depending on the background color

Expand/collapse nested nav items on mobile

This is a continuation of #12.

As stated by @schrapel in #12 (comment):

If we want to introduce clickable dropdowns for children on mobile we will need to add a <span> in each element with the arrow since before/after is not part of the DOM.

The current experience is overwhelming when you have a lot of nested nav items:

screen shot 2016-07-24 at 10 20 31 pm

Contextually-aware inline messages on controls

We could help users a lot by spotting known conflicts or contextual issues and displaying an indicator beside the Customizer control that is affected.

For example, if a Header Image has been set, then changing the Header Background Color control will have no effect in the live preview pane.

A novice user could potentially change this color, wonder why nothing is happening, and only conclude that their site must be broken. To improve this experience we could simply add a special alert icon next to this control, and perhaps a short message to reveal/explain this conflict to the user.

screen shot 2016-08-02 at 6 44 49 pm

Add custom color support w/ color scheme presets

Clean up SCSS / HTML

There is a lot of excess code in this parent theme that doesn't make much sense to me.

  1. Variables are often repeated and there are way too many to make them useful. E.g. in _typography and _variables. It's not clear which ones take priority
  2. There is a file called _mixins but a lot of mixins are not actually in the file
  3. The grid system uses a structure like .site-header > .site-header-wrapper > .site-header-inner > .site-header-6 + .site-header-6. There is no need a grid system needs to be nested so much

Add post meta

There is a post meta template in templates/parts/loop/post-meta.php. This should definitely be added by default to posts. @chriswallace / @fjarrett any others?

Add footer nav menu support

Many child themes have to add this support themselves, it would be much more convenient if Primer came with a nav menu in the footer.

Changes to navigation

There are a few issues with the navigation

  1. It uses min-width and max-width. Ideally it should only use one and since the rest of the site is mobile first lets only use min-width. If we need to both, then it should be limited to only structural changes (floats, displays) but these things can still be achieved with only min-width
  2. The javascript on the mobile menu does not work

Add support for Font Type descriptions

A potential pain point for users will be having to scan the preview pane to see what is actually changing when switching fonts. The Secondary Font, for example, might only be changing text that happens to be below the fold, which may be out of view.

Additionally, it will be very difficult (maybe even impossible) for the visually impaired to understand the effects of this setting. They will just have to hope it really is being applied to "Primary" and "Secondary" areas.

An easy way to bring more visibility and a better UX to Font Type controls would be to support short descriptions which can be optionally registered by Child Themes using the primer_font_types filter.

screen shot 2016-08-05 at 5 38 26 pm

Add full width header / footer support

We only need to add the CSS here for the header and footer

Look at the _layouts.scss in ascension or lyrical to see how .no-max-width works. It can be applied to any element that already has a max-width

Improve UX for secondary sidebars

The purpose of the secondary sidebar might be confusing for the users as the default layout doesn't show it.

One way to improve this might be to add a small description on the secondary sidebar explaining when those widgets show up.

Rename Typography to Fonts?

I feel like "Typography" is really just a hip way to say "Fonts" and is less familiar to the majority of users.

screen shot 2016-08-05 at 5 33 13 pm

Add font to Primer

We need to get Playfair Display and Playfair Display SC added to Primer.

Add hero sidebar

If Primer registers this sidebar area then child themes wouldn't have to. We will need to propose a design for how this would look in Primer.

Use the latest code from the Hybrid Core framework

Primer is currently using parts of Hybrid Core that have since been deprecated, namely the theme layouts functionality.

These old functions weren't really using a great global namespace either, now everything is prefixed with hybrid_.

We should include the necessary functions and new layout objects from the latest release of the Hybrid Core framework in Primer.

Specify font weight per font type

I think we should be able to pass an array of font weights for each font type. If it's not provided then that font type would default back to 300, 400, 700.

Do you agree?

Cache CSS output

I think it would make logical sense to cache the entire css output, rather than calculating it on the fly for every page load.

We can flush the cache when a customizer value changes and set the cache for the first user.

What do you think?

Three column layouts can't appear in Customizer dynamically

The tertiary sidebar cannot appear dynamically in the Customizer because it is conditionally loaded in the sidebar-tertiary.php template partial on page load.

So if you are using a one- or two-column layout when the Customizer is initially loaded, the tertiary sidebar will not appear upon selecting a three-column layout.

Possible solutions:

A. Always render the sidebar content and show/hide it with CSS.

B. Inject the sidebar into the DOM via the Customizer controls JS.

Place color controls in existing sections rather than in "Colors"

Rather than having a catch-all section named "Colors" with 10 choices, I think it makes a lot more sense to place color controls in existing sections.

This will make the context of each color abundantly clear to the user and pretty much eliminate the need to do something like #56.

The Storefront theme does this quite nicely:

screen shot 2016-08-05 at 6 43 11 pm

Along with this idea, I would also propose that Colors be renamed to Color Scheme. At first it will just be a lonely dropdown menu. But eventually this section will be a lot more lively once we implement #62 and possibly #41.

Additionally, the Header Image and Background Image sections, should be renamed to Header and Background, respectively.

Hero area

We need to use consistent naming and code for the hero / custom header area. It's definitely my fault for not being consistent.

  1. Decide on a filename / css class to use. hero vs custom header vs site header, etc
  2. Ascension uses blockquote, cite, button where as the rest usually just use text + button. We need to make it easy for people to implement this. Should we have a custom widget?

Keep grandchild menu flyouts inside the viewable area

If you have a really long Primary Menu with the last item containing children and grandchildren, it's possible for the grandchild flyout menu to be cutoff and overflow outside of the viewable area.

We should add logic to navigation.js to ensure the flyout will appear on the opposite side when it's too close to the browser window's edge.

screen shot 2016-07-28 at 3 46 44 pm

Nav links should have the same margin

The element above nav-links has margin-bottom: 1.5em and .nav-links only has 1em. They should match 1.5em so there is the same margin above and below

screenshot 2016-07-03 23 50 12

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.