feat: builderscode 1.0

This commit is contained in:
swaits committed 2025-10-07 16:23:19 -07:00
commit 5d6f929cc4
10 files changed
+390

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
public/
.hugo_build.lock
resources/_gen/
+16
View File
@@ -0,0 +1,16 @@
Creative Commons Zero v1.0 Universal (CC0 1.0)
Copyright (c) 2025 Stephen Waits
To the extent possible under law, Stephen Waits has waived all copyright and related or neighboring rights to Builder's Code of Conduct.
This work is published from: United States
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially
- No attribution required
This software is provided "as is", without warranty of any kind.
Full license text: https://creativecommons.org/publicdomain/zero/1.0/legalcode
+19
View File
@@ -0,0 +1,19 @@
# Builder's Code of Conduct
A Code of Conduct for people who build things.
Live site: [builderscode.org](https://builderscode.org)
## Development
```bash
hugo serve --port 8080
```
## Deployment
Configured for Netlify. Push to main branch to deploy.
## License
CC0 1.0 Universal - Public Domain Dedication
+51
View File
@@ -0,0 +1,51 @@
# Builder's Code v1.0
A Code of Conduct for people who build things.
---
## The Rule
**Stay professional. Stay technical.**
## Expected
- Contribute constructively.
- Respect others' time and work.
- Focus on the work and its technical merit.
## Not Welcome
- Harassment, name-calling, or personal attacks.
- Trolling, spamming, or derailing discussions.
- Discussions about contributors rather than their contributions.
## Enforcement
Violations result in:
1. **Warning** - First offense.
2. **Temporary suspension** - Repeated or serious violations.
3. **Permanent ban** - Continued violations.
Maintainers can remove, block, or ban anyone who disrupts the project.
---
## Adopting Builder's Code of Conduct
To adopt this for your project, add to your README:
```
This project follows the [Builder's Code of Conduct](https://builderscode.org).
```
Or copy this to `CODE_OF_CONDUCT.md` in your project root.
---
## License
This work is dedicated to the public domain under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
You may use, modify, and distribute this freely without attribution.
+7
View File
@@ -0,0 +1,7 @@
baseURL = 'https://builderscode.org/'
languageCode = 'en-us'
title = "Builder's Code of Conduct"
disableKinds = ['taxonomy', 'term', 'RSS']
[params]
description = "A Code of Conduct for people who build things"
+240
View File
@@ -0,0 +1,240 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{ with .Description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Courier New', Courier, monospace;
line-height: 1.6;
color: #3d3027;
background: #faf7f2;
max-width: 800px;
margin: 0 auto;
padding: 2rem 1.5rem;
}
h1 {
font-size: 2rem;
margin-bottom: 0.5rem;
}
h2 {
font-size: 1.5rem;
margin-top: 2rem;
margin-bottom: 1rem;
}
p {
margin-bottom: 1rem;
}
ul, ol {
margin-bottom: 1rem;
padding-left: 1.5rem;
}
ol {
padding-left: 2rem;
}
li {
margin-bottom: 0.5rem;
}
hr {
border: none;
border-top: 1px solid #d9cfbb;
margin: 2rem 0;
}
code {
background: #eee8dc;
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-size: 0.9em;
}
pre {
background: #eee8dc;
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
margin-bottom: 1rem;
}
pre code {
background: none;
padding: 0;
}
a {
color: #4a8d8f;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
strong {
font-weight: 600;
}
.coc-box {
border: 2px solid #d9cfbb;
border-radius: 8px;
padding: 2rem;
margin: 2rem 0;
position: relative;
}
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: none;
border: 1px solid #d9cfbb;
border-radius: 4px;
padding: 0.5rem;
cursor: pointer;
font-size: 1.2rem;
color: #3d3027;
}
.copy-btn {
position: absolute;
top: 1rem;
right: 1rem;
background: none;
border: 1px solid #d9cfbb;
border-radius: 4px;
padding: 0.3rem 0.6rem;
cursor: pointer;
font-size: 0.85rem;
font-family: inherit;
font-weight: bold;
color: #3d3027;
}
.copy-btn:hover {
background: #eee8dc;
}
.version-link, .back-link {
font-size: 0.9rem;
color: #6d5d4b;
margin-top: 1rem;
display: inline-block;
}
.current-badge {
color: #28a745;
font-weight: 600;
font-size: 0.9rem;
}
.license {
font-size: 0.8rem;
color: #8a8a8a;
margin-top: 3rem;
padding-top: 1rem;
border-top: 1px solid #d9cfbb;
text-align: center;
}
@media (prefers-color-scheme: dark) {
body {
background: #252b37;
color: #cbd5e1;
}
.coc-box {
border-color: #3d4a5c;
}
hr {
border-top-color: #3d4a5c;
}
code, pre {
background: #2d3748;
}
.theme-toggle, .copy-btn {
border-color: #3d4a5c;
color: #cbd5e1;
}
.copy-btn:hover {
background: #2d3748;
}
a {
color: #74c7ec;
}
.version-link, .back-link {
color: #94a3b8;
}
.license {
border-top-color: #3d4a5c;
color: #7a8a9a;
}
}
body[data-theme="dark"] {
background: #252b37;
color: #cbd5e1;
}
body[data-theme="dark"] .coc-box {
border-color: #3d4a5c;
}
body[data-theme="dark"] hr {
border-top-color: #3d4a5c;
}
body[data-theme="dark"] code,
body[data-theme="dark"] pre {
background: #2d3748;
}
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .copy-btn {
border-color: #3d4a5c;
color: #cbd5e1;
}
body[data-theme="dark"] .copy-btn:hover {
background: #2d3748;
}
body[data-theme="dark"] a {
color: #74c7ec;
}
body[data-theme="dark"] .version-link,
body[data-theme="dark"] .back-link {
color: #94a3b8;
}
body[data-theme="dark"] .license {
border-top-color: #3d4a5c;
color: #7a8a9a;
}
body[data-theme="light"] {
background: #faf7f2;
color: #3d3027;
}
body[data-theme="light"] .coc-box {
border-color: #d9cfbb;
}
body[data-theme="light"] hr {
border-top-color: #d9cfbb;
}
body[data-theme="light"] code,
body[data-theme="light"] pre {
background: #eee8dc;
}
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .copy-btn {
border-color: #d9cfbb;
color: #3d3027;
}
body[data-theme="light"] .copy-btn:hover {
background: #eee8dc;
}
body[data-theme="light"] a {
color: #4a8d8f;
}
body[data-theme="light"] .version-link,
body[data-theme="light"] .back-link {
color: #6d5d4b;
}
</style>
</head>
<body>
<button class="theme-toggle" id="theme-btn" onclick="toggleTheme()">☀︎</button>
{{ block "main" . }}{{ end }}
<p class="license">Licensed under <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a> • Copyright © 2025 Stephen Waits</p>
<script>
function copyCoC(){var t=document.querySelector('.coc-box').innerText;navigator.clipboard.writeText(t).then(function(){alert('Copied!')});}
function updateThemeBtn(){var d=window.matchMedia('(prefers-color-scheme: dark)').matches;var t=document.body.dataset.theme;var dark=t=='dark'||(t==''&&d)||(!t&&d);document.getElementById('theme-btn').textContent=dark?'☀︎':'☾';}
function toggleTheme(){var d=window.matchMedia('(prefers-color-scheme: dark)').matches;var t=document.body.dataset.theme;var dark=t=='dark'||(t==''&&d)||(!t&&d);document.body.dataset.theme=dark?'light':'dark';updateThemeBtn();}
updateThemeBtn();
</script>
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
{{ define "main" }}
<div class="coc-box">
<button class="copy-btn" onclick="copyCoC()">[copy]</button>
{{ .Content }}
</div>
<p class="back-link"><a href="/">← Back to latest version</a> | <a href="/versions/">All versions</a></p>
{{ end }}
+10
View File
@@ -0,0 +1,10 @@
{{ define "title" }}{{ .Site.Title }}{{ end }}
{{ define "main" }}
{{ $latest := index (where .Site.RegularPages "Section" "versions").ByDate.Reverse 0 }}
<div class="coc-box">
<button class="copy-btn" onclick="copyCoC()">[copy]</button>
{{ $latest.Content }}
</div>
<p class="version-link"><a href="/versions/">Previous versions</a></p>
{{ end }}
+26
View File
@@ -0,0 +1,26 @@
{{ define "title" }}Versions | {{ .Site.Title }}{{ end }}
{{ define "main" }}
<h1>Versions</h1>
<p>The homepage always shows the latest version. Previous versions are archived here.</p>
<h2>Current</h2>
<ul>
{{ $latest := index .Pages.ByDate.Reverse 0 }}
<li><a href="{{ $latest.RelPermalink }}">v{{ $latest.File.BaseFileName }}</a> <span class="current-badge">(current)</span></li>
</ul>
{{ if gt (len .Pages) 1 }}
<h2>Archive</h2>
<ul>
{{ range after 1 .Pages.ByDate.Reverse }}
<li><a href="{{ .RelPermalink }}">v{{ .File.BaseFileName }}</a></li>
{{ end }}
</ul>
{{ else }}
<h2>Archive</h2>
<p>No previous versions yet.</p>
{{ end }}
<p class="back-link"><a href="/">← Back to latest version</a></p>
{{ end }}
+9
View File
@@ -0,0 +1,9 @@
[build]
publish = "public"
command = "hugo --gc --minify"
[build.environment]
HUGO_VERSION = "0.150.1"
[context.production.environment]
HUGO_ENV = "production"