1
0
mirror of https://github.com/osmarks/website synced 2024-09-16 15:59:36 +00:00

Implement Web Button technology

This commit is contained in:
osmarks 2024-07-17 16:21:26 +01:00
parent e2e5aefbfc
commit 25c545e84e
31 changed files with 50 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -40,4 +40,8 @@ You can contact me through [email](mailto:me@osmarks.net), <span class="hoverdef
* Mechanical keyboard. * Mechanical keyboard.
* Causing inscrutable networking problems. * Causing inscrutable networking problems.
* Bench press: 77.5kg (5RM). * Bench press: 77.5kg (5RM).
* Nigh-omniscient knowledge of and concern for English grammar. * Nigh-omniscient knowledge of and concern for English grammar.
::: buttons
:::

View File

@ -24,7 +24,8 @@
"If at first you don't succeed, destroy all evidence that you tried.", "If at first you don't succeed, destroy all evidence that you tried.",
"One mans constant is another mans variable.", "One mans constant is another mans variable.",
"All processes that are stable we shall predict. All processes that are unstable we shall control.", "All processes that are stable we shall predict. All processes that are unstable we shall control.",
"This website doesn't exist. This is a Boltzmann website." "This website doesn't exist. This is a Boltzmann website.",
"Paperclip rights are human rights."
], ],
"feeds": [ "feeds": [
"https://www.science.org/blogs/pipeline/feed", "https://www.science.org/blogs/pipeline/feed",
@ -37,5 +38,34 @@
"https://os.phil-opp.com/rss.xml" "https://os.phil-opp.com/rss.xml"
], ],
"dateFormat": "YYYY-MM-DD", "dateFormat": "YYYY-MM-DD",
"microblogSource": "https://b.osmarks.net/outbox" "microblogSource": "https://b.osmarks.net/outbox",
"buttons": [
["arch_btw.png", "https://archlinux.org/"],
["nginx.png", "https://nginx.org/"],
["dyson_sphere.png", "https://www.schlockmercenary.com/2001-07-02"],
["accursed_js.png", "https://github.com/osmarks/website/blob/master/src/index.js"],
["nvidia.png", "/mlrig/"],
["firefox.png", "https://www.mozilla.org/en-US/firefox/new/"],
["linuxusedhere.png", "/stack/"],
["www.gif", "/"],
["webpassion.gif", "/"],
["prometheus_labs.png", "https://scp-wiki.wikidot.com/prometheus-labs-hub"],
["camtime.png", "https://qntm.org/camtime"],
["lift.gif", "https://www.reddit.com/r/slatestarcodex/comments/9h2jbi/you_should_probably_lift_weights/"],
["minecraft.png", "https://www.minecraft.net/"],
["openai.gif", "https://www.youtube.com/watch?v=gA1sNLL6yg4"],
["time.gif", "/incdec/"],
["mastodon.png", "https://b.osmarks.net/"],
["irc.gif", "https://apionet.gh0.pw/"],
["novelai.png", "https://novelai.net/"],
["ftl.png", "https://subsetgames.com/ftl.html"],
["potatos.png", "https://potatos.madefor.cc/"],
["factorio.png", "https://factorio.com/"],
["rust.png", "https://www.rust-lang.org/"],
["x86.png", "https://en.wikipedia.org/wiki/X86"],
["rss.png", "/rss.xml"],
["bee.png", "https://citrons.xyz/a/memetic-apioform-page.html"],
["perceptron.png", "https://en.wikipedia.org/wiki/Perceptron"],
["rhombic_dodecahedron.gif", "https://en.wikipedia.org/wiki/Rhombic_dodecahedron"]
]
} }

View File

@ -115,6 +115,12 @@ const renderContainer = (tokens, idx) => {
return `<div class="${options.wide ? "caption wider" : "caption"}">${options.link ? link : ""}<img src="${md.utils.escapeHtml(options.src)}">${options.link ? "</a>" : ""}` return `<div class="${options.wide ? "caption wider" : "caption"}">${options.link ? link : ""}<img src="${md.utils.escapeHtml(options.src)}">${options.link ? "</a>" : ""}`
} else if (blockType === "epigraph") { } else if (blockType === "epigraph") {
return `<div class="epigraph"><div>` return `<div class="epigraph"><div>`
} else if (blockType === "buttons") {
let out = `<div class="buttons">`
for (const button of R.sortBy(x => Math.random(), globalData.buttons)) {
out += `<a class="button" href="${md.utils.escapeHtml(button[1])}"><img src="/assets/images/button_${md.utils.escapeHtml(button[0])}" alt="${md.utils.escapeHtml(button[0])}"></a>`
}
return out
} }
} else { } else {
if (blockType === "captioned") { if (blockType === "captioned") {
@ -129,6 +135,8 @@ const renderContainer = (tokens, idx) => {
ret = `<div class="attribution">${md.utils.escapeHtml("— ") + inner}</div>` + ret ret = `<div class="attribution">${md.utils.escapeHtml("— ") + inner}</div>` + ret
} }
return ret return ret
} else if (blockType === "buttons") {
return `</div>`
} }
} }
throw new Error(`unrecognized blockType ${blockType}`) throw new Error(`unrecognized blockType ${blockType}`)

View File

@ -37,7 +37,7 @@ $navbar-width: 20rem
body body
margin: 0 margin: 0
font-family: 'Titillium Web', 'Fira Sans', sans-serif font-family: 'Titillium Web', 'Fira Sans', sans-serif
line-height: 1.3 line-height: 1.4
pre, code, .deemph pre, code, .deemph
font-family: 'Miracode', monospace font-family: 'Miracode', monospace
@ -358,4 +358,7 @@ table
width: calc(100% - 0.5em) !important width: calc(100% - 0.5em) !important
.next .next
text-align: right text-align: right
.buttons .button
margin: 0.2em