Skip to content

Commit 7652870

Browse files
committed
feat: variables, move msdl to macro
1 parent 665fff1 commit 7652870

File tree

7 files changed

+95
-57
lines changed

7 files changed

+95
-57
lines changed

docs/getting-started/installation.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ See the alternatives below.
4343
!!! question "Which version should I choose?"
4444
If you meet the official requirements, we **strongly** recommend choosing Windows 11. If not, use Windows 10.
4545

46-
<!--
47-
The ISO downloader JavaScript is rewritten from the MSDL website by Gravesoft on GitHub.
48-
Major credit to them and MSDL's various contributors! :)
49-
50-
GNU Affero General Public License v3.0 is the license for the MSDL JavaScript included here on the
51-
Atlas docs, as per the original project: https://github.com/gravesoft/msdl/blob/main/LICENSE
52-
-->
53-
5446
??? grey-tip "Alternatives"
5547
=== "Windows Media Creation Tool"
5648

@@ -63,32 +55,7 @@ See the alternatives below.
6355
1. Choose the **ISO file** option, then choose the download location
6456
1. After the ISO has completed downloading, click **Finish**
6557

66-
<center class="noJs centerMsdl">
67-
<div class="msdl-button-container">
68-
<button class="msdl-button" style="margin-right: 2px" onclick="getWindows(2935);">Download Windows 11 64-bit</button>
69-
<button class="msdl-button" style="margin-left: 2px" onclick="getWindows(2618);">Download Windows 10 64-bit</button>
70-
</div>
71-
72-
<div id="msdl-ms-content"></div>
73-
74-
<div id="msdl-please-wait">
75-
<p>Please wait...</p>
76-
</div>
77-
78-
<div id="msdl-processing-error">
79-
<p>An error has occurred while processing your request. Try refreshing the page or using an alternative method.</p>
80-
<p id="msdl-error-code">Error: Unknown</p>
81-
</div>
82-
83-
<div id="msdl-download">
84-
<p>A download should soon be started, if not, <a id="msdl-download-link" href="about:blank">click here download the ISO</a>.</p>
85-
</div>
86-
87-
<input id="msdl-session-id" type="hidden">
88-
89-
:simple-github: **Credit to the** [Microsoft Software Download Listing](https://github.com/gravesoft/msdl) **project**
90-
</center>
91-
58+
--8<-- "msdl.md"
9259
<!-- --8<-- [end:iso1] -->
9360

9461
<!-- --8<-- [start:drivers] -->

docs/install-faq/windows-version-support.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ icon: material/list-status
99

1010
---
1111

12-
Atlas only supports the latest, [non-beta/non-Insider](https://en.wikipedia.org/wiki/Windows_Insider) versions of Windows 10 and 11. Insider isn't supported for stability and privacy, as it usually has bugs we can't account for, and it requires sending extra diagnostic data to Microsoft.
12+
As of the latest version, Atlas only supports:
13+
{ .annotate }
14+
15+
- **Windows 11:**
16+
--8<-- "vars.md:win11"
17+
- **Windows 10:**
18+
--8<-- "vars.md:win10"
19+
20+
Only the latest [non-beta/non-Insider](https://en.wikipedia.org/wiki/Windows_Insider) versions are supported. Insider isn't for stability and privacy, as it usually has bugs we can't account for, and it requires sending extra diagnostic data to Microsoft.
1321

1422
We *strongly recommend* following our [installation guide](../getting-started/installation.md) for installing a supported version, as the initial Atlas install requires a Windows reinstallation regardless.
1523

@@ -22,4 +30,4 @@ The only exclusions to this are:
2230
- Enterprise LTSC editions
2331
- Atlas already debloats Windows' included apps
2432
- Windows Server
25-
- Supporting it would require too much extra testing
33+
- Supporting it would require too much extra testing

docs/javascript/misc.v1.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/javascript/misc.v2.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
function removeCSSRule(selector) {
3+
for (let i = 0; i < document.styleSheets.length; i++) {
4+
let stylesheet = document.styleSheets[i];
5+
try {
6+
for (let j = 0; j < stylesheet.cssRules.length; j++) {
7+
let rule = stylesheet.cssRules[j];
8+
if (rule.selectorText === selector) {
9+
stylesheet.deleteRule(j);
10+
return;
11+
}
12+
}
13+
} catch {
14+
// do nothing
15+
}
16+
}
17+
}
18+
19+
removeCSSRule('.noJs');
20+
});

includes/msdl.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
The ISO downloader JavaScript is rewritten from the MSDL website by Gravesoft on GitHub.
3+
Major credit to them and MSDL's various contributors! :)
4+
5+
GNU Affero General Public License v3.0 is the license for the MSDL JavaScript included here on the
6+
Atlas docs, as per the original project: https://github.com/gravesoft/msdl/blob/main/LICENSE
7+
-->
8+
9+
<center class="noJs centerMsdl">
10+
<div class="msdl-button-container">
11+
<button markdown class="msdl-button" style="margin-right: 2px" onclick="
12+
getWindows(
13+
--8<-- "vars.md:win11productId"
14+
);
15+
">
16+
Download Windows 11
17+
--8<-- "vars.md:win11"
18+
</button>
19+
<button class="msdl-button" style="margin-left: 2px" onclick="
20+
getWindows(
21+
--8<-- "vars.md:win10productId"
22+
);
23+
">
24+
Download Windows 10
25+
--8<-- "vars.md:win10"
26+
</button>
27+
</div>
28+
29+
<div id="msdl-ms-content"></div>
30+
31+
<div id="msdl-please-wait">
32+
<p>Please wait...</p>
33+
</div>
34+
35+
<div id="msdl-processing-error">
36+
<p>An error has occurred while processing your request. Try refreshing the page or using an alternative method.</p>
37+
<p id="msdl-error-code">Error: Unknown</p>
38+
</div>
39+
40+
<div id="msdl-download">
41+
<p>A download should soon be started, if not, <a id="msdl-download-link" href="about:blank">click here download the ISO</a>.</p>
42+
</div>
43+
44+
<input id="msdl-session-id" type="hidden">
45+
46+
:simple-github: **Credit to the** [Microsoft Software Download Listing](https://github.com/gravesoft/msdl) **project**
47+
</center>

includes/vars.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# MSDL
2+
<!-- --8<-- [start:win11] -->
3+
23H2
4+
<!-- --8<-- [end:win11] -->
5+
<!-- --8<-- [start:win11productId] -->
6+
2935
7+
<!-- --8<-- [end:win11productId] -->
8+
9+
<!-- --8<-- [start:win10] -->
10+
22H2
11+
<!-- --8<-- [end:win10] -->
12+
<!-- --8<-- [start:win10productId] -->
13+
2618
14+
<!-- --8<-- [end:win10productId] -->

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ theme:
170170
extra_javascript:
171171
- javascript/msdl.v1.js
172172
- javascript/init_kapa_widget.v2.js
173-
- javascript/misc.v1.js
173+
- javascript/misc.v2.js
174174

175175

176176
extra_css:
@@ -265,8 +265,8 @@ markdown_extensions:
265265
# https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#snippets
266266
- pymdownx.snippets:
267267
auto_append:
268-
- includes/abbreviations.md
269-
base_path: ['./docs/getting-started/', '.']
268+
- abbreviations.md
269+
base_path: ['./docs/getting-started/', 'includes']
270270

271271
# https://squidfunk.github.io/mkdocs-material/reference/content-tabs
272272
- pymdownx.tabbed:

0 commit comments

Comments
 (0)