Skip to content

Commit f34688c

Browse files
committed
beta v1.2 - fixed mobile view
1 parent 37bde21 commit f34688c

File tree

7 files changed

+1041
-25
lines changed

7 files changed

+1041
-25
lines changed

about.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<div class="banner-extra" id="banner-extra">
1616
<p id="about" class="banner-text">about</p>
1717
<p class="banner-text unitalic"></p>
18-
<p id="source" class="banner-text">source code</p>
18+
<a href="https://github.com/thechesslibrary/thechesslibrary.github.io"><p id="source" class="banner-text">source code</p></a>
1919
<p class="banner-text unitalic"></p>
2020
<a href="../donate.html"><p id="donate" class="banner-text">donate</p></a>
2121
</div>
2222
<div class="about-text">
23-
<p style="color: aqua">beta v1.1<br></p>
23+
<p style="color: aqua">beta v1.2<br></p>
2424
<p style="display: inline-block;">The Chess Library is an open-source database of 700,000+ chess games, run by
2525
<a href="https://www.github.com/gitpushjoe" style="word-wrap: break-word;"><nobr>a single college student.</nobr></a> It's currently in open beta testing right now so if you have any suggestions, bug findings, questions, or would like to help expand the database,
2626
please share using the donate link above. (Note: The back-end web scraping and data formatting scripts will be up soon.)<br>&nbsp;<br><br>Sources:<br>

database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const b64FourChrToInt = (str) => {
8585

8686
$(document).on("boards-update", (event, boards) => {
8787
if (mainGame.currentBoard != 0)
88-
$(".banner-extra").css("visibility", "hidden");
88+
$(".banner-extra").css("visibility", "collapse");
8989
const task = new ScheduledTask(prepareDirectory, [event.detail.boards]).setLock(1).setNewSession(1).setSleep(10);
9090
scheduler.force(task); // force will add the current token to the task, which will be carried down the task chain
9191
});

donate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="banner-extra" id="banner-extra">
1616
<a href="../about.html"><p id="about" class="banner-text">about</p></a>
1717
<p class="banner-text unitalic"></p>
18-
<p id="source" class="banner-text">source code</p>
18+
<a href="https://github.com/thechesslibrary/thechesslibrary.github.io"><p id="source" class="banner-text">source code</p></a>
1919
<p class="banner-text unitalic"></p>
2020
<p id="donate" class="banner-text">donate</p>
2121
</div>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<div class="banner-extra" id="banner-extra">
2424
<a href="../about.html"><p id="about" class="banner-text">about</p></a>
2525
<p class="banner-text unitalic"></p>
26-
<p id="source" class="banner-text">source code</p>
26+
<a href="https://github.com/thechesslibrary/thechesslibrary.github.io"><p id="source" class="banner-text">source code</p></a>
2727
<p class="banner-text unitalic"></p>
2828
<a href="../donate.html"><p id="donate" class="banner-text">donate</p></a>
2929
</div>

move-display.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ function createBranch(id, move, white, draw, black, percentage, visibility='visi
4545
function updateBranch(id, move, white=0, draw=100, black=0, percentage=0, visibility='hidden') {
4646
let $branch = $(`.branch${id}`);
4747
if (!move) {
48-
$branch.css('visibility', 'hidden');
48+
$branch.css('visibility', 'collapse').css('display', 'none').css('height', '0px').css('min-height', '0px').css('padding-bottom', '0px');
4949
return;
5050
}
5151
$branch.find('.branch.text').text(move);
5252
$branch.find('.white-percentage').css('width', `${white}%`);
5353
$branch.find('.draw-percentage').css('width', `${draw}%`);
5454
$branch.find('.black-percentage').css('width', `${black}%`);
55-
percnetage = Math.round(percentage)
55+
percentage = Math.round(percentage)
5656
$branch.find('.branch.text.no-right-padding').text(`${Math.round(percentage)}%`);
57-
$branch.css('visibility', visibility);
57+
const display = visibility == 'hidden' ? 'none' : 'grid';
58+
$branch.css('visibility', visibility).css('display', display).css('height', '10%').css('min-height', '10%').css('padding-bottom', '1.5%');
5859
}
5960

6061
$(document).on("boards-update", (event, hoverGame = null) => {

0 commit comments

Comments
 (0)