mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-06-01 05:41:31 +00:00
ui: highlight relevant book
This commit is contained in:
parent
cf12b481a9
commit
9202583619
|
@ -27,9 +27,11 @@ make tsweb
|
||||||
npm test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note: Github tests may fail due to lack of permissions.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © 2019 [Steven Hugg](https://github.com/sehugg).
|
Copyright © 2016-2020 [Steven Hugg](https://github.com/sehugg).
|
||||||
|
|
||||||
This project is [GPL-3.0](https://github.com/sehugg/8bitworkshop/blob/master/LICENSE) licensed.
|
This project is [GPL-3.0](https://github.com/sehugg/8bitworkshop/blob/master/LICENSE) licensed.
|
||||||
|
|
||||||
|
|
|
@ -560,6 +560,13 @@ div.asset_toolbar {
|
||||||
.book-title {
|
.book-title {
|
||||||
font-size:12pt;
|
font-size:12pt;
|
||||||
}
|
}
|
||||||
|
.book-active span {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.book-active span::after {
|
||||||
|
font-size: x-large;
|
||||||
|
content: ' \2b50';
|
||||||
|
}
|
||||||
.pc-console {
|
.pc-console {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
color: #7f7f7f;
|
color: #7f7f7f;
|
||||||
|
|
|
@ -258,25 +258,25 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="booksMenuButton">
|
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="booksMenuButton">
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item dropdown-link" target="_book_a2600" href="https://www.amazon.com/gp/product/1541021304/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&tag=pzp-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B01N4DSRIZ&linkId=04d39e274c06e6c93b93d20a9a977111">
|
<a class="dropdown-item dropdown-link book-vcs" target="_book_a2600" href="https://www.amazon.com/gp/product/1541021304/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&tag=pzp-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B01N4DSRIZ&linkId=04d39e274c06e6c93b93d20a9a977111">
|
||||||
<img src="images/book_a2600.png"/>
|
<img src="images/book_a2600.png"/>
|
||||||
<span class="book-title">Making Games For The Atari 2600</span>
|
<span class="book-title">Making Games For The Atari 2600</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item dropdown-link" target="_book_arcade" href="https://www.amazon.com/gp/product/1545484759/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1545484759&linkCode=as2&tag=pzp-20&linkId=b27709c022d2ebe639e90316d9f4fd5b">
|
<a class="dropdown-item dropdown-link book-arcade" target="_book_arcade" href="https://www.amazon.com/gp/product/1545484759/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1545484759&linkCode=as2&tag=pzp-20&linkId=b27709c022d2ebe639e90316d9f4fd5b">
|
||||||
<img src="images/book_arcade.png"/>
|
<img src="images/book_arcade.png"/>
|
||||||
<span class="book-title">Making 8-bit Arcade Games in C</span>
|
<span class="book-title">Making 8-bit Arcade Games in C</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item dropdown-link" target="_book_verilog" href="https://www.amazon.com/gp/product/1728619440/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1728619440&linkCode=as2&tag=pzp-20&linkId=7237a25861cb6b49a4128ba53d84c3e2">
|
<a class="dropdown-item dropdown-link book-verilog" target="_book_verilog" href="https://www.amazon.com/gp/product/1728619440/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1728619440&linkCode=as2&tag=pzp-20&linkId=7237a25861cb6b49a4128ba53d84c3e2">
|
||||||
<img src="images/book_verilog.png"/>
|
<img src="images/book_verilog.png"/>
|
||||||
<span class="book-title">Designing Video Game Hardware in Verilog</span>
|
<span class="book-title">Designing Video Game Hardware in Verilog</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item dropdown-link" target="_book_nes" href="https://www.amazon.com/gp/product/1075952727/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1075952727&linkCode=as2&tag=pzp-20&linkId=633176e8b36fea7f927020e2c322d80a">
|
<a class="dropdown-item dropdown-link book-nes" target="_book_nes" href="https://www.amazon.com/gp/product/1075952727/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1075952727&linkCode=as2&tag=pzp-20&linkId=633176e8b36fea7f927020e2c322d80a">
|
||||||
<img src="images/book_nes.png"/>
|
<img src="images/book_nes.png"/>
|
||||||
<span class="book-title">Making Games For The NES</span>
|
<span class="book-title">Making Games For The NES</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -805,7 +805,7 @@ function _downloadCassetteFile(e) {
|
||||||
var blob = new Blob([audout], {type: "audio/wav"});
|
var blob = new Blob([audout], {type: "audio/wav"});
|
||||||
saveAs(blob, audpath);
|
saveAs(blob, audpath);
|
||||||
stdout += "Then connect your audio output to the cassette input, turn up the volume, and play the audio file.";
|
stdout += "Then connect your audio output to the cassette input, turn up the volume, and play the audio file.";
|
||||||
alertInfo(stdout);
|
alertInfo('<pre style="white-space: pre-wrap">'+stdout+'</pre>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1926,9 +1926,17 @@ async function startPlatform() {
|
||||||
updateSelector();
|
updateSelector();
|
||||||
addPageFocusHandlers();
|
addPageFocusHandlers();
|
||||||
showInstructions();
|
showInstructions();
|
||||||
|
updateBooksMenu();
|
||||||
revealTopBar();
|
revealTopBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateBooksMenu() {
|
||||||
|
if (getRootBasePlatform(platform_id) == 'nes') $(".book-nes").addClass("book-active");
|
||||||
|
else if (getRootBasePlatform(platform_id) == 'vcs') $(".book-vcs").addClass("book-active");
|
||||||
|
else if (getRootBasePlatform(platform_id) == 'verilog') $(".book-verilog").addClass("book-active");
|
||||||
|
else if (platform.getToolForFilename(getCurrentMainFilename()) == 'sdcc') $(".book-arcade").addClass("book-active");
|
||||||
|
}
|
||||||
|
|
||||||
function revealTopBar() {
|
function revealTopBar() {
|
||||||
setTimeout(() => { $("#controls_dynamic").css('visibility','inherit'); }, 250);
|
setTimeout(() => { $("#controls_dynamic").css('visibility','inherit'); }, 250);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user