rework templates and build system
This commit is contained in:
@@ -22,11 +22,11 @@ var template = read('./template.html');
|
|||||||
|
|
||||||
// read page fragments
|
// read page fragments
|
||||||
var fragments = {};
|
var fragments = {};
|
||||||
[ 'analytics',
|
[ 'index',
|
||||||
'index',
|
|
||||||
'fork',
|
'fork',
|
||||||
'terms',
|
'terms',
|
||||||
'privacy',
|
'privacy',
|
||||||
|
'logo',
|
||||||
].forEach(function (name) {
|
].forEach(function (name) {
|
||||||
fragments[name] = read('./fragments/' + name + '.html');
|
fragments[name] = read('./fragments/' + name + '.html');
|
||||||
});
|
});
|
||||||
@@ -35,8 +35,8 @@ var fragments = {};
|
|||||||
['index', 'privacy', 'terms'].forEach(function (page) {
|
['index', 'privacy', 'terms'].forEach(function (page) {
|
||||||
var source = swap(template, {
|
var source = swap(template, {
|
||||||
fork: fragments.fork,
|
fork: fragments.fork,
|
||||||
analytics: fragments.analytics,
|
|
||||||
main: fragments[page],
|
main: fragments[page],
|
||||||
|
logo: fragments.logo,
|
||||||
});
|
});
|
||||||
write('../' + page + '.html', source);
|
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 -->
|
|
||||||
|
|
||||||
3
customize.dist/src/fragments/logo.html
Normal file
3
customize.dist/src/fragments/logo.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<center>
|
||||||
|
<a href="/"><img class="imgcenter cryptofist" src="/customize/cryptofist_small.png" /></a>
|
||||||
|
</center>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html class="cp">
|
||||||
<head>
|
<head>
|
||||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
@@ -12,12 +12,13 @@
|
|||||||
waitSeconds: 60,
|
waitSeconds: 60,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{analytics}}
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{fork}}
|
{{fork}}
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
{{logo}}
|
||||||
|
|
||||||
{{main}}
|
{{main}}
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user