summaryrefslogtreecommitdiffstats
path: root/htdocs
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2022-04-26 17:34:13 -0230
committerSam Anthony <sam@samanthony.xyz>2022-04-26 17:34:13 -0230
commitb1a3d5e5ae2b2e8e28db187b98cab82f5717a931 (patch)
tree5491bc0cd2213248bad7c77f13d2dd8dee8d02ed /htdocs
parent5ad2cb5fd0ff73db8263dda792e69508873f1de2 (diff)
downloadsamanthony.xyz-b1a3d5e5ae2b2e8e28db187b98cab82f5717a931.zip
add samanthony.xyz software page
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/css/style.css44
-rw-r--r--htdocs/index.html5
-rw-r--r--htdocs/software/index.html15
-rw-r--r--htdocs/software/samanthony.xyz.html50
4 files changed, 85 insertions, 29 deletions
diff --git a/htdocs/css/style.css b/htdocs/css/style.css
index 1c6db7c..7403843 100644
--- a/htdocs/css/style.css
+++ b/htdocs/css/style.css
@@ -4,7 +4,6 @@
--highlight-color: #4acaa4;
}
-/* General */
body {
background-color: var(--bg-color);
color: var(--fg-color);
@@ -12,11 +11,32 @@ body {
font-family: sans-serif;
}
+main {
+ margin: auto;
+ max-width: 80em;
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
.hanging-indent {
padding-left: 2em;
text-index: -2em;
}
+header :first-child { margin-bottom: 0px; }
+
+hr {
+ margin: 0px;
+ color: var(--fg-color);
+}
+
+ul { padding-left: 2em; }
+
+/* Tables */
+table { padding-top: 1em; }
+th { text-align: left; }
+td:first-child { padding-right: 0.5em; }
+
/* Links */
a {
color: var(--highlight-color);
@@ -24,13 +44,6 @@ a {
}
a:hover { text-decoration: underline 0.055em; }
-/* Headers */
-header :first-child { margin-bottom: 0px; }
-header hr {
- margin: 0px;
- color: var(--fg-color);
-}
-
/* Quotes */
blockquote p { margin: 0px; }
blockquote p:first-child { font-style: italic; }
@@ -38,9 +51,6 @@ blockquote p:nth-child(2) {
text-indent: 2em;
}
-/* Lists */
-ul { padding-left: 2em; }
-
/* Nav */
body { margin: 0px; }
nav { background-color: var(--highlight-color); }
@@ -55,15 +65,3 @@ nav a {
nav a:first-child .label { font-weight: bold; }
nav .label { font-size: 0.7em; }
nav .this-section { font-style: italic; }
-nav hr {
- margin: 0px;
- color: var(--fg-color);
-}
-
-/* Main page content */
-main {
- margin: auto;
- max-width: 80em;
- padding-left: 1em;
- padding-right: 1em;
-}
diff --git a/htdocs/index.html b/htdocs/index.html
index e02436e..821d693 100644
--- a/htdocs/index.html
+++ b/htdocs/index.html
@@ -94,9 +94,4 @@
and everyone should. With
<a href="https://landchad.net">all the information that's out there</a>
it's never been easier to help fix the Web by creating your own site.
-
- <p>
- You can read the boring technical details of how this site is implemented
- <a href="/software/samanthony.xyz">here</a>.
- </p>
{{ end }}
diff --git a/htdocs/software/index.html b/htdocs/software/index.html
index 4b1092d..ecf8d95 100644
--- a/htdocs/software/index.html
+++ b/htdocs/software/index.html
@@ -3,5 +3,18 @@
{{ end }}
{{ define "body_content" }}
- <p>This is the software page</p>
+ <header>
+ <h1>Software Hosted Here</h1>
+ <hr>
+ </header>
+ <table>
+ <tr>
+ <th>name</th>
+ <th>description</th>
+ </tr>
+ <tr>
+ <td><a href="samanthony.xyz.html">samanthony.xyz</a></th>
+ <td>This website</th>
+ </tr>
+ </table>
{{ end }}
diff --git a/htdocs/software/samanthony.xyz.html b/htdocs/software/samanthony.xyz.html
new file mode 100644
index 0000000..dc0c38c
--- /dev/null
+++ b/htdocs/software/samanthony.xyz.html
@@ -0,0 +1,50 @@
+{{ define "title" }}
+ <title>software | samanthony.xyz</title>
+{{ end }}
+
+{{ define "style" }}
+<style>
+ h1, h2 { margin-bottom: 0px; }
+ h2 {
+ margin-top: 0px;
+ padding-left: 1em;
+ color: grey;
+ }
+</style>
+{{ end }}
+
+{{ define "body_content" }}
+ <header>
+ <h1>samanthony.xyz</h1>
+ <h2>This website</h2>
+ <hr>
+ </header>
+ <p>
+ Get a copy of the source code with
+ <code>git clone git://samanthony.xyz/samanthony.xyz.git</code>.
+ </p>
+ <p>
+ The site uses HTML templates to avoid tedium and for the ability to make
+ small changes across the entire site without editing multiple files. It uses
+ the html/template package included in Go's standard library.
+ </p>
+ <p>
+ A server is required to serve these templates. Once again Go provides with
+ the built in http package. This makes writing a web server extremely easy.
+ All you have to do is write a function to handle incoming requests and call
+ http.ListenAndServe(). Painless.
+ </p>
+ <p>
+ Since I'm running OpenBSD, TLS can be dealt with external to the webserver
+ by using relayd. As an aside, I encourage anyone looking for an operating
+ system to give OpenBSD a look. It's been an absolute pleasure to work with
+ so far. As long as you don't expect it to be exactly like a Linux-based
+ system (it's not), then not only is it more secure, but also
+ <em>easier to use</em> than something Linux-based. Even for a noob like
+ myself. Sane design and good documentation go a long way.
+ </p>
+ <p>
+ Inspiration was taken from httpd and the server runs chroot'd. When
+ serving content it also drops down to an unprivileged user with setuid.
+ </p>
+{{ end }}