Initial commit

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2023-05-14 22:12:19 +02:00
commit 67a8211323
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
20 changed files with 580 additions and 0 deletions

39
.drone.yml Normal file
View file

@ -0,0 +1,39 @@
kind: pipeline
type: docker
name: Build & Deploy
clone:
disable: true
steps:
- name: Clone
image: woodpeckerci/plugin-git
settings:
recursive: true
- name: Build site
image: denoland/deno
commands:
- deno task build
depends_on:
- "Clone"
- name: Push to Pages
image: plugins/gh-pages
settings:
remote_url:
from_secret: URL
password:
from_secret: PASS
target_branch: pages
pages_directory: dist
copy_contents: true
user_name: Sam Therapy
user_email: sam@samtherapy.net
depends_on:
- "Build site"
when:
branch:
- master
event:
- push

12
.editorconfig Normal file
View file

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

88
.gitignore vendored Normal file
View file

@ -0,0 +1,88 @@
# Lume generated site
dist/
# DS Store
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# FuseBox cache
.fusebox/
# Snyk
.dccache

11
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}

50
_config.ts Normal file
View file

@ -0,0 +1,50 @@
import lume from "lume/mod.ts"
// Stable plugins
import attributes from "lume/plugins/attributes.ts"
import codeHighlight from "lume/plugins/code_highlight.ts"
import esbuild from "lume/plugins/esbuild.ts"
import jsx from "lume/plugins/jsx_preact.ts"
import inline from "lume/plugins/inline.ts";
import katex from "lume/plugins/katex.ts"
import lightningcss from "lume/plugins/lightningcss.ts"
import metas from "lume/plugins/metas.ts"
import minifyHTML from "lume/plugins/minify_html.ts"
import mdx from "lume/plugins/mdx.ts"
import pug from "lume/plugins/pug.ts"
import remark from "lume/plugins/remark.ts"
import sass from "lume/plugins/sass.ts"
import sourceMaps from "lume/plugins/source_maps.ts"
import svgo from "lume/plugins/svgo.ts"
// Experimental plugins
// Custom plugins
import toml from "./custom/toml/toml.ts"
const site = lume({
src: "./src",
dest: "./dist",
})
site
.copy("static", ".")
.loadData([".toml"], toml)
.use(attributes())
.use(codeHighlight())
.use(katex())
.use(metas())
.use(jsx())
.use(mdx())
.use(remark())
.use(pug())
.use(svgo())
.use(esbuild({
extensions: [".ts", ".js"],
}))
.use(lightningcss())
.use(sass())
.use(minifyHTML())
.use(inline())
export default site

1
_redirects Normal file
View file

@ -0,0 +1 @@
/* /index.html 200

6
custom/toml/toml.ts Normal file
View file

@ -0,0 +1,6 @@
import { parse } from "std/toml/mod.ts"
export default async function toml(path: string | URL) {
const content = await Deno.readTextFile(path)
return parse(content)
}

42
deno.json Normal file
View file

@ -0,0 +1,42 @@
{
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
"build": "deno task lume",
"serve": "deno task lume -s"
},
"lock": false,
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "npm:preact",
"lib": [
"dom",
"dom.iterable",
"dom.asynciterable",
"deno.ns"
]
},
"imports": {
"lume/": "https://deno.land/x/lume@v1.16.2/",
"experimental/": "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/",
"std/": "https://deno.land/std/"
},
"lint": {
"files": {
"exclude": [
"src/_includes/styles/external/",
"dist/"
]
}
},
"fmt": {
"options": {
"semiColons": false
},
"files": {
"exclude": [
"src/_includes/styles/external/",
"dist"
]
}
}
}

11
src/_data.toml Normal file
View file

@ -0,0 +1,11 @@
# Site metas from Lume metas plugin
[metas]
site = "What you're trying to access is dead"
lang = "en"
description = "The website of a random fishe"
icon = "img/favicon.png"
keywords = ["dead", "down", "cheese"]
generator = false
[mergedKeys]
metas = "object"

View file

@ -0,0 +1,13 @@
doctype html
html(lang=metas.lang)
head
title= title
include meta.pug
body
header
h1= title
h2= subtitle
main
| !{content}
footer
include footer.html

View file

View file

@ -0,0 +1,4 @@
meta(charset="utf-8")
meta(name='viewport', content='width=device-width, initial-scale=1')
link(rel="shortcut icon", href="/img/favicon.png", type="image/png" inline)
link(rel="stylesheet", href="/css/style.css" inline)

View file

@ -0,0 +1,8 @@
@use "styles/sakura.theme";
:root {
font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Noto, "Segoe UI", Arial, Helvetica, "Helvetica Neue", sans-serif;
justify-content: center;
text-align: center;
}

View file

@ -0,0 +1,264 @@
/* Sakura.css v1.4.1
* ================
* Minimal css theme.
* Project: https://github.com/oxalorg/sakura/
*/
/* Body */
html {
font-size: 62.5%; // So that root size becomes 10px
font-family: $font-family-base;
}
body {
// $font-size-base must be a rem value
font-size: $font-size-base;
line-height: 1.618;
max-width: 60em;
margin: auto;
color: $color-text;
background-color: $color-bg;
padding: 13px;
}
@media (max-width: 684px) {
body {
font-size: $font-size-base * 0.85;
}
}
@media (max-width: 382px) {
body {
font-size: $font-size-base * 0.75;
}
}
@mixin word-wrap() {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-word;
}
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.1;
font-family: $font-family-heading;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1.5rem;
@include word-wrap;
}
h1 {
font-size: 2.35em
}
h2 {
font-size: 2.00em
}
h3 {
font-size: 1.75em
}
h4 {
font-size: 1.5em
}
h5 {
font-size: 1.25em
}
h6 {
font-size: 1em
}
p {
margin-top: 0px;
margin-bottom: 2.5rem;
}
small,
sub,
sup {
font-size: 75%;
}
hr {
border-color: $color-blossom;
}
a {
text-decoration: none;
color: $color-blossom;
&:visited {
color: darken($color-blossom, 10%);
}
&:hover {
color: $color-fade;
border-bottom: 2px solid $color-text;
}
}
ul {
padding-left: 1.4em;
margin-top: 0px;
margin-bottom: 2.5rem;
}
li {
margin-bottom: 0.4em;
}
blockquote {
margin-left: 0px;
margin-right: 0px;
padding-left: 1em;
padding-top: 0.8em;
padding-bottom: 0.8em;
padding-right: 0.8em;
border-left: 5px solid $color-blossom;
margin-bottom: 2.5rem;
background-color: $color-bg-alt;
}
blockquote p {
margin-bottom: 0;
}
img,
video {
height: auto;
max-width: 100%;
margin-top: 0px;
margin-bottom: 2.5rem;
}
/* Pre and Code */
pre {
background-color: $color-bg-alt;
display: block;
padding: 1em;
overflow-x: auto;
margin-top: 0px;
margin-bottom: 2.5rem;
font-size: 0.9em;
}
code,
kbd,
samp {
font-size: 0.9em;
padding: 0 0.5em;
background-color: $color-bg-alt;
white-space: pre-wrap;
}
pre>code {
padding: 0;
background-color: transparent;
white-space: pre;
font-size: 1em;
}
/* Tables */
table {
text-align: justify;
width: 100%;
border-collapse: collapse;
}
td,
th {
padding: 0.5em;
border-bottom: 1px solid $color-bg-alt;
}
/* Buttons, forms and input */
input,
textarea {
border: 1px solid $color-text;
&:focus {
border: 1px solid $color-blossom;
}
}
textarea {
width: 100%;
}
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
display: inline-block;
padding: 5px 10px;
text-align: center;
text-decoration: none;
white-space: nowrap;
background-color: $color-blossom;
color: $color-bg;
border-radius: 1px;
border: 1px solid $color-blossom;
cursor: pointer;
box-sizing: border-box;
&[disabled] {
cursor: default;
opacity: .5;
}
&:focus:enabled,
&:hover:enabled {
background-color: $color-fade;
border-color: $color-fade;
color: $color-bg;
outline: 0;
}
}
textarea,
select,
input {
color: $color-text;
padding: 6px 10px;
/* The 6px vertically centers text on FF, ignored by Webkit */
margin-bottom: 10px;
background-color: $color-bg-alt;
border: 1px solid $color-bg-alt;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box;
&:focus {
border: 1px solid $color-blossom;
outline: 0;
}
}
input[type="checkbox"]:focus {
outline: 1px dotted $color-blossom;
}
label,
legend,
fieldset {
display: block;
margin-bottom: .5rem;
font-weight: 600;
}

View file

@ -0,0 +1,15 @@
// Settings for SakuraCSS
$color-blossom: #ffffff;
$color-fade: #c9c9c9;
$color-bg: #222222;
$color-bg-alt: #4a4a4a;
/* $color-text: #dedce5; */
$color-text: #c9c9c9;
$font-size-base: 1.8rem;
$font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
$font-family-heading: $font-family-base;
@import "styles/external/sakura";

0
src/_includes/types.ts Normal file
View file

5
src/css/style.scss Normal file
View file

@ -0,0 +1,5 @@
@use "styles/base";
img {
max-width: 40%;
}

11
src/index.mdx Normal file
View file

@ -0,0 +1,11 @@
---
title: It's over
subtitle: Shit's fucked
layout: layouts/base.pug
---
The service you're trying to access is currently down.
<img src="./img/503.jpg" alt="http.cat/503" inline />
It might be back soon. It might not. Who knows? \
Not me, I'm a static page.

BIN
src/static/img/503.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
src/static/img/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB