Skip to content

Commit 499238b

Browse files
authored
Merge pull request official-stockfish#18 from daylen/revert
Revert "Merge pull request official-stockfish#17 from daylen/note"
2 parents 1426d40 + 3ae9435 commit 499238b

File tree

4 files changed

+30
-54
lines changed

4 files changed

+30
-54
lines changed

assets/js/scripts.js

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const body = document.querySelector('body')
2-
const menuTrigger = document.querySelector('#toggle-main-menu-mobile');
3-
const menuContainer = document.querySelector('#main-menu-mobile');
1+
var body = document.querySelector('body')
2+
var menuTrigger = document.querySelector('#toggle-main-menu-mobile');
3+
var menuContainer = document.querySelector('#main-menu-mobile');
44

55
menuTrigger.onclick = function() {
66
menuContainer.classList.toggle('open');
@@ -25,11 +25,11 @@ function IsOldWindows() {
2525
}
2626

2727
function GetFastAndSlow(json, old_windows) {
28-
let fast = {};
29-
let slow = {};
30-
// console.log(json.files);
31-
for (let obj of json.files) {
32-
// console.log(obj);
28+
var fast = {};
29+
var slow = {};
30+
console.log(json.files);
31+
for (var obj of json.files) {
32+
console.log(obj);
3333
if (obj.tags && obj.tags.includes( (old_windows ? 'lt_' : '') + 'win10_fast' )) {
3434
fast = obj;
3535
}
@@ -40,25 +40,16 @@ function GetFastAndSlow(json, old_windows) {
4040
return [fast, slow];
4141
}
4242

43-
const windows_table = document.getElementById('windows-table');
43+
var windows_table = document.getElementById('windows-table');
4444
if (windows_table) {
4545
fetch('/windows.json?a').then(response => response.json()).then(data => {
46-
// console.log(data);
47-
const fast_and_slow = GetFastAndSlow(data, IsOldWindows());
48-
// console.log(fast_and_slow);
49-
windows_table.querySelector('.fast').href = fast_and_slow[0].file;
50-
windows_table.querySelector('.fast span').textContent = fast_and_slow[0].arch;
51-
windows_table.querySelector('.compat').href = fast_and_slow[1].file;
52-
windows_table.querySelector('.compat span').textContent = fast_and_slow[1].arch;
53-
})
54-
}
46+
console.log(data);
47+
var fast_and_slow = GetFastAndSlow(data, IsOldWindows());
48+
console.log(fast_and_slow);
49+
document.getElementById('windows-fast-button').href = fast_and_slow[0].file;
50+
document.getElementById('windows-fast-text').innerHTML = fast_and_slow[0].arch;
51+
document.getElementById('windows-compat-button').href = fast_and_slow[1].file;
52+
document.getElementById('windows-compat-text').innerHTML = fast_and_slow[1].arch;
5553

56-
const linux_table = document.getElementById('linux-table');
57-
if (linux_table) {
58-
fetch('/linux.json?a').then(response => response.json()).then(data => {
59-
linux_table.querySelector('.fast').href = data.files[0].file;
60-
linux_table.querySelector('.fast span').textContent = data.files[0].arch;
61-
linux_table.querySelector('.compat').href = data.files[1].file;
62-
linux_table.querySelector('.compat span').textContent = data.files[1].arch;
6354
})
6455
}

assets/scss/components/_content.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@
9393
blockquote {
9494
padding: 0 1em;
9595
color: $steel;
96-
border-left: .25em solid $primary;
96+
border-left: .25em solid $secondary;
9797
}
9898
}

content/download/_index.html

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@
44
aliases:
55
- /mac/
66
---
7-
<blockquote>
8-
<p><b>Note:</b> Stockfish is a <a target="_blank" href="https://disservin.github.io/stockfish-docs/pages/Stockfish-FAQ.html#executing-stockfish-opens-a-cmd-window">command line program</a>. You may want to use it in your own <a target="_blank" href="https://disservin.github.io/stockfish-docs/pages/Download-and-usage.html#download-a-chess-gui">chess GUI</a>.</p>
9-
</blockquote>
10-
117
<h2>Windows</h2>
12-
<table id="windows-table">
8+
<p>Note: The Stockfish chess engine is a command line program. You may want to use it in your own UCI-compatible <a href="https://disservin.github.io/stockfish-docs/pages/Download-and-usage.html">chess GUI</a>.</p>
9+
<table width="100%" id="windows-table">
1310
<tr>
1411
<td><b>⚡️ Faster</b>: Works on modern computers. </td>
15-
<td><a href="#" class="radius success button fast">Download (<span></span>)</a></td>
12+
<td><a href="#" class="radius success button" id="windows-fast-button">Download (<span id="windows-fast-text"></span>)</a></td>
1613
</tr>
1714
<tr>
1815
<td><b>🐢 More compatible</b>: Is a bit slower, but works on the vast majority of computers. </td>
19-
<td><a href="#" class="radius success button compat">Download (<span></span>)</a></td>
16+
<td><a href="#" class="radius success button" id="windows-compat-button">Download (<span id="windows-compat-text"></span>)</a></td>
2017
</tr>
2118
</table>
2219
If you're looking for binaries for a specific CPU architecture, <a href="/download/windows">see all Windows binaries</a>
2320

2421
<h2>Android</h2>
25-
<table>
22+
<p>Note: The Stockfish chess engine is a command line program. You may want to use it in your own UCI-compatible <a href="https://disservin.github.io/stockfish-docs/pages/Download-and-usage.html">chess GUI</a>.</p>
23+
<table width="100%">
2624
<tr>
2725
<td><b>⚡️ Faster</b>: Works on most Android devices. </td>
2826
<td><a href="https://github.com/official-stockfish/Stockfish/releases/download/sf_16/stockfish-android-armv8.tar" class="radius success button">Download (ARMv8)</a></td>
@@ -33,7 +31,6 @@ <h2>Android</h2>
3331
<a href="https://github.com/official-stockfish/Stockfish/releases/download/sf_16/stockfish-android-armv7-neon.tar" class="radius success button">Download (ARMv7 NEON)</a></td>
3432
</tr>
3533
</table>
36-
3734
<h2>macOS</h2>
3835
<p>The easiest way to get started is with the Stockfish app:<br />
3936
<a href="https://itunes.apple.com/us/app/stockfish/id801463932?ls=1&mt=12"><img src="/svg/mac-app-store.svg" width="240px" class="sfm-store-button"></a>
@@ -47,28 +44,18 @@ <h2>iOS</h2>
4744
</p>
4845

4946
<h2>Linux</h2>
50-
<table id="linux-table">
51-
<tr>
52-
<td><b>⚡️ Faster</b>: Works on modern computers. </td>
53-
<td><a href="#" class="radius success button fast">Download (<span></span>)</a></td>
54-
</tr>
55-
<tr>
56-
<td><b>🐢 More compatible</b>: Is a bit slower, but works on the vast majority of computers. </td>
57-
<td><a href="#" class="radius success button compat">Download (<span></span>)</a></td>
58-
</tr>
59-
</table>
60-
If you're looking for binaries for a specific CPU architecture, <a href="/download/linux">see all Linux binaries</a>
47+
<a href="/download/linux">See all Linux binaries</a>
48+
6149

6250
<hr>
6351
<h2>Source Code</h2>
6452
<ul class="small-block-grid-2">
65-
<li><a href="https://github.com/official-stockfish/Stockfish" class="" >Stockfish engine on GitHub</a></li>
66-
<li><a href="https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_16.zip" class="" >Download Stockfish 16 source (zip)</a></li>
67-
<li><a href="https://github.com/daylen/stockfish-mac" class="" >Stockfish for Mac on GitHub</a></li>
53+
<li><a href="https://github.com/official-stockfish/Stockfish" class="" >Stockfish engine on GitHub</a></li>
54+
<li><a href="https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_16.zip" class="" >Download Stockfish 16 source (zip)</a></li>
55+
<li><a href="https://github.com/daylen/stockfish-mac" class="" >Stockfish for Mac on GitHub</a></li>
6856
</ul>
69-
7057
<h2>Other Versions</h2>
7158
<ul class="small-block-grid-2">
72-
<li><a href="https://github.com/official-stockfish/Stockfish/releases?q=prerelease%3Atrue" class="" >Pre-release builds</a></li>
73-
<li><a href="https://www.dropbox.com/sh/75gzfgu7qo94pvh/NlXX-QLGu6" class="" >Old (archived) releases of Stockfish</a></li>
59+
<li><a href="https://github.com/official-stockfish/Stockfish/releases?q=prerelease%3Atrue" class="" >Pre-release builds</a></li>
60+
<li><a href="https://www.dropbox.com/sh/75gzfgu7qo94pvh/NlXX-QLGu6" class="" >Old (archived) releases of Stockfish</a></li>
7461
</ul>

layouts/_default/baseof.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
<!-- dummy to force publishing of windows.json -->
3939
{{ $windows_json := resources.Get "windows.json" }}
4040
{{ $windows_json_link := $windows_json.RelPermalink }}
41-
{{ $linux_json := resources.Get "linux.json" }}
42-
{{ $linux_json_link := $linux_json.RelPermalink }}
4341

4442
{{ block "footer_js" . }}
4543
{{ end }}

0 commit comments

Comments
 (0)