Sha256: b6a7a093d6e5c01639a0d3362d085969f191ef780b9588d363181662e52e6d5a

Contents?: true

Size: 1.14 KB

Versions: 11

Compression:

Stored size: 1.14 KB

Contents

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 = '<div class="project ' + program + '" ' + 
    'data-year="' + year + '" ' +
    'data-program="' + program + '" ' +
    'data-scale="' + scale + '" ' +
    'data-status="' + status + '" ' +
    '><div class="icon"></div>' + 
    '<p class="title">' + title + '</p>' +
    '</div>';

  return project;
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bonethug-0.0.17 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.16 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.15 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.14 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.13 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.12 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.11 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.10 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.7 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.6 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js
bonethug-0.0.5 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/js/make-big-graph-projects.js