diff --git a/_posts/custom-layout-modes/2011-12-05-big-graph.html b/_posts/custom-layout-modes/2011-12-05-big-graph.html new file mode 100644 index 0000000..6d16185 --- /dev/null +++ b/_posts/custom-layout-modes/2011-12-05-big-graph.html @@ -0,0 +1,196 @@ +--- +title: BIG Graph +layout: default +category: custom-layout-modes +--- + +
+

Custom layout mode to replicate the Flash interface of big.dk. Similiar to Category rows, item elements are grouped by their sorting data into columns.

+ +{% highlight javascript %} + +$container.isotope({ + layoutMode: 'bigGraph', + bigGraph: { + columnWidth: 45, // size of item + rowHeight: 45, // size of item + maxRows: 11, // max number of items vertically + gutterWidth: { // width of gutter, needs to match getSortData names + year: 0, + scale: 60, + program: 40, + status: 60, + title: 0 + } + }, + // options... +}); + +{% endhighlight %} + +

To use this layout mode, grab the $.Isotope.prototype methods from the script at the bottom of this page's source.

+ +
+ +
+ +

Sort

+ + + +
+ +
+ +
+ + + + + + diff --git a/css/style.css b/css/style.css index d9f05f6..a5f5ff6 100644 --- a/css/style.css +++ b/css/style.css @@ -754,6 +754,64 @@ code .nd { color: #9FAD7E; } /* CSS pseudo selector */ font-size: 20px; } +/**** BIG Graph ****/ + +.big-graph { + background: white; + height: 600px; + margin: 20px auto; +} + +.big-graph .project { + width: 45px; + height: 45px; + float: left; +} + +.big-graph .project .icon { + pointer-events: none; + width: 31px; + height: 31px; + background: white; + margin-left: 7px; + -webkit-transition: -webkit-transform 0.25s; + -moz-transition: -moz-transform 0.25s; + -ms-transition: -ms-transform 0.25s; + -o-transition: -o-transform 0.25s; + transition: transform 0.25s; +} + +.big-graph .project:hover { + z-index: 5; + +} + +.big-graph .project:hover .icon { + -webkit-transform: scale(3); + -moz-transform: scale(3); + -ms-transform: scale(3); + -o-transform: scale(3); + transform: scale(3); +} + +.big-graph .project.commercial .icon { background: #6B6B6B; } +.big-graph .project.urbanism .icon { background: #00CF00; } +.big-graph .project.public-space .icon { background: #FF8D00; } +.big-graph .project.culture .icon { background: #D61919; } +.big-graph .project.body-culture .icon { background: #00ECFF; } +.big-graph .project.health .icon { background: #FF2251; } +.big-graph .project.education .icon { background: #00A700; } +.big-graph .project.housing .icon { background: #FF02FF; } +.big-graph .project.hotel .icon { background: #0000C3; } +.big-graph .project.media .icon { background: #292929; } + +.big-graph .project p { + line-height: 14px; + font-size: 10.5px; + color: black; + margin-left: 7px; +} + /**** Infinite Scroll ****/ #infscr-loading { diff --git a/js/make-big-graph-projects.js b/js/make-big-graph-projects.js new file mode 100644 index 0000000..a820a18 --- /dev/null +++ b/js/make-big-graph-projects.js @@ -0,0 +1,43 @@ +var programs = 'commercial urbanism public-space culture body-culture health education housing hotel media'.split(' '), + programsLen = programs.length, + statuses = 'idea in-progress under-construction completed'.split(' '), + statusesLen = statuses.length; + +function randInt(num) { + return Math.floor( Math.random() * num ); +} + +function getChar() { + var code; + if ( Math.random() < 0.05 ) { + // number + code = randInt(10) + 48; + } else { + // alpha + code = randInt(24) + 65; + } + return String.fromCharCode(code); +} + +function makeBigGraphProject() { + var year = 2001 + randInt(11), + i = Math.floor( Math.random() * 2 + 3 ), + title = ''; + while (i--) { + title += getChar(); + } + var program = programs[ randInt( programsLen ) ]; + status = statuses[ randInt( statusesLen ) ]; + scale = randInt(20); + + project = '
' + + '

' + title + '

' + + '
'; + + return project; +} \ No newline at end of file