Skip to content

Commit

Permalink
adds more examples, removes prettify layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Aug 30, 2013
1 parent 887e05f commit 9615741
Show file tree
Hide file tree
Showing 29 changed files with 507 additions and 101 deletions.
8 changes: 8 additions & 0 deletions Gruntfile.js
Expand Up @@ -82,6 +82,14 @@ module.exports = function(grunt) {
styles: 'button-040/styles.css'
}
},
button041: {
files: {'_demo/button-041/': ['button-041/index.hbs']},
options: {
partials: 'button-041/button.hbs',
data: 'button-041/*.json',
styles: 'button-041/styles.css'
}
},
button050: {
files: {'_demo/button-050/': ['button-050/index.hbs']},
options: {
Expand Down
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -9,6 +9,11 @@ Each example in the project demonstrates a different approach to separating conc
No judgement is made concerning how much abstraction is good or bad.







## TODO

* versatile button that can be `<a href="#"></a>`, `<button></button>`, `<input type="text">` etc.
Expand Down
138 changes: 68 additions & 70 deletions _demo/button-020/index.html
Expand Up @@ -14,76 +14,74 @@
</head>
<body>
<div class="page-wrap no-transitions" id="page-wrap">
<div class="effeckt effeckt-demo-buttons group">
<header>
<h2>Example 2: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
</h2>
<span class="source">
Source:
<a href="http://lab.hakim.se/effeckt/">Hakim El Hattab</a>
</span>
</header>
<div class="button-demo-wrap">
<button class="effeckt-button expand-right topcoat-button">
<span class="label">Expand Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-left topcoat-button">
<span class="label">Expand Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-up topcoat-button">
<span class="label">Expand Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-down topcoat-button">
<span class="label">Expand Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-left topcoat-button">
<span class="label">Slide Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-right topcoat-button">
<span class="label">Slide Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-up topcoat-button">
<span class="label">Slide Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-down topcoat-button">
<span class="label">Slide Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-out topcoat-button">
<span class="label">Zoom Out</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-in topcoat-button">
<span class="label">Zoom in</span>
<span class="spinner"></span>
</button>
</div>
<header>
<h2>Example 1: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
</h2>
<span class="source">
Source:
<a href="http://lab.hakim.se/effeckt/">Hakim El Hattab</a>
</span>
</header>
<div class="button-demo-wrap">
<button class="effeckt-button expand-right topcoat-button">
<span class="label">Expand Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-left topcoat-button">
<span class="label">Expand Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-up topcoat-button">
<span class="label">Expand Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-down topcoat-button">
<span class="label">Expand Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-left topcoat-button">
<span class="label">Slide Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-right topcoat-button">
<span class="label">Slide Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-up topcoat-button">
<span class="label">Slide Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-down topcoat-button">
<span class="label">Slide Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-out topcoat-button">
<span class="label">Zoom Out</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-in topcoat-button">
<span class="label">Zoom in</span>
<span class="spinner"></span>
</button>
</div>
</div>

Expand Down
9 changes: 2 additions & 7 deletions _demo/button-021/index.html
Expand Up @@ -14,14 +14,9 @@
</head>
<body>
<div class="page-wrap no-transitions" id="page-wrap">
<div class="effeckt group">
<div class="effeckt effeckt-demo-buttons group">
<header>
<h2>
<a href=".html">#</a>
</h2>
</header>
<header>
<h2>Example 1: Topcoat Buttons + Effeckt.css
<h2>Example 2: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
</h2>
<span class="source">
Expand Down
105 changes: 105 additions & 0 deletions _demo/button-041/index.html
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Button Examples</title>
<meta name="viewport" content="user-scalable=no,initial-scale = 1.0,maximum-scale = 1.0">
<link rel="stylesheet" href="../assets/css/demo.autoprefixed.css">
<link rel="stylesheet" href="../assets/css/effeckt.autoprefixed.css">
<link rel="stylesheet" href="../assets/css/topcoat-mobile-dark.autoprefixed.css">
<link rel="stylesheet" href="../../button-041/styles.css">

<!-- Vendor Libs -->
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/modernizr.js"></script>
</head>
<body>
<div class="page-wrap no-transitions" id="page-wrap">
<div class="effeckt effeckt-demo-buttons group">
<header>
<h2>Example 4: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
</h2>
<span class="source">
Source:
<a href="http://lab.hakim.se/effeckt/">Hakim El Hattab</a>
</span>
</header>
<div class="button-demo-wrap">
<button class="effeckt-button expand-right topcoat-button">
<span class="label">Expand Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-left topcoat-button">
<span class="label">Expand Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-up topcoat-button">
<span class="label">Expand Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button expand-down topcoat-button">
<span class="label">Expand Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-left topcoat-button">
<span class="label">Slide Left</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-right topcoat-button">
<span class="label">Slide Right</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-up topcoat-button">
<span class="label">Slide Up</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button slide-down topcoat-button">
<span class="label">Slide Down</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-out topcoat-button">
<span class="label">Zoom Out</span>
<span class="spinner"></span>
</button>
</div>
<div class="button-demo-wrap">
<button class="effeckt-button zoom-in topcoat-button">
<span class="label">Zoom In</span>
<span class="spinner"></span>
</button>
</div>
</div>
</div>

<!-- Demo -->
<script src="../assets/js/demo.js"></script>

<!-- Libs -->
<script src="../assets/js/modals.js"></script>
<script src="../assets/js/buttons.js"></script>
<script src="../assets/js/list-items.js"></script>
<script src="../assets/js/off-screen-nav.js"></script>
<script src="../assets/js/page-transitions.js"></script>
<script src="../assets/js/list-scroll.js"></script>
<script>
stroll.bind('.effeckt-demo-list-scroll ul');
</script>
</body>
</html>
22 changes: 22 additions & 0 deletions button-000/README.md
@@ -0,0 +1,22 @@
# Buttons Example #001

> Basic example, with component listed multiple times, wrapped with a layout.
## demo
### markup

### data

## component
### markup

### data



### index.hbs

* All demo markup for the component is constrained to a single page.
* [layout](), `default.hbs`, is used to "wrap" the demo page with a common head and footer. This layout is defined in the Gruntfile, in Assemble's task-level options.
* Each `button` "modifier" is listed in full, versus externalizing the modifiers into "includes" or partial views.
* Extraneous information about the demo is also embedded in the HTML with the component examples.
22 changes: 22 additions & 0 deletions button-010/README.md
@@ -0,0 +1,22 @@
# Buttons Example #010

> Basic example, with component listed multiple times, wrapped with a layout.
## demo
### markup

### data

## component
### markup

### data



### index.hbs

* All demo markup for the component is constrained to a single page.
* [layout](), `default.hbs`, is used to "wrap" the demo page with a common head and footer. This layout is defined in the Gruntfile, in Assemble's task-level options.
* Each `button` "modifier" is listed in full, versus externalizing the modifiers into "includes" or partial views.
* Extraneous information about the demo is also embedded in the HTML with the component examples.
4 changes: 4 additions & 0 deletions button-010/index.hbs
@@ -1,4 +1,6 @@
<div class="effeckt effeckt-demo-buttons group">

{{!-- demo metadata --}}
<header>
<h2>Example 1: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
Expand All @@ -8,6 +10,8 @@
<a href="http://lab.hakim.se/effeckt/">Hakim El Hattab</a>
</span>
</header>

{{!-- buttons --}}
<div class="button-demo-wrap">
<button class="effeckt-button expand-right topcoat-button">
<span class="label">Expand Right</span>
Expand Down
4 changes: 4 additions & 0 deletions button-011/index.hbs
@@ -1,5 +1,7 @@
<div class="effeckt effeckt-demo-buttons group">

{{!-- demo metadata --}}

<header>
<h2>Example 1: Topcoat Buttons + Effeckt.css
<a href="buttons.html">#</a>
Expand All @@ -10,6 +12,8 @@
</span>
</header>

{{!-- button component --}}

<div class="button-demo-wrap">
{{> button-expand-right }}
</div>
Expand Down
11 changes: 11 additions & 0 deletions button-020/README.md
@@ -0,0 +1,11 @@
# Buttons Example #2

> Basic example, with component externalized.
### index.hbs

* `button` component is externalized to a `buttons.hbs`.
* Demo page, `index.hbs`, lists out each button modifier as a separate "include".
* [layout](), `default.hbs`, is used to "wrap" the demo page with a common head and footer. This layout is defined in the Gruntfile, in Assemble's task-level options.
* Each `button` "modifier" is listed in full, versus externalizing the modifiers into "includes" or partial views.
* Extraneous information about the demo is also embedded in the HTML with the component examples.

0 comments on commit 9615741

Please sign in to comment.