70 lines
2.7 KiB
Plaintext
Raw Normal View History

2019-06-01 04:55:49 +00:00
component Layout(ctx aero.Context, user *arn.User, openGraph *arn.OpenGraph, meta, tags []string, content string)
2017-06-01 13:38:08 +00:00
html(lang="en")
2016-10-28 16:11:25 +00:00
head
2018-12-08 06:18:31 +00:00
link(rel="stylesheet", href="/styles", importance="high")
2017-11-28 20:48:12 +00:00
2017-07-06 19:38:19 +00:00
if openGraph != nil
title= openGraph.Tags["og:title"]
else
2019-06-01 04:55:49 +00:00
title= assets.Manifest.Name
2017-07-06 18:56:37 +00:00
2018-04-24 12:34:12 +00:00
//- Viewport
2016-11-03 04:11:00 +00:00
meta(name="viewport", content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes")
2017-11-09 07:45:51 +00:00
2018-04-24 12:34:12 +00:00
//- Open Graph
2017-07-06 18:56:37 +00:00
if openGraph != nil
2018-04-16 15:59:34 +00:00
if openGraph.Tags["og:video"] != ""
2018-04-16 15:58:53 +00:00
meta(name="twitter:card", content="player")
else
meta(name="twitter:card", content="summary")
2018-04-06 06:17:11 +00:00
2018-04-16 14:11:32 +00:00
//- Facebook App ID
meta(property="fb:app_id", content="915407915202908")
2017-11-21 14:30:30 +00:00
2017-11-09 07:45:51 +00:00
for _, name := range meta
meta(name=name, content=openGraph.Meta[name])
for _, name := range tags
meta(property=name, content=openGraph.Tags[name])
2017-06-25 16:06:03 +00:00
link(rel="chrome-webstore-item", href="https://chrome.google.com/webstore/detail/hajchfikckiofgilinkpifobdbiajfch")
2017-06-03 23:17:00 +00:00
link(rel="manifest", href="/manifest.json")
2017-11-29 12:56:34 +00:00
2018-12-08 06:18:31 +00:00
//- Preconnect to CDN
2019-05-24 07:43:51 +00:00
link(rel="preconnect", href="//fonts.gstatic.com")
link(rel="preconnect", href="//media.notify.moe")
2018-12-08 06:18:31 +00:00
2017-11-29 12:56:34 +00:00
//- Icons
link(rel="icon", type="image/webp", sizes="64x64", href="//media.notify.moe/images/brand/64.webp")
link(rel="icon", type="image/webp", sizes="128x128", href="//media.notify.moe/images/brand/128.webp")
link(rel="icon", type="image/webp", sizes="512x512", href="//media.notify.moe/images/brand/512.webp")
link(rel="icon", type="image/png", sizes="64x64", href="//media.notify.moe/images/brand/64.png")
link(rel="icon", type="image/png", sizes="128x128", href="//media.notify.moe/images/brand/128.png")
link(rel="icon", type="image/png", sizes="512x512", href="//media.notify.moe/images/brand/512.png")
link(rel="apple-touch-icon", sizes="180x180", type="image/png", href="//media.notify.moe/images/brand/180.png")
2018-04-24 12:34:12 +00:00
//- Color of the embed sidebar in Discord,
//- also the color of tabs on mobile browsers.
2019-05-23 06:02:13 +00:00
meta(name="theme-color", content=assets.Manifest.ThemeColor)
2018-04-24 12:34:12 +00:00
//- Google site verification
meta(name="google-site-verification", content="1U-E2pDaYbFHyOSWl6AX3DvixQuDc4kfem9Kde_jZ8A")
2016-10-28 16:11:25 +00:00
body
2017-06-24 19:07:45 +00:00
#container(class=utils.GetContainerClass(ctx))
2017-07-22 13:04:54 +00:00
#columns
2018-12-06 04:27:01 +00:00
Sidebar(ctx.Get("term"), user)
2017-11-03 08:34:21 +00:00
Content(content)
2018-09-27 05:19:14 +00:00
2017-07-22 13:04:54 +00:00
LoadingAnimation
StatusMessage
2018-03-09 11:50:01 +00:00
ExtensionNavigation(user)
2018-09-27 05:19:14 +00:00
2017-06-30 15:51:17 +00:00
if user != nil
2018-03-07 13:52:56 +00:00
#user(data-id=user.ID, data-pro=user.IsPro(), data-theme=user.Settings().Theme)
2018-04-24 12:34:12 +00:00
2019-05-05 05:35:08 +00:00
script(src="/scripts", importance="high", crossorigin="anonymous")
2019-05-23 06:02:13 +00:00
script(type="application/ld+json")!= assets.Organization
2017-11-03 08:34:21 +00:00
component Content(content string)
#content-container
main#content.fade!= content