Commit a9185f4e authored by Ian Dennis Miller's avatar Ian Dennis Miller

cards are closed, to start

parent cea4b1a8
......@@ -2,39 +2,33 @@ var toggle_article = function(id) {
// find the article button
var button = document.getElementById(id + "-button");
hide_picker();
untoggle_article();
close_ui();
// if cards are not filtered
if (! filtered) {
filtered = true;
filter_id = id;
// hide all
for (var i = 0; i < divs.length; i++){
divs[i].style.display = "none";
}
// show just this article
var els = document.querySelectorAll('[about="#' + id + '"]');
for (var i = 0; i < els.length; i++){
els[i].style.display = "block";
}
filter_id = id;
button.classList.add('filtered');
close_ui();
// hide all
for (var i = 0; i < divs.length; i++){
divs[i].style.display = "none";
}
else {
untoggle_article();
// show just this article
var els = document.querySelectorAll('[about="#' + id + '"]');
for (var i = 0; i < els.length; i++){
els[i].style.display = "block";
}
button.classList.add('filtered');
}
var untoggle_article = function() {
filtered = false;
// filtered = false;
var buttons = document.querySelectorAll('#article-list a.filtered');
for (var i = 0; i < buttons.length; i++) {
var button = buttons[i];
button.classList.remove('filtered');
}
show_all();
// show_all();
}
var hide_picker = function() {
......@@ -47,7 +41,7 @@ var show_picker = function() {
var els = document.querySelectorAll('#article-list');
els[0].style.display = "block";
hide_keywords();
untoggle_article();
// untoggle_article();
open_ui();
}
......
......@@ -8,9 +8,9 @@ var swiper = new Swipe(document.getElementsByTagName('body')[0]);
function main() {
// display all cards
show_all();
// show_all();
close_ui();
show_appearances();
// show_appearances();
// init keyboard
document.onkeydown = handler;
......
......@@ -31,6 +31,7 @@ body.focused {
.card {
border: 1px solid;
margin: 0em auto 1em auto;
display: none;
padding: 0.5em;
break-inside: avoid-column;
background: rgb(255, 255, 255);
......@@ -74,7 +75,7 @@ ul {
}
a.filtered {
font-style: italic;
font-weight: bold;
}
.search ul {
......
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