Commit 3748eaa1 authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #433 from passy/collapsed-news

Site - No-JS expander
parents c62974b0 d583b025
...@@ -245,7 +245,8 @@ ...@@ -245,7 +245,8 @@
<h2>New in 1.1 - TBA</h2> <h2>New in 1.1 - TBA</h2>
<ul class="whats-new"> <ul class="whats-new">
<li>We now have 18 stable apps and 35 in labs. <li>We now have 18 stable apps and 35 in labs.
<a href="#" data-target="#new-apps" class="expander">New since 1.0.1 ▼</a> <label for="news-expander"><a>New since 1.0.1 ▼</a></label>
<input type="checkbox" id="news-expander">
<ul class="collapsed" id="new-apps"> <ul class="collapsed" id="new-apps">
<li><a href="architecture-examples/dart/web/">Dart</a></li> <li><a href="architecture-examples/dart/web/">Dart</a></li>
<li><a href="labs/architecture-examples/typescript-backbone/">TypeScript + Backbone.js</a></li> <li><a href="labs/architecture-examples/typescript-backbone/">TypeScript + Backbone.js</a></li>
......
...@@ -202,7 +202,11 @@ p .label { ...@@ -202,7 +202,11 @@ p .label {
transition: max-height 1s; transition: max-height 1s;
} }
.collapsed.expanded { #news-expander {
display: none;
}
#news-expander:checked ~ .collapsed {
max-height: 999px; max-height: 999px;
} }
......
...@@ -132,19 +132,9 @@ ...@@ -132,19 +132,9 @@
}); });
}; };
$.fn.expander = function () {
this.click(function (ev) {
ev.preventDefault();
$($(this).data('target')).toggleClass('expanded');
});
};
// Apps popover // Apps popover
$('.applist a').persistantPopover(); $('.applist a').persistantPopover();
// What's new expander
$('.expander').expander();
// Quotes // Quotes
$('.quotes').quote([{ $('.quotes').quote([{
quote: 'TodoMVC is a godsend for helping developers find what well-developed frameworks match their mental model of application architecture.', quote: 'TodoMVC is a godsend for helping developers find what well-developed frameworks match their mental model of application architecture.',
......
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