/
convos.html.ep
78 lines (74 loc) · 5.06 KB
/
convos.html.ep
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
% use Mojo::JSON 'to_json';
% use Mojo::Util 'b64_encode';
% my $social = $c->social;
% stash start_app => '' unless stash 'start_app';
<!DOCTYPE html>
<html lang="<%= $lang %>">
<head>
<!-- social + seo -->
% if ($organization_name eq 'Convos') {
<title><%=l '%1 - Convos', title %></title>
% } else {
<title><%=l '%1 - Convos for %2', title, $organization_name %></title>
% }
%= tag 'meta', name => 'description', content => $social->{description}
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@convosby">
<meta property="og:type" content="object">
%= tag 'meta', property => 'og:site_name', content => $organization_name
%= tag 'meta', property => 'og:url', content => $social->{url}
%= tag 'meta', name => 'twitter:description', property => 'og:description', content => $social->{description}
%= tag 'meta', name => 'twitter:image:src', property => 'og:image', content => $social->{image}
%= tag 'meta', name => 'twitter:title', property => 'og:title', content => title
%= tag 'link', rel => 'canonical', href => $social->{canonical} if $social->{canonical}
<!-- pwa -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" sizes="57x57" href="<%= url_for '/asset/apple-touch-icon-57x57.e024a83e.png' %>">
<link rel="apple-touch-icon" sizes="60x60" href="<%= url_for '/asset/apple-touch-icon-60x60.51c5a95b.png' %>">
<link rel="apple-touch-icon" sizes="72x72" href="<%= url_for '/asset/apple-touch-icon-72x72.231a66c9.png' %>">
<link rel="apple-touch-icon" sizes="76x76" href="<%= url_for '/asset/apple-touch-icon-76x76.5e14b7a1.png' %>">
<link rel="apple-touch-icon" sizes="114x114" href="<%= url_for '/asset/apple-touch-icon-114x114.913c43db.png' %>">
<link rel="apple-touch-icon" sizes="120x120" href="<%= url_for '/asset/apple-touch-icon-120x120.52c691a9.png' %>">
<link rel="apple-touch-icon" sizes="144x144" href="<%= url_for '/asset/apple-touch-icon-144x144.eb857b3e.png' %>">
<link rel="apple-touch-icon" sizes="152x152" href="<%= url_for '/asset/apple-touch-icon-152x152.be6c9e4f.png' %>">
<link rel="apple-touch-icon" sizes="180x180" href="<%= url_for '/asset/apple-touch-icon-180x180.c1fe73dd.png' %>">
<link rel="icon" type="image/png" sizes="32x32" href="<%= url_for '/asset/favicon-32x32.2447df68.png' %>">
<link rel="icon" type="image/png" sizes="194x194" href="<%= url_for '/asset/favicon-194x194.77dd0ed4.png' %>">
<link rel="icon" type="image/png" sizes="192x192" href="<%= url_for '/asset/android-chrome-192x192.02ee7244.png' %>">
<link rel="icon" type="image/png" sizes="16x16" href="<%= url_for '/asset/favicon-16x16.9e1affe1.png' %>">
<link rel="manifest" href="<%= url_for '/asset/site.e3ea726b.webmanifest' %>">
<link rel="mask-icon" href="<%= url_for '/asset/safari-pinned-tab.cb98a0d7.svg' %>" color="#00451D">
<meta name="msapplication-TileImage" content="<%= url_for '/asset/mstile-144x144.a653fdfa.png' %>">
<meta name="msapplication-config" content="<%= url_for '/asset/browserconfig.f80fd3df.xml' %>">
<meta name="msapplication-TileColor" content="#00451D">
<meta name="theme-color" content="#00451D">
<!-- convos settings -->
%= tag 'meta', name => 'contactorganization', content => $organization_name
%= tag 'meta', name => 'contactnetworkaddress', content => $organization_url
%= tag 'meta', name => 'convos:base_url', content => $base_url
%= tag 'meta', name => 'convos:contact', content => b64_encode($contact, '')
%= tag 'meta', name => 'convos:existing_user', content => $existing_user ? 'yes' : 'no'
%= tag 'meta', name => 'convos:first_user', content => $first_user ? 'yes' : 'no'
%= tag 'meta', name => 'convos:open_to_public', content => $open_to_public ? 'yes' : 'no'
%= tag 'meta', name => 'convos:start_app', content => $start_app
%= tag 'meta', name => 'convos:status', content => stash('status') || 200
%= tag 'meta', name => 'csrf', content => csrf_token
%= tag 'meta', name => 'version', content => Convos->VERSION
<!-- base style + themes -->
<noscript><style>.has-js { display: none; }</style></noscript>
%= asset 'convos.css'
% my $theme = stash('start_app') ? $c->themes->get(js_session('theme'), js_session('colorScheme')) : $c->themes->get;
%= tag 'link', rel => 'stylesheet', type => 'text/css', id => 'theme_primary', href => url_for($theme->{url}), title => $theme->{title}
% for my $theme (@{$c->themes->list}) {
%= tag 'link', rel => 'alternate stylesheet', type => 'text/css', id => "theme_alt__$theme->{id}", href => url_for($theme->{url}), title => $theme->{title}
% }
%= tag style => sub { stash 'custom_css' } if stash 'custom_css'
</head>
% my @classnames = qw(no-js no-notify no-mouse no-touch for-cms);
% push @classnames, 'has-compact-display' if js_session 'compactDisplay';
<body class="<%= join ' ', @classnames =%>">
%= content
%= asset 'convos.js' unless stash 'exception'
</body>
</html>