diff --git a/src/creator.coffee b/src/creator.coffee index af36b39..93834d7 100755 --- a/src/creator.coffee +++ b/src/creator.coffee @@ -194,7 +194,7 @@ Hangman.controller 'HangmanCreatorCtrl', ['$timeout', '$scope', '$sanitize', 'Re $scope.hideCover() $scope.hideCover = -> - $scope.showTitleDialog = $scope.showIntroDialog = false + $scope.showTitleDialog = $scope.showIntroDialog = $scope.questionBankDialog = false $scope.initNewWidget = (widget, baseUrl) -> $scope.$apply -> diff --git a/src/creator.html b/src/creator.html index 82049fc..1b96ccf 100644 --- a/src/creator.html +++ b/src/creator.html @@ -27,7 +27,12 @@

- +

Incorrect guesses per phrase

@@ -170,34 +175,10 @@

Phrase

{{currentPage+1}}/{{numberOfPages()}}
-
-
-
-
- Enable question bank? -
- - No - Yes - -
-
-
- - How many questions to ask? -
- - out of {{items.length}} -
-
-
-
- -
Click here to add your first question
-
+

Guess the Phrase

@@ -213,5 +194,29 @@

Guess the Phrase

+
+
+ Enable question bank? +
+ + No + Yes + +
+
+
+ + How many questions to ask? +
+ + out of {{items.length}} +
+
+
+ +
+ diff --git a/src/creator.scss b/src/creator.scss index 83c913d..0b9173e 100644 --- a/src/creator.scss +++ b/src/creator.scss @@ -483,6 +483,81 @@ button.add-question { } } +.questionBankDialog { + + position: fixed; + top: 50%; + left: 50%; + margin: 0; + transform: translate(-50%, -50%); + background-color: white; + padding: 0; + height: 200px; + width: 300px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + + input { + margin-top: 0; + padding: 0; + width: unset; + background: white; + font-size: 17px; + text-align: center; + border: none; + vertical-align: unset; + font-family: 'Lato'; + } + .num-input-wrapper { + display: flex; + justify-content: center; + width: 100%; + align-items: center; + margin-bottom: 15px; + + .numInput { + color: black; + outline: 1px solid black; + width: 35px; + margin: 2px 5px 0 0; + } + } + + .enable-qb-question { + margin-top: 15px; + margin-bottom: 15px; + + .enable-qb-options { + display: flex; + justify-content: center; + } + } + + .dialogCloseButton { + position: relative; + margin-top: 5px; + margin-bottom: 5px; + font-size: 15px; + width: 100px; + background-color: #70bd34; + color: black; + + &:hover { + background-color: #88df45; + border: 1px solid #88df45; + color: black; + cursor: pointer; + } + + &:disabled { + background-color: #cccccc; + color: white; + } + } +} + .arrow-box { position: absolute; background: #fbf767; @@ -622,9 +697,37 @@ button.add-question { .questionBankButton { position: absolute; - background-color: #5a5a5a; + background-color: $green; + color: #fff; + width: unset; right: 550px; top: 35px; + + &:hover { + background-color: #7AD038; + cursor: pointer; + } + + &:disabled { + background-color: #ccc; + border: 1px solid #ccc; + color: #fff; + cursor: not-allowed; + } + + &.gray-out:not(:disabled) { + background-color: #5a5a5a; + border: 1px solid #5a5a5a; + color: #fff; + + &:hover { + background-color: #938f8f; + border: 1px solid #938f8f; + cursor: pointer; + } + + } + } .attempts { @@ -780,57 +883,6 @@ button.add-question { } } -.questionBankDialog-wrapper { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - border: 5px solid greenyellow; - border-radius: 5px; - background-color: white; - color: black; - height: 300px; - width: 250px; - z-index: 10000; - display: flex; - justify-content: center; - align-items: center; - - .questionBankDialog { - margin: 15px; - - .numInput { - width: 30px; - margin-top: 10px; - } - - .enable-qb-question { - margin-top: 15px; - margin-bottom: 15px; - } - - } - - .dialogCloseButton { - position: absolute; - bottom: 10px; - background-color: rgb(26, 244, 171); - color: black; - } - -} - -// To blur the background while the dialog is open -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 9000; - backdrop-filter: blur(5px); - } - .question-tip { position: absolute; right: 28px;