From e228509ff7c8d97b7597254300e80b165fa18eac Mon Sep 17 00:00:00 2001 From: Klemek Date: Tue, 29 Aug 2023 16:44:26 +0200 Subject: [PATCH] both sides in memory helper --- index.html | 5 +++++ main.js | 11 +++++++++-- style.css | 4 ++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 94219a4..a37cea0 100644 --- a/index.html +++ b/index.html @@ -36,6 +36,11 @@

{{showConfig ? '▾' : '▸'}} List ({{ available.length }})

+ + + + + diff --git a/main.js b/main.js index e900c73..e722d68 100644 --- a/main.js +++ b/main.js @@ -59,6 +59,8 @@ let app = { done: [], newRow: [ '', '' ], showConfig: true, + q2a: true, + a2q: false, }; }, computed: { @@ -112,8 +114,13 @@ let app = { } if (this.current.length > 0) { - this.question = this.current[0][0]; - this.answer = this.current[0][1]; + if ((this.a2q && !this.q2a) || (this.a2q === this.q2a && utils.randint(0, 2) === 1)) { + this.anser = this.current[0][0]; + this.question = this.current[0][1]; + } else { + this.question = this.current[0][0]; + this.answer = this.current[0][1]; + } } }, }, diff --git a/style.css b/style.css index bc4f6dc..2fb0cd4 100644 --- a/style.css +++ b/style.css @@ -142,6 +142,10 @@ table.config td input { width: 15em; } +table.config td input[type=checkbox] { + width: inherit !important; +} + .expand { cursor: pointer; user-select: none;
 Q → A A → Q