Add fullscreen, deploy automation, versioning.
This commit is contained in:
parent
ff3702bb67
commit
776ed212f2
7
Makefile
Normal file
7
Makefile
Normal file
@ -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
|
@ -57,10 +57,12 @@ button {
|
|||||||
|
|
||||||
#settings .visibility-indicator {
|
#settings .visibility-indicator {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
font-size: 80%;
|
||||||
transition: all linear 0.2s;
|
transition: all linear 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings #adv-settings {
|
#settings #adv-settings {
|
||||||
|
font-size: 80%;
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height linear 0.3s;
|
transition: max-height linear 0.3s;
|
||||||
@ -68,7 +70,7 @@ button {
|
|||||||
|
|
||||||
#settings.adv-settings-visible #adv-settings {
|
#settings.adv-settings-visible #adv-settings {
|
||||||
max-height: 40%;
|
max-height: 40%;
|
||||||
overflow-y: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings.adv-settings-visible .visibility-indicator {
|
#settings.adv-settings-visible .visibility-indicator {
|
||||||
@ -187,7 +189,7 @@ input[name=importFileName] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#debug {
|
#debug {
|
||||||
/* display: none; */
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Simple Flashcards</title>
|
<title>Simple Flashcards</title>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
|
<meta name=viewport content='width=device-width,initial-scale=1'>
|
||||||
|
<meta name=application-name content='Simple Flashcards'>
|
||||||
|
|
||||||
<link rel=stylesheet href=flashcards.css type="text/css">
|
<link rel=stylesheet href=flashcards.css type="text/css">
|
||||||
<script src='flashcards.js'></script>
|
<script src='flashcards.js'></script>
|
||||||
@ -63,6 +65,7 @@
|
|||||||
<button id=stop-button>Stop</button>
|
<button id=stop-button>Stop</button>
|
||||||
</div>
|
</div>
|
||||||
<div id=debug>
|
<div id=debug>
|
||||||
|
Version %VERSION%
|
||||||
<span class=small-only>small</span>
|
<span class=small-only>small</span>
|
||||||
<span class=medium-only>medium</span>
|
<span class=medium-only>medium</span>
|
||||||
<span class=large-only>large</span>
|
<span class=large-only>large</span>
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
nextCardIdx: 0,
|
nextCardIdx: 0,
|
||||||
cardOrder: [], // elements are objects: { name: 'abc', cards: 'xyz' }
|
cardOrder: [], // elements are objects: { name: 'abc', cards: 'xyz' }
|
||||||
savedSets: [],
|
savedSets: [],
|
||||||
$: document.querySelector.bind(document)
|
$: document.querySelector.bind(document),
|
||||||
|
version: "%VERSION%"
|
||||||
};
|
};
|
||||||
|
|
||||||
FC.shuffle = function(inArray) {
|
FC.shuffle = function(inArray) {
|
||||||
@ -93,6 +94,7 @@
|
|||||||
FC.cardOrder = FC.shuffle(orderedIndices);
|
FC.cardOrder = FC.shuffle(orderedIndices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FC.$('html').requestFullscreen();
|
||||||
FC.showNextCard();
|
FC.showNextCard();
|
||||||
FC.runningInterval = setInterval(FC.showNextCard, FC.currentSet.slidePeriod * 1000);
|
FC.runningInterval = setInterval(FC.showNextCard, FC.currentSet.slidePeriod * 1000);
|
||||||
FC.bodyEl.classList.remove('settings-visible');
|
FC.bodyEl.classList.remove('settings-visible');
|
||||||
@ -100,6 +102,7 @@
|
|||||||
|
|
||||||
FC.stopCards = function(ev) {
|
FC.stopCards = function(ev) {
|
||||||
clearInterval(FC.runningInterval);
|
clearInterval(FC.runningInterval);
|
||||||
|
document.exitFullscreen();
|
||||||
FC.bodyEl.classList.add('settings-visible');
|
FC.bodyEl.classList.add('settings-visible');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user