]> Lady’s Gitweb - Status/blob - index.html
New status @ 2024-01-06T01:20:49-05:00
[Status] / index.html
1 <!dOcTyPe html>
2 <HTML Lang=en>
3 <TITLE>Index</TITLE>
4 <STYLE>
5 html{ Color: #E3E3E3; Background: #700020; Font-Family: UI-Rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, Sans-Serif; Line-Height: 1.5; Text-Shadow: Calc(1EM / 12) Calc(1EM / 12) #000000 }
6 body{ Display: Grid; Box-Sizing: Border-Box; Margin: Auto; Padding-Inline: 1CH; Min-Block-Size: 100VH; Inline-Size: 100%; Max-Inline-Size: 48REM; Align-Content: Center; Justify-Content: Stretch }
7 :Any-Link{ Color: #87E6DD }
8 #topics{ Display: Grid; Margin-Block: 1REM; Grid: Auto-Flow / 1FR 1FR; Gap: 0 1REM }
9 #topics h2{ Margin-Block-End: 0; Grid-Column: 1 / Span 2; Text-Align: Center }
10 #topics h2:Last-Child{ Display: None }
11 div.STATUS{ Border: Thin Solid; Padding-Inline: 1REM; Border-Radius: .5REM; Color: #F3DEE3; Background: #1A1A1A; Font-Size: Larger; Text-Shadow: None }
12 div.STATUS :Any-Link{ Color: #D6B7BF }
13 summary{ Padding-Block: 1REM; Font-Weight: Bold }
14 details[open]>summary{ Border-Block-End: Thin Solid }
15 footer{ Border-Block-Start: Thin Solid; Padding-Block: 1REM; Font-Size: Smaller; Text-Align: End }
16 footer p{ Margin-Block: 0 .5REM }
17 footer time:Not([datetime]),
18 footer small{ Font-Size: Inherit; Font-Style: Italic }
19 svg{ Display: Inline-Block; Vertical-Align: Middle; Block-Size: 1EM; Inline-Size: 1EM; Color: #F3DEE3; Fill: #1A1A1A }
20 :Any-Link svg{ Color: #D6B7BF }
21 svg#feedicon{ Color: #EAB783; Fill: #D11800 }
22 </STYLE>
23 <H1>Index</H1>
24 <DIV Class=STATUS ID=status>
25 </DIV>
26 <SECTION ID=topics>
27 <H2>Topics</H2>
28 </SECTION>
29 <FOOTER>
30 <A HRef=https://www.ladys.computer/><IMG Width=88 Height=31 Style="Display: Block; Margin: Auto; Image-Rendering: Pixelated" Src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAMAAABUFvrSAAAAAXNSR0IArs4c6QAAADBQTFRF////AAAAGhoaPj4+aGhok5OTvr6+cAAgmSJEs4qW897jH31jLLONOua1UwB0j2YApwkwfQAAAalJREFUSIm1lgGzgiAQhHM1o3sx/f9/++SOg+OAbJpxx0gxP9blxG7LRbot+xW6JzBmCvtjf/yiZwbPzidweE6Vxh6foVPwXsAVUvZAVME8ig51Di6OAao8KCXv8fkQII0D31ttHkyFwrzDK3cQkfSFZQnSwIHbWd1cFA2lgrk3dYVUYdJ04M1od471rvMXWTAKeJmAa3GvHZgJxHlwS1C7EvFHMPB6yWf1USikoFMshEI+cfyX1TmGcUgmEOSIZfIyd+D4lYUOnBlE1HpXMJdbwg7KLWWcDS8+Cp06WN8aO/QBCclu94BwxuwZGDjWSLXojOqzF/RgUBXJb18V02WqYddBesdZLgogRoeKpieiGboDr0aN43Qpb1EaOTo+0iawjsTtN4+0gGM2JrBYkAXcjvT1WnEC5nuI0g7A29rq1HG1qo71wK/H9/f7WC5X3pr1eASO9f5tFIOMD3BdlAvYRpEnr0TxtDMJM6cevLkgvOOm2mDKW9mQ0Trw9NWkNdW8Ru2B3P8PL9PBpVaAP/n1y7S/9LMy+DH9QQLTLxLwVX+xtkt0gC/SP0CwO6Ncy8sUAAAAAElFTkSuQmCC" Alt="Lady’s Computer"></A>
31 </FOOTER>
32 <DIV Hidden><SVG ID=feedicon Version=1.1 ViewBox="0 0 256 256"><RECT Width=256 Height=256 RX=55 RY=55 X=0 Y=0 Fill=CurrentColor /><RECT Width=236 Height=236 RX=47 RY=47 X=10 Y=10 Style="Fill: Inherit" /><CIRCLE CX=68 CY=189 R=24 Fill=CurrentColor /><PATH D="M 160 213 h -34 a 82 82 0 0 0 -82 -82 v -34 a 116 116 0 0 1 116 116 z" Fill=CurrentColor /><PATH D="M 184 213 A 140 140 0 0 0 44 73 V 38 a 175 175 0 0 1 175 175 z" Fill=CurrentColor /></SVG>
33 <SCRIPT Type=module>
34 const parser = new DOMParser
35 document.title = location.hostname
36 document.documentElement.querySelector("body>h1").textContent = location.hostname
37 const renderLatest = (meta, container) => {
38 const { feed, items } = meta
39 const status = items.pop()
40 const src = status.content
41 const { documentElement: article } = parser.parseFromString(src, "application/xhtml+xml")
42 const footer = document.createElement("footer")
43 const authorshipP = footer.appendChild(document.createElement("p"))
44 const { creator, title } = status
45 if (creator) {
46 const authorLink = authorshipP.appendChild(document.createElement("a"))
47 authorLink.href = creator["@id"]
48 authorLink.textContent = creator.name
49 authorshipP.appendChild(document.createTextNode(" @ ")) }
50 authorshipP.appendChild(document.createElement("time")).textContent = status.created
51 const nav = footer.appendChild(document.createElement("nav"))
52 const atomLink = nav.appendChild(document.createElement("a"))
53 atomLink.href = feed
54 const atomSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg")
55 atomSVG.setAttribute("version", "1.1")
56 atomSVG.setAttribute("viewBox", "0 0 256 256")
57 const atomUse = atomSVG.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "use"))
58 atomUse.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "#feedicon")
59 atomLink.append(atomSVG, " Atom feed.")
60 nav.appendChild(document.createTextNode(" "))
61 const permalink = nav.appendChild(document.createElement("a"))
62 permalink.href = status["@id"]
63 permalink.textContent = "Permalink."
64 nav.appendChild(document.createTextNode(" "))
65 const upLink = nav.appendChild(document.createElement("a"))
66 upLink.href = meta["@id"]
67 upLink.textContent = `See more ${ status.subject ? `${status.subject}` : "status" } updates.`
68 if (title) {
69 const wrapper = document.createElement("article")
70 const details = wrapper.appendChild(document.createElement("details"))
71 details.setAttribute("open", "")
72 const summary = details.appendChild(document.createElement("summary"))
73 summary.textContent = title
74 details.append(...document.importNode(article, true).childNodes)
75 container.replaceChildren(wrapper, footer) }
76 else container.replaceChildren(document.importNode(article, true), footer) }
77 fetch("statuses.jsonld")
78 .then($ => $.json())
79 .then(meta => fetch(`${meta.current}.jsonld`))
80 .then($ => $.json())
81 .then(meta => renderLatest(meta, document.getElementById("status")))
82 fetch("topics.jsonld")
83 .then($ => $.json())
84 .then(meta => {
85 const topics = document.getElementById("topics")
86 for (const topicID of meta.items.map($ => $["@id"] ?? $)) {
87 const section = topics.appendChild(document.createElement("section"))
88 fetch(`${topicID}.jsonld`)
89 .then($ => $.json())
90 .then(topic => {
91 section.appendChild(document.createElement("h3")).textContent = topic.subject
92 const div = section.appendChild(document.createElement("div"))
93 div.className = "STATUS"
94 renderLatest(topic, div) }) } })
95 </SCRIPT>
This page took 0.40579 seconds and 5 git commands to generate.