Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F969256
html.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
881 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.js"
;
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
Fri, Nov 22, 08:58 (3 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
547669
Default Alt Text
html.ts (881 B)
Attached To
Mode
rPHOTOAPP photo-app-demo
Attached
Detach File
Event Timeline
Log In to Comment