harness-drone/server/template/user_repos.amber

41 lines
1,017 B
Text
Raw Normal View History

2014-06-04 21:25:38 +00:00
extends base
block title
| Repos
block content
article
header
h1 My Repos
a[href="/"].pure-button
i.fa.fa-rss
section
form.pure-form.search-form
input[type="search"][placeholder="Filter List"].pure-u-1#search
2014-06-04 21:25:38 +00:00
div.repo-list
each $repo in Repos
a.pure-g.repo-item.searchable[data-status=Active][href="/"+Host+"/"+Owner+"/"+Name][data-index=Owner+"/"+Name]
2014-06-04 21:25:38 +00:00
div.pure-u-11-12
h2
span #{Owner}
span.divider /
span #{Name}
div.pure-u-1-12
if Active
span.repo-active On
else
span.repo-inactive Off
block append scripts
style#search_style
script[type="text/javascript"]
var searchStyle = document.getElementById('search_style');
document.getElementById('search').addEventListener('input', function() {
if (!this.value) {
searchStyle.innerHTML = "";
return;
}
// look ma, no indexOf!
searchStyle.innerHTML = ".searchable:not([data-index*=\"" + this.value + "\"]) { display: none; }";
});