blob: 516297af57a48da914edf89661d628df9f61a54d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
return function(props)
local use_cdn = reluax.dev_mode == false
local asset_prefix = use_cdn and "https://cdn.duckonaut.dev" or ""
local thumbnail = props.attrs.thumbnail or
asset_prefix .. "/assets/images/thumbnail.png"
local title = props.attrs.title or "rem.duckonaut.dev"
local description = props.attrs.description or "zzz"
local stylesheets = props.attrs.stylesheets or
{ 'app.css',
'index.css'
}
local style_tags = {}
for _, stylesheet in ipairs(stylesheets) do
style_tags[#style_tags + 1] =
<link rel="stylesheet" href={asset_prefix .. "/assets/" .. stylesheet} />
end
return <html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href={asset_prefix .. '/assets/images/favicon.svg'} />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet"
href="//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack-subset.css" />
<script type="text/javascript"
src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript"
src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
{$ style_tags $}
<meta property="og:image" content={thumbnail} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:url" content="https://rem.duckonaut.dev" />
<meta property="og:type" content="website" />
<meta name="theme-color" content="#9191ff" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@duckonaut" />
<meta name="twitter:creator" content="@duckonaut" />
<title>{$ title $}</title>
</head>
<body>
<div id="app">{$ props.children $}</div>
</body>
</html>
end
|