fix invalid html issues

add doctype. remove duplicate main tag from page-builder. change spans to divs where there are p children
This commit is contained in:
sorrel 2024-02-08 22:34:57 -05:00
parent baec19a6d7
commit 30a3780663
3 changed files with 57 additions and 48 deletions

View file

@ -176,7 +176,9 @@
(define (make-page resource static-write) (define (make-page resource static-write)
(string->bytes/utf-8 (string->bytes/utf-8
(static-write (static-write
(fragment->page resource)))) (string-append
"<!DOCTYPE html>\n"
(fragment->page resource)))))
(define (fragment->page resource) (define (fragment->page resource)
(xexpr->string (xexpr->string

View file

@ -1,6 +1,7 @@
(main (article
((id "oxaliq-dot-net-index"))
(noscript (noscript
(span (div
((class "noscript")) ((class "noscript"))
(p "hey! yr not letting yr browser execute javascript served by my page.") (p "hey! yr not letting yr browser execute javascript served by my page.")
(p "that's cool!") (p "that's cool!")
@ -24,40 +25,46 @@
a nice time building this little thing ") a nice time building this little thing ")
(p " i hope you have a nice time looking at things here") (p " i hope you have a nice time looking at things here")
(hr) (hr)
(p (span ((class "hx-target")) (div ((class "hx-target"))
(p
(a ((href "/this") (a ((href "/this")
(hx-get "/hx/this") (hx-get "/hx/this")
(hx-target "closest span") (hx-target "closest div.hx-target")
(hx-swap "innerHTML")) (hx-swap "innerHTML"))
"(how i build this little page)"))) "(how i build this little page)")))
(p (span ((class "hx-target")) (div ((class "hx-target"))
(p
(a ((href "/now") (a ((href "/now")
(hx-get "/hx/now") (hx-get "/hx/now")
(hx-target "closest span") (hx-target "closest div.hx-target")
(hx-swap "innerHTML")) (hx-swap "innerHTML"))
"(what i'm doing)"))) "(what i'm doing)")))
(p (span ((class "hx-target")) (div ((class "hx-target"))
(p
(a ((href "/about") (a ((href "/about")
(hx-get "/hx/about") (hx-get "/hx/about")
(hx-target "closest span") (hx-target "closest div.hx-target")
(hx-swap "innerHTML")) (hx-swap "innerHTML"))
"(who i am)"))) "(who i am)")))
(p (span ((class "hx-target")) (div ((class "hx-target"))
(p
(a ((href "/contact") (a ((href "/contact")
(hx-get "/hx/contact") (hx-get "/hx/contact")
(hx-target "closest span") (hx-target "closest div.hx-target")
(hx-swap "innerHTML")) (hx-swap "innerHTML"))
"(how to say hi to me)"))) "(how to say hi to me)")))
(p (span ((class "hx-target")) (div ((class "hx-target"))
(p
(a ((href "/very-earnest-disclaimer") (a ((href "/very-earnest-disclaimer")
(hx-get "/hx/very-earnest-disclaimer") (hx-get "/hx/very-earnest-disclaimer")
(hx-target "closest span") (hx-target "closest div.hx-target")
(hx-swap "innerHTML")) (hx-swap "innerHTML"))
"(a very earnest disclaimer)"))) "(a very earnest disclaimer)")))
; (p (span ((class "hx-target")) ; (div ((class "hx-target"))
; (p
; (a ((href "/links") ; (a ((href "/links")
; (hx-get "/hx/links") ; (hx-get "/hx/links")
; (hx-target "closest span") ; (hx-target "closest div.hx-target")
; (hx-swap "innerHTML")) ; (hx-swap "innerHTML"))
; "(some things i think are neat)"))) ; "(some things i think are neat)")))
(p (a ((href "static/license/license.txt")) (p (a ((href "static/license/license.txt"))

View file

@ -35,26 +35,26 @@ h1, h2, h3, h4, h5 {
font-family: 'Courier New', Courier, monospace; font-family: 'Courier New', Courier, monospace;
color: var(--background-color); color: var(--background-color);
background-color: var(--visited-link-color); background-color: var(--visited-link-color);
padding: 2 10; padding: 2px 10px;
} }
h5 { h5 {
margin: 2 0; margin: 2px 0px;
} }
span.noscript p { div.noscript p {
font-family: 'Courier New', Courier, monospace; font-family: 'Courier New', Courier, monospace;
font-size: small; font-size: small;
} }
span.hx-target section { div.hx-target section {
border: solid 1px var(--link-color); border: solid 1px var(--link-color);
border-radius: 4px; border-radius: 4px;
padding: 5 10; padding: 5px 10px;
margin: 3; margin: 3px;
} }
span.hx-target footer { div.hx-target footer {
display: none; display: none;
} }
@ -78,7 +78,7 @@ a:not(.ascii a):not(a[hx-get*="hx"])::before {
} }
body { body {
max-width: 600; max-width: 600px;
margin: auto; margin: auto;
font-size: medium; font-size: medium;
font-family: sans-serif; font-family: sans-serif;
@ -128,21 +128,21 @@ nav a {
} }
p { p {
margin: 12 0; margin: 12px 0px;
} }
ul.tag-list { ul.tag-list {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
margin: 6 0; margin: 6px 0px;
padding: 0; padding: 0px;
} }
li.tag-item { li.tag-item {
list-style-type: none; list-style-type: none;
flex-basis: fit-content; flex-basis: fit-content;
margin: 0 6; margin: 0px 6px;
} }
img { img {