Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed May 14, 2024
1 parent df9e717 commit 57e1661
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function (request: Request) {
}
try {
const url = new URL(request.url).searchParams.get("url")!
const body = await fetch(url, {headers:{Accept:"text/html"}}).then((response) => response.text())
const body = await fetch(url, { headers: { Accept: "text/html" } }).then((response) => response.text())
return new Response(body, { headers: { "Content-Type": "text/html" } })
} catch (error) {
return new Response(error.message, { status: STATUS_CODE.InternalServerError })
Expand Down
4 changes: 2 additions & 2 deletions app/build/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function html() {
const lv2 = Array.from(element.querySelectorAll("section > :is(h1, h2, h3, h4, h5, h6)"))
.filter((hx) => (hx as HTMLElement).parentElement?.parentElement === element)
.map((hx) => {
const lv3 = Array.from(hx.parentElement!.querySelectorAll('section > section > section > :is(h1, h2, h3, h4, h5, h6), summary :is(h1, h2, h3, h4, h5, h6)'))
const lv3 = Array.from(hx.parentElement!.querySelectorAll("section > section > section > :is(h1, h2, h3, h4, h5, h6), summary :is(h1, h2, h3, h4, h5, h6)"))
.map((hy) => `<li><small>${emojiless((hy.querySelector("a") as unknown as HTMLElement).outerHTML)}</small></li>`)
.join("")
const a = (hx.querySelector("a") as unknown as HTMLElement).outerHTML
Expand All @@ -73,6 +73,6 @@ export async function html() {
}

/** Strip emojis */
function emojiless(string:string) {
function emojiless(string: string) {
return string.replace(/[\u{1F600}-\u{1F64F}|\u{1F300}-\u{1F5FF}|\u{1F680}-\u{1F6FF}|\u{1F1E0}-\u{1F1FF}|\u{2600}-\u{26FF}|\u{2700}-\u{27BF}]+/gu, "")
}
2 changes: 1 addition & 1 deletion styles/@layouts/mod.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
body.layout-simple {
display: grid;
max-width: none;
padding: 0 1.5rem;
column-gap: 1.5rem;
grid-template-areas:
"header"
"main"
"footer";
grid-template-rows: auto 1fr auto;
max-width: none;
}

body.layout-simple > :is(header:first-of-type, footer:last-of-type) {
Expand Down
2 changes: 1 addition & 1 deletion styles/forms/mod.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ form {
overflow: auto;
padding: 1rem;
border-radius: var(--bd-radius);
background: var(--bg-muted);
margin: 0 auto 1rem;
background: var(--bg-muted);
}

:is(form, label):last-child {
Expand Down
2 changes: 1 addition & 1 deletion styles/sectioning/mod.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* Sections */
body {
max-width: var(--ct-width);
padding: 0 1.5rem;
margin: 0 auto;
background: var(--bg-default);
color: var(--default);
font-family: var(--ft);
font-size: var(--ft-size);
line-height: 1.5;
max-width: var(--ct-width);
}

main, header {
Expand Down

0 comments on commit 57e1661

Please sign in to comment.