Doug Stewart avatar Doug Stewart committed 950fd9a

THIS WORKS AND IS AWESOME.

Comments (0)

Files changed (6)

layouts/less/1-column-fixed.less

-/*
- @containerwidth: 960px
- @primarysbwidth: 350px
- @secondarysbwidth: 350px
- @footerwidth: 100%
-*/
-#container{width:@containerwidth;margin:0 auto}
-#primarysb{float:left;width:@primarysbwidth}
-#secondarysb{float:right;width:@secondarysbwidth}
-#footer{clear:both;width:@footerwidth}
+#container{.setwidth(@containerwidth, 960px);margin:0 auto;}
+#primarysb{.setwidth(@primarysbwidth, 350px);float:left;}
+#secondarysb{.setwidth(@secondarysbwidth, 350px);float:right;}
+#footer{.setwidth(@footerwidth, 100%);clear:both;}

layouts/less/1-column-fluid.less

-/*
- @primarysbwidth: 50%
- @secondarysbwidth: 49.9%
- @footerwidth: 100%
-*/
-#primarysb{float:left;width:@primarysbwidth}
-#secondarysb{float:left;width:@secondarysbwidth}
-#footer{clear:left;width:@footerwidth}
+#primarysb{float:left;.setwidth(@primarysbwidth, 50%)}
+#secondarysb{float:left;.setwidth((99.9% - @primarysbwidth), 49.9%)}
+#footer{clear:left;.setwidth(@footerwidth, 100%)}

layouts/less/2-columns-fixed-sb-left-under-full.less

-/*
- @containerwidth: 960px
- @lbcontentwidth: 700px
- @primarysbwidth: 200px
- @secondarysbwidth: 100%
-*/
-#container{width:@containerwidth;margin:0 auto}
-#lb-content{float:right;width:@lbcontentwidth}
-#primarysb{float:left;width:@primarysbwidth}
-#secondarysb{clear:both;width:@secondarysbwidth}
+#container{.setwidth(@containerwidth, 960px);margin:0 auto}
+#lb-content{float:right;.setwidth(@lbcontentwidth, 700px)}
+#primarysb{float:left;.setwidth(@primarysbwidth, 200px)}
+#secondarysb{clear:both;.setwidth(@secondarysbwidth, 100%)}

layouts/less/2-columns-fixed-sb-left-under.less

  @secondarysbwidth: 700px
  @footerwidth: 100%
 */
-#container{width:@containerwidth;margin:0 auto}
-#lb-content{float:right;width:@lbcontentwidth}
-#primarysb{float:left;width:@primarysbwidth}
-#secondarysb{float:right;width:@secondarysbwidth}
-#footer{clear:both;width:@footerwidth}
+#container{.setwidth(@containerwidth, 960px);margin:0 auto}
+#lb-content{float:right;.setwidth(@lbcontentwidth, 700px)}
+#primarysb{float:left;.setwidth(@primarysbwidth, 200px)}
+#secondarysb{float:right;.setwidth(@secondarysbwidth, 700px)}
+#footer{clear:both;.setwidth(@footerwidth, 100%)}

layouts/less/2-columns-fixed-sb-left.less

-/*
- containerwidth: 960px
- lbcontentwidth: 700px
- primarysbwidth: 200px
- secondarysbwidth: 200px
- footerwidth: 100%
-*/
-#container{width:@containerwidth;margin:0 auto}
-#lb-content{float:right;width:@lbcontentwidth}
-#primarysb{float:left;width:@primarysbwidth}
-#secondarysb{float:left;clear:left;width:@secondarysbwidth}
-#footer{clear:both;width:@footerwidth}
+#container{.setwidth(@containerwidth, 960px);margin:0 auto}
+#lb-content{float:right;.setwidth(@lbcontentwidth, 700px)}
+#primarysb{float:left;.setwidth(@primarysbwidth, 200px)}
+#secondarysb{float:left;clear:left;.setwidth(@secondarysbwidth, 200px)}
+#footer{clear:both;.setwidth(@footerwidth, 100%)}

layouts/less/master.less

+.setwidth(@width, @defaultw) when (isnumber(@width)){
+	width: @width;
+}
+.setwidth(@width, @defaultw) when not(isnumber(@width)){
+	width: @defaultw;
+}
+
+.layout(@layout) when (isstring(@layout)){
+	@import @layout;
+}
+
+.layout(@layout) when not (isstring(@layout)){
+	@import "2-columns-fixed-sb-right.less";
+}
+.layout(@layout);
+/*
 .layout(@layout) when ( @layout = 1-column-fixed ) {
 	@import "1-column-fixed.less";
 }
 .layout(@layout) when (@layout = 1-column-fluid ) {
 	@import "1-column-fluid.less";
 }
+.layout(@layout) when (@layout = 2-columns-fixed-sb-left-under-full ) {
+	@import "2-columns-fixed-sb-left-under-full.less";
+}
+.layout(@layout) when (@layout = 2-columns-fixed-sb-left-under) {
+	@import "2-columns-fixed-sb-left-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-fixed-sb-left) {
+	@import "2-columns-fixed-sb-left.less";
+}
+.layout(@layout) when (@layout = 2-columns-fixed-sb-right-under-full) {
+	@import "2-columns-fixed-sb-right-under-full.less";
+}
+.layout(@layout) when (@layout = 2-columns-fixed-sb-right-under) {
+	@import "2-columns-fixed-sb-right-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-fixed-sb-right) {
+	@import "2-columns-fixed-sb-right.less";
+}
+.layout(@layout) when (@layout = 2-columns-fluid-sb-fixed-left-sb-under) {
+	@import "2-columns-fluid-sb-fixed-left-sb-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-fluid-sb-fixed-left) {
+	@import "2-columns-fluid-sb-fixed-left.less";
+}
+.layout(@layout) when (@layout = 2-columns-fluid-sb-fixed-right-sb-under) {
+	@import "2-columns-fluid-sb-fixed-right-sb-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-fluid-sb-fixed-right) {
+	@import "2-columns-fluid-sb-fixed-right.less";
+}
+.layout(@layout) when (@layout = 2-columns-percentage-sb-fixed-left-sb-under) {
+	@import "2-columns-percentage-sb-fixed-left-sb-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-percentage-sb-fixed-left) {
+	@import "2-columns-percentage-sb-fixed-left";
+}
+.layout(@layout) when (@layout = 2-columns-percentage-sb-fixed-right-sb-under) {
+	@import "2-columns-percentage-sb-fixed-right-sb-under.less";
+}
+.layout(@layout) when (@layout = 2-columns-percentage-sb-fixed-right) {
+	@import "2-columns-percentage-sb-fixed-right.less";
+}
+.layout(@layout) when (@layout = 3-columns-fixed-sb-both) {
+	@import "3-columns-fixed-sb-both.less";
+}
+.layout(@layout) when (@layout = 3-columns-fixed-sb-left) {
+	@import "3-columns-fixed-sb-left.less";
+}
+.layout(@layout) when (@layout = 3-columns-fixed-sb-right) {
+	@import "3-columns-fixed-sb-right.less";
+}
+.layout(@layout) when (@layout = 3-columns-fluid-sb-fixed-both) {
+	@import "3-columns-fluid-sb-fixed-both.less";
+}
+.layout(@layout) when (@layout = 3-columns-fluid-sb-fixed-left) {
+	@import "3-columns-fluid-sb-fixed-left.less";
+}
+.layout(@layout) when (@layout = 3-columns-fluid-sb-fixed-right) {
+	@import "3-columns-fluid-sb-fixed-right.less";
+}
+.layout(@layout) when (@layout = 3-columns-percentage-sb-both) {
+	@import "3-columns-percentage-sb-both.less";
+}
+.layout(@layout) when (@layout = 3-columns-percentage-sb-left) {
+	@import "3-columns-percentage-sb-left.less";
+}
+.layout(@layout) when (@layout = 3-columns-percentage-sb-right) {
+	@import "3-columns-percentage-sb-right.less";
+}
+.layout(@layout) when (@layout = 3-columns-sb-both-hybrid-left) {
+	@import "3-columns-sb-both-hybrid-left.less";
+}
+.layout(@layout) when (@layout = 3-columns-sb-both-hybrid-right) {
+	@import "3-columns-sb-both-hybrid-right.less";
+}
+.layout(@layout) when (@layout = 3-columns-sb-left-hybrid) {
+	@import "3-columns-sb-left-hybrid.less";
+}
+.layout(@layout) when (@layout = 3-columns-sb-right-hybrid) {
+	@import "3-columns-sb-right-hybrid.less";
+}
 
-.layout(@layout);
+.layout(@layout);*/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.