Skip to content

Commit aab7702

Browse files
committed
Several improvements
1 parent 5585988 commit aab7702

10 files changed

Lines changed: 170 additions & 115 deletions

File tree

‎.github/workflows/format-html-tidy.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: github.actor != 'github-actions[bot]'
2222

23+
defaults:
24+
run:
25+
shell: bash
26+
2327
steps:
2428
- name: Checkout (push)
2529
if: github.event_name == 'push'
@@ -36,7 +40,6 @@ jobs:
3640
ref: ${{ github.event.pull_request.head.sha }}
3741

3842
- name: Ensure ksh (package) + tidy are installed and /bin/ksh exists
39-
shell: bash
4043
run: |
4144
set -euo pipefail
4245
@@ -50,13 +53,11 @@ jobs:
5053
tidy -version
5154
5255
- name: Run formatter script (ksh)
53-
shell: bash
5456
run: |
5557
/bin/ksh ./scripts/format-html-tidy.ksh
5658
5759
- name: Commit & push changes (push event)
5860
if: github.event_name == 'push'
59-
shell: bash
6061
run: |
6162
set -euo pipefail
6263
if [ -n "$(git status --porcelain)" ]; then
@@ -71,7 +72,6 @@ jobs:
7172
7273
- name: Commit & push changes (PR from same repo)
7374
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
74-
shell: bash
7575
run: |
7676
set -euo pipefail
7777
if [ -n "$(git status --porcelain)" ]; then
@@ -86,7 +86,6 @@ jobs:
8686
8787
- name: Fail if formatting changed files (PR from fork cannot be pushed)
8888
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
89-
shell: bash
9089
run: |
9190
set -euo pipefail
9291
if [ -n "$(git status --porcelain)" ]; then

‎LICENSE‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,13 @@ sublicensing and sale of copies of the content, as well as the right to allow
88
access to the content provided to third parties. It should be noted that the
99
content is provided without warranty of any kind, either express or implied.
1010
However, the authors are confident that the information provided in the content
11-
of this website is accurate and beneficial to the intended audience.
11+
of this website is accurate and beneficial to the intended audience.
12+
13+
The following files are subject to different terms of use:
14+
15+
./styles.css
16+
./popup-fallback.js
17+
./scripts/format-html-tidy.ksh
18+
19+
These files are licensed under a ISC-like license, which can be found in the
20+
respective files.

‎articles/linux-hardening.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Linux Hardening Guide - The Cyberpunk Handbook</title>
6+
<title>The Cyberpunk Handbook - Linux Hardening Guide</title>
77
<link rel="icon" href="./../favicon.ico" type="image/x-icon">
88
<link rel="stylesheet" href="./../styles.css">
99
<script src="./../popup-fallback.js"></script>
@@ -194,9 +194,7 @@ <h3>Summary</h3>
194194

195195
<footer>
196196
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
197-
198-
<p><em>Perpetual and free authorization is hereby granted to any individual who acquires a copy of the content of this website, within the respective domains listed on the home page, for unrestricted use. This authorization includes, among other rights, the use, copying, modification, combination, publication, distribution, sublicensing and sale of copies of the content, as well as the right to allow access to the content provided to third parties. It should be noted that the content is provided without warranty of any kind, either express or implied. However, the authors are confident that the information provided in the content of this website is accurate and beneficial to the intended audience.</em>
199-
</p>
197+
<p><a href="./../license.html" target="_blank" rel="noopener noreferrer">License</a></p>
200198
</footer>
201199
</body>
202200
</html>

‎contact.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Contact - The Cyberpunk Handbook</title>
6+
<title>The Cyberpunk Handbook - Contact</title>
77
<link rel="icon" href="./favicon.ico" type="image/x-icon">
88
<link rel="stylesheet" href="./styles.css">
99
<script src="./popup-fallback.js"></script>
@@ -44,9 +44,7 @@ <h2>SimpleX group</h2>
4444

4545
<footer>
4646
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
47-
48-
<p><em>Perpetual and free authorization is hereby granted to any individual who acquires a copy of the content of this website, within the respective domains listed on the home page, for unrestricted use. This authorization includes, among other rights, the use, copying, modification, combination, publication, distribution, sublicensing and sale of copies of the content, as well as the right to allow access to the content provided to third parties. It should be noted that the content is provided without warranty of any kind, either express or implied. However, the authors are confident that the information provided in the content of this website is accurate and beneficial to the intended audience.</em>
49-
</p>
47+
<p><a href="./license.html" target="_blank" rel="noopener noreferrer">License</a></p>
5048
</footer>
5149
</body>
5250
</html>

‎index.html‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ <h4><a href="http://poy7mv4bgjnjgxq73hck72x5lnspvev4pnsiea2gdyegt7xpeg3q.b32.i2p
7575

7676
<footer>
7777
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
78-
79-
<p><em>Perpetual and free authorization is hereby granted to any individual who acquires a copy of the content of this website, within the respective domains listed on the home page, for unrestricted use. This authorization includes, among other rights, the use, copying, modification, combination, publication, distribution, sublicensing and sale of copies of the content, as well as the right to allow access to the content provided to third parties. It should be noted that the content is provided without warranty of any kind, either express or implied. However, the authors are confident that the information provided in the content of this website is accurate and beneficial to the intended audience.</em>
80-
</p>
78+
<p><a href="./license.html" target="_blank" rel="noopener noreferrer">License</a></p>
8179
</footer>
8280
</body>
8381
</html>

‎license.html‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>The Cyberpunk Handbook - License</title>
7+
<link rel="icon" href="./favicon.ico" type="image/x-icon">
8+
<link rel="stylesheet" href="./styles.css">
9+
<script src="./popup-fallback.js"></script>
10+
</head>
11+
<body>
12+
<header>
13+
<h1>License</h1>
14+
<nav>
15+
<a href="./index.html" target="_blank" rel="noopener noreferrer">Home</a>
16+
</nav>
17+
</header>
18+
19+
<main>
20+
<section>
21+
<p>Perpetual and free authorization is hereby granted to any individual who acquires a copy of the content of this website, within the respective domains listed on the home page, for unrestricted use. This authorization includes, among other rights, the use, copying, modification, combination, publication, distribution, sublicensing and sale of copies of the content, as well as the right to allow access to the content provided to third parties. It should be noted that the content is provided without warranty of any kind, either express or implied. However, the authors are confident that the information provided in the content of this website is accurate and beneficial to the intended audience.</p>
22+
23+
<h3>Files with Different Terms</h3>
24+
<ul>
25+
<li><a href="./styles.css" target="_blank" rel="noopener noreferrer">./styles.css</a></li>
26+
<li><a href="./popup-fallback.js" target="_blank" rel="noopener noreferrer">./popup-fallback.js</a></li>
27+
<li><a href="./scripts/format-html-tidy.ksh" target="_blank" rel="noopener noreferrer">./scripts/format-html-tidy.ksh</a></li>
28+
</ul>
29+
30+
<p>These files are licensed under an ISC-like license, which can be found in the respective files.</p>
31+
</section>
32+
</main>
33+
34+
<footer>
35+
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
36+
<p><a href="./license.html" target="_blank" rel="noopener noreferrer">License</a></p>
37+
</footer>
38+
</body>
39+
</html>

‎manifesto.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Manifesto - The Cyberpunk Handbook</title>
6+
<title>The Cyberpunk Handbook - Manifesto</title>
77
<link rel="icon" href="./favicon.ico" type="image/x-icon">
88
<link rel="stylesheet" href="./styles.css">
99
<script src="./popup-fallback.js"></script>
@@ -63,9 +63,7 @@ <h2>V. Present and Resistance</h2>
6363

6464
<footer>
6565
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
66-
67-
<p><em>Perpetual and free authorization is hereby granted to any individual who acquires a copy of the content of this website, within the respective domains listed on the home page, for unrestricted use. This authorization includes, among other rights, the use, copying, modification, combination, publication, distribution, sublicensing and sale of copies of the content, as well as the right to allow access to the content provided to third parties. It should be noted that the content is provided without warranty of any kind, either express or implied. However, the authors are confident that the information provided in the content of this website is accurate and beneficial to the intended audience.</em>
68-
</p>
66+
<p><a href="./license.html" target="_blank" rel="noopener noreferrer">License</a></p>
6967
</footer>
7068
</body>
7169
</html>

‎popup-fallback.js‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,30 @@
1616
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1717
*/
1818

19-
// Attempt to open target="_blank" links; if blocked, fall back to same-tab navigation.
19+
// Ask first: open in new tab or same tab for target="_blank" links.
20+
// Avoid opening before the user decides; fall back gracefully if pop-ups are blocked.
2021
document.addEventListener('click', function (event) {
22+
// Respect modified clicks (Ctrl/Cmd/Shift/Middle) and prior handlers.
23+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
24+
return;
25+
}
26+
2127
const link = event.target.closest('a[href]');
22-
if (!link) {
28+
if (!link || link.target !== '_blank') {
2329
return;
2430
}
2531

26-
if (link.target === '_blank') {
27-
const href = link.href;
28-
const opened = window.open(href, link.target);
32+
event.preventDefault();
33+
const href = link.href;
34+
35+
const openInNewTab = window.confirm('Open this link in a new tab?');
36+
if (openInNewTab) {
37+
const opened = window.open(href, '_blank');
2938
if (!opened) {
30-
event.preventDefault();
39+
// Pop-up blocked; fall back to same-tab navigation.
3140
window.location.href = href;
3241
}
42+
} else {
43+
window.location.href = href;
3344
}
3445
});

‎template.html‎

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

‎templates/articles.html‎

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>The Cyberpunk Handbook - PAGE TITLE</title>
7+
<link rel="icon" href="./../favicon.ico" type="image/x-icon">
8+
<link rel="stylesheet" href="./../styles.css">
9+
<script src="./../popup-fallback.js"></script>
10+
</head>
11+
<body>
12+
<header>
13+
<h1>ARTICLE TITLE</h1>
14+
</header>
15+
16+
<nav>
17+
<ul>
18+
<li><a href="./../index.html" target="_blank" rel="noopener noreferrer">Home</a></li>
19+
<li><a href="./../manifesto.html" target="_blank" rel="noopener noreferrer">Manifesto</a></li>
20+
<li><a href="./../contact.html" target="_blank" rel="noopener noreferrer">Contact</a></li>
21+
</ul>
22+
</nav>
23+
24+
<main>
25+
<article>
26+
<header>
27+
<p class="kicker">GUIDE / CATEGORY</p>
28+
29+
<h1>Article Title</h1>
30+
31+
<p class="meta">Updated <time datetime="2025-01-01">DATE</time> • Version v0.0.0</p>
32+
33+
<p class="lede">Short summary of what this guide covers and why it matters.</p>
34+
35+
<section>
36+
<h2>TL;DR</h2>
37+
38+
<ul>
39+
<li>Primary recommendation or outcome.</li>
40+
41+
<li>Secondary decision or warning.</li>
42+
43+
<li>Link to the most critical reference.</li>
44+
</ul>
45+
</section>
46+
</header>
47+
48+
<section>
49+
<h2>Context</h2>
50+
51+
<p>Describe threat model, prerequisites, and scope. Call out what is explicitly out of scope.</p>
52+
53+
<ul>
54+
<li>Assumption one</li>
55+
56+
<li>Assumption two</li>
57+
</ul>
58+
</section>
59+
60+
<section>
61+
<h2>Steps</h2>
62+
63+
<ol>
64+
<li>Step one</li>
65+
66+
<li>Step two</li>
67+
</ol>
68+
</section>
69+
70+
<section>
71+
<h2>Verification</h2>
72+
73+
<p>Document how to validate that the guidance worked (commands, screenshots, or checksums).</p>
74+
</section>
75+
76+
<section>
77+
<h2>References</h2>
78+
79+
<ul>
80+
<li><a href="https://example.com">Source one</a></li>
81+
82+
<li><a href="https://example.com">Source two</a></li>
83+
</ul>
84+
</section>
85+
</article>
86+
</main>
87+
88+
<footer>
89+
<p>&copy; 2025 The Cyberpunk Handbook Authors. All Rights Reserved.</p>
90+
<p><a href="./../license.html" target="_blank" rel="noopener noreferrer">License</a></p>
91+
</footer>
92+
</body>
93+
</html>

0 commit comments

Comments
 (0)