-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
converted to 100% static file server site
- Loading branch information
1 parent
b28f6c7
commit 370c562
Showing
8 changed files
with
97 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.git | ||
.git* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
cicd: | ||
# https://github.com/internetarchive/cicd | ||
uses: internetarchive/cicd/.github/workflows/cicd.yml@main | ||
with: | ||
NOMAD_VAR_PORTS: '{ 80 = "http" }' | ||
NOMAD_VAR_HOSTNAMES: '["tracey.archive.org"]' | ||
PLATFORMS: 'linux/amd64,linux/arm64' | ||
secrets: | ||
NOMAD_TOKEN_EXT: ${{ secrets.NOMAD_TOKEN_EXT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/internetarchive/dyno:main | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: /app/lint |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
FROM denoland/deno:alpine | ||
FROM nginx:alpine | ||
|
||
LABEL maintainers=tracey | ||
|
||
EXPOSE 5000 | ||
|
||
# needed for `env -S` | ||
RUN apk add coreutils | ||
|
||
WORKDIR /app/ | ||
WORKDIR /usr/share/nginx/html/ | ||
COPY . . | ||
|
||
USER deno | ||
|
||
RUN deno cache index.js | ||
|
||
CMD ./index.js |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta property="title" content="Tracey Jaquith, Internet Archive ποΈ"> | ||
<!-- | ||
<link href="https://esm.archive.org/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||
--> | ||
<link href="bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||
<style> | ||
.list { | ||
display: grid; | ||
grid-gap: 10px; | ||
grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); | ||
align-items: top; | ||
} | ||
h2 { | ||
margin-top: 75px; | ||
} | ||
.card { | ||
text-align: center; | ||
display: initial; | ||
} | ||
.card a img { | ||
max-width: 250px; | ||
max-height: 250px; | ||
} | ||
.card a { | ||
display: block; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="container" style="width:98%; max-width:98%"> | ||
<h1> | ||
Tracey Jaquith<br> | ||
Founding Coder, Internet Archive ποΈ<br> | ||
TV Architect | ||
</h1> | ||
<h3> | ||
I focus on TV, video/audio, UI/UX, javascript π¦, markdown, π¦ containers & devops π | ||
</h3> | ||
<b> | ||
Find me at: | ||
<a href="https://mastodon.social/@traceypooh">𦣠mastodon</a> | ||
<a href="https://twitter.com/tracey_pooh">π¦ twitter/X</a> | ||
</b> | ||
|
||
<main></main> | ||
|
||
<hr> | ||
π <i>i'm an expert plastic square presser</i> | ||
</div> | ||
</body> | ||
|
||
<script type="module" src="./index.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
#!/usr/bin/env -S deno run --location https://tracey.dev.archive.org --allow-read --allow-net --watch | ||
|
||
/** | ||
* Our little web server | ||
*/ | ||
import httpd from 'https://deno.land/x/httpd/mod.js' | ||
|
||
const SLIDES = 'https://archive.org/~tracey/slides/' | ||
const ME = { | ||
// When updating a "slides only" w/ a new video link: | ||
|
@@ -190,68 +183,7 @@ We use ffmpeg to crop the image area; tesseract to OCR the image into text; and | |
} | ||
|
||
|
||
/** | ||
* Returns beginning static markup for @see markup() | ||
* | ||
* @param string title Page / H1 title | ||
*/ | ||
function markup_pre() { | ||
return ` | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta property="title" content="Tracey Jaquith, Internet Archive ποΈ"> | ||
<link href="https://esm.archive.org/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> | ||
<style> | ||
.list { | ||
display: grid; | ||
grid-gap: 10px; | ||
grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); | ||
align-items: top; | ||
} | ||
h2 { | ||
margin-top: 75px; | ||
} | ||
.card { | ||
text-align: center; | ||
display: initial; | ||
} | ||
.card a img { | ||
max-width: 250px; | ||
max-height: 250px; | ||
} | ||
.card a { | ||
display: block; | ||
} | ||
a { | ||
text-decoration: none; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container" style="width:98%; max-width:98%"> | ||
<h1> | ||
Tracey Jaquith<br> | ||
Founding Coder, Internet Archive ποΈ<br> | ||
TV Architect | ||
</h1> | ||
<h3> | ||
I focus on TV, video/audio, UI/UX, javascript π¦, markdown, π¦ containers & devops π | ||
</h3> | ||
<b> | ||
Find me at: | ||
<a href="https://mastodon.social/@traceypooh">𦣠mastodon</a> | ||
<a href="https://twitter.com/tracey_pooh">π¦ twitter/X</a> | ||
</b> | ||
` | ||
} | ||
|
||
|
||
function markup() { | ||
function main() { | ||
let str = '' | ||
|
||
for (const [header, list] of Object.entries(ME)) { | ||
|
@@ -278,20 +210,10 @@ function markup() { | |
str += '</div>' | ||
} | ||
|
||
return str | ||
document.querySelector('main').innerHTML = str | ||
} | ||
|
||
|
||
function markup_post() { | ||
return ` | ||
<hr> | ||
π <i>i'm an expert plastic square presser</i> | ||
` | ||
} | ||
|
||
// Main web server | ||
// eslint-disable-next-line consistent-return | ||
httpd((req, headers) => { | ||
if (new URL(req.url).pathname === '/') | ||
return new Response(`${markup_pre()}${markup()}${markup_post()}`, { headers }) | ||
}, { ls: false }) | ||
document.addEventListener('DOMContentLoaded', () => { | ||
main() | ||
}) |