-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.luax
78 lines (66 loc) · 2.69 KB
/
common.luax
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 "duckonaut.dev"
local description = props.attrs.description or "duckonaut's stuff"
local stylesheelts = props.attrs.stylesheets or
{ 'app.css',
'index.css',
'contact.css',
'project.css',
'navbar.css',
'carousel.css',
'blog.css'
}
local scripts = props.attrs.scripts or
{ 'index.js' }
local style_tags = {}
for _, stylesheet in ipairs(stylesheelts) do
style_tags[#style_tags + 1] =
<link rel="stylesheet" href={asset_prefix .. "/assets/" .. stylesheet} />
end
local script_tags = {}
for _, script in ipairs(scripts) do
script_tags[#script_tags + 1] =
<script src={asset_prefix .. "/assets/" .. script}></script>
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/[email protected]/build/web/hack-subset.css" />
<link rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.css" />
<link rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.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>
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslCanvas/master/dist/GlslCanvas.js"></script>
{$ script_tags $}
{$ 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://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