forked from FreeFeed/freefeed-react-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jade
163 lines (156 loc) · 7.93 KB
/
index.jade
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
doctype html
html(lang='en')
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width,initial-scale=1,maximum-scale=1')
//- Support for FB OpenGraph and Twitter
<!--#if expr="${request_uri} = /^\/([a-zA-Z0-9]+)\/([a-fA-F0-9\-]{36})/" -->
<!--#set var="post_id" value="$2" -->
<!--#include virtual="/v2/posts-opengraph/${post_id}" -->
<!--#endif -->
//- RSS autodiscovery
<!--#if expr="${request_uri} = /^\/([a-zA-Z0-9]+)/" -->
<!--#set var="username" value="$1" -->
<!--#include virtual="/v2/timelines-metatags/${username}" -->
<!--#endif -->
title FreeFeed
unless htmlWebpackPlugin.options.opts.hot
link(rel='stylesheet', href=htmlWebpackPlugin.files.css[0])
link(rel='stylesheet', href=htmlWebpackPlugin.files.css[1])
noscript
style.
.jsonly { display: none }
style.
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px }
h1 { font-size: 36px; font-weight: 500 }
h1 a { color: #222; text-decoration: none }
body.dark-theme h1 a { color: hsl(0, 0%, 70%); }
body.initial { transition: none; }
style.
.privacy-popup {position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; color: white; background-color: rgba(16,16,16,0.8); padding: 24px; display: flex; flex-flow: row; flex-wrap: wrap; align-items: center; justify-content: center;}
.privacy-text {line-height: 1.42857; font-size: 16px; margin-bottom: 16px; max-width: 600px;}
.privacy-button {font-size: 16px; font-weight: bold; color: #F6C944; border: solid 2px #F6C944; border-radius: 8px; padding: 12px 24px; line-height: 1.42857; cursor: pointer; background-color: white; max-height: 50px;}
.privacy-button:hover {color: #FDB832; border-color: #FDB832;}
a.privacy-link {color: white; font-weight: bold; text-decoration: underline;}
a.privacy-link:hover {color: #F6C944; font-weight: bold;}
link(rel='icon', href=htmlWebpackPlugin.files.publicPath + 'assets/images/favicon.ico', type='image/x-icon')
link(rel='apple-touch-icon', sizes='512x512', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_512_512.png')
link(rel='apple-touch-icon', sizes='256x256', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_256_256.png')
link(rel='apple-touch-icon', sizes='192x192', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_192_192.png')
link(rel='apple-touch-icon', sizes='180x180', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_180_180.png')
link(rel='apple-touch-icon', sizes='152x152', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_152_152.png')
link(rel='apple-touch-icon', sizes='144x144', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_144_144.png')
link(rel='apple-touch-icon', sizes='120x120', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_120_120.png')
link(rel='apple-touch-icon', sizes='114x114', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_114_114.png')
link(rel='apple-touch-icon', sizes='76x76', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_76_76.png')
link(rel='apple-touch-icon', sizes='72x72', href=htmlWebpackPlugin.files.publicPath + 'assets/images/ios/icon_72_72.png')
body.initial
//- Instantly check color scheme
script.
(function() {
try {
var storageKey = !{JSON.stringify(htmlWebpackPlugin.options.appConfig.appearance.colorSchemeStorageKey)};
var colorScheme = localStorage.getItem(storageKey);
if (
colorScheme === 'dark'
|| colorScheme !== 'light'
&& window.matchMedia
&& window.matchMedia('(prefers-color-scheme: dark)').matches
) {
document.body.classList.add('dark-theme');
}
} catch (e) { }
setTimeout(() => document.body.classList.remove('initial'), 0);
})();
#app
.container
.row.header-row
.col-md-4
.header
h1.title
a(href='/') FreeFeed
.jsonly
p Loading...
.row
.col-md-9
.content
.box
noscript
#js-disabled-warn.alert.alert-danger(role='alert')
strong Javascript is disabled!
| Looks like you have JavaScript disabled in your browser. Please enable it to enjoy our service.
if htmlWebpackPlugin.options.opts.livereload
script( src="/webpack-dev-server.js" )
script.
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-62517081-1', 'auto');
ga('require', 'eventTracker');
ga('require', 'outboundLinkTracker');
ga('require', 'urlChangeTracker');
ga('send', 'pageview');
script(async src='https://www.google-analytics.com/analytics.js')
script.
(function(w, d){
var id='embedly-platform', n = 'script';
if (!d.getElementById(id)){
w.embedly = w.embedly || function() {(w.embedly.q = w.embedly.q || []).push(arguments);};
var e = d.createElement(n); e.id = id; e.async=1;
e.src = ('https:' === document.location.protocol ? 'https' : 'http') + '://cdn.embedly.com/widgets/platform.js';
var s = d.getElementsByTagName(n)[0];
s.parentNode.insertBefore(e, s);
}
})(window, document);
if htmlWebpackPlugin.options.appConfig.sentry.publicDSN
script(src='https://cdn.ravenjs.com/3.27.0/raven.min.js', crossorigin="anonymous")
script Raven.config('#{htmlWebpackPlugin.options.appConfig.sentry.publicDSN}', { autoBreadcrumbs: true }).install();
script.
(function(w,d){
var PRIVACY_COOKIE_NAME = 'privacy'
function parseCookies() {
return (d.cookie || '').split(';').reduce(function(res, cookieStr){
var cookieData = cookieStr.trim().split('=')
res[cookieData[0]] = cookieData[1]
return res
}, {})
}
function combineCookies(cookieObj) {
return Object.keys(cookieObj).map(function(cookieKey){
return cookieKey + '=' +cookieObj[cookieKey]
}).join('; ')
}
function getCookie(a) {
return parseCookies()[a]
}
function setCookie(a, v, days) {
var e = '';
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
e = "; expires=" + date.toUTCString();
}
d.cookie = a+'='+v+e+"; path=/"
}
function showPrivacyPopup(){
var privacyPopup = document.createElement('DIV')
privacyPopup.classList.add('privacy-popup')
var privacyText = document.createElement('DIV')
privacyText.innerHTML = 'This site uses cookies and other technologies to collect data and enhance your experience. Visit our <a href="/about/privacy" class="privacy-link">Privacy Policy</a> to learn more. By clicking "Accept" or by continuing to use our site you agree to this use of cookies and data.'
privacyText.classList.add('privacy-text')
var acceptButton = document.createElement('BUTTON')
acceptButton.innerText = 'Accept'
acceptButton.classList.add('privacy-button')
acceptButton.addEventListener('click', function(){
setCookie(PRIVACY_COOKIE_NAME, 'true', 730)
document.body.removeChild(privacyPopup)
})
privacyPopup.appendChild(privacyText)
privacyPopup.appendChild(acceptButton)
document.body.appendChild(privacyPopup)
}
var privacyCookie = getCookie(PRIVACY_COOKIE_NAME)
if (!privacyCookie) {
showPrivacyPopup()
}
})(window, document);
script(src=htmlWebpackPlugin.files.chunks.app.entry)
script(src=htmlWebpackPlugin.files.chunks.common.entry)