| Page 1 of 2 | [ 12 posts ] | Go to page 1, 2 Next |
Juan Ignacio DopazoYUI Contributor
|
So, this thread with Mitch gave me the idea of making a YUI Boilerplate. Why? To address some of the most common questions in the forums: "where do I put my scripts?", "what's the best way of inserting YUI css?", "how do I create my own modules?", "how do I use HTML5 with YUI?". As @wrumsby pointed out it would be useful for starting new projects and for normalizing work in large teams.
What would it have to contain? An index file An index.html forked from the HTML5 Boilerplate. My index.html usually looks like this: index.htmlClick here to see the revision history on this Gist.It would be awesome to get feedback from different YUI users to see what structure they usually chose. A project structure A folder structure where to put your files. Optionally it could include the YUI Builder as part of it. A module template With the folder structure set up, it could include a module template file and a configuration object already set up for it... module templateClick here to see the revision history on this Gist.HTML5? Using HTML5 in IE6 is just a matter of doing document.createElement('nav') in the <head>. A Gallery module could do that and we could insert it concatenated with the YUI seed. Any ideas? |
|
Quote: Using HTML5 in IE6 is just a matter of doing document.createElement('nav') in the <head>. A Gallery module could do that and we could insert it concatenated with the YUI seed. There's a Gallery module for Modernizr which should do that (the Gallery module should probably be updated to wrap Modernizr 2.x). HTML5 shims like this do have an issue with innerHTML (it looks like you've already seen that thread |
Juan Ignacio DopazoYUI Contributor
|
I have. The thing is that I think Modernizer does too much. Do you need to check Modernizr.canvas when you'll use the Graphics module? Do you need to check Modernizr.hashchange when there is the History module? YUI does all the things Modernizer does and if it doesn't it probably will.
But the question is not whether to use Modernizr or not, the question is if we want to have the YUI seed file in the <head> or at the end of the <body>. I see 3 possibilities:
Anyway we should ask Matt if that issue was addressed in 3.4.0 or not, and there are some CSS styles that need to be added somewhere: Future CSS Gallery moduleClick here to see the revision history on this Gist.And there is still the open question about whether to use HTML5 or not. The main idea is to have a zip file that lets you start fast with YUI. |
|
I have been toying with the idea of updating the Modernizr module (or creating a Modernizr 2) module that is broken down into a number of modules, e.g. modernizr-base, modernizr-canvas, etc.
But yes, that is possibly a secondary question. |
|
Hi Juan,
1. I recommend being more aggressive about minimal markup. Get rid of the explicit <html>, <head>, and <body>. Both for practical reasons (it's smaller, cleaner, removes two un-necessary levels of indenting) and for branding reasons, to make YUI 3 Boilerplate look visually more clean and distinct from HTML5 Boilerplate. 2. In the use statement, consider actually using at least one module, just to serve as an example. |
|
Quote: In the use statement, consider actually using at least one module, just to serve as an example. I almost always use 'node-base' and 'event-base' so perhaps the use statement could be something like: Code: YUI().use('event-base', function(Y) { Y.on('domready', function() { // ... } }); |
|
Sure. In light of what wrumsby said, maybe something like this? https://gist.github.com/1161628
|
Juan Ignacio DopazoYUI Contributor
|
That would be OK if it was just an example, but the idea is to have a file from which to start working without writing the boring parts all the time.
The idea is to put the YUI seed file at the bottom. So in that case using 'domready' is unnecessary. I guess we need a customizable download for this. At least a simple version and a complex version. And integrating the YUI Grids Builder with the download process would be really cool. The simple version could just have a call to YUI().use('node'). The complex one should include a custom module with requirements and a YUI_config object. I put a fork of the HTML5 Boilerplate here for experimentation https://github.com/juandopazo/yui3-boilerplate. |
|
I like the idea of a basic version and an advanced version.
Should the simple version load SimpleYUI? Also, is the goal, "A boilerplate page for using YUI" or "A alternative boilerplate page that happens to use YUI instead of jQuery, and also includes some other useful stuff we think you'd need"? As an alternative to trying to re-launch the Grids Builder, maybe the boilerplate should just provide an example div structure for a 3-column layout -- and add some brief HTML comments that explain how to change the grid. The YUI 2 Grid Builder was cool, but YUI 3 Grids is *way* simpler -- to the point where I'm not convinced it even needs a grid builder. |
Juan Ignacio DopazoYUI Contributor
|
Right, I think both would be useful to different kinds of developers. There could be "A boilerplate page for using YUI" hosted in yuilibrary.com and maintained by you, and an HTML5 Boilerplate with YUI maintained by those of us interested in using HTML5.
I have my reservations about SimpleYUI, but if you think so the simple version should use SimpleYUI. The complex version should be aimed at using the Loader and optionally the YUI Builder. You're right about the grids! |
| Page 1 of 2 | [ 12 posts ] | Go to page 1, 2 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group