From 4fdb4e20cd0a58436810b527970eded91804f691 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 21 Jan 2010 10:20:55 -0800 Subject: [PATCH] [Blueprint] Better initial starter templates for blueprint projects, depending on what approach they want to take: basic or semantic. --- frameworks/blueprint/templates/basic/grid.png | Bin 0 -> 206 bytes frameworks/blueprint/templates/basic/ie.sass | 4 ++ .../blueprint/templates/basic/manifest.rb | 30 ++++++++++++++ .../templates/basic/partials/_base.sass | 10 +++++ .../blueprint/templates/basic/print.sass | 4 ++ .../blueprint/templates/basic/screen.sass | 11 +++++ .../blueprint/templates/project/screen.sass | 2 +- .../blueprint/templates/semantic/grid.png | Bin 0 -> 206 bytes .../blueprint/templates/semantic/ie.sass | 16 ++++++++ .../blueprint/templates/semantic/manifest.rb | 33 +++++++++++++++ .../templates/semantic/partials/_base.sass | 11 +++++ .../templates/semantic/partials/_form.sass | 6 +++ .../templates/semantic/partials/_page.sass | 18 +++++++++ .../templates/semantic/partials/_two_col.sass | 38 ++++++++++++++++++ .../blueprint/templates/semantic/print.sass | 8 ++++ .../blueprint/templates/semantic/screen.sass | 14 +++++++ 16 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 frameworks/blueprint/templates/basic/grid.png create mode 100644 frameworks/blueprint/templates/basic/ie.sass create mode 100644 frameworks/blueprint/templates/basic/manifest.rb create mode 100644 frameworks/blueprint/templates/basic/partials/_base.sass create mode 100644 frameworks/blueprint/templates/basic/print.sass create mode 100644 frameworks/blueprint/templates/basic/screen.sass create mode 100644 frameworks/blueprint/templates/semantic/grid.png create mode 100644 frameworks/blueprint/templates/semantic/ie.sass create mode 100644 frameworks/blueprint/templates/semantic/manifest.rb create mode 100644 frameworks/blueprint/templates/semantic/partials/_base.sass create mode 100644 frameworks/blueprint/templates/semantic/partials/_form.sass create mode 100644 frameworks/blueprint/templates/semantic/partials/_page.sass create mode 100644 frameworks/blueprint/templates/semantic/partials/_two_col.sass create mode 100644 frameworks/blueprint/templates/semantic/print.sass create mode 100644 frameworks/blueprint/templates/semantic/screen.sass diff --git a/frameworks/blueprint/templates/basic/grid.png b/frameworks/blueprint/templates/basic/grid.png new file mode 100644 index 0000000000000000000000000000000000000000..129d4a29fbe92688aabed5638e0c4f73a7bca818 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<>!3HEX<>xE|QY^(zo*^7SP{WbZ0pxQQctjR6 zFmQbUVMeDlCNqG7G9|7NCBgY=CFO}lsSJ)O`AMk?Zka`?<@rU~#R|^B#xt(DF$2|k zc)B=-cyuP$eEj#lzKxOL5tEL~%H%~Gtu@#d^DPnSv6>KM@XEpK;0k6FVdQ&MBb@06Zo?vj6}9 literal 0 HcmV?d00001 diff --git a/frameworks/blueprint/templates/basic/ie.sass b/frameworks/blueprint/templates/basic/ie.sass new file mode 100644 index 00000000..9485bcf9 --- /dev/null +++ b/frameworks/blueprint/templates/basic/ie.sass @@ -0,0 +1,4 @@ +@import blueprint.sass + +// Generate the blueprint IE-specific customizations: ++blueprint-ie diff --git a/frameworks/blueprint/templates/basic/manifest.rb b/frameworks/blueprint/templates/basic/manifest.rb new file mode 100644 index 00000000..3c101942 --- /dev/null +++ b/frameworks/blueprint/templates/basic/manifest.rb @@ -0,0 +1,30 @@ +description "The blueprint framework." + +stylesheet 'screen.sass', :media => 'screen, projection' +stylesheet 'partials/_base.sass' +stylesheet 'print.sass', :media => 'print' +stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8" + +image 'grid.png' + +help %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation +} + +welcome_message %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation + +To get started, edit the screen.sass file and read the comments and code there. +} diff --git a/frameworks/blueprint/templates/basic/partials/_base.sass b/frameworks/blueprint/templates/basic/partials/_base.sass new file mode 100644 index 00000000..06953c3f --- /dev/null +++ b/frameworks/blueprint/templates/basic/partials/_base.sass @@ -0,0 +1,10 @@ +// Here is where you can define your constants for your application and to configure the blueprint framework. +// Feel free to delete these if you want keep the defaults: + +!blueprint_grid_columns = 24 +!blueprint_grid_width = 30px +!blueprint_grid_margin = 10px + +// If you change your grid column dimensions +// you can make a new grid background image from the command line like this: +// compass grid-img 30+10x16 diff --git a/frameworks/blueprint/templates/basic/print.sass b/frameworks/blueprint/templates/basic/print.sass new file mode 100644 index 00000000..b1c9386a --- /dev/null +++ b/frameworks/blueprint/templates/basic/print.sass @@ -0,0 +1,4 @@ +@import blueprint.sass + +// Generate the blueprint print styles: ++blueprint-print diff --git a/frameworks/blueprint/templates/basic/screen.sass b/frameworks/blueprint/templates/basic/screen.sass new file mode 100644 index 00000000..9fe8f70f --- /dev/null +++ b/frameworks/blueprint/templates/basic/screen.sass @@ -0,0 +1,11 @@ +// This import applies a global reset to any page that imports this stylesheet. +@import blueprint/reset.sass +// To configure blueprint, edit the partials/_base.sass file. +@import partials/base.sass +// Import all the default blueprint modules so that we can access their mixins. +@import blueprint +// Import the non-default scaffolding module. +@import blueprint/scaffolding.sass + +// Generate the blueprint framework according to your configuration: ++blueprint diff --git a/frameworks/blueprint/templates/project/screen.sass b/frameworks/blueprint/templates/project/screen.sass index fff485eb..bc0160a3 100644 --- a/frameworks/blueprint/templates/project/screen.sass +++ b/frameworks/blueprint/templates/project/screen.sass @@ -23,7 +23,7 @@ form.bp +blueprint-form // Page layout can be done using mixins applied to your semantic classes and IDs: -body.three-col +body.two-col #container +container #header, #footer diff --git a/frameworks/blueprint/templates/semantic/grid.png b/frameworks/blueprint/templates/semantic/grid.png new file mode 100644 index 0000000000000000000000000000000000000000..129d4a29fbe92688aabed5638e0c4f73a7bca818 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<>!3HEX<>xE|QY^(zo*^7SP{WbZ0pxQQctjR6 zFmQbUVMeDlCNqG7G9|7NCBgY=CFO}lsSJ)O`AMk?Zka`?<@rU~#R|^B#xt(DF$2|k zc)B=-cyuP$eEj#lzKxOL5tEL~%H%~Gtu@#d^DPnSv6>KM@XEpK;0k6FVdQ&MBb@06Zo?vj6}9 literal 0 HcmV?d00001 diff --git a/frameworks/blueprint/templates/semantic/ie.sass b/frameworks/blueprint/templates/semantic/ie.sass new file mode 100644 index 00000000..31aad76a --- /dev/null +++ b/frameworks/blueprint/templates/semantic/ie.sass @@ -0,0 +1,16 @@ +@import blueprint.sass + +// To generate css equivalent to the blueprint css but with your configuration applied, uncomment: +// +blueprint-ie + +//Recommended Blueprint configuration with scoping and semantic layout: +body.bp + +blueprint-ie(true) + // Note: Blueprint centers text to fix IE6 container centering. + // This means all your texts will be centered under all version of IE by default. + // If your container does not have the .container class, don't forget to restore + // the correct behavior to your main container (but not the body tag!) + // Example: + // .my-container + // text-align: left + diff --git a/frameworks/blueprint/templates/semantic/manifest.rb b/frameworks/blueprint/templates/semantic/manifest.rb new file mode 100644 index 00000000..e88b963c --- /dev/null +++ b/frameworks/blueprint/templates/semantic/manifest.rb @@ -0,0 +1,33 @@ +description "The blueprint framework." + +stylesheet 'screen.sass', :media => 'screen, projection' +stylesheet 'partials/_base.sass' +stylesheet 'partials/_form.sass' +stylesheet 'partials/_page.sass' +stylesheet 'partials/_two_col.sass' +stylesheet 'print.sass', :media => 'print' +stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8" + +image 'grid.png' + +help %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation +} + +welcome_message %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation + +To get started, edit the screen.sass file and read the comments and code there. +} diff --git a/frameworks/blueprint/templates/semantic/partials/_base.sass b/frameworks/blueprint/templates/semantic/partials/_base.sass new file mode 100644 index 00000000..f6d45e59 --- /dev/null +++ b/frameworks/blueprint/templates/semantic/partials/_base.sass @@ -0,0 +1,11 @@ +// Here is where you can define your constants for your application and to configure the blueprint framework. +// Feel free to delete these if you want keep the defaults: + +!blueprint_grid_columns = 24 +!blueprint_container_size = 950px +!blueprint_grid_margin = 10px + +// Use this to calculate the width based on the total width. +// Or you can set !blueprint_grid_width to a fixed value and unset !blueprint_container_size -- it will be calculated for you. +!blueprint_grid_width = (!blueprint_container_size + !blueprint_grid_margin) / !blueprint_grid_columns - !blueprint_grid_margin + diff --git a/frameworks/blueprint/templates/semantic/partials/_form.sass b/frameworks/blueprint/templates/semantic/partials/_form.sass new file mode 100644 index 00000000..9d610983 --- /dev/null +++ b/frameworks/blueprint/templates/semantic/partials/_form.sass @@ -0,0 +1,6 @@ +// Only apply the blueprint form styles to forms with +// a class of "bp". This makes it easier to style +// forms from scratch if you need to. + +form.bp + +blueprint-form \ No newline at end of file diff --git a/frameworks/blueprint/templates/semantic/partials/_page.sass b/frameworks/blueprint/templates/semantic/partials/_page.sass new file mode 100644 index 00000000..0ac6e5fb --- /dev/null +++ b/frameworks/blueprint/templates/semantic/partials/_page.sass @@ -0,0 +1,18 @@ +// Import the non-default scaffolding module to help us get started. +@import blueprint/scaffolding.sass + +// This configuration will only apply the +// blueprint styles to pages with a body class of "bp" +// This makes it easier to have pages without blueprint styles +// when you're using a single/combined stylesheet. + +body.bp + +blueprint-typography(true) + +blueprint-utilities + +blueprint-debug + +blueprint-interaction + +// Remove the scaffolding when you're ready to start doing visual design. +// Or leave it in if you're happy with how blueprint looks out-of-the-box ++blueprint-scaffolding("body.bp") + diff --git a/frameworks/blueprint/templates/semantic/partials/_two_col.sass b/frameworks/blueprint/templates/semantic/partials/_two_col.sass new file mode 100644 index 00000000..eb5fc6f2 --- /dev/null +++ b/frameworks/blueprint/templates/semantic/partials/_two_col.sass @@ -0,0 +1,38 @@ +// Page layout can be done using mixins applied to your semantic classes and IDs +// For instance this layout defines a two column layout on pages with +// a body class of "two-col". +// +// The markup would look like: +//
+// +// +//
+// +//
+// +// and the layout would look like: +// +------------------------+ +// | #header | +// +--------+---------------+ +// | | | +// |#sidebar| #content | +// | | | +// +------------------------+ +// | #footer | +// +--------+---------------+ + +body.two-col + #container + +container + #header, #footer + +column(!blueprint_grid_columns) + #sidebar + // One third of the grid columns, rounding down. With 24 cols, this is 8. + !sidebar_columns = floor(!blueprint_grid_columns / 3) + +column(!sidebar_columns) + #content + // Two thirds of the grid columns, rounding up. + // With 24 cols, this is 16. + !content_columns = ceil(2 * !blueprint_grid_columns / 3) + // true means it's the last column in the row + +column(!content_columns, true) \ No newline at end of file diff --git a/frameworks/blueprint/templates/semantic/print.sass b/frameworks/blueprint/templates/semantic/print.sass new file mode 100644 index 00000000..e3727d9e --- /dev/null +++ b/frameworks/blueprint/templates/semantic/print.sass @@ -0,0 +1,8 @@ +@import blueprint.sass + +// To generate css equivalent to the blueprint css but with your configuration applied, uncomment: +// +blueprint-print + +//Recommended Blueprint configuration with scoping and semantic layout: +body.bp + +blueprint-print(true) \ No newline at end of file diff --git a/frameworks/blueprint/templates/semantic/screen.sass b/frameworks/blueprint/templates/semantic/screen.sass new file mode 100644 index 00000000..88b00df2 --- /dev/null +++ b/frameworks/blueprint/templates/semantic/screen.sass @@ -0,0 +1,14 @@ +// This import applies a global reset to any page that imports this stylesheet. +@import blueprint/reset.sass + +// To configure blueprint, edit the partials/base.sass file. +@import partials/base.sass + +// Import all the default blueprint modules so that we can access their mixins. +@import blueprint + +// Combine the partials into a single screen stylesheet. +@import partials/page.sass +@import partials/form.sass +@import partials/two_col.sass +