diff options
Diffstat (limited to 'htdocs')
| -rw-r--r-- | htdocs/base.html | 8 | ||||
| -rw-r--r-- | htdocs/css/style.css | 69 | ||||
| -rw-r--r-- | htdocs/css/syntax.css | 19 | ||||
| -rw-r--r-- | htdocs/index.html | 101 | ||||
| -rw-r--r-- | htdocs/style.css | 40 |
5 files changed, 194 insertions, 43 deletions
diff --git a/htdocs/base.html b/htdocs/base.html index cc85064..7a3c97f 100644 --- a/htdocs/base.html +++ b/htdocs/base.html @@ -7,10 +7,12 @@ {{ define "title" }}<title>samanthony.xyz</title>{{ end }} {{ template "title" }} + <link rel="stylesheet" href="/css/style.css"> <!-- Child templates can apply their own styles --> {{ define "style" }}{{ end }} {{ template "style" }} - <link rel="stylesheet" href="/style.css"> + <!-- Code syntax highlighting --> + <link rel="stylesheet" href="/css/syntax.css"> </head> <body> <nav> @@ -28,6 +30,8 @@ {{ end }} <hr> </nav> - {{ template "body_content" }} + <main> + {{ template "body_content" }} + </main> </body> </html> diff --git a/htdocs/css/style.css b/htdocs/css/style.css new file mode 100644 index 0000000..1c6db7c --- /dev/null +++ b/htdocs/css/style.css @@ -0,0 +1,69 @@ +:root { + --fg-color: white; + --bg-color: black; + --highlight-color: #4acaa4; +} + +/* General */ +body { + background-color: var(--bg-color); + color: var(--fg-color); + + font-family: sans-serif; +} + +.hanging-indent { + padding-left: 2em; + text-index: -2em; +} + +/* Links */ +a { + color: var(--highlight-color); + text-decoration: none; +} +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; } +blockquote p:nth-child(2) { + text-indent: 2em; +} + +/* Lists */ +ul { padding-left: 2em; } + +/* Nav */ +body { margin: 0px; } +nav { background-color: var(--highlight-color); } +nav a { + margin-left: 0.2em; + + font-size: 1.6em; + font-weight: normal; + + color: var(--fg-color); +} +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/css/syntax.css b/htdocs/css/syntax.css new file mode 100644 index 0000000..f425178 --- /dev/null +++ b/htdocs/css/syntax.css @@ -0,0 +1,19 @@ +code { + border: 0.055em solid var(--highlight-color); + border-radius: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.1em; + padding-left: 0.5em; + padding-right: 0.5em; + + display: inline-block; + vertical-align: middle; + + background-color: #282828; +} + +/* HTML */ +/* Tag */ code[data-lang="html"] .t { color: var(--highlight-color); } +/* Element */ code[data-lang="html"] .e { color: #9b5712; } +/* AttributeName */ code[data-lang="html"] .an { color: #91931b; } +/* AttributeValue */ code[data-lang="html"] .av { color: red; } diff --git a/htdocs/index.html b/htdocs/index.html index ac2f7a6..e02436e 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -1,3 +1,102 @@ {{ define "body_content" }} - <p>Hello, world!</p> + <header> + <h1>Why This Site Exists</h2> + <hr> + </header> + + <p> + Most of the modern Web sucks. This is my futile attempt at changing that. + </p> + + <p> + Many sites these days try to solve problems that don't exist using improper + tools and techniques to do so. The classic example is JavaScript; + client-side scripting can be quite useful <em>in certain situations</em>. + The problem, however, is that most situations are not these situations. + </p> + + <p> + The vast majority of websites could be simple HTML( + CSS) pages and gain all + the benefits that go along with that, namely <em>simplicity</em>, + <em>speed/performance</em> and + <a href="http://harmful.cat-v.org/Blog/2015/04/24/0/"> + <em>reliability</em></a>. + Instead, people choose to complicate things. + </p> + + <blockquote><p>"Install this plugin!"</p></blockquote> + <blockquote><p>"Use this framework!"</p></blockquote> + + <p> + Rather than fixing the underlying problem by stripping back the layers to + find that we really just want to render some HTML, we instead pile more + on top, obscuring and worsening whatever problem we think we're trying to + solve. + </p> + + <blockquote cite="https://suckless.org/sucks/web/"> + <p> + "Millions of jobs are based on outputting HTML in an inefficient way." + </p> + <p>— <a href="https://suckless.org/sucks/web/">suckless.org</a></p> + </blockquote> + + <p> + Some common excuses for "I need to use x:" + <ul> + <li> + "It's responsive" + <br> + <p style="margin: 0px;" class="hanging-indent"> + Setting this meta tag: + <code data-lang="html"> + <span class="t"><<span class="e">meta</span> + <span class="an">name</span>=<span class="av">"viewport"</span> + <span class="an">content</span>=<span class="av">"width=device-width, initial-scale=1.0"</span>> + </span> + </code> + along with some very basic CSS is all that's required for a + responsive site that looks good on any screen. + </p> + </li> + <li> + "It looks nicer" + <p style="margin: 0px;" class="hanging-indent"> + Java<em>Script</em>. Cascading + <em>Style</em> Sheets. See the problem? + Don't use scripts for styling. Also, no, it doesn't look nicer. + </p> + </li> + <li> + "It's makes for a better user experience" + <p style="margin: 0px" class="hanging-indent"> + If you like waiting seconds for a page to load before scrolling an + entire screen height with a parallaxed background just to read two + words then yes, that is a good experience. + Personally, I would rather not have to hover my cursor through a maze + of eight nested, animated drop-down menus while being bombarded by + popups asking for personal information and telling me that the site + uses + <a href="https://lcamtuf.blogspot.com/2010/10/http-cookies-or-how-not-to-design.html"> + cookies</a>. + </p> + </li> + </ul> + </p> + + <header> + <h1>What Can We Do?</h1> + <hr> + </header> + + <p> + Start your own website where you can complain about stuff too! Anyone can + 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/style.css b/htdocs/style.css deleted file mode 100644 index d260d69..0000000 --- a/htdocs/style.css +++ /dev/null @@ -1,40 +0,0 @@ -/* General */ -body { - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; - - background-color: black; - color: white; - - font-family: sans-serif; -} - -a { text-decoration: none; } -a:hover { - text-decoration: underline; - text-decoration-thickness: 0.055em; -} - -/* Navbar */ -nav { background-color: #4acaa4; } - -nav a { - margin-left: 0.2em; - - font-size: 1.6em; - font-weight: normal; - color: white; -} - -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: white; -} |