Skip to content

Commit

Permalink
docs : create custom-layout-modes section
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Oct 18, 2011
1 parent a23c18e commit 346f846
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ <h2>Demos</h2>
{% endfor %}
</ul>

<h2>Custom layout modes</h2>

<ul>
{% for demo in site.categories['custom-layout-modes'] reversed %}
{% if page.title == demo.title and page.category == 'custom-layout-modes' %}
<li class="current"><a href="#content">{{ demo.title }}</a></li>
{% else %}
<li><a href="{{ link_path }}{{ demo.url }}">{{ demo.title }}</a>
{% endif %}
{% endfor %}
</ul>

<h2><a href="{{ root_path }}tests/index.html">Tests</a></h2>

</nav> <!-- #site-nav -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: centered masonry
title: Centered Masonry
layout: default
category: tests
category: custom-layout-modes
---

<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Category rows
layout: default
category: demos
category: custom-layout-modes
---

<section id="copy">
<p>This demo uses a custom layout mode, <code>categoryRows</code> that arranges elements into rows based on their category. The layout mode logic relies on sorting to define rows.</p>
<p>This demo uses a <a href="../docs/extending-isotope.html">custom layout mode</a>, <code>categoryRows</code> that arranges elements into rows based on their category. The layout mode logic relies on sorting to define rows.</p>
</section>

<section id="options" class="clearfix">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: masonry corner stamp
title: Masonry corner stamp
layout: default
category: tests
category: custom-layout-modes
---

<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: masonry gutters
title: Masonry gutters
layout: default
category: tests
category: custom-layout-modes
---

<style>
Expand Down
2 changes: 1 addition & 1 deletion _posts/docs/2011-05-25-extending-isotope.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $.extend( $.Isotope.prototype, {

{% endhighlight %}

[**See Demo: Category Rows**](../demos/category-rows.html)
[**See Custom layout mode: Category Rows**](../customer-layout-modes/category-rows.html)

All of the [default layout modes](../docs/layout-modes.html) follow this pattern. We'll look at the code behind the _fitRows_ layout mode.

Expand Down

0 comments on commit 346f846

Please sign in to comment.