rework templates and build system

pull/1/head
ansuz 8 years ago
parent c9d99f101a
commit a5407e9222

@ -22,11 +22,11 @@ var template = read('./template.html');
// read page fragments
var fragments = {};
[ 'analytics',
'index',
[ 'index',
'fork',
'terms',
'privacy',
'logo',
].forEach(function (name) {
fragments[name] = read('./fragments/' + name + '.html');
});
@ -35,8 +35,8 @@ var fragments = {};
['index', 'privacy', 'terms'].forEach(function (page) {
var source = swap(template, {
fork: fragments.fork,
analytics: fragments.analytics,
main: fragments[page],
logo: fragments.logo,
});
write('../' + page + '.html', source);
});

@ -1,18 +0,0 @@
<!-- Piwik -->
<script type="text/javascript">
if (window.location.href.indexOf('cryptpad.fr') !== -1) {
// This piwik is only relevant to cryptpad.fr
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.xwiki.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 12]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
}
</script>
<!-- End Piwik Code -->

@ -0,0 +1,3 @@
<center>
<a href="/"><img class="imgcenter cryptofist" src="/customize/cryptofist_small.png" /></a>
</center>

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html class="cp">
<head>
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
@ -12,12 +12,13 @@
waitSeconds: 60,
});
</script>
{{analytics}}
</head>
<body>
{{fork}}
<div id="main">
{{logo}}
{{main}}
</div>
</body>

Loading…
Cancel
Save