Giter VIP home page Giter VIP logo

genesis-sample's Introduction

Genesis Sample Theme

GitHub project link: https://github.com/studiopress/genesis-sample/.

Installation Instructions

  1. Upload the Genesis Sample theme folder via FTP to your wp-content/themes/ directory. (The Genesis parent theme needs to be in the wp-content/themes/ directory as well.)
  2. Go to your WordPress dashboard and select Appearance.
  3. Activate the Genesis Sample theme.
  4. Inside your WordPress dashboard, go to Genesis > Theme Settings and configure them to your liking.

Theme Support

Please visit https://my.studiopress.com/help/ for theme support.

For Developers

The version of Genesis Sample on GitHub includes tooling to check code against WordPress standards. To use it:

  1. Install Composer globally on your development machine. See Composer setup steps.
  2. In the command line, change directory to the Genesis Sample folder.
  3. Type the command composer install to install PHP development dependencies.
  4. Type composer phpcs to run coding standards checks.

You'll see output highlighting issues with PHP files that do not conform to Genesis Sample coding standards.

Run composer phpcbf if you see “phpcbf can fix the x marked sniff violations automatically” in the output of composer phpcs.

npm scripts

Scripts are also provided to help with CSS linting, CSS autoprefixing, and creation of pot language files. To use them:

  1. Install Node.js, which also gives you the Node Package Manager (npm).
  2. In the command line, change directory to the Genesis Sample folder.
  3. Type the command npm install to install dependencies.

You can then type any of these commands:

  • npm run autoprefixer to add and remove vendor prefixes in style.css.
  • npm run makepot to regenerate the languages/genesis-sample.pot file.
  • npm run lint:css to generate a report of style violations for style.css.
  • npm run lint:js to generate a report of style violations for JavaScript files.
  • npm run fix:js to fix any JavaScript style violations that can be corrected automatically.
  • npm run zip to create a genesis-sample.zip. Files in the excludes array in scripts/makezip.js are omitted.

Packaging for distribution

  1. Follow the install instructions for npm scripts above.
  2. Switch to the git branch you plan to distribute.
  3. Bump version numbers manually and commit those changes.
  4. Type npm run zip to create genesis-sample.zip. Files in the excludes array in scripts/makezip.js are omitted from the zip. filename.md files will be renamed to filename.txt.

genesis-sample's People

Contributors

bgardner avatar bmo-tech avatar cjkoepke avatar dependabot[bot] avatar dreamwhisper avatar garyjones avatar johnstonphilip avatar markkelnar avatar mattlawck avatar mindctrl avatar nathanrice avatar nickcernis avatar phpbits avatar robincornett avatar seothemes avatar timothyjensen avatar vfontjr 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  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

genesis-sample's Issues

Conflict with TOC+

Hi, I just replaced an old Genesis sample child theme with this new one, which on the whole went well, the only problem I experienced was a conflict with the TOC+ plugin, if there is a [toc] shortcode on a page it would throw up a fatal error:

Fatal error: Cannot redeclare genesis_sample_color_contrast() (previously declared in /homepages/12/d230748768/htdocs/s1-com-v2-wp/wp-content/themes/s2/lib/output.php:30) in /homepages/12/d230748768/htdocs/s1-com-v2-wp/wp-content/themes/s2/lib/output.php on line 30

It's not a big deal since the TOC+ works fine when auto-adding table of contents, it's only when you add the [toc] shortcode manually to reposition or add a TOC to an excluded page.

I've only modifed the style.css and functions.php and have not touched the output.php file.

Any thoughts on wat is happening? I only modifed the style.css and functions.php and have not touched the output.php file.

Genesis Customizer Widget Controls Not Expanding in WP 4.8

Our website is running Genesis Framework 2.52 & Genesis Sample 2.30. We upgraded to WordPress 4.80 & now the Customize Widgets page has stopped working. Won't expand the Primary, Secondary Sidebars or the Footers. Used a backup to show that it works in 4.75, but dies after the 4.80 upgrade. Can't get to Customize Header either. I also tried switching the theme to WordPress 2016 & then upgrading to 4.80. Customize Widgets page works for 2016 theme, but then switching back to Genesis Sample 2.30 breaks it. Any ideas to restore the functionality?

mobile menu

Hello
I think there some issues with the mobile menu - if I add a header menu, it is not visible anymore on the mobile - I think it should get at least its own toggle button

Mobile-First CSS

Mobile-first design is a form of Progressive Enhancement (PE). PE looks at providing a solid base of a website to as many people as possible, and then adding content or features as the limitations for that visitor allow.

For mobile-first design, that means concentrating on what is the key actions that small-screen (mobile) visitors should be able to achieve, and then adding more as the size of the screen expands up to tablet, laptop, desktop and larger.

As a supplier of themes, we can not offer mobile-first design. We don't know what content each website that uses Sample (or a a fork of it) will have.

What we can do however, is offer mobile-first CSS. That is, using min-width media queries (MQ) that allows developers to logically start with the smallest screen and work up, allowing the cascading nature of CSS to allow MQ with larger min-width breakpoints to override the earlier styles of smaller screens.

Mobile first CSS is a change in thought process, but one that has considerable benefits. As well as facilitating a PE mindset, it may also reduce the amount of CSS in the file, which can give performance benefits by reducing the number of bytes. Let's take a simple example:

Traditional (119 bytes):

.two-columns {
    width: 50%;
}

@media screen and (max-width: 600px) {
    .two-columns {
        width: 100%;
    }
}

Mobile-first (85 bytes):

@media screen and (min-width: 600px) {
    .two-columns {
        width: 50%;
    }
}

Even with a simple example like this, that's a 29% saving of bytes. Multiply that up by other column classes and layout (sidebar, main etc.), and whatever else are styled as responsive, and you can see that it would be a small but not insignificant saving of bytes, as well as being less code to maintain.

Switching Sample to it won't just save bytes for Sample, but would represent a positive move forward for PE for all themes (for new official SP themes, and all the premium themes and client project themes) across the Genesis community.

The change in mindset isn't difficult - in fact, I find it harder to think of the logic with max-width than with min-width now. When designing, it's got to be easier to start thinking at one extreme of the scale, and work up, than start in the middle (laptop/desktop) and have to think both smaller and larger screen sizes.

Although the Sample style.css has recently been updated, some repos already exist which show how the min-width style.css might look, as these have already been done by members of the Genesis community.

My request then, is that Sample switches to mobile-first CSS.

Set content_width

The child's functions.php lacks any definition of $content_width a la $content_width = apply_filters( 'content_width', 580, 480, 900 ); as provided by #77.

Checking out a couple StudioPress child themes, a $content_width wasn't seemingly defined in those either.

There are a few various places that having a $content_width would be helpful and provide a better experience (embeds, some pending work in Jetpack wrt responsive images to go alongside Core's 4.4 work), etc.

Use Sass or Less

Any thoughts on using Sass or Less? If the development version of Genesis is already using sass/less, then this will be fairly simple to do.

Replacing get_stylesheet_directory_uri() with CHILD_URL

I was advised by Tonya the following:

Genesis defines the constant CHILD_URL in the init.php. You can use it instead of calling get_stylesheet_directory_uri() to be more performant. Why? It takes time for PHP to call the function multiple times. The value is already stored for us in the Genesis constant, CHILD_URL.

As such

wp_enqueue_script( 'genesis-sample-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true );

in functions.php can be changed to

wp_enqueue_script( 'genesis-sample-responsive-menu', CHILD_URL . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true );

changelog

Thanks for your work on this theme - wondering if there is a changelog somewhere?

To clarify the above question:
While very grateful for the work done on this theme I was a little surprised that there is no changelog shipped with the theme/within the project files here.

I have subsequently discovered the blog post on studiopress that details the latest update which is great. However, given that people will access this theme in a variety of ways - via downloads on their studiopress account, downloading the zip from here, etc. - and may be unaware of such blog posts - one idea would be to include a traditional changelog in order to provide some initial orientation and a convenient overview of changes through time, within the project files.

Notwithstanding my limited experience, pretty much every open source project I've worked with - including those hosted on github - has had a changelog of some sort somewhere. Frequently in multiple places but certainly with the actual theme/project files.

Yes, changes can be seen on github, however it is currently a bit of a thing to get, for example, from here
https://github.com/copyblogger/genesis-sample
to
014deb3...490ce18

If there was a changelog included in the README.md for instance, that link (or even a link to the blog post) could be included to provide a way for people not familiar with the project or the studiopress blog to get their head around things.

For those who have used the genesis sample theme within a project (in any number of ways) needing to know what has changed as well as those only just getting to know the project, this would be very helpful.

Thanks again for your work on this.

Tag and Master

Genesis Sample was "released" eight days ago, but there's been no tag created for the commit, and the master branch is currently 72 commits behind develop.

Please, fix this basic administration of an open source git repo, that developers expect. Releasing zip files and blog posts to the world should happen well after the code is finalised in version control.

Adding older tags would be good too.

Use .no-js instead of .js?

Currently the sample theme adds a .js class to the body when JavaScript is enabled. The mobile menu styles are then applied to nav items. There is a slight delay in adding the .js class which causes visitors to briefly see the non-js version of the nav menu items.

A better solution would be to have a .no-js body class and remove it if JavaScript is enabled. Only 1% of browser requests have JS disabled on average so it makes sense to support the majority of users.

This would also result in less css styles needed to achieve the same result.

Add npm scripts

Grunt automates stuff for us, and we have it in place for Genesis as well as most of our plugins. Should be pretty easy to add.

To do: makepot once Grunt is in place.

Update on 2.2?

2.2 is supposed to add compatibility for WP 4.2 which is already out.... When will 2.2 be out?

Image logo disappears at smaller screen widths

At widths below 960px, the logo.png image disappears if the header is set to “Image logo” in Genesis → Theme Settings:

about_-_wp_test

The same issue is not present in Genesis itself:

about_-_wp_test_and___kkd-92293-686___studiopress_member_contact__technical_issue_-_copyblogger_media_helpdesk_and_object-oriented_programming_is_bad_-_youtube

The logo.png in Genesis Sample is 164px high; the one in Genesis is 90px.

If I change the min-height to 164px here in Genesis Sample that seems to solve things:

.header-image .site-title > a {
    background: url(images/logo.png) no-repeat;
    float: left;
    min-height: 60px;
    width: 100%;
}

Changing the height of the default logo to remove the white space around it may be another way to solve this.

Remove Duplicate CSS

This CSS on line 1514:

    .sidebar-primary,
    .title-area {
        width: 300px;
    }

is duplicated just below it starting on line 1519:

    .footer-widgets-1,
    .footer-widgets-2,
    .footer-widgets-3,
    .sidebar-primary,
    .title-area {
        width: 300px;
    }

Use custom-logo instead of custom-header

Themes should really be using the custom logo theme feature instead of custom header for uploading site logos. This outputs better markup and is more flexible, it also free's up the custom header which can then be used for something else. Child themes can use custom logos easily without having to change anything in Genesis.

Fix comments format

The single line comments found in this repo are of the form:

//* ...

These are non-standard. They originated from personal developer preference in Genesis, but even that has been fixed now. As such, the comments here should be fixed to be // ... with leading capital letters and a full stop at the end, as per sentence structure, or otherwise turned into formal DocBlocks if they are meant to be documenting a structural element (file, class, function, method, property, interface, trait etc.)

If folks are using this as the basis of many new themes, it's worth following the standard format found in PHP and WordPress, fixed once here, so it doesn't continue to create sub-standard quality cod in multiple themes.

Style for accessibility screen reader text on rtl site adds unwanted horizontal scroll bar

Steps to recreate:
A fresh WP install with language set to one of the RTL languages (Hebrew, Arabic).
Using the genesis sample theme with the necessary rtl css rule overrides in the rtl.css file (that is loaded by WP by default, for RTL sites).
Accessibility option is enabled (either by the add theme support or by using the Genesis Accessibility plugin).
Added a simple page widget to the primary sidebar with the "read More" option turned on.
An horizontal scroll bar appears at the bottom of the browser.

Investigation:
Using the Chrome DevTools -> Inspect Element on the "read more" link on the primary sidebar.
The screen-reader-text class is the one causing the issue.
Adding right:0 to this class, resolves the issue.

My assumption:
In this class (screen-reader-text), the position is set to absolute.
Using position:absolute without the right (or left) rule confuses the browser...

Gravatars @2x

Did we want to add the functions for author box / comment Gravatars to double their size, and reduce them by 1/2 via CSS?

Version number missing from Theme View

The version number is missing from this view:

screen shot 2016-02-23 at 9 09 29 pm

It appears the style.css does not have Version: x.x.x in the header. It has the template version, but not version which results in the version number not being displayed when view the theme details page.

Including samples

Hey

What about including a sample-functions.php that includes various most used (popular) functions code? As one could then easily just copy the code over to the functions.php file.

Such as home page widgets OR...... actually just having a page template called home template with these widget areas in them. So one can include multiple content widgets on any page one decides to do so.

Including a portfolio page template with nice comments explaining how to modify it.

Adding the favicon code.

An example on adding social settings to the theme options similar to how Bill did it here: http://www.billerickson.net/genesis-theme-options/
I am thinking theme options should be like lego blocks. Have a bunch to select from and add the ones you want to use. This way each developer can easily modify the settings for their own (or customers) need.

Even though most of the above code exist in various web pages today it would be nice to make them accessible through the Genesis sample theme. To see this theme as a learning platform for the user to go ahead and make their customizations. To make their own custom child theme.

One more thing. Color style options:
Here one can add different stylesheets and a screenshot into their own skin/color folder. One could create customized layouts and through the theme color/skin setting select various layouts. Deciding on a layout and then locking it in hiding the selection in the Genesis option settings so the customer can not choose but use what has been defined as the default layout.

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.