diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d345d1 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +deploy: + -rm -r dist + mkdir dist + cp flashcards.* dist + git describe --always --tags | xargs --replace=INSERTED -- sed -i -e 's/%VERSION%/INSERTED/' dist/* + aws s3 sync dist s3://flashcards.jdbernard.com + rm -r dist diff --git a/flashcards.css b/flashcards.css index fe6b359..d2ea3b4 100644 --- a/flashcards.css +++ b/flashcards.css @@ -57,10 +57,12 @@ button { #settings .visibility-indicator { display: inline-block; + font-size: 80%; transition: all linear 0.2s; } #settings #adv-settings { + font-size: 80%; max-height: 0; overflow: hidden; transition: max-height linear 0.3s; @@ -68,7 +70,7 @@ button { #settings.adv-settings-visible #adv-settings { max-height: 40%; - overflow-y: scroll; + overflow: scroll; } #settings.adv-settings-visible .visibility-indicator { @@ -187,7 +189,7 @@ input[name=importFileName] { } #debug { - /* display: none; */ + display: none; position: absolute; bottom: 0; right: 0; diff --git a/flashcards.html b/flashcards.html index e8cd5d5..6d1928f 100644 --- a/flashcards.html +++ b/flashcards.html @@ -3,6 +3,8 @@ Simple Flashcards + + @@ -63,6 +65,7 @@
+ Version %VERSION% small medium large diff --git a/flashcards.js b/flashcards.js index 9ccb31e..6e28261 100644 --- a/flashcards.js +++ b/flashcards.js @@ -5,7 +5,8 @@ nextCardIdx: 0, cardOrder: [], // elements are objects: { name: 'abc', cards: 'xyz' } savedSets: [], - $: document.querySelector.bind(document) + $: document.querySelector.bind(document), + version: "%VERSION%" }; FC.shuffle = function(inArray) { @@ -93,6 +94,7 @@ FC.cardOrder = FC.shuffle(orderedIndices); } + FC.$('html').requestFullscreen(); FC.showNextCard(); FC.runningInterval = setInterval(FC.showNextCard, FC.currentSet.slidePeriod * 1000); FC.bodyEl.classList.remove('settings-visible'); @@ -100,6 +102,7 @@ FC.stopCards = function(ev) { clearInterval(FC.runningInterval); + document.exitFullscreen(); FC.bodyEl.classList.add('settings-visible'); };