Skip to content

Commit

Permalink
Mobile work for Check Selection section
Browse files Browse the repository at this point in the history
Expand buttons restyled
  • Loading branch information
wcolding committed Jan 19, 2024
1 parent d7116e1 commit 1a3f60b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 14 deletions.
88 changes: 77 additions & 11 deletions static/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ button {
font-size: small;
}

.gameContainer {
height: auto;
}

.checkElement {
margin: 0px;
padding: 0px;
Expand Down Expand Up @@ -101,7 +105,7 @@ button {
color: #44355B;
}

#loadPresetButtonMobile {
.mobileButton {
display: none;
}

Expand Down Expand Up @@ -140,14 +144,26 @@ select {
color: #BB342F;
}

.expandButton {
margin: 0px;
border: 0;
.expandButtonHolder {
display: inline-block;
margin: 0;
padding: 0;
height: 20px;
width: 20px;
vertical-align: text-top;
}

.expandButton {
display: block;
margin: 0;
padding:0;
border: 0;
height: 100%;
width: 100%;
font-size: smaller;
background-color: #221E22;
background-color: transparent;
color: white;
text-align: center;
}

.scrollingGamesList {
Expand Down Expand Up @@ -254,16 +270,23 @@ footer {
margin-bottom: 5px;
}

#copyAsPresetButton {
display: none;
input[type=checkbox] {
transform: scale(1.5);
-webkit-transform: scale(1.5);
}

#loadPresetButton {
label {
font-size: larger;
padding-left: 10px;
margin-bottom: 20px;
}

#copyAsPresetButton, #loadPresetButton, #generateButton {
display: none;
}

#loadPresetButtonMobile
{
.mobileButton {
display: block;
width: 100%;
font-size: large;
font-weight: bold;
Expand All @@ -272,7 +295,12 @@ footer {
margin-top: 20px;
padding: 10px;
font-size: x-large;
display: block;
color: #ECA72C;
background-color: #221E22;
}

.mobileButton:disabled {
color: #44355B;
}

.presetLabel {
Expand All @@ -283,4 +311,42 @@ footer {
.presetInfo {
font-size: larger;
}

.checksCounter, .objsCounter {
display: inline-block;
margin-right:10px;
font-size: large;
}

.optionsSection input[type=checkbox], .gameSelect input[type=checkbox]{
margin-bottom: 10px;
}

.scrollingGamesList {
margin-top: 0;
height: auto;
}

.expandButtonHolder {
transform: scale(1.5);
-webkit-transform: scale(1.5);
}

.gameName {
padding-left: 10px;
}

.checksCount {
display: block;
padding-left: 80px;
}

.checkElement {
display: block;
padding-left: 10px;
}

footer {
display: none;
}
}
4 changes: 4 additions & 0 deletions static/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,12 @@ function updateCounterDisplay() {
objsCounter.innerHTML = `Exclusive Checks: ${objectivesCounter}`;
setColor(checksCounter, selectCounter, randoCount);
let enoughObjectives = setColor(objsCounter, objectivesCounter, randoCount);

let generateButton = document.getElementById("generateButton");
generateButton.disabled = !enoughObjectives;

let mobileGenerateButton = document.getElementById("generateButtonMobile");
mobileGenerateButton.disabled = !enoughObjectives;
}

function setColor(object, counter, required) {
Expand Down
9 changes: 6 additions & 3 deletions templates/App.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h3>Presets</h3>
<button class="smallButton" id="loadPresetButton" onclick="loadSelectedPreset()">Load Preset</button><br>
<div class="presetLabel">Name:</div><div class="presetInfo" id="presetName"></div><br>
<div class="presetLabel">Description:</div><div class="presetInfo" id="presetDesc"></div>
<button class="smallButton" id="loadPresetButtonMobile" onclick="loadSelectedPreset()">Load Preset</button>
<button class="mobileButton" id="loadPresetButtonMobile" onclick="loadSelectedPreset()">Load Preset</button>
</div>

<div class="section" id="checkSelection">
Expand All @@ -56,8 +56,9 @@ <h3>Check Selection</h3>
<input type="checkbox" name="includeGameName" id="includeGameNameBox" onclick="writeSettings()">
<label for="includeGameNameBox">Include game name in squares</label>
</div>

<input class="mobileButton" id="generateButtonMobile" type="submit" value="Generate" disabled>
</div>

</form>
<button class="smallButton" id="copyAsPresetButton" onclick="copySelectedAsPreset()">Copy selected as Preset</button>
<br>
Expand All @@ -68,7 +69,9 @@ <h3>Check Selection</h3>

<div class="gameContainer">
<div class="gameSelect">
<button class="expandButton" onclick="showGameChecks('{{entry.game}}')" style="display: inline;" id="{{entry.game}}_expandButton">+</button>
<div class="expandButtonHolder">
<button class="expandButton" onclick="showGameChecks('{{entry.game}}')" id="{{entry.game}}_expandButton">+</button>
</div>
<label>
<input type=checkbox
id="{{entry.game}}_allSelect"
Expand Down

0 comments on commit 1a3f60b

Please sign in to comment.