woodpecker/server/template/user_repos.amber

40 lines
1,017 B
Text

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
div.repo-list
each $repo in Repos
a.pure-g.repo-item.searchable[data-status=Active][href="/"+Host+"/"+Owner+"/"+Name][data-index=Owner+"/"+Name]
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; }";
});