Commit 91b3e64e authored by Sindre Sorhus's avatar Sindre Sorhus

Site: Use CSS3 columns instead of Bootstrap grid for the lists of apps

parent 6762ec68
......@@ -21,7 +21,7 @@
<p>Helping you <strong>select</strong> a MV* framework</p>
<nav>
<a href="#" class="zocial red">Download (1.0)</a>
<a href="#" class="zocial red">Project on GitHub</a>
<a href="https://github.com/addyosmani/todomvc" class="zocial red">Project on GitHub</a>
</nav>
</div>
<div class="span4">
......@@ -35,78 +35,74 @@
for structuring and organizing JavaScript web apps. Backbone, Spine, Ember (SproutCore 2.0), JavaScriptMVC... the list of new and stable solutions goes on and on, but just how do you decide on which to use in a sea of so many options?</p>
<p>To help solve this problem, we created <a href="https://github.com/addyosmani/todomvc">TodoMVC</a> - a project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.</p>
</div>
<div class="span8 applist">
<div class="span8">
<h2>Our Stable Apps</h2>
<div class="row">
<div class="span2">
<ul class="applist">
<li>
<a class="routing" href="architecture-examples/angularjs/" data-source="http://angularjs.org" data-content="What HTML would have been had it been designed for web apps">AngularJS</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/backbone/" data-source="http://documentcloud.github.com/backbone/" data-content="Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.">Backbone.js</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/emberjs/" data-source="http://emberjs.com" data-content="Ember is a JavaScript framework for creating ambitious web applications that eliminates boilerplate and provides a standard application architecture.">Ember.js</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/spine/" data-source="http://spinejs.com" data-content="Spine is a lightweight framework for building JavaScript web applications. Spine gives you an MVC structure and then gets out of your way, allowing you to concentrate on the fun stuff, building awesome web applications.">Spine.js</a>
<span class="label">R</span>
</div>
</div>
<div class="row">
<div class="span2">
</li>
<li>
<a href="architecture-examples/knockoutjs/" data-source="http://knockoutjs.com" data-content="Simplify dynamic JavaScript UIs by applying the Model-View-View Model (MVVM) pattern">KnockoutJS</a>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/dojo/" data-source="http://dojotoolkit.org" data-content="Dojo saves you time and scales with your development process, using web standards as its platform. It’s the toolkit experienced developers turn to for building high quality desktop and mobile web applications.">Dojo</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/yuilibrary/" data-source="http://yuilibrary.com" data-content="YUI's lightweight core and modular architecture make it scalable, fast, and robust. Built by frontend engineers at Yahoo!, YUI powers the most popular websites in the world.">YUILibrary</a>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/gwt/" data-source="https://developers.google.com/web-toolkit/" data-content="Google Web Toolkit (GWT) is an MVP development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords.">GWT</a>
</div>
</div>
<div class="row">
<div class="span2">
</li>
<li>
<a href="architecture-examples/closure/" data-source="http://code.google.com/closure/library/" data-content="The Closure Library is a broad, well-tested, modular, and cross-browser JavaScript library. You can pull just what you need from a large set of reusable UI widgets and controls, and from lower-level utilities for DOM manipulation, server communication, animation, data structures, unit testing, rich-text editing, and more.">Closure</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="labs/architecture-examples/extjs/" data-source="http://www.sencha.com/products/extjs" data-content="Ext JS 4 is the next major advancement in our JavaScript framework. Featuring expanded functionality, plugin-free charting, and a new MVC architecture it's the best Ext JS yet. Create incredible web apps for every browser.">Ext.js</a>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/agilityjs/" data-source="http://agilityjs.com" data-content="Agility.js is an MVC library for Javascript that lets you write maintainable and reusable browser code without the infrastructural overhead found in other MVC libraries. The goal is to enable developers to write web apps at least as quickly as with jQuery, while simplifying long-term maintainability through MVC objects.">Agility.js</a>
<span class="label">R</span>
</div>
<div class="span2">
</li>
<li>
<a href="architecture-examples/knockback/" data-source="http://kmalakoff.github.com/knockback/" data-content="Knockback.js provides Knockout.js magic for Backbone.js Models and Collections.">Knockback.js</a>
<span class="label">R</span>
</div>
</div>
</li>
</ul>
<hr>
<h2>Apps using RequireJS/AMD</h2>
<div class="row">
<div class="span4">
<ul class="applist amd">
<li>
<a href="dependency-examples/backbone_require/" data-source="http://requirejs.org" data-content="RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.">Backbone.js + RequireJS</a>
</div>
<div class="span4">
</li>
<li>
<a href="dependency-examples/emberjs_require/" data-source="http://emberjs.com" data-content="Ember is a JavaScript framework for creating ambitious web applications that eliminates boilerplate and provides a standard application architecture. This is an example of using it with AMD modules">Ember.js + RequireJS</a>
<span class="label">R</span>
</div>
</div>
</li>
</ul>
<h2>Compare these to a non-framework implementation</h2>
<div class="row">
<div class="span4">
<ul class="applist">
<li>
<a href="vanilla-examples/vanillajs/" data-source="https://developer.mozilla.org/en/JavaScript" data-content="You know JavaScript right? :P">Vanilla JS</a>
</div>
<div class="span4">
</li>
<li>
<a href="architecture-examples/jquery/" data-source="http://jquery.com" data-content="jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.">jQuery</a>
</div>
</div>
</li>
</ul>
<p>* <span class="label">R</span> = App also demonstrates routing</p>
</div>
</div>
......@@ -268,7 +264,6 @@
</footer>
</div>
<script src="assets/jquery.min.js"></script>
<script src="site/js/jquery.hoverIntent.min.js"></script>
<script src="site/js/bootstrap.min.js"></script>
<script src="site/js/main.js"></script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
......
......@@ -105,8 +105,24 @@ header nav a:first-child {
margin-bottom: 20px;
}
.applist .row > div {
.applist {
list-style: none;
margin: 0;
-webkit-columns: 4;
-moz-columns: 4;
-ms-columns: 4;
-o-columns: 4;
columns: 4;
}
.applist li {
white-space: nowrap;
padding-bottom: 20px;
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
-ms-column-break-inside: avoid;
-o-column-break-inside: avoid;
column-break-inside: avoid;
}
.applist a {
......@@ -126,6 +142,14 @@ header nav a:first-child {
color: red;
}
.applist.amd {
-webkit-columns: 2;
-moz-columns: 2;
-ms-columns: 2;
-o-columns: 2;
columns: 2;
}
.applist.labs {
-webkit-columns: 3;
-moz-columns: 3;
......@@ -134,20 +158,6 @@ header nav a:first-child {
columns: 3;
}
.applist.labs {
list-style: none;
margin: 0;
}
.applist.labs li {
margin-bottom: 20px;
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
-ms-column-break-inside: avoid;
-o-column-break-inside: avoid;
column-break-inside: avoid;
}
.credit a {
margin: 0 5px;
white-space: nowrap;
......@@ -221,7 +231,7 @@ a.zocial {
}
@media (max-width: 480px) {
.applist.labs {
body .applist {
-webkit-columns: auto !important;
-moz-columns: auto !important;
-ms-columns: auto !important;
......@@ -261,12 +271,22 @@ a.zocial {
margin: auto;
}
.applist.labs {
-webkit-columns: 2;
-moz-columns: 2;
-ms-columns: 2;
-o-columns: 2;
columns: 2;
.applist {
-webkit-columns: 2 !important;
-moz-columns: 2 !important;
-ms-columns: 2 !important;
-o-columns: 2 !important;
columns: 2 !important;
}
}
@media (max-width: 980px) {
.applist {
-webkit-columns: 3;
-moz-columns: 3;
-ms-columns: 3;
-o-columns: 3;
columns: 3;
}
}
......
/**
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
* @param f onMouseOver function || An object with configuration options
* @param g onMouseOut function || Nothing (use configuration options object)
* @author Brian Cherne brian(at)cherne(dot)net
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment