diff --git a/index.html b/index.html index 610f9cc..23609b7 100644 --- a/index.html +++ b/index.html @@ -23,10 +23,10 @@

about

The Code52 gang are putting together some stylesheets and resources for people looking to get more familiar with Metro.

Much like the Twitter Bootstrap project (which was one of the inspirations for this project), the site uses LESS to build the stylesheets on-the-fly. So if you wanted to test this locally, you'd need something like Jekyll or our own Pretzel to serve up the content (as the generation is done using Javascript and you will likely encounter file:// permission issues). - +

While you can just go and grab the code from GitHub, feel free to click around the site and see more for yourself. - +

demos

-

tiles

+

tiles

@@ -86,7 +86,7 @@

tiles

- +
@@ -98,25 +98,62 @@

tiles

-
+

test

test

test

test

-
+

test

test

test

test

test

-
+ + +

small tiles

+
+
+ + + + +
+ +
+ + + + +
+
+ + + + +
+
+ + + + +
+
+

test

+

test

+

test

+

test

+

test

+
+
+ - + + - - \ No newline at end of file + diff --git a/less/tiles.less b/less/tiles.less index 113057a..771a25c 100644 --- a/less/tiles.less +++ b/less/tiles.less @@ -1,20 +1,23 @@ -@tilebasewidth : 130; -@tilepadding: 5; -@tilemargin: 10; +@tilebasewidth: 130px; +@tilepadding: 5px; +@tilemargin: 10px; @tilesize: (@tilepadding*2) + @tilebasewidth + @tilemargin; +@2tilewidth: (@tilebasewidth + @tilemargin) *2; +@smalltilesize: (@tilepadding*2) + @tilebasewidth /2 + @tilemargin; +@small2tilewidth: (@tilebasewidth /2 + @tilemargin) *2; .tile { -webkit-perspective: 0; -webkit-transform-style: preserve-3d; -webkit-transition: -webkit-transform 0.2s; float: left; - margin-right: @tilemargin + 0px; - margin-bottom: @tilemargin + 0px; + margin-right: @tilemargin; + margin-bottom: @tilemargin; text-align:center; - padding: @tilepadding + 0px; + padding: @tilepadding; opacity:0.75; - h1, h2, h3, h4, h5, h6 { + h1, h2, h3, h4, h5, h6 { color: @white; -webkit-user-select: none; } @@ -28,29 +31,45 @@ .tile img { border :0;} .tile:hover { opacity:1;} .tiles { .clear; } -.tilerow { - float:left; +.tilerow { + float:left; -webkit-perspective: 0; -webkit-transform-style: preserve-3d; - -webkit-user-select: none; -} + -webkit-user-select: none; +} + +.tilesize(@width, @height) { + width: @width; + height: @height; +} .one { - width: @tilebasewidth + 0px; - height: @tilebasewidth + 0px; + .tilesize(@tilebasewidth, @tilebasewidth); } .two-h { - width: (@tilebasewidth + @tilemargin) *2 + 0px; - height: @tilebasewidth + 0px; + .tilesize(@2tilewidth, @tilebasewidth); } .two-v { - width: @tilebasewidth + 0px; - height: (@tilebasewidth + @tilemargin)*2 + 0px; + .tilesize(@tilebasewidth, @2tilewidth); } -.firstcol, .secondcol, .thirdcol, .fourthcol, .fifthcol { position: absolute;} -.firstcol { } -.secondcol { margin-left: @tilesize*1px; } -.thirdcol { margin-left: @tilesize*2px; } -.fourthcol { margin-left: @tilesize*3px; } -.fifthcol { margin-left: @tilesize*4px; } +.half-h { + .tilesize(@small2tilewidth, @tilebasewidth /2); +} +.half-v { + .tilesize(@tilebasewidth /2, @small2tilewidth); +} +.quarter { + .tilesize(@tilebasewidth /2, @tilebasewidth /2); +} +.firstcol, .secondcol, .thirdcol, .fourthcol, .fifthcol, .smallfirstcol, .smallsecondcol, .smallthirdcol, .smallfourthcol, .smallfifthcol { position: absolute;} +.firstcol { } +.secondcol { margin-left: @tilesize*1; } +.thirdcol { margin-left: @tilesize*2; } +.fourthcol { margin-left: @tilesize*3; } +.fifthcol { margin-left: @tilesize*4; } +.smallfirstcol { } +.smallsecondcol { margin-left: @smalltilesize*1; } +.smallthirdcol { margin-left: @smalltilesize*2; } +.smallfourthcol { margin-left: @smalltilesize*3; } +.smallfifthcol { margin-left: @smalltilesize*4; }