chore: more fixes

This commit is contained in:
Dave Kerr
2025-03-10 15:08:18 +00:00
parent 692b7cca1a
commit 0a56479bd9
4 changed files with 27 additions and 22 deletions

View File

@@ -1,4 +1,11 @@
"""Generate the Hacker Laws website from the Hacker Laws README""" """Generate the Hacker Laws website from the Hacker Laws README"""
# TODO:
# - favicon
# - test share links
# - rubbish at bottom of pate
# - crosslink ES/HL/TAI
# - 'back to top' better text
import argparse import argparse
import os import os
import shutil import shutil

View File

@@ -22,18 +22,19 @@
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css">
</head> </head>
<body id="top"> <body id="top">
<nav class="navbar navbar-expand-lg navbar-custom fixed-top"> <nav class="navbar navbar-expand-lg fixed-top bg-dark" data-bs-theme="dark">
<div class="container"> <div class="container">
<a class="navbar-brand" href="#top">Hacker Laws</a> <a class="navbar-brand" href="#top">Hacker Laws</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navMenu"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navMenu">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navMenu"> <div class="collapse navbar-collapse justify-content-end" id="navMenu">
<ul class="navbar-nav me-auto"> <ul class="navbar-nav me-auto">
<li class="nav-item"><a class="nav-link" href="#">Effective Shell</a></li> <li class="nav-item"><a class="nav-link" href="https://effective-shell.com" target="_blank"><i class="bi bi-book"></i> Effective Shell</a></li>
<li class="nav-item"><a class="nav-link" href="#">Sponsor</a></li> <li class="nav-item"><a class="nav-link" href="https://github.com/dwmkerr/terminal-ai" target="_blank"><i class="bi bi-terminal"></i> Terminal AI</a></li>
<li class="nav-item"><a class="nav-link" href="#">Terminal AI</a></li> <li class="nav-item"><a class="nav-link" href="https://github.com/sponsors/dwmkerr" target="_blank"><i class="bi bi-cup-hot"></i> Sponsor</a></li>
</ul> </ul>
<button class="btn btn-outline-light" type="submit"><i class="bi bi-github"></i> GitHub</button>
</div> </div>
</div> </div>
</nav> </nav>

View File

@@ -1,3 +1,6 @@
html {
scroll-behavior: auto !important;
}
body { body {
font-family: 'Inter', sans-serif; font-family: 'Inter', sans-serif;
@@ -8,21 +11,16 @@ body {
.container { .container {
max-width: 800px; max-width: 800px;
} }
.navbar-custom {
background-color: #fff;
border-bottom: 1px solid #e5e5e5;
}
.navbar-brand, .nav-link {
font-weight: 700;
}
header { header {
text-align: center; text-align: center;
margin-bottom: 2rem; margin-bottom: 2rem;
padding: 2rem 0; padding: 2rem 0;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
h1, h2 { h1, h2, h3, h4, h5, h6 {
font-family: 'Libre Baskerville', serif; font-family: 'Libre Baskerville', serif;
/* Avoid scrolling under the sticky header. */
scroll-margin-top: 80px;
} }
.law-section { .law-section {
margin-bottom: 2rem; margin-bottom: 2rem;
@@ -45,13 +43,6 @@ h1, h2 {
.law-section:hover h2 a.anchor { .law-section:hover h2 a.anchor {
visibility: visible; visibility: visible;
} }
a {
color: #0056b3;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.social-sharing a { .social-sharing a {
margin-right: 0.75rem; margin-right: 0.75rem;
font-size: 1.2rem; font-size: 1.2rem;

View File

@@ -11,7 +11,7 @@ Like this project? Please considering [sponsoring me](https://github.com/sponsor
<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc GFM -->
- [Introduction](#introduction) - [Introduction](#introduction)
- [Laws & Principles](#laws--principles) - [Laws](#laws)
- [9091 Principle (1% Rule)](#9091-principle-1-rule) - [9091 Principle (1% Rule)](#9091-principle-1-rule)
- [9090 Rule](#9090-rule) - [9090 Rule](#9090-rule)
- [Amdahl's Law](#amdahls-law) - [Amdahl's Law](#amdahls-law)
@@ -56,6 +56,7 @@ Like this project? Please considering [sponsoring me](https://github.com/sponsor
- [Twyman's law](#twymans-law) - [Twyman's law](#twymans-law)
- [Wadler's Law](#wadlers-law) - [Wadler's Law](#wadlers-law)
- [Wheaton's Law](#wheatons-law) - [Wheaton's Law](#wheatons-law)
- [Principles](#principles)
- [All Models Are Wrong (George Box's Law)](#all-models-are-wrong-george-boxs-law) - [All Models Are Wrong (George Box's Law)](#all-models-are-wrong-george-boxs-law)
- [Chesterton's Fence](#chestertons-fence) - [Chesterton's Fence](#chestertons-fence)
- [The Dead Sea Effect](#the-dead-sea-effect) - [The Dead Sea Effect](#the-dead-sea-effect)
@@ -92,10 +93,11 @@ There are lots of laws which people discuss when talking about development. This
❗: This repo contains an explanation of some laws, principles and patterns, but does not _advocate_ for any of them. Whether they should be applied will always be a matter of debate, and greatly dependent on what you are working on. ❗: This repo contains an explanation of some laws, principles and patterns, but does not _advocate_ for any of them. Whether they should be applied will always be a matter of debate, and greatly dependent on what you are working on.
## Laws & Principles ## Laws
And here we go! And here we go!
### 9091 Principle (1% Rule) ### 9091 Principle (1% Rule)
[1% Rule on Wikipedia](https://en.wikipedia.org/wiki/1%25_rule_(Internet_culture)) [1% Rule on Wikipedia](https://en.wikipedia.org/wiki/1%25_rule_(Internet_culture))
@@ -769,6 +771,10 @@ See also:
Coined by Wil Wheaton (Star Trek: The Next Generation, The Big Bang Theory), this simple, concise, and powerful law aims for an increase in harmony and respect within a professional organization. It can be applied when speaking with coworkers, performing code reviews, countering other points of view, critiquing, and in general, most professional interactions humans have with each other. Coined by Wil Wheaton (Star Trek: The Next Generation, The Big Bang Theory), this simple, concise, and powerful law aims for an increase in harmony and respect within a professional organization. It can be applied when speaking with coworkers, performing code reviews, countering other points of view, critiquing, and in general, most professional interactions humans have with each other.
## Principles
Principles are generally more likely to be guidelines relating to design.
### All Models Are Wrong (George Box's Law) ### All Models Are Wrong (George Box's Law)
[All Models Are Wrong](https://en.wikipedia.org/wiki/All_models_are_wrong) [All Models Are Wrong](https://en.wikipedia.org/wiki/All_models_are_wrong)