Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

First pass at custom layouts #26

Merged
merged 21 commits into from
Jul 25, 2016
Merged

First pass at custom layouts #26

merged 21 commits into from
Jul 25, 2016

Conversation

fjarrett
Copy link
Member

@fjarrett fjarrett commented Jul 23, 2016

Resolves #22

  • Ability to set a default "Global" layout in the Customizer
  • Live layout preview in the Customizer
  • Ability to override the default layout on a post-by-post basis
  • Show layouts as image thumbnails in meta box
  • RTL support
  • Meta box styles for mobile
  • Ability to set full-width header/footer in the Customizer
  • Show layouts as image thumbnails in Customizer

@fjarrett
Copy link
Member Author

@jonathanbardo and @schrapel please review what I have here so far.

@tobeycodes
Copy link
Contributor

tobeycodes commented Jul 23, 2016

Looks good. Will run some texts

The UX is a lot better, clearly makes sense to users

P.s go to bed, it must be late haha

.find( 'input' )
.prop( 'disabled', false );

} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjarrett 😱

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 fixed in 911aa33

@@ -162,7 +180,7 @@ module.exports = function(grunt) {

require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );

grunt.registerTask('default', ['watch']);
grunt.registerTask('default', ['sass','autoprefixer','cssjanus','cssmin','jshint','uglify']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjarrett @schrapel I've changed the default grunt command to only compile and run lint (this is what we used as default for out other plugins out there. grunt watch if you want to start watching all those files.


}

$GLOBALS['primer_customizer_layouts'] = new Primer_Customizer_Layouts;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanbardo Just to give a little background on why I chose to assign the class to a global var. Layouts are a special case where helper functions in the global scope need to be available for theme developers when creating Child themes. The object itself if pretty lightweight and I believe this approach is better than instantiating a new object every time you want to call a helper method.

@fjarrett
Copy link
Member Author

@jonathanbardo I'm pretty happy with this now after your changes. I'm going to merge this as-is and work on showing image thumbnails in the Customizer as a separate issue.

@fjarrett fjarrett merged commit 91b49df into develop Jul 25, 2016
@fjarrett fjarrett deleted the feature/custom-layouts branch July 25, 2016 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants