Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996545
html.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
878 B
Referenced Files
None
Subscribers
None
html.ts
View Options
import
{
Templatable
,
tempstream
}
from
"tempstream"
;
import
{
Readable
}
from
"stream"
;
import
{
BaseContext
}
from
"koa"
;
import
navbar
from
"./routes/common/navbar"
;
export
const
defaultHead
=
(
ctx
:
BaseContext
,
title
:
string
)
=>
/* HTML */
`<title>
${
title
}
·
${
ctx
.
$app
.
manifest
.
name
}
</title>
<meta name="viewport" content="width=device-width" />
<script async src="/dist/bundle.js"></script>
<link href="/dist/style.css" rel="stylesheet" type="text/css" />`
;
export
default
function
html
(
ctx
:
BaseContext
,
title
:
string
,
body
:
Templatable
,
makeHead
:
(
ctx
:
BaseContext
,
title
:
string
)
=>
Templatable
=
defaultHead
)
:
Readable
{
ctx
.
set
(
"content-type"
,
"text/html;charset=utf-8"
);
return
tempstream
/* HTML */
` <!DOCTYPE html>
<html lang="pl">
<head>
${
makeHead
(
ctx
,
title
)
}
</head>
<body>
${
navbar
(
ctx
)
}
${
body
}
</body>
</html>`
;
}
File Metadata
Details
Attached
Mime Type
text/html
Expires
Tue, Dec 24, 14:05 (9 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557308
Default Alt Text
html.ts (878 B)
Attached To
Mode
rREWRITE Configurable rewriter
Attached
Detach File
Event Timeline
Log In to Comment