first commit
16
custom/cryptopad_custom/customize/404.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp" id="four-oh-four">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<h1>404</h1>
|
||||
<h3>We couldn't find the page you were looking for</h3>
|
||||
|
||||
</noscript>
|
After Width: | Height: | Size: 7.3 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360.4 94.7"><defs><style>.cls-1{fill:#4591c4}.cls-2{fill:#999}</style></defs><title>CryptPad_logo_color</title><g id="Layer_2" data-name="Layer 2"><g id="svg2"><g id="g4845"><path id="path4811" class="cls-1" d="M99.5 63.6a24.8 24.8 0 0 1-5.9-.6 8.5 8.5 0 0 1-3.8-1.9 7.1 7.1 0 0 1-2-3.4 19.4 19.4 0 0 1-.6-5.2v-10a19.4 19.4 0 0 1 .6-5.1 7.1 7.1 0 0 1 2-3.4 8.5 8.5 0 0 1 3.8-2 24.8 24.8 0 0 1 5.9-.6h22.3v6.2h-22a11.8 11.8 0 0 0-2.7.3 3.5 3.5 0 0 0-1.7.9 3.3 3.3 0 0 0-.9 1.6 11.1 11.1 0 0 0-.2 2.5v9.4a11.1 11.1 0 0 0 .2 2.5 3.3 3.3 0 0 0 .9 1.6 3.3 3.3 0 0 0 1.7.8l2.7.2h22v6.1z"/><path id="path4813" class="cls-1" d="M126.5 63.6V48.8a16 16 0 0 1 .7-4.9 7.5 7.5 0 0 1 2.1-3.3 8.9 8.9 0 0 1 3.7-1.9 21.4 21.4 0 0 1 5.5-.6h4.6v5.7h-4.4l-2.5.2a3.3 3.3 0 0 0-1.6.8 3.2 3.2 0 0 0-.8 1.6 10.1 10.1 0 0 0-.3 2.5v14.7z"/><path id="path4815" class="cls-1" d="M154.1 51.4a3.8 3.8 0 0 0 .9 3 4.6 4.6 0 0 0 3.1.8h15.7V38h6.8v25.2q0 4.3-2.1 6.2t-6.9 1.9h-10.2v-5.8h9.6a3.3 3.3 0 0 0 2.1-.6 2.7 2.7 0 0 0 .7-2.2v-2h-16.1a19 19 0 0 1-4.9-.5 7.8 7.8 0 0 1-3.3-1.7 6.5 6.5 0 0 1-1.8-2.8 12.7 12.7 0 0 1-.6-4V38h6.9z"/><path id="path4817" class="cls-1" d="M207.5 38a25.1 25.1 0 0 1 5.9.6 8.5 8.5 0 0 1 3.8 1.9 7.1 7.1 0 0 1 2 3.4 19.7 19.7 0 0 1 .6 5.2v3.4a19.4 19.4 0 0 1-.6 5.2 7.1 7.1 0 0 1-2 3.4 8.5 8.5 0 0 1-3.8 1.9 25.1 25.1 0 0 1-5.9.6h-14.3v7.6h-7V49.1a19.7 19.7 0 0 1 .6-5.2 7.1 7.1 0 0 1 2-3.4 8.6 8.6 0 0 1 3.8-1.9 25.1 25.1 0 0 1 5.9-.6zm5.3 11.3a11.7 11.7 0 0 0-.3-2.7 2.9 2.9 0 0 0-1-1.6 4 4 0 0 0-1.9-.8l-3-.2h-7.8l-2.7.2a3.5 3.5 0 0 0-1.7.8 3.2 3.2 0 0 0-.8 1.6 11.7 11.7 0 0 0-.2 2.6v8.4h13.4l3-.2a3.8 3.8 0 0 0 1.9-.7 2.9 2.9 0 0 0 1-1.6 11.9 11.9 0 0 0 .3-2.8z"/><path id="path4819" class="cls-1" d="M226.5 63.6V43.8H223V38h3.6v-7.2h7.2V38h8.1v5.7h-8.1v19.9z"/><path id="path4821" class="cls-2" d="M252.4 54.4v9.2h-7.2V31.4H271a25.7 25.7 0 0 1 5.8.5 8.4 8.4 0 0 1 3.7 1.8 6.8 6.8 0 0 1 2 3.2 17.1 17.1 0 0 1 .6 4.8v2.8a16.9 16.9 0 0 1-.6 4.8 6 6 0 0 1-2 3 8.3 8.3 0 0 1-3.7 1.6 31.6 31.6 0 0 1-5.9.4zm23.5-12.3q0-2.6-1.1-3.5t-4-.9h-18.4v11h18.5a6.5 6.5 0 0 0 3.9-.9q1.1-.9 1.1-3.4z"/><path id="path4823" class="cls-2" d="M296.2 63.6a18.4 18.4 0 0 1-4.6-.5 7.4 7.4 0 0 1-2.9-1.3 4.6 4.6 0 0 1-1.5-2.1 8.7 8.7 0 0 1-.4-2.8v-2.4a9.3 9.3 0 0 1 .4-2.9 4.7 4.7 0 0 1 1.4-2.1 6.5 6.5 0 0 1 2.7-1.3 17.7 17.7 0 0 1 4.4-.4h18.9v-.6q0-2.5-1-3.3a5.3 5.3 0 0 0-3.4-.8h-7V38h7a20.7 20.7 0 0 1 5.2.6 8.9 8.9 0 0 1 3.5 1.7 6.7 6.7 0 0 1 2 2.9 12.5 12.5 0 0 1 .6 4.2v6.2a17.2 17.2 0 0 1-.5 4.7 6.3 6.3 0 0 1-1.9 3.1 7.9 7.9 0 0 1-3.6 1.7 26.8 26.8 0 0 1-5.6.5zM314.7 52h-18.2a3.1 3.1 0 0 0-1.9.5 2.5 2.5 0 0 0-.7 2.1v1.7a2.1 2.1 0 0 0 .8 1.9 3.7 3.7 0 0 0 2.1.5H310l2.1-.2a3.2 3.2 0 0 0 1.5-.7 3 3 0 0 0 .9-1.4 7.8 7.8 0 0 0 .3-2.3z"/><path id="path4825" class="cls-2" d="M339.1 63.6a25.4 25.4 0 0 1-6-.6 8.6 8.6 0 0 1-3.8-1.9 7.1 7.1 0 0 1-2-3.4 19.4 19.4 0 0 1-.6-5.2v-3.4a19.7 19.7 0 0 1 .6-5.2 7.1 7.1 0 0 1 2-3.4 8.6 8.6 0 0 1 3.8-1.9 25.4 25.4 0 0 1 6-.6h14.2v-8.2h7v22.8a19.4 19.4 0 0 1-.6 5.2 7.1 7.1 0 0 1-2 3.4A8.5 8.5 0 0 1 354 63a25.1 25.1 0 0 1-5.9.6zm-5.3-11.2a11.7 11.7 0 0 0 .3 2.7 2.9 2.9 0 0 0 1 1.6 4 4 0 0 0 1.9.8l3.1.2h7.8l2.7-.2a3.3 3.3 0 0 0 1.7-.8 3.2 3.2 0 0 0 .9-1.6 11.9 11.9 0 0 0 .2-2.6v-8.4H340l-3 .2a4 4 0 0 0-1.9.8 2.9 2.9 0 0 0-1 1.6 11.7 11.7 0 0 0-.3 2.7z"/><path id="path4827" class="cls-1" d="M39.2 0L9.9 5.4A6.3 6.3 0 1 0 3.2 16v42.2c0 4 1.8 8.3 5.3 12.7A65.5 65.5 0 0 0 21.6 83a128.2 128.2 0 0 0 17.6 10.5A128.1 128.1 0 0 0 56.7 83a65.4 65.4 0 0 0 13.1-12.1c3.5-4.5 5.3-8.8 5.3-12.7V16A6.3 6.3 0 0 0 72 4.2a6.2 6.2 0 0 0-3.6 1.2zm-.1 6.2l26.7 4.9a5.9 5.9 0 0 0 .2 1.1L50.3 22.5a15.3 15.3 0 0 0-22.6.1l-15.5-10a6.3 6.3 0 0 0 .3-1.4zm28.8 9a6.5 6.5 0 0 0 1.8 1.1v41a10.4 10.4 0 0 1-.1 1.7 21.5 21.5 0 0 1-4.1 7.8 56.1 56.1 0 0 1-11.3 10.4 110.6 110.6 0 0 1-15 9 110.8 110.8 0 0 1-15-9A55.8 55.8 0 0 1 13 66.8a19.8 19.8 0 0 1-4.4-9.3V16.4a6.3 6.3 0 0 0 1.7-1l19.8 12.7a10.1 10.1 0 0 1 9-5.4 10 10 0 0 1 9 5.4z"/><g id="g4829"><path id="path4831" class="cls-2" d="M23 54.8a4.6 4.6 0 1 0 0 9.3 4.6 4.6 0 0 0 0-9.3z"/><path id="path4833" class="cls-2" d="M24.3 28.5a14.9 14.9 0 0 0 4.2 15.4l-7.3 14.8a2.8 2.8 0 0 0 2.3 3.8h11v-5.2h-6.8l6.4-12.8a2.7 2.7 0 0 0-.8-3.3 9.7 9.7 0 0 1-4.3-9.6z"/></g><g id="g4835"><path id="path4837" class="cls-2" d="M55.3 54.8a4.6 4.6 0 1 0 0 9.3 4.6 4.6 0 0 0 0-9.3z"/><path id="path4839" class="cls-2" d="M53.8 28.6l-4.7 3.1a10.2 10.2 0 0 1 .1 1.2 10 10 0 0 1-4.3 8.3 2.7 2.7 0 0 0-.8 3.3l6.3 12.8h-6.8v5.2h11a2.8 2.8 0 0 0 2.3-3.8l-7.3-14.8a15.2 15.2 0 0 0 4.8-11 15.3 15.3 0 0 0-.6-4.3z"/></g><path id="path4841" class="cls-1" d="M43.2 33.3a4.2 4.2 0 1 1-4.2-4.2 4.2 4.2 0 0 1 4.2 4.2z"/><path id="path4843" class="cls-1" d="M45.3 88.4a6.3 6.3 0 1 1-6.3-6.3 6.3 6.3 0 0 1 6.3 6.3z"/></g></g></g></svg>
|
After Width: | Height: | Size: 4.7 KiB |
1
custom/cryptopad_custom/customize/CryptPadlogo_op5.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 393.94 476.2"><defs><style>.cls-1{opacity:0.04;}.cls-2{fill:#999;}.cls-3{fill:#4591c4;}</style></defs><title>CryptPadlogo</title><g id="Layer_2" data-name="Layer 2"><g id="svg2"><g id="g4764" class="cls-1"><path class="cls-2" d="M139.36,288.16l32.07-64.43a13.59,13.59,0,0,0-4.23-16.62,48.65,48.65,0,0,1-21.28-48.25l-23.47-15.31a75.74,75.74,0,0,0-3.36,21.87c0,22,9.52,41.45,24.35,55.54l-27.24,54.8c-.11,0-.2,0-.31,0a23.27,23.27,0,1,0,0,46.53,23,23,0,0,0,17.31-7.86h40.27V288.16Z"/><path class="cls-2" d="M278.28,275.73c-.57,0-1.11.13-1.68.17l-27.33-55.09c14.75-14.07,24.2-33.47,24.2-55.39a77.13,77.13,0,0,0-3.06-21.72l-23.62,15.45a51.69,51.69,0,0,1,.44,6.27A50.21,50.21,0,0,1,225.65,207a13.58,13.58,0,0,0-4.22,16.62l31.77,64.58h-34V314.4h41.63a23.23,23.23,0,1,0,17.41-38.67Z"/><polygon class="cls-2" points="270.41 143.7 270.41 143.7 270.41 143.7 270.41 143.7"/><circle class="cls-3" cx="196.06" cy="167.4" r="21.21"/><path class="cls-3" d="M362.25,21.36a31.14,31.14,0,0,0-18.1,5.8L197,0,50,27.16a31.62,31.62,0,1,0-33.68,53.4v212c0,19.95,8.93,41.51,26.62,64.08,15.66,20,37.82,40.46,65.89,60.83a603,603,0,0,0,57,36.21,31.54,31.54,0,0,0,60,1.25,606,606,0,0,0,59.26-37.46c28.09-20.37,50.23-40.86,65.9-60.83,17.7-22.6,26.61-44.13,26.61-64.08V80.38a31.46,31.46,0,0,0-15.39-59ZM62.82,55.94,196.61,31.32l134.33,24.8a29.58,29.58,0,0,0,.9,5.61L253.09,113a76.78,76.78,0,0,0-113.69.36L61.55,62.82A31.8,31.8,0,0,0,62.82,55.94ZM350.49,288.21a51.41,51.41,0,0,1-.73,8.51c-3.16,12.6-10.11,25.8-20.82,39.47-13.41,17.09-32.43,34.52-56.48,51.95a532.75,532.75,0,0,1-54.19,34.09,31.5,31.5,0,0,0-43.73-.62,534,534,0,0,1-53.06-33.47c-24-17.43-42.9-34.86-56.31-51.95-12.77-16.31-20.25-31.94-22.26-46.71,0-.41,0-.86,0-1.27V82.37a31.51,31.51,0,0,0,8.69-5.25l88.88,57.75.37-.36,10.5,6.88a51,51,0,0,1,45.07-27,50.37,50.37,0,0,1,45.08,27.15l22.09-14.3L341.44,76.4A32.55,32.55,0,0,0,350.49,82Z"/></g></g></g></svg>
|
After Width: | Height: | Size: 1.9 KiB |
16
custom/cryptopad_custom/customize/about.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
BIN
custom/cryptopad_custom/customize/alt-favicon.png
Normal file
After Width: | Height: | Size: 23 KiB |
12
custom/cryptopad_custom/customize/application_config.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* You can override the configurable values from this file.
|
||||
* The recommended method is to make a copy of this file (/customize.dist/application_config.js)
|
||||
in a 'customize' directory (/customize/application_config.js).
|
||||
* If you want to check all the configurable values, you can open the internal configuration file
|
||||
but you should not change it directly (/common/application_config_internal.js)
|
||||
*/
|
||||
define(['/common/application_config_internal.js'], function (AppConfig) {
|
||||
AppConfig.availablePadTypes = ['drive','pad','code','slide'];
|
||||
return AppConfig;
|
||||
});
|
||||
|
BIN
custom/cryptopad_custom/customize/bg14.jpg
Normal file
After Width: | Height: | Size: 474 KiB |
BIN
custom/cryptopad_custom/customize/bkabout.jpg
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
custom/cryptopad_custom/customize/bkregister.jpg
Normal file
After Width: | Height: | Size: 181 KiB |
BIN
custom/cryptopad_custom/customize/bkwhat.jpg
Normal file
After Width: | Height: | Size: 98 KiB |
70
custom/cryptopad_custom/customize/ckeditor-config.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
/* global CKEDITOR */
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
var fixThings = false;
|
||||
// https://dev.ckeditor.com/ticket/10907
|
||||
config.needsBrFiller= fixThings;
|
||||
config.needsNbspFiller= fixThings;
|
||||
|
||||
config.removeButtons= 'Source,Maximize';
|
||||
// magicline plugin inserts html crap into the document which is not part of the
|
||||
// document itself and causes problems when it's sent across the wire and reflected back
|
||||
config.removePlugins= 'resize,elementspath';
|
||||
config.resize_enabled= false; //bottom-bar
|
||||
config.extraPlugins= 'autolink,colorbutton,colordialog,font,indentblock,justify,mediatag,print,blockbase64';
|
||||
config.toolbarGroups= [
|
||||
// {"name":"clipboard","groups":["clipboard","undo"]},
|
||||
//{"name":"editing","groups":["find","selection"]},
|
||||
{"name":"links"},
|
||||
{"name":"insert"},
|
||||
{"name":"forms"},
|
||||
{"name":"tools"},
|
||||
{"name":"document","groups":["mode","document","doctools"]},
|
||||
{"name":"others"},
|
||||
{"name":"basicstyles","groups":["basicstyles","cleanup"]},
|
||||
{"name":"paragraph","groups":["list","indent","blocks","align","bidi"]},
|
||||
{"name":"styles"},
|
||||
{"name":"colors"},
|
||||
{"name":"print"}];
|
||||
|
||||
config.font_defaultLabel = 'Arial';
|
||||
config.fontSize_defaultLabel = '16';
|
||||
|
||||
config.keystrokes = [
|
||||
[ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],
|
||||
[ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ],
|
||||
|
||||
[ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ],
|
||||
|
||||
[ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ],
|
||||
[ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ],
|
||||
[ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ],
|
||||
|
||||
[ CKEDITOR.CTRL + CKEDITOR.SHIFT + 76 /*L*/, 'link' ],
|
||||
[ CKEDITOR.CTRL + 76 /*L*/, undefined ],
|
||||
|
||||
[ CKEDITOR.CTRL + 66 /*B*/, 'bold' ],
|
||||
[ CKEDITOR.CTRL + 73 /*I*/, 'italic' ],
|
||||
[ CKEDITOR.CTRL + 85 /*U*/, 'underline' ],
|
||||
|
||||
[ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ]
|
||||
];
|
||||
|
||||
//skin: 'moono-cryptpad,/pad/themes/moono-cryptpad/'
|
||||
//skin: 'flat,/pad/themes/flat/'
|
||||
//config.skin= 'moono-lisa,/pad/themes/moono-lisa/'
|
||||
skin: 'moono-dark,/pad/themes/moono-dark/'
|
||||
//skin: 'office2013,/pad/themes/office2013/'
|
||||
};
|
||||
|
||||
(function () {
|
||||
// These are overrides inside of ckeditor which add ?ver= to the CSS files so that
|
||||
// every part of ckeditor will get in the browser cache.
|
||||
var fix = function (x) {
|
||||
if (x.map) { return x.map(fix); }
|
||||
return (/\/bower_components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
|
||||
};
|
||||
CKEDITOR.tools._buildStyleHtml = CKEDITOR.tools.buildStyleHtml;
|
||||
CKEDITOR.document._appendStyleSheet = CKEDITOR.document.appendStyleSheet;
|
||||
CKEDITOR.tools.buildStyleHtml = function (x) { return CKEDITOR.tools._buildStyleHtml(fix(x)); };
|
||||
CKEDITOR.document.appendStyleSheet = function (x) { return CKEDITOR.document._appendStyleSheet(fix(x)); };
|
||||
}());
|
207
custom/cryptopad_custom/customize/ckeditor-contents.css
Normal file
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
/* Font */
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
|
||||
font-size: 13px;
|
||||
|
||||
/* Text color */
|
||||
color: #333;
|
||||
|
||||
/* Remove the background color to make it transparent */
|
||||
background-color: #fff;
|
||||
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Remove margin-top for the first element */
|
||||
body > *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* If the magic line is the first element, remove margin-top for the next one */
|
||||
body > .non-realtime:first-child + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.cke_editable
|
||||
{
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
|
||||
/* Fix for missing scrollbars with RTL texts. (#10488) */
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
font-style: italic;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
padding: 2px 0;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.cke_contents_ltr blockquote
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 8px;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
|
||||
.cke_contents_rtl blockquote
|
||||
{
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
border-right-width: 5px;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #0782C1;
|
||||
}
|
||||
|
||||
ol,ul,dl
|
||||
{
|
||||
/* IE7: reset rtl list margin. (#7334) */
|
||||
*margin-right: 0px;
|
||||
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
font-weight: normal;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
border: 0px;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img.right
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: right;
|
||||
margin-left: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
img.left
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
word-wrap: break-word; /* IE7 */
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
.marker
|
||||
{
|
||||
background-color: Yellow;
|
||||
}
|
||||
|
||||
span[lang]
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
figure
|
||||
{
|
||||
text-align: center;
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 2px;
|
||||
background: rgba(0,0,0,0.05);
|
||||
padding: 10px;
|
||||
margin: 10px 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
figure > figcaption
|
||||
{
|
||||
text-align: center;
|
||||
display: block; /* For IE8 */
|
||||
}
|
||||
|
||||
a > img {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
border: none;
|
||||
outline: 1px solid #0782C1;
|
||||
}
|
||||
|
||||
.cp-cursor-position {
|
||||
cursor: default;
|
||||
background-color: red;
|
||||
background-clip: padding-box;
|
||||
padding: 0 1px;
|
||||
border: 2px solid red;
|
||||
border-right-color: transparent !important;
|
||||
border-left-color: transparent !important;
|
||||
margin-left: -3px;
|
||||
margin-right: -3px;
|
||||
}
|
||||
.cp-cursor-position[data-type="start"] {
|
||||
border-left: none;
|
||||
border-right-width: 4px;
|
||||
margin-right: -5px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
.cp-cursor-position[data-type="end"] {
|
||||
border-right: none;
|
||||
border-left-width: 4px;
|
||||
margin-left: -5px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
.cp-cursor-avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.cp-cursor-avatar media-tag {
|
||||
min-height: 32px;
|
||||
max-height: 32px;
|
||||
min-width: 32px;
|
||||
max-width: 32px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.cp-cursor-avatar media-tag img {
|
||||
border-radius: 4px;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.cp-link-clicked {
|
||||
position: absolute;
|
||||
background: white;
|
||||
border: 1px solid #333;
|
||||
border-radius: 5px;
|
||||
padding: 3px 8px;
|
||||
display: inline-block;
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cp-link-clicked a {
|
||||
cursor: pointer;
|
||||
}
|
14
custom/cryptopad_custom/customize/code.svg
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1.6" y1="12" x2="22.4" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M12.9,3l2,0.4L11.1,21l-2-0.4L12.9,3 M19.6,12L16,8.4V5.6l6.4,6.4L16,18.4v-2.8L19.6,12 M1.6,12L8,5.6v2.8
|
||||
L4.4,12L8,15.6v2.8L1.6,12z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 779 B |
369
custom/cryptopad_custom/customize/config.js
Normal file
|
@ -0,0 +1,369 @@
|
|||
/*@flow*/
|
||||
/*
|
||||
globals module
|
||||
*/
|
||||
var _domain = 'http://pad.cisti.org:2000/';
|
||||
|
||||
// You can `kill -USR2` the node process and it will write out a heap dump.
|
||||
// If your system doesn't support dumping, comment this out and install with
|
||||
// `npm install --production`
|
||||
// See: https://strongloop.github.io/strongloop.com/strongblog/how-to-heap-snapshots/
|
||||
|
||||
// to enable this feature, uncomment the line below:
|
||||
// require('heapdump');
|
||||
|
||||
|
||||
// we prepend a space because every usage expects it
|
||||
// requiring admins to preserve it is unnecessarily confusing
|
||||
var domain = ' ' + _domain;
|
||||
module.exports = {
|
||||
|
||||
// the address you want to bind to, :: means all ipv4 and ipv6 addresses
|
||||
// this may not work on all operating systems
|
||||
httpAddress: '::',
|
||||
|
||||
// the port on which your httpd will listen
|
||||
|
||||
/* CryptPad can be configured to send customized HTTP Headers
|
||||
* These settings may vary widely depending on your needs
|
||||
* Examples are provided below
|
||||
*/
|
||||
|
||||
httpHeaders: {
|
||||
"X-XSS-Protection": "1; mode=block",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"Access-Control-Allow-Origin": "*"
|
||||
},
|
||||
|
||||
contentSecurity: [
|
||||
"default-src 'none'",
|
||||
"style-src 'unsafe-inline' 'self' " + domain,
|
||||
"script-src 'self'" + domain,
|
||||
"font-src 'self' data:" + domain,
|
||||
|
||||
/* child-src is used to restrict iframes to a set of allowed domains.
|
||||
* connect-src is used to restrict what domains can connect to the websocket.
|
||||
*
|
||||
* it is recommended that you configure these fields to match the
|
||||
* domain which will serve your CryptPad instance.
|
||||
*/
|
||||
"child-src blob: *",
|
||||
// IE/Edge
|
||||
"frame-src blob: *",
|
||||
|
||||
"media-src * blob:",
|
||||
|
||||
/* this allows connections over secure or insecure websockets
|
||||
if you are deploying to production, you'll probably want to remove
|
||||
the ws://* directive, and change '*' to your domain
|
||||
*/
|
||||
"connect-src 'self' ws: wss: blob:" + domain,
|
||||
|
||||
// data: is used by codemirror
|
||||
"img-src 'self' data: blob:" + domain,
|
||||
|
||||
// for accounts.cryptpad.fr authentication and pad2 cross-domain iframe sandbox
|
||||
"frame-ancestors *",
|
||||
].join('; '),
|
||||
|
||||
// CKEditor requires significantly more lax content security policy in order to function.
|
||||
padContentSecurity: [
|
||||
"default-src 'none'",
|
||||
"style-src 'unsafe-inline' 'self'" + domain,
|
||||
// Unsafe inline, unsafe-eval are needed for ckeditor :(
|
||||
"script-src 'self' 'unsafe-eval' 'unsafe-inline'" + domain,
|
||||
"font-src 'self'" + domain,
|
||||
|
||||
/* See above under 'contentSecurity' as to how these values should be
|
||||
* configured for best effect.
|
||||
*/
|
||||
"child-src *",
|
||||
// IE/Edge
|
||||
"frame-src *",
|
||||
|
||||
// see the comment above in the 'contentSecurity' section
|
||||
"connect-src 'self' ws: wss:" + domain,
|
||||
|
||||
// (insecure remote) images are included by users of the wysiwyg who embed photos in their pads
|
||||
"img-src * blob:",
|
||||
].join('; '),
|
||||
|
||||
// OnlyOffice requires even more lax content security policy in order to function.
|
||||
ooContentSecurity: [
|
||||
"default-src 'none'",
|
||||
"style-src 'unsafe-inline' 'self'" + domain,
|
||||
// Unsafe inline, unsafe-eval are needed for ckeditor :(
|
||||
"script-src 'self' 'unsafe-eval' 'unsafe-inline'" + domain,
|
||||
"font-src 'self'" + domain,
|
||||
|
||||
/* See above under 'contentSecurity' as to how these values should be
|
||||
* configured for best effect.
|
||||
*/
|
||||
"child-src *",
|
||||
// IE/Edge
|
||||
"frame-src *",
|
||||
|
||||
// see the comment above in the 'contentSecurity' section
|
||||
"connect-src 'self' blob: ws: wss:" + domain,
|
||||
|
||||
// (insecure remote) images are included by users of the wysiwyg who embed photos in their pads
|
||||
"img-src * blob: data:",
|
||||
].join('; '),
|
||||
|
||||
httpPort: 2000,
|
||||
|
||||
// This is for allowing the cross-domain iframe to function when developing
|
||||
httpSafePort: 2001,
|
||||
|
||||
// This is for deployment in production, CryptPad uses a separate origin (domain) to host the
|
||||
// cross-domain iframe. It can simply host the same content as CryptPad.
|
||||
// httpSafeOrigin: "https://some-other-domain.xyz",
|
||||
|
||||
httpUnsafeOrigin: domain,
|
||||
|
||||
/* your server's websocket url is configurable
|
||||
* (default: '/cryptpad_websocket')
|
||||
*
|
||||
* websocketPath can be relative, of the form '/path/to/websocket'
|
||||
* or absolute, specifying a particular URL
|
||||
*
|
||||
* 'wss://cryptpad.fr:3000/cryptpad_websocket'
|
||||
*/
|
||||
websocketPath: '/cryptpad_websocket',
|
||||
|
||||
/* CryptPad can log activity to stdout
|
||||
* This may be useful for debugging
|
||||
*/
|
||||
logToStdout: true,
|
||||
|
||||
/* CryptPad supports verbose logging
|
||||
* (false by default)
|
||||
*/
|
||||
verbose: false,
|
||||
|
||||
/* Main pages
|
||||
* add exceptions to the router so that we can access /privacy.html
|
||||
* and other odd pages
|
||||
*/
|
||||
mainPages: [
|
||||
'index',
|
||||
// 'privacy',
|
||||
// 'terms',
|
||||
// 'about',
|
||||
// 'contact',
|
||||
// 'what-is-cryptpad',
|
||||
// 'features',
|
||||
// 'faq'
|
||||
],
|
||||
|
||||
/* Limits, Donations, Subscriptions and Contact
|
||||
*
|
||||
* By default, CryptPad limits every registered user to 50MB of storage. It also shows a
|
||||
* subscribe button which allows them to upgrade to a paid account. We handle payment,
|
||||
* and keep 50% of the proceeds to fund ongoing development.
|
||||
*
|
||||
* You can:
|
||||
* A: leave things as they are
|
||||
* B: disable accounts but display a donate button
|
||||
* C: hide any reference to paid accounts or donation
|
||||
*
|
||||
* If you chose A then there's nothing to do.
|
||||
* If you chose B, set 'allowSubscriptions' to false.
|
||||
* If you chose C, set 'removeDonateButton' to true
|
||||
*/
|
||||
allowSubscriptions: true,
|
||||
removeDonateButton: true,
|
||||
|
||||
/* Sales coming from your server will be identified by your domain
|
||||
*
|
||||
* If you are using CryptPad in a business context, please consider taking a support contract
|
||||
* by contacting sales@cryptpad.fr
|
||||
*/
|
||||
myDomain: _domain,
|
||||
|
||||
/*
|
||||
* If you are using CryptPad internally and you want to increase the per-user storage limit,
|
||||
* change the following value.
|
||||
*
|
||||
* Please note: This limit is what makes people subscribe and what pays for CryptPad
|
||||
* development. Running a public instance that provides a "better deal" than cryptpad.fr
|
||||
* is effectively using the project against itself.
|
||||
*/
|
||||
defaultStorageLimit: 50 * 1024 * 1024,
|
||||
|
||||
/*
|
||||
* CryptPad allows administrators to give custom limits to their friends.
|
||||
* add an entry for each friend, identified by their user id,
|
||||
* which can be found on the settings page. Include a 'limit' (number of bytes),
|
||||
* a 'plan' (string), and a 'note' (string).
|
||||
*
|
||||
* hint: 1GB is 1024 * 1024 * 1024 bytes
|
||||
*/
|
||||
customLimits: {
|
||||
/*
|
||||
"https://my.awesome.website/user/#/1/cryptpad-user1/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=": {
|
||||
limit: 20 * 1024 * 1024 * 1024,
|
||||
plan: 'insider',
|
||||
note: 'storage space donated by my.awesome.website'
|
||||
},
|
||||
"https://my.awesome.website/user/#/1/cryptpad-user2/GdflkgdlkjeworijfkldfsdflkjeEAsdlEnkbx1vVOo=": {
|
||||
limit: 10 * 1024 * 1024 * 1024,
|
||||
plan: 'insider',
|
||||
note: 'storage space donated by my.awesome.website'
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
/* some features may require that the server be able to schedule tasks
|
||||
far into the future, such as:
|
||||
> "three months from now, this channel should expire"
|
||||
To disable these features, set 'enableTaskScheduling' to false
|
||||
*/
|
||||
enableTaskScheduling: true,
|
||||
|
||||
/* if you would like the list of scheduled tasks to be stored in
|
||||
a custom location, change the path below:
|
||||
*/
|
||||
taskPath: './tasks',
|
||||
|
||||
/* if you would like users' authenticated blocks to be stored in
|
||||
a custom location, change the path below:
|
||||
*/
|
||||
blockPath: './block',
|
||||
|
||||
/*
|
||||
* By default, CryptPad also contacts our accounts server once a day to check for changes in
|
||||
* the people who have accounts. This check-in will also send the version of your CryptPad
|
||||
* instance and your email so we can reach you if we are aware of a serious problem. We will
|
||||
* never sell it or send you marketing mail. If you want to block this check-in and remain
|
||||
* completely invisible, set this and allowSubscriptions both to false.
|
||||
*/
|
||||
adminEmail: 'admin@cisti.org',
|
||||
|
||||
|
||||
/*
|
||||
You have the option of specifying an alternative storage adaptor.
|
||||
These status of these alternatives are specified in their READMEs,
|
||||
which are available at the following URLs:
|
||||
|
||||
mongodb: a noSQL database
|
||||
https://github.com/xwiki-labs/cryptpad-mongo-store
|
||||
amnesiadb: in memory storage
|
||||
https://github.com/xwiki-labs/cryptpad-amnesia-store
|
||||
leveldb: a simple, fast, key-value store
|
||||
https://github.com/xwiki-labs/cryptpad-level-store
|
||||
sql: an adaptor for a variety of sql databases via knexjs
|
||||
https://github.com/xwiki-labs/cryptpad-sql-store
|
||||
|
||||
For the most up to date solution, use the default storage adaptor.
|
||||
*/
|
||||
storage: './storage/file',
|
||||
|
||||
/*
|
||||
CryptPad stores each document in an individual file on your hard drive.
|
||||
Specify a directory where files should be stored.
|
||||
It will be created automatically if it does not already exist.
|
||||
*/
|
||||
filePath: './datastore/',
|
||||
|
||||
/* CryptPad allows logged in users to request that particular documents be
|
||||
* stored by the server indefinitely. This is called 'pinning'.
|
||||
* Pin requests are stored in a pin-store. The location of this store is
|
||||
* defined here.
|
||||
*/
|
||||
pinPath: './pins',
|
||||
|
||||
/* Pads that are not 'pinned' by any registered user can be set to expire
|
||||
* after a configurable number of days of inactivity (default 90 days).
|
||||
* The value can be changed or set to false to remove expiration.
|
||||
* Expired pads can then be removed using a cron job calling the
|
||||
* `delete-inactive.js` script with node
|
||||
*/
|
||||
inactiveTime: 90, // days
|
||||
|
||||
/* CryptPad allows logged in users to upload encrypted files. Files/blobs
|
||||
* are stored in a 'blob-store'. Set its location here.
|
||||
*/
|
||||
blobPath: './blob',
|
||||
|
||||
/* CryptPad stores incomplete blobs in a 'staging' area until they are
|
||||
* fully uploaded. Set its location here.
|
||||
*/
|
||||
blobStagingPath: './blobstage',
|
||||
|
||||
/* CryptPad's file storage adaptor closes unused files after a configurable
|
||||
* number of milliseconds (default 30000 (30 seconds))
|
||||
*/
|
||||
channelExpirationMs: 30000,
|
||||
|
||||
/* CryptPad's file storage adaptor is limited by the number of open files.
|
||||
* When the adaptor reaches openFileLimit, it will clean up older files
|
||||
*/
|
||||
openFileLimit: 2048,
|
||||
|
||||
/* CryptPad's socket server can be extended to respond to RPC calls
|
||||
* you can configure it to respond to custom RPC calls if you like.
|
||||
* provide the path to your RPC module here, or `false` if you would
|
||||
* like to disable the RPC interface completely
|
||||
*/
|
||||
rpc: './rpc.js',
|
||||
|
||||
/* RPC errors are shown by default, but if you really don't care,
|
||||
* you can suppress them
|
||||
*/
|
||||
suppressRPCErrors: false,
|
||||
|
||||
/* Setting this value to anything other than true will cause file upload
|
||||
* attempts to be rejected outright.
|
||||
*/
|
||||
enableUploads: true,
|
||||
|
||||
/* If you have enabled file upload, you have the option of restricting it
|
||||
* to a list of users identified by their public keys. If this value is set
|
||||
* to true, your server will query a file (cryptpad/privileged.conf) when
|
||||
* users connect via RPC. Only users whose public keys can be found within
|
||||
* the file will be allowed to upload.
|
||||
*
|
||||
* privileged.conf uses '#' for line comments, and splits keys by newline.
|
||||
* This is a temporary measure until a better quota system is in place.
|
||||
* registered users' public keys can be found on the settings page.
|
||||
*/
|
||||
//restrictUploads: false,
|
||||
|
||||
/* Max Upload Size (bytes)
|
||||
* this sets the maximum size of any one file uploaded to the server.
|
||||
* anything larger than this size will be rejected
|
||||
*/
|
||||
maxUploadSize: 20 * 1024 * 1024,
|
||||
|
||||
/* clients can use the /settings/ app to opt out of usage feedback
|
||||
* which informs the server of things like how much each app is being
|
||||
* used, and whether certain clientside features are supported by
|
||||
* the client's browser. The intent is to provide feedback to the admin
|
||||
* such that the service can be improved. Enable this with `true`
|
||||
* and ignore feedback with `false` or by commenting the attribute
|
||||
*/
|
||||
//logFeedback: true,
|
||||
|
||||
/* If you wish to see which remote procedure calls clients request,
|
||||
* set this to true
|
||||
*/
|
||||
//logRPC: true,
|
||||
|
||||
/* it is recommended that you serve CryptPad over https
|
||||
* the filepaths below are used to configure your certificates
|
||||
*/
|
||||
//privKeyAndCertFiles: [
|
||||
// '/etc/apache2/ssl/my_secret.key',
|
||||
// '/etc/apache2/ssl/my_public_cert.crt',
|
||||
// '/etc/apache2/ssl/my_certificate_authorities_cert_chain.ca'
|
||||
//],
|
||||
|
||||
/* You can get a repl for debugging the server if you want it.
|
||||
* to enable this, specify the debugReplName and then you can
|
||||
* connect to it with `nc -U /tmp/repl/<your name>.sock`
|
||||
* If you run multiple cryptpad servers, you need to use different
|
||||
* repl names.
|
||||
*/
|
||||
//debugReplName: "cryptpad"
|
||||
};
|
16
custom/cryptopad_custom/customize/contact.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
83
custom/cryptopad_custom/customize/credential.js
Normal file
|
@ -0,0 +1,83 @@
|
|||
define([
|
||||
'/customize/application_config.js',
|
||||
'/bower_components/scrypt-async/scrypt-async.min.js',
|
||||
], function (AppConfig) {
|
||||
var Cred = {};
|
||||
var Scrypt = window.scrypt;
|
||||
|
||||
Cred.MINIMUM_PASSWORD_LENGTH = typeof(AppConfig.minimumPasswordLength) === 'number'?
|
||||
AppConfig.minimumPasswordLength: 8;
|
||||
|
||||
Cred.isLongEnoughPassword = function (passwd) {
|
||||
return passwd.length >= Cred.MINIMUM_PASSWORD_LENGTH;
|
||||
};
|
||||
|
||||
var isString = Cred.isString = function (x) {
|
||||
return typeof(x) === 'string';
|
||||
};
|
||||
|
||||
Cred.isValidUsername = function (name) {
|
||||
return !!(name && isString(name));
|
||||
};
|
||||
|
||||
Cred.isValidPassword = function (passwd) {
|
||||
return !!(passwd && isString(passwd));
|
||||
};
|
||||
|
||||
Cred.passwordsMatch = function (a, b) {
|
||||
return isString(a) && isString(b) && a === b;
|
||||
};
|
||||
|
||||
Cred.customSalt = function () {
|
||||
return typeof(AppConfig.loginSalt) === 'string'?
|
||||
AppConfig.loginSalt: '';
|
||||
};
|
||||
|
||||
Cred.deriveFromPassphrase = function (username, password, len, cb) {
|
||||
Scrypt(password,
|
||||
username + Cred.customSalt(), // salt
|
||||
8, // memoryCost (n)
|
||||
1024, // block size parameter (r)
|
||||
len || 128, // dkLen
|
||||
200, // interruptStep
|
||||
cb,
|
||||
undefined); // format, could be 'base64'
|
||||
};
|
||||
|
||||
Cred.dispenser = function (bytes) {
|
||||
var entropy = {
|
||||
used: 0,
|
||||
};
|
||||
|
||||
// crypto hygeine
|
||||
var consume = function (n) {
|
||||
// explode if you run out of bytes
|
||||
if (entropy.used + n > bytes.length) {
|
||||
throw new Error('exceeded available entropy');
|
||||
}
|
||||
if (typeof(n) !== 'number') { throw new Error('expected a number'); }
|
||||
if (n <= 0) {
|
||||
throw new Error('expected to consume a positive number of bytes');
|
||||
}
|
||||
|
||||
// grab an unused slice of the entropy
|
||||
// Note: Internet Explorer doesn't support .slice on Uint8Array
|
||||
var A;
|
||||
if (bytes.slice) {
|
||||
A = bytes.slice(entropy.used, entropy.used + n);
|
||||
} else {
|
||||
A = bytes.subarray(entropy.used, entropy.used + n);
|
||||
}
|
||||
|
||||
// account for the bytes you used so you don't reuse bytes
|
||||
entropy.used += n;
|
||||
|
||||
//console.info("%s bytes of entropy remaining", bytes.length - entropy.used);
|
||||
return A;
|
||||
};
|
||||
|
||||
return consume;
|
||||
};
|
||||
|
||||
return Cred;
|
||||
});
|
BIN
custom/cryptopad_custom/customize/cryptofist_mini.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
custom/cryptopad_custom/customize/cryptofist_small.png
Normal file
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 9.8 KiB |
61
custom/cryptopad_custom/customize/delta-words.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
define([
|
||||
'/bower_components/chainpad/chainpad.dist.js',
|
||||
], function (ChainPad) {
|
||||
var Diff = ChainPad.Diff;
|
||||
|
||||
var isSpace = function (S, i) {
|
||||
return /^\s$/.test(S.charAt(i));
|
||||
};
|
||||
|
||||
var leadingBoundary = function (S, offset) {
|
||||
if (/\s/.test(S.charAt(offset))) { return offset; }
|
||||
while (offset > 0) {
|
||||
offset--;
|
||||
if (isSpace(S, offset)) { offset++; break; }
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
|
||||
var trailingBoundary = function (S, offset) {
|
||||
if (isSpace(S, offset)) { return offset; }
|
||||
while (offset < S.length && !/\s/.test(S.charAt(offset))) {
|
||||
offset++;
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
|
||||
var opsToWords = function (previous, current) {
|
||||
var output = [];
|
||||
Diff.diff(previous, current).forEach(function (op) {
|
||||
// ignore deleted sections...
|
||||
var offset = op.offset;
|
||||
var toInsert = op.toInsert;
|
||||
|
||||
// given an operation, check whether it is a word fragment,
|
||||
// if it is, expand it to its word boundaries
|
||||
var first = current.slice(leadingBoundary(current, offset), offset);
|
||||
var last = current.slice(offset + toInsert.length, trailingBoundary(current, offset + toInsert.length));
|
||||
|
||||
var result = first + toInsert + last;
|
||||
// concat-in-place
|
||||
Array.prototype.push.apply(output, result.split(/\s+/));
|
||||
});
|
||||
return output.filter(Boolean);
|
||||
};
|
||||
|
||||
var runningDiff = function (getter, f, time) {
|
||||
var last = getter();
|
||||
// first time through, send all the words :D
|
||||
f(opsToWords("", last));
|
||||
return setInterval(function () {
|
||||
var current = getter();
|
||||
|
||||
// find inserted words...
|
||||
var words = opsToWords(last, current);
|
||||
last = current;
|
||||
f(words);
|
||||
}, time);
|
||||
};
|
||||
|
||||
return runningDiff;
|
||||
});
|
1
custom/cryptopad_custom/customize/error.html
Normal file
|
@ -0,0 +1 @@
|
|||
ERROR 42: porcodio
|
17
custom/cryptopad_custom/customize/faq.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
||||
|
16
custom/cryptopad_custom/customize/features.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="cptools" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="template" d="M839.56 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0 0zM216.847 809.412h590.306v-228.894h-590.306v228.894zM216.847 544.376h240.941v-228.894h-240.941v228.894zM493.929 110.682h313.224v-24.094h-313.224v24.094zM493.929 166.942h313.224v-24.094h-313.224v24.094zM493.929 223.081h313.224v-24.094h-313.224v24.094zM493.929 279.341h313.224v-24.094h-313.224v24.094zM493.929 544.376h313.224v-24.094h-313.224v24.094zM493.929 493.176h313.224v-24.094h-313.224v24.094zM493.929 441.976h313.224v-24.094h-313.224v24.094zM493.929 390.776h313.224v-24.094h-313.224v24.094zM493.929 339.576h313.224v-24.094h-313.224v24.094zM216.847 279.341h240.941v-192.753h-240.941v192.753z" />
|
||||
<glyph unicode="" glyph-name="new-template" d="M840.764 886.152h-655.119c-35.33 0-63.97-28.64-63.97-63.97v0-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM844.499 34.545c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735h655.119c2.063 0 3.735-1.672 3.735-3.735v0zM643.915 466.071h-93.365v93.003c0 10.313-8.36 18.673-18.673 18.673v0h-37.346c-0.036 0-0.078 0-0.121 0-10.246 0-18.552-8.306-18.552-18.552 0-0.042 0-0.085 0-0.127v0.006-93.003h-93.365c-0.036 0-0.078 0-0.121 0-10.246 0-18.552-8.306-18.552-18.552 0-0.042 0-0.085 0-0.127v0.006-37.346c0-10.313 8.36-18.673 18.673-18.673v0h93.365v-93.967c0-0.036 0-0.078 0-0.121 0-10.246 8.306-18.552 18.552-18.552 0.042 0 0.085 0 0.127 0h37.34c10.313 0 18.673 8.36 18.673 18.673v0 93.606h93.365c10.285 0.068 18.605 8.388 18.673 18.666v37.352c0.002 0.108 0.003 0.234 0.003 0.361 0 10.313-8.36 18.673-18.673 18.673-0.001 0-0.002 0-0.004 0v0z" />
|
||||
<glyph unicode="" glyph-name="slide" d="M939.671 758.453h-397.553v29.636c0 16.833-13.646 30.479-30.479 30.479s-30.479-13.646-30.479-30.479v0-29.636h-396.83c-16.053-1.040-28.68-14.315-28.68-30.539s12.627-29.5 28.59-30.535l0.091-0.005h30.961v-448.151c0-0.036 0-0.079 0-0.121 0-22.87 18.471-41.425 41.309-41.562h292.516l-78.185-78.065c-5.102-5.453-8.235-12.803-8.235-20.884 0-16.9 13.7-30.6 30.6-30.6 8.082 0 15.432 3.133 20.902 8.251l-0.017-0.016 107.46 107.58 107.58-107.58c5.523-5.509 13.146-8.915 21.564-8.915 16.866 0 30.539 13.673 30.539 30.539 0 8.448-3.43 16.095-8.974 21.624l-78.066 78.066h273.107c22.85 0.137 41.322 18.692 41.322 41.562 0 0.043 0 0.085 0 0.128v-0.007 448.151h30.961c16.053 1.040 28.68 14.315 28.68 30.539s-12.627 29.5-28.59 30.535l-0.091 0.005zM848.113 268.619h-671.864v428.755h671.503zM493.688 419.569h317.44v-24.456h-317.44v24.456zM493.688 476.552h317.44v-24.456h-317.44v24.456zM493.688 533.414h317.44v-24.456h-317.44v24.456zM493.688 590.396h317.44v-24.456h-317.44v24.456zM212.872 590.396h244.194v-195.283h-244.194v195.283z" />
|
||||
<glyph unicode="" glyph-name="shared-folder" d="M829.44 727.251h-296.84l-47.104 62.886c-25.923 34.066-66.406 55.898-111.999 56.139h-178.938c-77.457-0.137-140.211-62.891-140.348-140.335v-515.868c0.137-77.457 62.891-140.211 140.335-140.348h634.893c77.457 0.137 140.211 62.891 140.348 140.335v396.482c0 0.036 0 0.078 0 0.121 0 77.561-62.807 140.452-140.335 140.589h-0.013zM911.119 190.072c-0.068-45.083-36.597-81.611-81.673-81.679h-634.887c-45.083 0.068-81.611 36.597-81.679 81.673v515.862c0.068 45.083 36.597 81.611 81.673 81.679h178.906c26.48-0.030 50.004-12.656 64.908-32.207l0.146-0.199 47.104-62.765 17.709-24.094h326.114c45.125-0.069 81.679-36.665 81.679-81.799 0 0 0 0 0 0v0zM614.4 451.132c0.071 0 0.156 0 0.24 0 34.132 0 61.801 27.669 61.801 61.801s-27.669 61.801-61.801 61.801c-34.047 0-61.664-27.532-61.801-61.547v-0.013c0-0.018 0-0.040 0-0.061 0-7.309 1.235-14.33 3.508-20.865l-0.135 0.446-103.966-60.235c-0.474 0.655-1.031 1.213-1.665 1.672l-0.021 0.015c-10.785 9.46-25.010 15.231-40.582 15.231-34.065 0-61.681-27.615-61.681-61.681 0-11.035 2.898-21.393 7.974-30.355l-0.16 0.307c11.046-18 30.619-29.824 52.953-29.824 16.92 0 32.255 6.786 43.431 17.785l-0.008-0.008 103.966-60.235c-2.138-5.921-3.374-12.754-3.374-19.876 0-0.085 0-0.171 0.001-0.256v0.013c-0.003-0.217-0.005-0.474-0.005-0.731 0-7.409 1.417-14.486 3.994-20.977l-0.135 0.384c8.944-23.66 31.407-40.178 57.728-40.178 33.999 0 61.56 27.562 61.56 61.56 0 28.833-19.822 53.036-46.582 59.725l-0.424 0.090c-4.366 1.539-9.418 2.572-14.664 2.884l-0.154 0.007c-19.639 0-37.082-9.398-48.078-23.943l-0.11-0.152-101.798 59.031c3.729 7.764 5.908 16.879 5.908 26.504s-2.179 18.74-6.070 26.88l0.162-0.376 101.798 58.79c11.336-14.332 28.681-23.481 48.167-23.612h0.022z" />
|
||||
<glyph unicode="" glyph-name="poll" d="M859.076 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v0-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM862.81 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0zM329.487 543.895h48.188v-346.714h-48.188v346.714zM507.422 698.82h48.188v-501.76h-48.188v501.76zM685.237 449.687h48.188v-252.506h-48.188v252.506z" />
|
||||
<glyph unicode="" glyph-name="file-upload" d="M843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h454.054v60.235h-454.054c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 540.19h-60.235zM843.294 696.772l-174.2 209.016v-281.299h234.436l-60.235 72.282zM461.161 238.984h102.039v203.957h72.523l-123.723 214.076-123.723-214.076h72.885v-203.957z" />
|
||||
<glyph unicode="" glyph-name="whiteboard" d="M904.132 845.553h-783.661c-0.18 0.002-0.392 0.003-0.605 0.003-36.261 0-65.656-29.395-65.656-65.656 0-0.213 0.001-0.425 0.003-0.638v0.032-663.793c0.339-36.002 29.603-65.057 65.654-65.057 0.213 0 0.425 0.001 0.637 0.003h784.232c36.261 0 65.656 29.395 65.656 65.656v663.191c0.002 0.18 0.003 0.392 0.003 0.605 0 36.261-29.395 65.656-65.656 65.656-0.213 0-0.425-0.001-0.638-0.003h0.032zM909.553 116.104c0-2.994-2.427-5.421-5.421-5.421v0h-783.661c-2.994 0-5.421 2.427-5.421 5.421v663.191c-0.021 0.181-0.034 0.39-0.034 0.602 0 2.994 2.427 5.421 5.421 5.421 0.012 0 0.024 0 0.035 0h784.262c2.994 0 5.421-2.427 5.421-5.421v0zM612.593 219.588h235.761v-48.188h-235.761v48.188z" />
|
||||
<glyph unicode="" glyph-name="todo" d="M839.56 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0zM325.512 404.992h481.28v-48.188h-481.28v48.188zM217.208 417.039h72.282v-72.282h-72.282v72.282zM325.512 270.908h481.28v-48.188h-481.28v48.188zM217.208 282.955h72.282v-72.282h-72.282v72.282zM325.512 673.28h481.28v-48.188h-481.28v48.188zM216.847 613.045h72.282v72.282h-72.282zM230.701 648.463c0.353 0.416 0.864 0.688 1.44 0.723h0.006c0.623-0.015 1.178-0.29 1.564-0.721l10.965-10.965 27.708 27.708c0.215 0.083 0.463 0.132 0.723 0.132s0.508-0.048 0.737-0.137l-0.014 0.005c1.131 0 2.048-0.917 2.048-2.048v0c-0.018-0.601-0.243-1.146-0.605-1.57l0.003 0.003-29.154-29.033c-0.090-0.024-0.194-0.038-0.301-0.038s-0.211 0.014-0.31 0.040l0.008-0.002h-1.687c-0.090-0.024-0.194-0.038-0.301-0.038s-0.211 0.014-0.31 0.040l0.008-0.002-12.047 12.047c-0.336 0.39-0.556 0.888-0.602 1.437l-0.001 0.009c-0.126 0.258-0.2 0.562-0.2 0.883 0 0.605 0.263 1.149 0.68 1.524l0.002 0.002zM325.512 539.196h481.28v-48.188h-481.28v48.188zM216.847 478.961h72.282v72.282h-72.282zM231.063 514.259c0.352 0.372 0.849 0.603 1.4 0.603 0.016 0 0.032 0 0.048-0.001h-0.002c0.034 0.002 0.073 0.003 0.112 0.003 0.568 0 1.083-0.231 1.454-0.605v0l10.963-10.963 27.708 27.708c0.37 0.371 0.881 0.601 1.445 0.602v0c0.557-0.046 1.056-0.266 1.449-0.605l-0.003 0.003c0.36-0.42 0.584-0.965 0.602-1.562v-0.004c-0.046-0.557-0.266-1.056-0.605-1.449l0.003 0.003-29.154-29.033c-0.089-0.035-0.193-0.056-0.301-0.056s-0.212 0.020-0.307 0.058l0.006-0.002h-1.687c-0.089-0.035-0.193-0.056-0.301-0.056s-0.212 0.020-0.307 0.058l0.006-0.002-12.047 12.047c-0.369 0.37-0.597 0.881-0.597 1.446s0.228 1.075 0.597 1.446v0z" />
|
||||
<glyph unicode="" glyph-name="pad" d="M839.56 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0 0zM216.847 809.412h590.306v-23.974h-590.306v23.974zM216.847 761.224h590.306v-23.974h-590.306v23.974zM216.847 713.035h590.306v-23.974h-590.306v23.974zM216.847 664.847h590.306v-144.444h-590.306v144.444zM493.929 110.682h313.224v-24.094h-313.224v24.094zM493.929 166.942h313.224v-24.094h-313.224v24.094zM493.929 223.081h313.224v-24.094h-313.224v24.094zM493.929 279.341h313.224v-24.094h-313.224v24.094zM216.847 493.176h590.306v-24.094h-590.306v24.094zM216.847 441.976h590.306v-24.094h-590.306v24.094zM216.847 390.776h590.306v-24.094h-590.306v24.094zM216.847 339.576h590.306v-24.094h-590.306v24.094zM216.847 279.341h240.941v-192.753h-240.941v192.753z" />
|
||||
<glyph unicode="" glyph-name="folder-open" d="M100.232 590.035h828.717c-5.175 69.899-63.091 124.668-133.829 124.808h-283.843l-44.936 60.235c-24.766 32.712-63.599 53.649-107.326 53.73h-170.599c-0.036 0-0.078 0-0.121 0-73.968 0-133.946-59.894-134.084-133.83v-213.366l10.12 76.74c2.295 17.95 17.476 31.684 35.865 31.684 0.012 0 0.025 0 0.037 0h-0.002zM929.19 541.606h-805.948c-13.269-0.004-24.238-9.848-26.006-22.632l-0.016-0.137-43.008-317.801c-0.002-0.261-0.003-0.569-0.003-0.877 0-6.111 0.483-12.11 1.413-17.96l-0.085 0.646c0.904-6.888 2.169-12.966 3.837-18.875l-0.223 0.925c16.563-56.812 68.138-97.63 129.257-97.702h606.698c61.093 0.086 112.628 40.906 128.907 96.752l0.237 0.95c1.459 5.065 2.725 11.228 3.544 17.531l0.070 0.66c0.844 5.201 1.327 11.196 1.327 17.304 0 0.227-0.001 0.454-0.002 0.681v-0.035l40.237 295.755c0.219 1.556 0.344 3.354 0.344 5.18 0 21.624-17.529 39.153-39.153 39.153-0.036 0-0.073 0-0.109 0h0.006z" />
|
||||
<glyph unicode="" glyph-name="kanban" d="M839.56 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0zM217.329 809.894h144.565v-96.376h-144.565v96.376zM438.754 809.894h144.565v-96.376h-144.565v96.376zM660.299 809.894h144.565v-96.376h-144.565v96.376zM217.329 665.329h144.565v-96.376h-144.565v96.376zM438.754 665.329h144.565v-96.376h-144.565v96.376zM660.299 665.329h144.565v-96.376h-144.565v96.376zM217.329 520.764h144.565v-96.376h-144.565v96.376zM438.754 520.764h144.565v-96.376h-144.565v96.376zM660.299 520.764h144.565v-96.376h-144.565v96.376zM217.329 376.2h144.565v-96.376h-144.565v96.376zM660.299 376.2h144.565v-96.376h-144.565v96.376zM217.329 231.635h144.565v-96.376h-144.565v96.376z" />
|
||||
<glyph unicode="" glyph-name="folder" d="M373.459 846.276h-178.899c-77.457-0.137-140.211-62.891-140.348-140.335v-515.868c0.137-77.457 62.891-140.211 140.335-140.348h634.893c77.457 0.137 140.211 62.891 140.348 140.335v396.482c0 0.036 0 0.078 0 0.121 0 77.561-62.807 140.452-140.335 140.589h-296.853l-47.104 62.886c-25.923 34.066-66.406 55.898-111.999 56.139h-0.039z" />
|
||||
<glyph unicode="" glyph-name="shared-folder-open" d="M98.424 593.288h797.274c-4.8 67.457-60.657 120.376-128.894 120.471h-272.876l-43.249 57.705c-23.816 31.47-61.17 51.611-103.232 51.682h-164.213c-0.036 0-0.079 0-0.121 0-71.191 0-128.904-57.712-128.904-128.904 0-0.17 0-0.339 0.001-0.508v0.026-204.8l9.638 73.487c2.062 17.437 16.753 30.833 34.574 30.84h0.001zM900.759 255.608l33.973 248.049c0.196 1.447 0.308 3.12 0.308 4.819 0 20.873-16.906 37.797-37.772 37.828h-776.797c-12.746-0.016-23.272-9.5-24.923-21.796l-0.014-0.129-41.321-304.791c-0.002-0.25-0.003-0.546-0.003-0.843 0-5.87 0.483-11.628 1.412-17.235l-0.083 0.609c0.793-6.689 1.977-12.655 3.576-18.449l-0.203 0.861c15.92-54.648 65.53-93.912 124.319-93.967h583.566c0.061 0 0.133 0 0.205 0 16.48 0 32.227 3.14 46.675 8.853l-0.86-0.3c16.639-15.985 39.283-25.829 64.225-25.829 51.231 0 92.762 41.531 92.762 92.762 0 42.798-28.984 78.827-68.394 89.528l-0.65 0.15zM766.795 148.51h-583.56c-32.265 0.073-59.5 21.523-68.297 50.935l-0.13 0.506c-0.742 2.66-1.376 5.889-1.775 9.19l-0.032 0.327v1.566c0 1.566 0 3.373 0 5.301l36.382 272.023h724.751l-32.407-236.845c-1.82-0.63-3.331-1.281-4.788-2.025l0.21 0.097c-16.682-8.067-30.192-20.454-39.403-35.727l-0.232-0.415c-1.574-2.381-3.028-5.115-4.218-7.987l-0.119-0.325c-5.551-11.368-8.797-24.735-8.797-38.86 0-0.23 0.001-0.46 0.003-0.689v0.035c0-0.017 0-0.037 0-0.057 0-5.166 0.394-10.241 1.154-15.195l-0.070 0.554c-5.405-1.532-11.612-2.412-18.026-2.412-0.228 0-0.455 0.001-0.682 0.003h0.035zM877.026 84.781c-20.129 0.108-38.483 7.622-52.493 19.954l0.089-0.077c-14.994 12.543-25.212 30.362-27.788 50.568l-0.041 0.392c-0.537 3.145-0.844 6.769-0.844 10.463 0 0.091 0 0.182 0.001 0.273v-0.014c-0.001 0.109-0.001 0.239-0.001 0.368 0 12.484 2.89 24.293 8.038 34.794l-0.207-0.466c1.278 2.771 2.523 5.062 3.896 7.265l-0.161-0.278c7.898 12.884 18.884 23.175 31.958 30.024l0.449 0.214c0.692 0.493 1.491 0.902 2.346 1.186l0.064 0.018c10.065 4.991 21.914 7.922 34.445 7.951h0.010c0.046 0 0.1 0 0.154 0 7.802 0 15.336-1.144 22.444-3.275l-0.553 0.142c35.119-9.412 60.555-40.954 60.555-78.437 0-44.777-36.299-81.077-81.077-81.077-0.451 0-0.902 0.004-1.351 0.011l0.068-0.001zM906.059 183.206c9.581 0 17.348 7.767 17.348 17.348s-7.767 17.348-17.348 17.348v0c-0.002 0-0.004 0-0.007 0-9.411 0-17.072-7.495-17.341-16.841l-0.001-0.025c-0.004-0.12-0.006-0.262-0.006-0.404 0-1.849 0.356-3.615 1.003-5.232l-0.034 0.095-29.274-16.986c-3.089 3.105-7.328 5.063-12.025 5.18h-0.022c-9.003-0.772-16.019-8.271-16.019-17.408s7.015-16.636 15.954-17.404l0.065-0.004c4.719 0.117 8.958 2.075 12.046 5.179l0.001 0.001 12.047-7.228 16.504-9.638c-0.536-1.568-0.846-3.375-0.846-5.255 0-0.101 0.001-0.202 0.003-0.302v0.015c0-9.581 7.767-17.348 17.348-17.348s17.348 7.767 17.348 17.348c0 9.581-7.767 17.348-17.348 17.348v0c-5.563-0.038-10.508-2.653-13.705-6.709l-0.028-0.037-16.143 9.397-12.047 7.228c1.007 2.155 1.621 4.672 1.686 7.326v0.023c-0.052 2.758-0.667 5.36-1.736 7.712l0.050-0.122 28.672 16.625c3.116-4.367 8.151-7.19 13.848-7.228h0.006z" />
|
||||
<glyph unicode="" glyph-name="file" d="M843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h454.054v60.235h-454.054c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 540.19h-60.235zM843.294 696.772l-174.2 209.016v-281.299h234.436l-60.235 72.282z" />
|
||||
<glyph unicode="" glyph-name="contacts" d="M875.339 905.788h-655.119c-35.174-0.205-63.608-28.766-63.608-63.969 0 0 0-0.001 0-0.001v0-56.501h28.672c26.614 0 48.188-21.575 48.188-48.188s-21.575-48.188-48.188-48.188v0h-28.672v-192.753h28.672c26.614 0 48.188-21.575 48.188-48.188s-21.575-48.188-48.188-48.188v0h-28.672v-192.753h28.672c26.614 0 48.188-21.575 48.188-48.188s-21.575-48.188-48.188-48.188v0h-28.672v-56.501c0-35.33 28.64-63.97 63.97-63.97v0h654.758c0.107-0.001 0.234-0.001 0.361-0.001 35.33 0 63.97 28.64 63.97 63.97 0 0 0 0.001 0 0.001v0 787.637c0 0 0 0.001 0 0.001 0 35.33-28.64 63.97-63.97 63.97-0.127 0-0.254 0-0.381-0.001h0.020zM730.775 255.247h-368.52c-0.024 0-0.053 0-0.081 0-9.98 0-18.071 8.090-18.071 18.071 0 1.409 0.161 2.781 0.467 4.098l-0.024-0.122c2.111 10.104 6.682 18.914 13.060 26.078l-0.049-0.056c15.661 16.023 78.788 32.045 110.11 48.188 18.94 10.401 31.565 30.213 31.565 52.974 0 0.139 0 0.277-0.001 0.415v-0.021c-1.093 10.266-5.776 19.271-12.751 25.884l-0.019 0.018c-5.568 6.842-10.036 14.847-12.974 23.556l-0.157 0.538c-10.94 4.714-18.46 15.404-18.46 27.85 0 1.053 0.054 2.094 0.159 3.119l-0.011-0.129c-0.097 1.030-0.152 2.228-0.152 3.439 0 7.656 2.211 14.795 6.029 20.814l-0.094-0.159c-1.566 10.722-2.891 22.167-3.735 33.491-0.652 4.066-1.025 8.753-1.025 13.527 0 13.019 2.772 25.391 7.758 36.557l-0.227-0.57c5.785 12.712 18.376 21.391 32.994 21.391 2.219 0 4.391-0.2 6.5-0.583l-0.221 0.033c2.986 9.996 9.527 18.143 18.123 23.149l0.189 0.102c13.975 6.987 112.76 10.481 114.206-85.173 0.143-1.265 0.225-2.731 0.225-4.216s-0.082-2.951-0.241-4.394l0.016 0.178c-0.843-11.324-2.048-22.648-3.614-33.491 3.737-5.787 5.958-12.858 5.958-20.448 0-1.284-0.064-2.553-0.188-3.805l0.013 0.158c0.094-0.897 0.148-1.937 0.148-2.991 0-12.446-7.52-23.136-18.264-27.774l-0.196-0.075c-3.173-9.234-7.632-17.229-13.254-24.252l0.122 0.158c-6.963-6.561-11.64-15.479-12.753-25.474l-0.017-0.187c-0.001-0.153-0.002-0.333-0.002-0.514 0-22.761 12.625-42.574 31.254-52.818l0.312-0.157c31.563-16.023 94.328-32.045 110.231-48.188 6.295-7.112 10.827-15.924 12.828-25.661l0.062-0.361c0.299-1.231 0.47-2.644 0.47-4.096 0-9.934-8.015-17.995-17.932-18.070h-0.007zM184.922 122.729c19.96 0 36.141 16.181 36.141 36.141s-16.181 36.141-36.141 36.141v0h-64.452c-19.96 0-36.141-16.181-36.141-36.141s16.181-36.141 36.141-36.141v0h64.090zM120.471 411.859h64.090c19.96 0 36.141 16.181 36.141 36.141s-16.181 36.141-36.141 36.141v0h-64.090c-19.96 0-36.141-16.181-36.141-36.141s16.181-36.141 36.141-36.141v0zM120.471 700.988h64.090c19.96 0 36.141 16.181 36.141 36.141s-16.181 36.141-36.141 36.141v0h-64.090c-19.96 0-36.141-16.181-36.141-36.141s16.181-36.141 36.141-36.141v0z" />
|
||||
<glyph unicode="" glyph-name="code" d="M839.56 905.788h-655.119c-35.33 0-63.97-28.64-63.97-63.97v-787.637c0-35.33 28.64-63.97 63.97-63.97v0h655.119c35.33 0 63.97 28.64 63.97 63.97v0 787.637c0 35.33-28.64 63.97-63.97 63.97v0zM843.294 54.182c0-2.063-1.672-3.735-3.735-3.735v0h-655.119c-2.063 0-3.735 1.672-3.735 3.735v0 787.637c0 2.063 1.672 3.735 3.735 3.735v0h655.119c2.063 0 3.735-1.672 3.735-3.735v0zM445.741 514.259c0 0.036 0 0.078 0 0.121 0 5.928-2.817 11.198-7.185 14.545l-0.044 0.032c-3.983 2.691-8.892 4.295-14.175 4.295-4.094 0-7.962-0.963-11.392-2.675l0.148 0.067-184.2-86.618c-8.222-3.631-13.857-11.713-13.857-21.111 0-0.117 0.001-0.234 0.003-0.351v0.018c-0.012-0.283-0.019-0.616-0.019-0.95 0-9.595 5.609-17.881 13.727-21.756l0.145-0.062 182.874-86.618c3.48-1.929 7.624-3.084 12.033-3.132h0.015c0.048 0 0.104-0.001 0.16-0.001 5.069 0 9.747 1.674 13.511 4.5l-0.058-0.042c4.41 3.332 7.23 8.565 7.23 14.458 0 0.084-0.001 0.168-0.002 0.252v-0.013c-0.071 7.753-4.57 14.439-11.087 17.657l-0.116 0.052-159.021 75.174 159.503 75.174c6.763 2.889 11.483 9.349 11.805 16.947l0.001 0.039zM593.92 607.503c0.002 0.105 0.003 0.229 0.003 0.352 0 5.748-2.249 10.971-5.915 14.836l0.009-0.010c-3.681 4.147-9.026 6.747-14.977 6.747-0.029 0-0.057 0-0.086 0h0.004c-9.851-0.020-18.105-6.831-20.33-16l-0.029-0.143-101.798-317.32c-0.832-2.21-1.355-4.765-1.445-7.429l-0.001-0.040c0-0.049-0.001-0.106-0.001-0.164 0-5.808 2.246-11.091 5.916-15.028l-0.012 0.013c3.716-4.077 9.049-6.626 14.977-6.626 0.029 0 0.058 0 0.086 0h-0.004c4.647 0.168 8.845 1.966 12.066 4.836l-0.019-0.017c3.378 2.964 5.926 6.796 7.301 11.149l0.048 0.175 102.28 317.199c0.984 2.183 1.668 4.715 1.92 7.372l0.007 0.097zM795.106 444.024l-183.236 86.618c-3.456 2.029-7.611 3.228-12.047 3.228-5.294 0-10.189-1.707-14.164-4.601l0.069 0.048c-4.553-3.371-7.472-8.724-7.472-14.758 0-0.106 0.001-0.211 0.003-0.316v0.016c0.315-7.802 5.137-14.404 11.919-17.299l0.128-0.049 158.901-74.812-159.985-75.535c-6.524-3.171-10.945-9.741-10.963-17.345v-0.002c-0.001-0.071-0.002-0.155-0.002-0.24 0-5.892 2.82-11.126 7.184-14.425l0.045-0.033c3.706-2.784 8.384-4.458 13.453-4.458 0.056 0 0.113 0 0.169 0.001h-0.009c0.189-0.005 0.412-0.008 0.636-0.008 4.169 0 8.098 1.028 11.547 2.844l-0.136-0.065 183.959 86.98c8.264 3.938 13.873 12.223 13.873 21.819 0 0.334-0.007 0.667-0.020 0.998l0.002-0.047c0.002 0.099 0.002 0.216 0.002 0.333 0 9.398-5.634 17.48-13.71 21.053l-0.147 0.058z" />
|
||||
</font></defs></svg>
|
After Width: | Height: | Size: 20 KiB |
74
custom/cryptopad_custom/customize/fonts/cptools/style.css
Normal file
|
@ -0,0 +1,74 @@
|
|||
@font-face {
|
||||
font-family: 'cptools';
|
||||
src:
|
||||
url('fonts/cptools.ttf?703wg5') format('truetype'),
|
||||
url('fonts/cptools.woff?703wg5') format('woff'),
|
||||
url('fonts/cptools.svg?703wg5#cptools') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.cptools {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'cptools' !important;
|
||||
display: inline-block;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.cptools-slide:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.cptools-shared-folder:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.cptools-poll:before {
|
||||
content: "\e904";
|
||||
}
|
||||
.cptools-file-upload:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.cptools-whiteboard:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.cptools-todo:before {
|
||||
content: "\e907";
|
||||
}
|
||||
.cptools-pad:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.cptools-folder-open:before {
|
||||
content: "\e909";
|
||||
}
|
||||
.cptools-kanban:before {
|
||||
content: "\e90a";
|
||||
}
|
||||
.cptools-folder:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.cptools-shared-folder-open:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.cptools-file:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.cptools-contacts:before {
|
||||
content: "\e90e";
|
||||
}
|
||||
.cptools-code:before {
|
||||
content: "\e90f";
|
||||
}
|
||||
.cptools-template:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.cptools-new-template:before {
|
||||
content: "\e901";
|
||||
}
|
BIN
custom/cryptopad_custom/customize/fonts/lato/Lato-Black.ttf
Normal file
BIN
custom/cryptopad_custom/customize/fonts/lato/Lato-Italic.ttf
Normal file
BIN
custom/cryptopad_custom/customize/fonts/lato/Lato-Regular.ttf
Normal file
106
custom/cryptopad_custom/customize/fonts/lato/METADATA.json
Normal file
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"name": "Lato",
|
||||
"designer": "Łukasz Dziedzic",
|
||||
"license": "OFL",
|
||||
"visibility": "External",
|
||||
"category": "Sans Serif",
|
||||
"size": 51318,
|
||||
"fonts": [
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "normal",
|
||||
"weight": 100,
|
||||
"filename": "Lato-Hairline.ttf",
|
||||
"postScriptName": "Lato-Hairline",
|
||||
"fullName": "Lato Hairline",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "italic",
|
||||
"weight": 100,
|
||||
"filename": "Lato-HairlineItalic.ttf",
|
||||
"postScriptName": "Lato-HairlineItalic",
|
||||
"fullName": "Lato Hairline Italic",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "normal",
|
||||
"weight": 300,
|
||||
"filename": "Lato-Light.ttf",
|
||||
"postScriptName": "Lato-Light",
|
||||
"fullName": "Lato Light",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "italic",
|
||||
"weight": 300,
|
||||
"filename": "Lato-LightItalic.ttf",
|
||||
"postScriptName": "Lato-LightItalic",
|
||||
"fullName": "Lato Light Italic",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "normal",
|
||||
"weight": 400,
|
||||
"filename": "Lato-Regular.ttf",
|
||||
"postScriptName": "Lato-Regular",
|
||||
"fullName": "Lato Regular",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "italic",
|
||||
"weight": 400,
|
||||
"filename": "Lato-Italic.ttf",
|
||||
"postScriptName": "Lato-Italic",
|
||||
"fullName": "Lato Italic",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "normal",
|
||||
"weight": 700,
|
||||
"filename": "Lato-Bold.ttf",
|
||||
"postScriptName": "Lato-Bold",
|
||||
"fullName": "Lato Bold",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "italic",
|
||||
"weight": 700,
|
||||
"filename": "Lato-BoldItalic.ttf",
|
||||
"postScriptName": "Lato-BoldItalic",
|
||||
"fullName": "Lato Bold Italic",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "normal",
|
||||
"weight": 900,
|
||||
"filename": "Lato-Black.ttf",
|
||||
"postScriptName": "Lato-Black",
|
||||
"fullName": "Lato Black",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
},
|
||||
{
|
||||
"name": "Lato",
|
||||
"style": "italic",
|
||||
"weight": 900,
|
||||
"filename": "Lato-BlackItalic.ttf",
|
||||
"postScriptName": "Lato-BlackItalic",
|
||||
"fullName": "Lato Black Italic",
|
||||
"copyright": "Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name \"Lato\". Licensed under the SIL Open Font License, Version 1.1."
|
||||
}
|
||||
],
|
||||
"subsets": [
|
||||
"latin",
|
||||
"latin-ext",
|
||||
"menu"
|
||||
],
|
||||
"dateAdded": "2010-12-15"
|
||||
}
|
93
custom/cryptopad_custom/customize/fonts/lato/OFL.txt
Normal file
|
@ -0,0 +1,93 @@
|
|||
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato"
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
custom/cryptopad_custom/customize/fonts/neuropolitical.ttf
Normal file
133
custom/cryptopad_custom/customize/fonts/open-sans.less
Normal file
|
@ -0,0 +1,133 @@
|
|||
/* Open Sans @font-face kit */
|
||||
|
||||
@OpenSansPath: "/bower_components/open-sans-fontface/fonts";
|
||||
|
||||
/* BEGIN Light */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot');
|
||||
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/Light/OpenSans-Light.woff') format('woff'),
|
||||
url('@{OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Light */
|
||||
|
||||
/* BEGIN Light Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot');
|
||||
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'),
|
||||
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Light Italic */
|
||||
|
||||
/* BEGIN Regular */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot');
|
||||
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'),
|
||||
url('@{OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Regular */
|
||||
|
||||
/* BEGIN Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot');
|
||||
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'),
|
||||
url('@{OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Italic */
|
||||
|
||||
/* BEGIN Semibold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot');
|
||||
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'),
|
||||
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg');
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Semibold */
|
||||
|
||||
/* BEGIN Semibold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot');
|
||||
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'),
|
||||
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg');
|
||||
font-weight: 600;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Semibold Italic */
|
||||
|
||||
/* BEGIN Bold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot');
|
||||
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'),
|
||||
url('@{OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Bold */
|
||||
|
||||
/* BEGIN Bold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot');
|
||||
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'),
|
||||
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Bold Italic */
|
||||
|
||||
/* BEGIN Extrabold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot');
|
||||
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'),
|
||||
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg');
|
||||
font-weight: 800;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Extrabold */
|
||||
|
||||
/* BEGIN Extrabold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot');
|
||||
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'),
|
||||
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'),
|
||||
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg');
|
||||
font-weight: 800;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Extrabold Italic */
|
87
custom/cryptopad_custom/customize/four-oh-four.js
Normal file
|
@ -0,0 +1,87 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/api/config',
|
||||
'/common/hyperscript.js',
|
||||
'/common/outer/local-store.js',
|
||||
'/customize/messages.js',
|
||||
|
||||
'less!/customize/src/less2/pages/page-404.less',
|
||||
], function ($, Config, h, LocalStore, Messages) {
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
var img = h('img#cp-logo', {
|
||||
src: '/customize/cryptpad-new-logo-colors-logoonly.png?' + urlArgs
|
||||
});
|
||||
|
||||
var brand = h('h1#cp-brand', 'CryptPad');
|
||||
var message = h('h2#cp-scramble', Messages.four04_pageNotFound);
|
||||
var title = h('h2#cp-title', "404");
|
||||
|
||||
var loggedIn = LocalStore.isLoggedIn();
|
||||
var link = h('a#cp-link', {
|
||||
href: loggedIn? '/drive/': '/',
|
||||
}, loggedIn? Messages.header_logoTitle: Messages.header_homeTitle);
|
||||
|
||||
if (Config.httpUnsafeOrigin && Config.httpUnsafeOrigin !== window.location.origin
|
||||
&& window.parent) {
|
||||
$(link).click(function (e) {
|
||||
e.preventDefault();
|
||||
window.parent.location = Config.httpUnsafeOrigin + $(link).attr('href').slice(1);
|
||||
});
|
||||
}
|
||||
|
||||
var content = h('div#cp-main', [
|
||||
img,
|
||||
brand,
|
||||
title,
|
||||
message,
|
||||
link,
|
||||
]);
|
||||
document.body.appendChild(content);
|
||||
|
||||
var die = function (n) { return Math.floor(Math.random() * n); };
|
||||
var randomChar = function () {
|
||||
return String.fromCharCode(die(94) + 34);
|
||||
};
|
||||
var mutate = function (S, i, c) {
|
||||
var A = S.split("");
|
||||
A[i] = c;
|
||||
return A.join("");
|
||||
};
|
||||
|
||||
var take = function (A) {
|
||||
var n = die(A.length);
|
||||
var choice = A[n];
|
||||
A.splice(n, 1);
|
||||
return choice;
|
||||
};
|
||||
|
||||
var makeDecryptor = function (el, t, difficulty, cb) {
|
||||
var Orig = el.innerText;
|
||||
var options = [];
|
||||
el.innerText = el.innerText.split("").map(function (c, i) {
|
||||
Orig[i] = c;
|
||||
options.push(i);
|
||||
return randomChar();
|
||||
}).join("");
|
||||
|
||||
return function f () {
|
||||
if (die(difficulty) === 0) {
|
||||
var choice = take(options);
|
||||
el.innerText = mutate(el.innerText, choice, Orig.charAt(choice));
|
||||
} else { // make a superficial change
|
||||
el.innerText = mutate(el.innerText,
|
||||
options[die(options.length)],
|
||||
randomChar());
|
||||
}
|
||||
setTimeout(options.length > 0? f: cb, t);
|
||||
};
|
||||
};
|
||||
|
||||
makeDecryptor(brand, 70, 2, function () { })();
|
||||
makeDecryptor(title, 50, 14, function () { })();
|
||||
makeDecryptor(link, 20, 4, function () {})();
|
||||
makeDecryptor(message, 12, 3, function () {
|
||||
console.log('done');
|
||||
})();
|
||||
});
|
||||
|
BIN
custom/cryptopad_custom/customize/images/AGPL.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
custom/cryptopad_custom/customize/images/AaronMacSween.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
custom/cryptopad_custom/customize/images/CalebJames.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
custom/cryptopad_custom/customize/images/Catalin.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
custom/cryptopad_custom/customize/images/LudovicDuboist.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
custom/cryptopad_custom/customize/images/Pierre-new.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
custom/cryptopad_custom/customize/images/YannFlory.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
custom/cryptopad_custom/customize/images/aaron.jpg
Normal file
After Width: | Height: | Size: 780 KiB |
BIN
custom/cryptopad_custom/customize/images/atest.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
custom/cryptopad_custom/customize/images/avatar.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
custom/cryptopad_custom/customize/images/bkcontact.jpg
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
custom/cryptopad_custom/customize/images/caleb.jpg
Normal file
After Width: | Height: | Size: 835 KiB |
BIN
custom/cryptopad_custom/customize/images/code.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
custom/cryptopad_custom/customize/images/cover-faq.jpg
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
custom/cryptopad_custom/customize/images/cover-features.jpg
Normal file
After Width: | Height: | Size: 190 KiB |
BIN
custom/cryptopad_custom/customize/images/cover-privacy.jpg
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
custom/cryptopad_custom/customize/images/drive_screenshot.png
Normal file
After Width: | Height: | Size: 180 KiB |
25
custom/cryptopad_custom/customize/images/email.svg
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
.st1{fill:url(#SVGID_2_);}
|
||||
</style>
|
||||
<g>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0.9122" y1="8.1983" x2="23.1969" y2="8.1983">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M1.6,6.1c0.6,0.3,9,4.9,9.3,5c0.3,0.2,0.6,0.2,1.1,0.2c0.5,0,0.8-0.1,1.1-0.2c0.3-0.2,8.7-4.7,9.3-5
|
||||
c0.2-0.1,0.6-0.3,0.7-0.6c0.1-0.4,0-0.6-0.6-0.6H12.1H1.6C1,5,0.8,5.2,1,5.6C1,5.8,1.4,6,1.6,6.1z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0.6056" y1="12.6427" x2="23.3944" y2="12.6427">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st1" d="M22.9,6.4c-0.4,0.2-4.5,3.1-7.1,4.8l4.5,5.1c0.1,0.1,0.2,0.2,0.1,0.3c-0.1,0.1-0.2,0-0.3-0.1l-5.4-4.6
|
||||
c-0.8,0.5-1.4,0.9-1.5,0.9c-0.4,0.2-0.7,0.2-1.1,0.2c-0.4,0-0.7,0-1.1-0.2c-0.1-0.1-0.7-0.4-1.5-0.9L4,16.5
|
||||
c-0.1,0.1-0.3,0.1-0.3,0.1c-0.1-0.1,0-0.2,0.1-0.3l4.5-5.1C5.6,9.5,1.6,6.6,1.1,6.4c-0.5-0.2-0.5,0-0.5,0.3c0,0.2,0,11.2,0,11.2
|
||||
c0,0.5,0.8,1.1,1.3,1.1h10.2h10.2c0.5,0,1.2-0.6,1.2-1.1c0,0,0-11,0-11.2C23.4,6.4,23.4,6.1,22.9,6.4z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
22
custom/cryptopad_custom/customize/images/github.svg
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#Shape_1_);}
|
||||
</style>
|
||||
<g id="Octicons">
|
||||
<g id="mark-github">
|
||||
<linearGradient id="Shape_1_" gradientUnits="userSpaceOnUse" x1="1.0181" y1="12" x2="22.9819" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path id="Shape" class="st0" d="M12,1.3c-6.1,0-11,4.9-11,11c0,4.9,3.1,9,7.5,10.4c0.5,0.1,0.8-0.2,0.8-0.5c0-0.3,0-1.1,0-2
|
||||
c-2.8,0.5-3.5-0.7-3.7-1.3c-0.1-0.3-0.7-1.3-1.1-1.6c-0.4-0.2-0.9-0.7,0-0.7c0.9,0,1.5,0.8,1.7,1.1c1,1.7,2.6,1.2,3.2,0.9
|
||||
c0.1-0.7,0.4-1.2,0.7-1.5c-2.4-0.3-5-1.2-5-5.4c0-1.2,0.4-2.2,1.1-3C6,8.5,5.7,7.3,6.3,5.8c0,0,0.9-0.3,3,1.1
|
||||
c0.9-0.2,1.8-0.4,2.7-0.4c0.9,0,1.9,0.1,2.7,0.4c2.1-1.4,3-1.1,3-1.1c0.6,1.5,0.2,2.6,0.1,2.9c0.7,0.8,1.1,1.7,1.1,3
|
||||
c0,4.2-2.6,5.1-5,5.4c0.4,0.3,0.7,1,0.7,2c0,1.5,0,2.6,0,3c0,0.3,0.2,0.6,0.8,0.5c4.3-1.5,7.5-5.6,7.5-10.4
|
||||
C23,6.2,18.1,1.3,12,1.3L12,1.3z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
BIN
custom/cryptopad_custom/customize/images/hash.png
Normal file
After Width: | Height: | Size: 10 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 13"><defs><style>.cls-1{fill:#444;}</style></defs><title>Asset 2</title><g id="Layer_2" data-name="Layer 2"><g id="_490_Icons" data-name="490 Icons"><path class="cls-1" d="M7,0,9,2h7V13H0V0Z"/></g></g></svg>
|
After Width: | Height: | Size: 263 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.44 13"><defs><style>.cls-1{fill:#444;}</style></defs><title>Asset 1</title><g id="Layer_2" data-name="Layer 2"><g id="_490_Icons" data-name="490 Icons"><path class="cls-1" d="M13,13l2.44-6.5h-13L0,13ZM2,4,0,13V0H4.5l2,2H13V4Z"/></g></g></svg>
|
After Width: | Height: | Size: 298 B |
|
@ -0,0 +1,4 @@
|
|||
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
After Width: | Height: | Size: 255 B |
|
@ -0,0 +1,4 @@
|
|||
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 271 B |
30
custom/cryptopad_custom/customize/images/irc.svg
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
.st1{fill:url(#SVGID_2_);}
|
||||
</style>
|
||||
<g>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="4.7893" y1="12.0669" x2="6.7712" y2="12.0669">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<polygon class="st0" points="4.8,13 6.4,13 6.8,11.2 5.1,11.2 "/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0.4529" y1="12" x2="23.5471" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st1" d="M21.6,17.8c0-0.1,0.1-0.1,0.1-0.2c1.2-1.7,1.8-3.8,1.8-6c0-6.2-5.2-11.2-11.5-11.2S0.5,5.4,0.5,11.6
|
||||
c0,6.2,5.2,11.1,11.6,11.1c1.6,0,3.1-0.3,4.5-0.9c0,0,0.1,0,0.1,0c0,0,0,0,0,0c0.2-0.1,0.4-0.1,0.6-0.1c0.2,0,0.5,0,0.7,0.1
|
||||
l4.7,1.7l-1.2-4.9C21.4,18.3,21.4,18.1,21.6,17.8z M9.1,11.2H7.5L7.2,13h1.5v0.7H7L6.6,16H5.8l0.5-2.3H4.7L4.2,16H3.5l0.4-2.3H2.5
|
||||
V13h1.5l0.4-1.8H2.9v-0.7h1.6L5,8.1h0.7l-0.4,2.3h1.6l0.5-2.3h0.7l-0.5,2.3h1.4V11.2z M11.2,16h-0.9v-5.9h0.9V16z M11.1,8.9
|
||||
C11,9,10.9,9.1,10.7,9.1c-0.2,0-0.3,0-0.4-0.1c-0.1-0.1-0.2-0.2-0.2-0.4c0-0.2,0.1-0.4,0.2-0.4c0.1-0.1,0.2-0.1,0.4-0.1
|
||||
c0.1,0,0.3,0,0.4,0.1s0.2,0.2,0.2,0.4S11.2,8.9,11.1,8.9z M16.3,10.9c-0.2-0.1-0.5-0.1-0.6-0.1c-0.5,0-0.9,0.2-1.2,0.6
|
||||
c-0.3,0.4-0.5,0.9-0.5,1.4V16h-0.9v-5.9h0.7l0.1,1.1h0c0.2-0.4,0.5-0.7,0.8-0.9c0.3-0.2,0.6-0.3,1-0.3c0.3,0,0.5,0,0.7,0.1
|
||||
L16.3,10.9z M17.9,15.3c-0.5-0.5-0.7-1.3-0.7-2.2c0-1,0.2-1.7,0.7-2.3s1.2-0.8,2-0.8c0.3,0,0.6,0,0.8,0.1c0.3,0.1,0.5,0.1,0.7,0.2
|
||||
l-0.3,0.8c-0.2-0.1-0.4-0.1-0.6-0.2c-0.2-0.1-0.4-0.1-0.6-0.1c-1.2,0-1.8,0.8-1.8,2.3c0,0.7,0.1,1.3,0.4,1.7s0.7,0.6,1.3,0.6
|
||||
c0.5,0,1-0.1,1.5-0.3v0.8c-0.4,0.2-0.9,0.3-1.5,0.3C19.1,16.1,18.4,15.8,17.9,15.3z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
19
custom/cryptopad_custom/customize/images/issue.svg
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#Shape_2_);}
|
||||
</style>
|
||||
<g id="Octicons_1_">
|
||||
<g id="issue-opened">
|
||||
<linearGradient id="Shape_2_" gradientUnits="userSpaceOnUse" x1="1.1619" y1="12" x2="22.8381" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path id="Shape_1_" class="st0" d="M12,3.2c4.9,0,8.8,4,8.8,8.8s-4,8.8-8.8,8.8s-8.8-4-8.8-8.8S7.1,3.2,12,3.2L12,3.2z M12,1.2
|
||||
C6,1.2,1.2,6,1.2,12S6,22.8,12,22.8S22.8,18,22.8,12S18,1.2,12,1.2L12,1.2z M13.5,5.8h-3.1v7.7h3.1V5.8L13.5,5.8z M13.5,15.1h-3.1
|
||||
v3.1h3.1V15.1L13.5,15.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 979 B |
BIN
custom/cryptopad_custom/customize/images/key_small.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
custom/cryptopad_custom/customize/images/logo_white.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
1
custom/cryptopad_custom/customize/images/logo_white.svg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
custom/cryptopad_custom/customize/images/ludovic.jpg
Normal file
After Width: | Height: | Size: 953 KiB |
BIN
custom/cryptopad_custom/customize/images/ngi.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
custom/cryptopad_custom/customize/images/organize.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
custom/cryptopad_custom/customize/images/pad.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
custom/cryptopad_custom/customize/images/pad_screenshot.png
Normal file
After Width: | Height: | Size: 257 KiB |
BIN
custom/cryptopad_custom/customize/images/pierre.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
custom/cryptopad_custom/customize/images/poll.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
custom/cryptopad_custom/customize/images/realtime_small.png
Normal file
After Width: | Height: | Size: 80 KiB |
17
custom/cryptopad_custom/customize/images/sayhi.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0.4529" y1="12" x2="23.5471" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M12,22.7c1.6,0,3.1-0.3,4.5-0.9c0,0,0.1,0,0.1,0c0,0,0,0,0,0c0.2-0.1,0.4-0.1,0.6-0.1c0.2,0,0.5,0,0.7,0.1
|
||||
l4.7,1.7l-1.2-4.9c0-0.3,0.1-0.6,0.2-0.8l0,0c0-0.1,0.1-0.1,0.1-0.2c1.2-1.7,1.8-3.8,1.8-6c0-6.2-5.2-11.2-11.5-11.2
|
||||
S0.5,5.4,0.5,11.6C0.5,17.8,5.6,22.7,12,22.7z M17.3,10.2c1,0,1.8,0.8,1.8,1.8s-0.8,1.8-1.8,1.8c-1,0-1.8-0.8-1.8-1.8
|
||||
S16.4,10.2,17.3,10.2z M12,10.2c1,0,1.8,0.8,1.8,1.8S13,13.8,12,13.8S10.2,13,10.2,12S11,10.2,12,10.2z M6.7,10.2
|
||||
c1,0,1.8,0.8,1.8,1.8s-0.8,1.8-1.8,1.8S4.9,13,4.9,12S5.7,10.2,6.7,10.2z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
BIN
custom/cryptopad_custom/customize/images/slide.png
Normal file
After Width: | Height: | Size: 46 KiB |
17
custom/cryptopad_custom/customize/images/twitter.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0.3991" y1="12" x2="23.6009" y2="12">
|
||||
<stop offset="0" style="stop-color:#4592C4"/>
|
||||
<stop offset="1" style="stop-color:#545ACD"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M23.6,4.8c-0.9,0.4-1.8,0.6-2.7,0.8C21.9,5,22.6,4,23,2.9c-0.9,0.5-1.9,0.9-3,1.2c-0.9-0.9-2.1-1.5-3.5-1.5
|
||||
c-2.6,0-4.8,2.1-4.8,4.8c0,0.4,0,0.7,0.1,1.1c-4-0.2-7.5-2.1-9.8-5C1.6,4.1,1.4,5,1.4,5.8c0,1.7,0.8,3.1,2.1,4
|
||||
C2.7,9.8,2,9.6,1.3,9.2c0,0,0,0,0,0.1c0,2.3,1.6,4.2,3.8,4.7c-0.4,0.1-0.8,0.2-1.3,0.2c-0.3,0-0.6,0-0.9-0.1
|
||||
c0.6,1.9,2.4,3.3,4.4,3.3c-1.6,1.3-3.7,2-5.9,2c-0.4,0-0.8,0-1.1-0.1c2.1,1.4,4.6,2.2,7.3,2.2c8.8,0,13.6-7.3,13.6-13.6
|
||||
c0-0.2,0-0.4,0-0.6C22.2,6.6,23,5.8,23.6,4.8z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
BIN
custom/cryptopad_custom/customize/images/useraccount.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
custom/cryptopad_custom/customize/images/yann.jpg
Normal file
After Width: | Height: | Size: 960 KiB |
BIN
custom/cryptopad_custom/customize/images/zeroknowledge_small.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
custom/cryptopad_custom/customize/images/zk.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
16
custom/cryptopad_custom/customize/index.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
BIN
custom/cryptopad_custom/customize/loading-logo.png
Normal file
After Width: | Height: | Size: 23 KiB |
200
custom/cryptopad_custom/customize/loading.js
Normal file
|
@ -0,0 +1,200 @@
|
|||
// dark #326599
|
||||
// light #4591c4
|
||||
define([], function () {
|
||||
var loadingStyle = (function(){/*
|
||||
#cp-loading {
|
||||
transition: opacity 0.75s, visibility 0s 0.75s;
|
||||
visibility: visible;
|
||||
position: fixed;
|
||||
z-index: 10000000;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
background: linear-gradient(to right, #326599 0%, #326599 50%, #4591c4 50%, #4591c4 100%);
|
||||
color: #fafafa;
|
||||
font-size: 1.5em;
|
||||
opacity: 1;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#cp-loading.cp-loading-hidden {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
#cp-loading .cp-loading-logo {
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
margin-top: 50px;
|
||||
flex: 0 1 auto;
|
||||
min-height: 0;
|
||||
text-align: center;
|
||||
}
|
||||
#cp-loading .cp-loading-logo img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
#cp-loading .cp-loading-container {
|
||||
width: 700px;
|
||||
max-width: 90vw;
|
||||
height: 500px;
|
||||
max-height: calc(100vh - 20px);
|
||||
margin: 50px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
}
|
||||
@media screen and (max-height: 800px) {
|
||||
#cp-loading .cp-loading-container {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
#cp-loading .cp-loading-container {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
#cp-loading .cp-loading-cryptofist {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
//height: 300px;
|
||||
max-width: 90vw;
|
||||
max-height: 300px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
@media screen and (max-height: 500px) {
|
||||
#cp-loading .cp-loading-logo {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#cp-loading-message {
|
||||
background: #FFF;
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
#cp-loading-password-prompt {
|
||||
font-size: 18px;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-error {
|
||||
color: white;
|
||||
background: #9e0000;
|
||||
padding: 5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-info {
|
||||
text-align: left;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-form {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-form button,
|
||||
#cp-loading-password-prompt .cp-password-form .cp-password-input {
|
||||
background-color: #4591c4;
|
||||
color: white;
|
||||
border: 1px solid #4591c4;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-form .cp-password-container {
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-form input {
|
||||
flex: 1;
|
||||
padding: 0 5px;
|
||||
min-width: 0;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#cp-loading-password-prompt .cp-password-form button:hover {
|
||||
background-color: #326599;
|
||||
}
|
||||
#cp-loading .cp-loading-spinner-container {
|
||||
position: relative;
|
||||
height: 100px;
|
||||
}
|
||||
#cp-loading .cp-loading-spinner-container > div {
|
||||
height: 100px;
|
||||
}
|
||||
#cp-loading-tip {
|
||||
position: fixed;
|
||||
z-index: 10000000;
|
||||
top: 80%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
transition: opacity 750ms;
|
||||
transition-delay: 3000ms;
|
||||
}
|
||||
@media screen and (max-height: 600px) {
|
||||
#cp-loading-tip {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#cp-loading-tip span {
|
||||
background: #222;
|
||||
color: #fafafa;
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
opacity: 0.7;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
padding: 15px;
|
||||
max-width: 60%;
|
||||
display: inline-block;
|
||||
}
|
||||
.cp-loading-progress {
|
||||
width: 100%;
|
||||
margin: 20px;
|
||||
}
|
||||
.cp-loading-progress p {
|
||||
margin: 5px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cp-loading-progress-bar {
|
||||
height: 24px;
|
||||
background: white;
|
||||
}
|
||||
.cp-loading-progress-bar-value {
|
||||
height: 100%;
|
||||
background: #5cb85c;
|
||||
}
|
||||
*/}).toString().slice(14, -3);
|
||||
var urlArgs = window.location.href.replace(/^.*\?([^\?]*)$/, function (all, x) { return x; });
|
||||
var elem = document.createElement('div');
|
||||
elem.setAttribute('id', 'cp-loading');
|
||||
elem.innerHTML = [
|
||||
'<style>',
|
||||
loadingStyle,
|
||||
'</style>',
|
||||
'<div class="cp-loading-logo">',
|
||||
'<img class="cp-loading-cryptofist" src="/customize/loading-logo.png?' + urlArgs + '">',
|
||||
'</div>',
|
||||
'<div class="cp-loading-container">',
|
||||
'<div class="cp-loading-spinner-container">',
|
||||
'<span class="fa fa-spinner fa-pulse fa-4x fa-fw"></span>',
|
||||
'</div>',
|
||||
'<p id="cp-loading-message"></p>',
|
||||
'</div>'
|
||||
].join('');
|
||||
return function () {
|
||||
var intr;
|
||||
var append = function () {
|
||||
if (!document.body) { return; }
|
||||
clearInterval(intr);
|
||||
document.body.appendChild(elem);
|
||||
};
|
||||
intr = setInterval(append, 100);
|
||||
append();
|
||||
};
|
||||
});
|
544
custom/cryptopad_custom/customize/login.js
Normal file
|
@ -0,0 +1,544 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||
'/bower_components/chainpad-crypto/crypto.js',
|
||||
'/common/common-util.js',
|
||||
'/common/outer/network-config.js',
|
||||
'/customize/credential.js',
|
||||
'/bower_components/chainpad/chainpad.dist.js',
|
||||
'/common/common-realtime.js',
|
||||
'/common/common-constants.js',
|
||||
'/common/common-interface.js',
|
||||
'/common/common-feedback.js',
|
||||
'/common/outer/local-store.js',
|
||||
'/customize/messages.js',
|
||||
'/bower_components/nthen/index.js',
|
||||
'/common/outer/login-block.js',
|
||||
'/common/common-hash.js',
|
||||
|
||||
'/bower_components/tweetnacl/nacl-fast.min.js',
|
||||
'/bower_components/scrypt-async/scrypt-async.min.js', // better load speed
|
||||
], function ($, Listmap, Crypto, Util, NetConfig, Cred, ChainPad, Realtime, Constants, UI,
|
||||
Feedback, LocalStore, Messages, nThen, Block, Hash) {
|
||||
var Exports = {
|
||||
Cred: Cred,
|
||||
// this is depended on by non-customizable files
|
||||
// be careful when modifying login.js
|
||||
requiredBytes: 192,
|
||||
};
|
||||
|
||||
var Nacl = window.nacl;
|
||||
var allocateBytes = Exports.allocateBytes = function (bytes) {
|
||||
var dispense = Cred.dispenser(bytes);
|
||||
|
||||
var opt = {};
|
||||
|
||||
// dispense 18 bytes of entropy for your encryption key
|
||||
var encryptionSeed = dispense(18);
|
||||
// 16 bytes for a deterministic channel key
|
||||
var channelSeed = dispense(16);
|
||||
// 32 bytes for a curve key
|
||||
var curveSeed = dispense(32);
|
||||
|
||||
var curvePair = Nacl.box.keyPair.fromSecretKey(new Uint8Array(curveSeed));
|
||||
opt.curvePrivate = Nacl.util.encodeBase64(curvePair.secretKey);
|
||||
opt.curvePublic = Nacl.util.encodeBase64(curvePair.publicKey);
|
||||
|
||||
// 32 more for a signing key
|
||||
var edSeed = opt.edSeed = dispense(32);
|
||||
|
||||
// 64 more bytes to seed an additional signing key
|
||||
var blockKeys = opt.blockKeys = Block.genkeys(new Uint8Array(dispense(64)));
|
||||
opt.blockHash = Block.getBlockHash(blockKeys);
|
||||
|
||||
// derive a private key from the ed seed
|
||||
var signingKeypair = Nacl.sign.keyPair.fromSeed(new Uint8Array(edSeed));
|
||||
|
||||
opt.edPrivate = Nacl.util.encodeBase64(signingKeypair.secretKey);
|
||||
opt.edPublic = Nacl.util.encodeBase64(signingKeypair.publicKey);
|
||||
|
||||
var keys = opt.keys = Crypto.createEditCryptor(null, encryptionSeed);
|
||||
|
||||
// 24 bytes of base64
|
||||
keys.editKeyStr = keys.editKeyStr.replace(/\//g, '-');
|
||||
|
||||
// 32 bytes of hex
|
||||
var channelHex = opt.channelHex = Util.uint8ArrayToHex(channelSeed);
|
||||
|
||||
// should never happen
|
||||
if (channelHex.length !== 32) { throw new Error('invalid channel id'); }
|
||||
|
||||
var channel64 = Util.hexToBase64(channelHex);
|
||||
|
||||
// we still generate a v1 hash because this function needs to deterministically
|
||||
// derive the same values as it always has. New accounts will generate their own
|
||||
// userHash values
|
||||
opt.userHash = '/1/edit/' + [channel64, opt.keys.editKeyStr].join('/') + '/';
|
||||
|
||||
return opt;
|
||||
};
|
||||
|
||||
|
||||
var loginOptionsFromBlock = function (blockInfo) {
|
||||
var opt = {};
|
||||
var parsed = Hash.getSecrets('pad', blockInfo.User_hash);
|
||||
opt.channelHex = parsed.channel;
|
||||
opt.keys = parsed.keys;
|
||||
opt.edPublic = blockInfo.edPublic;
|
||||
opt.User_name = blockInfo.User_name;
|
||||
return opt;
|
||||
};
|
||||
|
||||
var loadUserObject = function (opt, cb) {
|
||||
var config = {
|
||||
websocketURL: NetConfig.getWebsocketURL(),
|
||||
channel: opt.channelHex,
|
||||
data: {},
|
||||
validateKey: opt.keys.validateKey, // derived validation key
|
||||
crypto: Crypto.createEncryptor(opt.keys),
|
||||
logLevel: 1,
|
||||
classic: true,
|
||||
ChainPad: ChainPad,
|
||||
owners: [opt.edPublic]
|
||||
};
|
||||
|
||||
var rt = opt.rt = Listmap.create(config);
|
||||
rt.proxy
|
||||
.on('ready', function () {
|
||||
setTimeout(function () { cb(void 0, rt); });
|
||||
})
|
||||
.on('disconnect', function (info) {
|
||||
cb('E_DISCONNECT', info);
|
||||
});
|
||||
};
|
||||
|
||||
var isProxyEmpty = function (proxy) {
|
||||
var l = Object.keys(proxy).length;
|
||||
return l === 0 || (l === 2 && proxy._events && proxy.on);
|
||||
};
|
||||
|
||||
var setMergeAnonDrive = function () {
|
||||
sessionStorage.migrateAnonDrive = 1;
|
||||
};
|
||||
|
||||
var setCreateReadme = function () {
|
||||
sessionStorage.createReadme = 1;
|
||||
};
|
||||
|
||||
Exports.loginOrRegister = function (uname, passwd, isRegister, shouldImport, cb) {
|
||||
if (typeof(cb) !== 'function') { return; }
|
||||
|
||||
// Usernames are all lowercase. No going back on this one
|
||||
uname = uname.toLowerCase();
|
||||
|
||||
// validate inputs
|
||||
if (!Cred.isValidUsername(uname)) { return void cb('INVAL_USER'); }
|
||||
if (!Cred.isValidPassword(passwd)) { return void cb('INVAL_PASS'); }
|
||||
if (isRegister && !Cred.isLongEnoughPassword(passwd)) {
|
||||
return void cb('PASS_TOO_SHORT');
|
||||
}
|
||||
|
||||
// results...
|
||||
var res = {
|
||||
register: isRegister,
|
||||
};
|
||||
|
||||
var RT, blockKeys, blockHash, Pinpad, rpc, userHash;
|
||||
|
||||
nThen(function (waitFor) {
|
||||
// derive a predefined number of bytes from the user's inputs,
|
||||
// and allocate them in a deterministic fashion
|
||||
Cred.deriveFromPassphrase(uname, passwd, Exports.requiredBytes, waitFor(function (bytes) {
|
||||
res.opt = allocateBytes(bytes);
|
||||
blockHash = res.opt.blockHash;
|
||||
blockKeys = res.opt.blockKeys;
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
// the allocated bytes can be used either in a legacy fashion,
|
||||
// or in such a way that a previously unused byte range determines
|
||||
// the location of a layer of indirection which points users to
|
||||
// an encrypted block, from which they can recover the location of
|
||||
// the rest of their data
|
||||
|
||||
// determine where a block for your set of keys would be stored
|
||||
var blockUrl = Block.getBlockUrl(res.opt.blockKeys);
|
||||
|
||||
// Check whether there is a block at that location
|
||||
Util.fetch(blockUrl, waitFor(function (err, block) {
|
||||
// if users try to log in or register, we must check
|
||||
// whether there is a block.
|
||||
|
||||
// the block is only useful if it can be decrypted, though
|
||||
if (err) {
|
||||
console.log("no block found");
|
||||
return;
|
||||
}
|
||||
|
||||
var decryptedBlock = Block.decrypt(block, blockKeys);
|
||||
if (!decryptedBlock) {
|
||||
console.error("Found a login block but failed to decrypt");
|
||||
return;
|
||||
}
|
||||
|
||||
console.error(decryptedBlock);
|
||||
res.blockInfo = decryptedBlock;
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
// we assume that if there is a block, it was created in a valid manner
|
||||
// so, just proceed to the next block which handles that stuff
|
||||
if (res.blockInfo) { return; }
|
||||
|
||||
var opt = res.opt;
|
||||
|
||||
// load the user's object using the legacy credentials
|
||||
loadUserObject(opt, waitFor(function (err, rt) {
|
||||
if (err) {
|
||||
waitFor.abort();
|
||||
return void cb(err);
|
||||
}
|
||||
|
||||
// if a proxy is marked as deprecated, it is because someone had a non-owned drive
|
||||
// but changed their password, and couldn't delete their old data.
|
||||
// if they are here, they have entered their old credentials, so we should not
|
||||
// allow them to proceed. In time, their old drive should get deleted, since
|
||||
// it will should be pinned by anyone's drive.
|
||||
if (rt.proxy[Constants.deprecatedKey]) {
|
||||
waitFor.abort();
|
||||
return void cb('NO_SUCH_USER', res);
|
||||
}
|
||||
|
||||
if (isRegister && isProxyEmpty(rt.proxy)) {
|
||||
// If they are trying to register,
|
||||
// and the proxy is empty, then there is no 'legacy user' either
|
||||
// so we should just shut down this session and disconnect.
|
||||
rt.network.disconnect();
|
||||
return; // proceed to the next async block
|
||||
}
|
||||
|
||||
// they tried to just log in but there's no such user
|
||||
// and since we're here at all there is no modern-block
|
||||
if (!isRegister && isProxyEmpty(rt.proxy)) {
|
||||
rt.network.disconnect(); // clean up after yourself
|
||||
waitFor.abort();
|
||||
return void cb('NO_SUCH_USER', res);
|
||||
}
|
||||
|
||||
// they tried to register, but those exact credentials exist
|
||||
if (isRegister && !isProxyEmpty(rt.proxy)) {
|
||||
rt.network.disconnect();
|
||||
waitFor.abort();
|
||||
Feedback.send('LOGIN', true);
|
||||
return void cb('ALREADY_REGISTERED', res);
|
||||
}
|
||||
|
||||
// if you are here, then there is no block, the user is trying
|
||||
// to log in. The proxy is **not** empty. All values assigned here
|
||||
// should have been deterministically created using their credentials
|
||||
// so setting them is just a precaution to keep things in good shape
|
||||
res.proxy = rt.proxy;
|
||||
res.realtime = rt.realtime;
|
||||
|
||||
// they're registering...
|
||||
res.userHash = opt.userHash;
|
||||
res.userName = uname;
|
||||
|
||||
// export their signing key
|
||||
res.edPrivate = opt.edPrivate;
|
||||
res.edPublic = opt.edPublic;
|
||||
|
||||
// export their encryption key
|
||||
res.curvePrivate = opt.curvePrivate;
|
||||
res.curvePublic = opt.curvePublic;
|
||||
|
||||
if (shouldImport) { setMergeAnonDrive(); }
|
||||
|
||||
// don't proceed past this async block.
|
||||
waitFor.abort();
|
||||
|
||||
// We have to call whenRealtimeSyncs asynchronously here because in the current
|
||||
// version of listmap, onLocal calls `chainpad.contentUpdate(newValue)`
|
||||
// asynchronously.
|
||||
// The following setTimeout is here to make sure whenRealtimeSyncs is called after
|
||||
// `contentUpdate` so that we have an update userDoc in chainpad.
|
||||
setTimeout(function () {
|
||||
Realtime.whenRealtimeSyncs(rt.realtime, function () {
|
||||
// the following stages are there to initialize a new drive
|
||||
// if you are registering
|
||||
LocalStore.login(res.userHash, res.userName, function () {
|
||||
setTimeout(function () { cb(void 0, res); });
|
||||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
}).nThen(function (waitFor) { // MODERN REGISTRATION / LOGIN
|
||||
var opt;
|
||||
if (res.blockInfo) {
|
||||
opt = loginOptionsFromBlock(res.blockInfo);
|
||||
userHash = res.blockInfo.User_hash;
|
||||
console.error(opt, userHash);
|
||||
} else {
|
||||
console.log("allocating random bytes for a new user object");
|
||||
opt = allocateBytes(Nacl.randomBytes(Exports.requiredBytes));
|
||||
// create a random v2 hash, since we don't need backwards compatibility
|
||||
userHash = opt.userHash = Hash.createRandomHash('drive');
|
||||
var secret = Hash.getSecrets('drive', userHash);
|
||||
opt.keys = secret.keys;
|
||||
opt.channelHex = secret.channel;
|
||||
}
|
||||
|
||||
// according to the location derived from the credentials which you entered
|
||||
loadUserObject(opt, waitFor(function (err, rt) {
|
||||
if (err) {
|
||||
waitFor.abort();
|
||||
return void cb('MODERN_REGISTRATION_INIT');
|
||||
}
|
||||
|
||||
console.error(JSON.stringify(rt.proxy));
|
||||
|
||||
// export the realtime object you checked
|
||||
RT = rt;
|
||||
|
||||
var proxy = rt.proxy;
|
||||
if (isRegister && !isProxyEmpty(proxy) && (!proxy.edPublic || !proxy.edPrivate)) {
|
||||
console.error("INVALID KEYS");
|
||||
console.log(JSON.stringify(proxy));
|
||||
return;
|
||||
}
|
||||
|
||||
res.proxy = rt.proxy;
|
||||
res.realtime = rt.realtime;
|
||||
|
||||
// they're registering...
|
||||
res.userHash = userHash;
|
||||
res.userName = uname;
|
||||
|
||||
// somehow they have a block present, but nothing in the user object it specifies
|
||||
// this shouldn't happen, but let's send feedback if it does
|
||||
if (!isRegister && isProxyEmpty(rt.proxy)) {
|
||||
// this really shouldn't happen, but let's handle it anyway
|
||||
Feedback.send('EMPTY_LOGIN_WITH_BLOCK');
|
||||
|
||||
rt.network.disconnect(); // clean up after yourself
|
||||
waitFor.abort();
|
||||
return void cb('NO_SUCH_USER', res);
|
||||
}
|
||||
|
||||
// they tried to register, but those exact credentials exist
|
||||
if (isRegister && !isProxyEmpty(rt.proxy)) {
|
||||
rt.network.disconnect();
|
||||
waitFor.abort();
|
||||
res.blockHash = blockHash;
|
||||
if (shouldImport) {
|
||||
setMergeAnonDrive();
|
||||
}
|
||||
|
||||
return void cb('ALREADY_REGISTERED', res);
|
||||
}
|
||||
|
||||
if (!isRegister && !isProxyEmpty(rt.proxy)) {
|
||||
LocalStore.setBlockHash(blockHash);
|
||||
waitFor.abort();
|
||||
if (shouldImport) {
|
||||
setMergeAnonDrive();
|
||||
}
|
||||
return void LocalStore.login(userHash, uname, function () {
|
||||
cb(void 0, res);
|
||||
});
|
||||
}
|
||||
|
||||
if (isRegister && isProxyEmpty(rt.proxy)) {
|
||||
proxy.edPublic = opt.edPublic;
|
||||
proxy.edPrivate = opt.edPrivate;
|
||||
proxy.curvePublic = opt.curvePublic;
|
||||
proxy.curvePrivate = opt.curvePrivate;
|
||||
proxy.login_name = uname;
|
||||
proxy[Constants.displayNameKey] = uname;
|
||||
setCreateReadme();
|
||||
if (shouldImport) {
|
||||
setMergeAnonDrive();
|
||||
} else {
|
||||
proxy.version = 6;
|
||||
}
|
||||
|
||||
Feedback.send('REGISTRATION', true);
|
||||
} else {
|
||||
Feedback.send('LOGIN', true);
|
||||
}
|
||||
|
||||
setTimeout(waitFor(function () {
|
||||
Realtime.whenRealtimeSyncs(rt.realtime, waitFor());
|
||||
}));
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
require(['/common/pinpad.js'], waitFor(function (_Pinpad) {
|
||||
console.log("loaded rpc module");
|
||||
Pinpad = _Pinpad;
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
// send an RPC to store the block which you created.
|
||||
console.log("initializing rpc interface");
|
||||
|
||||
Pinpad.create(RT.network, RT.proxy, waitFor(function (e, _rpc) {
|
||||
if (e) {
|
||||
waitFor.abort();
|
||||
console.error(e); // INVALID_KEYS
|
||||
return void cb('RPC_CREATION_ERROR');
|
||||
}
|
||||
rpc = _rpc;
|
||||
console.log("rpc initialized");
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
console.log("creating request to publish a login block");
|
||||
|
||||
// Finally, create the login block for the object you just created.
|
||||
var toPublish = {};
|
||||
|
||||
toPublish[Constants.userNameKey] = uname;
|
||||
toPublish[Constants.userHashKey] = userHash;
|
||||
toPublish.edPublic = RT.proxy.edPublic;
|
||||
|
||||
var blockRequest = Block.serialize(JSON.stringify(toPublish), res.opt.blockKeys);
|
||||
|
||||
rpc.writeLoginBlock(blockRequest, waitFor(function (e) {
|
||||
if (e) { return void console.error(e); }
|
||||
|
||||
console.log("blockInfo available at:", blockHash);
|
||||
LocalStore.setBlockHash(blockHash);
|
||||
LocalStore.login(userHash, uname, function () {
|
||||
cb(void 0, res);
|
||||
});
|
||||
}));
|
||||
});
|
||||
};
|
||||
Exports.redirect = function () {
|
||||
if (sessionStorage.redirectTo) {
|
||||
var h = sessionStorage.redirectTo;
|
||||
var parser = document.createElement('a');
|
||||
parser.href = h;
|
||||
if (parser.origin === window.location.origin) {
|
||||
delete sessionStorage.redirectTo;
|
||||
window.location.href = h;
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.location.href = '/drive/';
|
||||
};
|
||||
|
||||
var hashing;
|
||||
Exports.loginOrRegisterUI = function (uname, passwd, isRegister, shouldImport, testing, test) {
|
||||
if (hashing) { return void console.log("hashing is already in progress"); }
|
||||
hashing = true;
|
||||
|
||||
var proceed = function (result) {
|
||||
hashing = false;
|
||||
if (test && typeof test === "function" && test()) { return; }
|
||||
Realtime.whenRealtimeSyncs(result.realtime, function () {
|
||||
Exports.redirect();
|
||||
});
|
||||
};
|
||||
|
||||
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen
|
||||
// pops up
|
||||
window.setTimeout(function () {
|
||||
UI.addLoadingScreen({
|
||||
loadingText: Messages.login_hashing,
|
||||
hideTips: true,
|
||||
});
|
||||
|
||||
// We need a setTimeout(cb, 0) otherwise the loading screen is only displayed
|
||||
// after hashing the password
|
||||
window.setTimeout(function () {
|
||||
Exports.loginOrRegister(uname, passwd, isRegister, shouldImport, function (err, result) {
|
||||
var proxy;
|
||||
if (result) { proxy = result.proxy; }
|
||||
|
||||
if (err) {
|
||||
switch (err) {
|
||||
case 'NO_SUCH_USER':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.alert(Messages.login_noSuchUser, function () {
|
||||
hashing = false;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'INVAL_USER':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.alert(Messages.login_invalUser, function () {
|
||||
hashing = false;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'INVAL_PASS':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.alert(Messages.login_invalPass, function () {
|
||||
hashing = false;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'PASS_TOO_SHORT':
|
||||
UI.removeLoadingScreen(function () {
|
||||
var warning = Messages._getKey('register_passwordTooShort', [
|
||||
Cred.MINIMUM_PASSWORD_LENGTH
|
||||
]);
|
||||
UI.alert(warning, function () {
|
||||
hashing = false;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'ALREADY_REGISTERED':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.confirm(Messages.register_alreadyRegistered, function (yes) {
|
||||
if (!yes) {
|
||||
hashing = false;
|
||||
return;
|
||||
}
|
||||
proxy.login_name = uname;
|
||||
|
||||
if (!proxy[Constants.displayNameKey]) {
|
||||
proxy[Constants.displayNameKey] = uname;
|
||||
}
|
||||
LocalStore.eraseTempSessionValues();
|
||||
|
||||
|
||||
if (result.blockHash) {
|
||||
LocalStore.setBlockHash(result.blockHash);
|
||||
}
|
||||
|
||||
LocalStore.login(result.userHash, result.userName, function () {
|
||||
setTimeout(function () { proceed(result); });
|
||||
});
|
||||
});
|
||||
});
|
||||
break;
|
||||
default: // UNHANDLED ERROR
|
||||
hashing = false;
|
||||
UI.errorLoadingScreen(Messages.login_unhandledError);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (testing) { return void proceed(result); }
|
||||
|
||||
if (!(proxy.curvePrivate && proxy.curvePublic &&
|
||||
proxy.edPrivate && proxy.edPublic)) {
|
||||
|
||||
console.log("recovering derived public/private keypairs");
|
||||
// **** reset keys ****
|
||||
proxy.curvePrivate = result.curvePrivate;
|
||||
proxy.curvePublic = result.curvePublic;
|
||||
proxy.edPrivate = result.edPrivate;
|
||||
proxy.edPublic = result.edPublic;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
Realtime.whenRealtimeSyncs(result.realtime, function () {
|
||||
proceed(result);
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 500);
|
||||
}, 200);
|
||||
};
|
||||
|
||||
return Exports;
|
||||
});
|
BIN
custom/cryptopad_custom/customize/main-favicon.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
25
custom/cryptopad_custom/customize/main.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/common/outer/local-store.js',
|
||||
], function ($, LocalStore) {
|
||||
|
||||
$(function () {
|
||||
var $main = $('#mainBlock');
|
||||
|
||||
// main block is hidden in case javascript is disabled
|
||||
$main.removeClass('hidden');
|
||||
|
||||
// Make sure we don't display non-translated content (empty button)
|
||||
$main.find('#data').removeClass('hidden');
|
||||
|
||||
if (LocalStore.isLoggedIn()) {
|
||||
if (window.location.pathname === '/') {
|
||||
window.location = '/drive/';
|
||||
return;
|
||||
}
|
||||
}
|
||||
$(window).click(function () {
|
||||
$('.cp-dropdown-content').hide();
|
||||
});
|
||||
});
|
||||
});
|
154
custom/cryptopad_custom/customize/messages.js
Executable file
|
@ -0,0 +1,154 @@
|
|||
(function () {
|
||||
// add your module to this map so it gets used
|
||||
var map = {
|
||||
'fr': 'Français',
|
||||
'es': 'Español',
|
||||
'pl': 'Polski',
|
||||
'de': 'Deutsch',
|
||||
'pt-br': 'Português do Brasil',
|
||||
'ro': 'Română',
|
||||
'zh': '繁體中文',
|
||||
'el': 'Ελληνικά',
|
||||
};
|
||||
|
||||
var messages = {};
|
||||
var LS_LANG = "CRYPTPAD_LANG";
|
||||
var getStoredLanguage = function () { return localStorage && localStorage.getItem(LS_LANG); };
|
||||
var getBrowserLanguage = function () { return navigator.language || navigator.userLanguage || ''; };
|
||||
var getLanguage = messages._getLanguage = function () {
|
||||
if (window.cryptpadLanguage) { return window.cryptpadLanguage; }
|
||||
if (getStoredLanguage()) { return getStoredLanguage(); }
|
||||
var l = getBrowserLanguage();
|
||||
// Edge returns 'fr-FR' --> transform it to 'fr' and check again
|
||||
return map[l] ? l :
|
||||
(map[l.split('-')[0]] ? l.split('-')[0] : 'en');
|
||||
};
|
||||
var language = getLanguage();
|
||||
|
||||
// Translations files were migrated from requirejs modules to json.
|
||||
// To avoid asking every administrator to update their customized translation files,
|
||||
// we use a requirejs map to redirect the old path to the new one and to use the
|
||||
// requirejs json plugin
|
||||
var reqPaths = {
|
||||
"/common/translations/messages.js":"json!/common/translations/messages.json"
|
||||
};
|
||||
Object.keys(map).forEach(function (k) {
|
||||
reqPaths["/common/translations/messages."+k+".js"] = "json!/common/translations/messages."+k+".json";
|
||||
});
|
||||
require.config({
|
||||
map: {
|
||||
"*": reqPaths
|
||||
}
|
||||
});
|
||||
|
||||
var req = ['/common/common-util.js', '/customize/translations/messages.js'];
|
||||
if (language && map[language]) { req.push('/customize/translations/messages.' + language + '.js'); }
|
||||
|
||||
define(req, function(Util, Default, Language) {
|
||||
map.en = 'English';
|
||||
var defaultLanguage = 'en';
|
||||
|
||||
Util.extend(messages, Default);
|
||||
if (Language && language !== defaultLanguage) {
|
||||
// Add the translated keys to the returned object
|
||||
Util.extend(messages, Language);
|
||||
}
|
||||
|
||||
messages._languages = map;
|
||||
messages._languageUsed = language;
|
||||
|
||||
messages._checkTranslationState = function (cb) {
|
||||
if (typeof(cb) !== "function") { return; }
|
||||
var allMissing = [];
|
||||
var reqs = [];
|
||||
Object.keys(map).forEach(function (code) {
|
||||
if (code === defaultLanguage) { return; }
|
||||
reqs.push('/customize/translations/messages.' + code + '.js');
|
||||
});
|
||||
require(reqs, function () {
|
||||
var langs = arguments;
|
||||
Object.keys(map).forEach(function (code, i) {
|
||||
if (code === defaultLanguage) { return; }
|
||||
var translation = langs[i];
|
||||
var missing = [];
|
||||
var checkInObject = function (ref, translated, path) {
|
||||
var updated = {};
|
||||
Object.keys(ref).forEach(function (k) {
|
||||
if (/^updated_[0-9]+_/.test(k) && !translated[k]) {
|
||||
var key = k.split('_').slice(2).join('_');
|
||||
// Make sure we don't already have an update for that key. It should not happen
|
||||
// but if it does, keep the latest version
|
||||
if (updated[key]) {
|
||||
var ek = updated[key];
|
||||
if (parseInt(ek.split('_')[1]) > parseInt(k.split('_')[1])) { return; }
|
||||
}
|
||||
updated[key] = k;
|
||||
}
|
||||
});
|
||||
Object.keys(ref).forEach(function (k) {
|
||||
if (/^_/.test(k) || k === 'driveReadme') { return; }
|
||||
var nPath = path.slice();
|
||||
nPath.push(k);
|
||||
if (!translated[k] || updated[k]) {
|
||||
if (updated[k]) {
|
||||
var uPath = path.slice();
|
||||
uPath.unshift('out');
|
||||
missing.push([code, nPath, 2, uPath.join('.') + '.' + updated[k]]);
|
||||
return;
|
||||
}
|
||||
return void missing.push([code, nPath, 1]);
|
||||
}
|
||||
if (typeof ref[k] !== typeof translated[k]) {
|
||||
return void missing.push([code, nPath, 3]);
|
||||
}
|
||||
if (typeof ref[k] === "object" && !Array.isArray(ref[k])) {
|
||||
checkInObject(ref[k], translated[k], nPath);
|
||||
}
|
||||
});
|
||||
Object.keys(translated).forEach(function (k) {
|
||||
if (/^_/.test(k) || k === 'driveReadme') { return; }
|
||||
var nPath = path.slice();
|
||||
nPath.push(k);
|
||||
if (typeof ref[k] === "undefined") {
|
||||
missing.push([code, nPath, 0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
checkInObject(Default, translation, []);
|
||||
// Push the removals at the end
|
||||
missing.sort(function (a, b) {
|
||||
if (a[2] === 0 && b[2] !== 0) { return 1; }
|
||||
if (a[2] !== 0 && b[2] === 0) { return -1; }
|
||||
return 0;
|
||||
});
|
||||
Array.prototype.push.apply(allMissing, missing); // Destructive concat
|
||||
});
|
||||
cb(allMissing);
|
||||
});
|
||||
};
|
||||
|
||||
// Get keys with parameters
|
||||
messages._getKey = function (key, argArray) {
|
||||
if (!messages[key]) { return '?'; }
|
||||
var text = messages[key];
|
||||
if (typeof(text) === 'string') {
|
||||
return text.replace(/\{(\d+)\}/g, function (str, p1) {
|
||||
if (typeof(argArray[p1]) === 'string' || typeof(argArray[p1]) === "number") {
|
||||
return argArray[p1];
|
||||
}
|
||||
console.error("Only strings and numbers can be used in _getKey params!");
|
||||
return '';
|
||||
});
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
};
|
||||
|
||||
messages.driveReadme = '["BODY",{"class":"cke_editable cke_editable_themed cke_contents_ltr cke_show_borders","contenteditable":"true","spellcheck":"false","style":"color: rgb(51, 51, 51);"},' +
|
||||
'[["H1",{},["'+messages.readme_welcome+'"]],["P",{},["'+messages.readme_p1+'"]],["P",{},["'+messages.readme_p2+'"]],["HR",{},[]],["H2",{},["'+messages.readme_cat1+'",["BR",{},[]]]],["UL",{},[["LI",{},["'+messages._getKey("readme_cat1_l1", ['",["STRONG",{},["'+messages.newButton+'"]],"', '",["STRONG",{},["'+messages.type.pad+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat1_l2+'"]],["LI",{},["'+messages._getKey("readme_cat1_l3", ['",["STRONG",{},["'+messages.fm_unsortedName+'"]],"'])+'",["UL",{},[["LI",{},["'+messages._getKey("readme_cat1_l3_l1", ['",["STRONG",{},["'+messages.fm_rootName+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat1_l3_l2+'"]]]]]],["LI",{},["'+messages._getKey("readme_cat1_l4", ['",["STRONG",{},["'+messages.fm_trashName+'"]],"'])+'",["BR",{},[]]]]]],["P",{},[["BR",{},[]]]],["H2",{},["'+messages.readme_cat2+'",["BR",{},[]]]],["UL",{},[["LI",{},["'+messages._getKey("readme_cat2_l1", ['",["STRONG",{},["'+messages.shareButton+'"]],"', '",["STRONG",{},["'+messages.edit+'"]],"', '",["STRONG",{},["'+messages.view+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat2_l2+'"]]]],["P",{},[["BR",{},[]]]],["H2",{},["'+messages.readme_cat3+'"]],["UL",{},[["LI",{},["'+messages.readme_cat3_l1+'"]],["LI",{},["'+messages.readme_cat3_l2+'"]],["LI",{},["'+messages.readme_cat3_l3+'",["BR",{},[]]]]]]],' +
|
||||
'{"metadata":{"defaultTitle":"' + messages.driveReadmeTitle + '","title":"' + messages.driveReadmeTitle + '"}}]';
|
||||
|
||||
return messages;
|
||||
|
||||
});
|
||||
}());
|
146
custom/cryptopad_custom/customize/pages.js
Normal file
|
@ -0,0 +1,146 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/common/common-language.js',
|
||||
'/customize/messages.js',
|
||||
'jquery',
|
||||
], function (h, Language, Msg, $) {
|
||||
var Pages = {};
|
||||
|
||||
Pages.setHTML = function (e, html) {
|
||||
e.innerHTML = html;
|
||||
return e;
|
||||
};
|
||||
|
||||
var languageSelector = function () {
|
||||
var options = [];
|
||||
var languages = Msg._languages;
|
||||
var selected = Msg._languageUsed;
|
||||
var keys = Object.keys(languages).sort();
|
||||
keys.forEach(function (l) {
|
||||
var attr = { value: l };
|
||||
if (selected === l) { attr.selected = 'selected'; }
|
||||
options.push(h('option', attr, languages[l]));
|
||||
});
|
||||
var select = h('select', {}, options);
|
||||
$(select).change(function () {
|
||||
Language.setLanguage($(select).val() || '', null, function () {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
return select;
|
||||
};
|
||||
|
||||
var footerCol = function (title, L, literal) {
|
||||
return h('div.col-6.col-sm-3', [
|
||||
h('ul.list-unstyled', [
|
||||
h('li.footer-title', {
|
||||
'data-localization': title,
|
||||
}, title? Msg[title]: literal )
|
||||
].concat(L.map(function (l) {
|
||||
return h('li', [ l ]);
|
||||
}))
|
||||
)
|
||||
]);
|
||||
};
|
||||
|
||||
var footLink = function (ref, loc, text) {
|
||||
var attrs = {
|
||||
href: ref,
|
||||
};
|
||||
if (!/^\//.test(ref)) {
|
||||
attrs.target = '_blank';
|
||||
attrs.rel = 'noopener noreferrer';
|
||||
}
|
||||
if (loc) {
|
||||
attrs['data-localization'] = loc;
|
||||
text = Msg[loc];
|
||||
}
|
||||
return h('a', attrs, text);
|
||||
};
|
||||
|
||||
Pages.infopageFooter = function () {
|
||||
return h('footer', [
|
||||
h('div.container', [
|
||||
h('div.row', [
|
||||
footerCol(null, [
|
||||
h('div.cp-bio-foot', [
|
||||
h('p', Msg.main_footerText),
|
||||
languageSelector()
|
||||
])
|
||||
], ''),
|
||||
footerCol('footer_applications', [
|
||||
footLink('/drive/', 'main_drive'),
|
||||
footLink('/pad/', 'main_richText'),
|
||||
footLink('/code/', 'main_code'),
|
||||
footLink('/slide/', 'main_slide'),
|
||||
footLink('/poll/', 'main_poll'),
|
||||
footLink('/kanban/', 'main_kanban'),
|
||||
footLink('/whiteboard/', null, Msg.type.whiteboard)
|
||||
]),
|
||||
// footerCol('footer_aboutUs', [
|
||||
// footLink('https://blog.cryptpad.fr', 'blog'),
|
||||
// footLink('https://labs.xwiki.com', null, 'XWiki Labs'),
|
||||
// footLink('http://www.xwiki.com', null, 'XWiki SAS'),
|
||||
// footLink('https://www.open-paas.org', null, 'OpenPaaS')
|
||||
// ]),
|
||||
// footerCol('footer_contact', [
|
||||
// footLink('https://riot.im/app/#/room/#cryptpad:matrix.org', null, 'Chat'),
|
||||
// footLink('https://twitter.com/cryptpad', null, 'Twitter'),
|
||||
// footLink('https://github.com/xwiki-labs/cryptpad', null, 'GitHub'),
|
||||
// footLink('/contact.html', null, 'Email')
|
||||
// ])
|
||||
])
|
||||
]),
|
||||
h('div.cp-version-footer', "CryptPad v2.18.0 (Sloth)")
|
||||
]);
|
||||
};
|
||||
|
||||
Pages.infopageTopbar = function () {
|
||||
var rightLinks;
|
||||
var username = window.localStorage.getItem('User_name');
|
||||
if (username === null) {
|
||||
rightLinks = [
|
||||
h('a.nav-item.nav-link.cp-login-btn', { href: '/login/'}, Msg.login_login),
|
||||
h('a.nav-item.nav-link.cp-register-btn', { href: '/register/'}, Msg.login_register)
|
||||
];
|
||||
} else {
|
||||
rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/' }, [
|
||||
h('i.fa.fa-user-circle'),
|
||||
" ",
|
||||
username
|
||||
]);
|
||||
}
|
||||
|
||||
var button = h('button.navbar-toggler', {
|
||||
'type':'button',
|
||||
/*'data-toggle':'collapse',
|
||||
'data-target':'#menuCollapse',
|
||||
'aria-controls': 'menuCollapse',
|
||||
'aria-expanded':'false',
|
||||
'aria-label':'Toggle navigation'*/
|
||||
}, h('i.fa.fa-bars '));
|
||||
|
||||
$(button).click(function () {
|
||||
if ($('#menuCollapse').is(':visible')) {
|
||||
return void $('#menuCollapse').slideUp();
|
||||
}
|
||||
$('#menuCollapse').slideDown();
|
||||
});
|
||||
|
||||
return h('nav.navbar.navbar-expand-lg',
|
||||
h('a.navbar-brand', { href: '/index.html'}),
|
||||
button,
|
||||
/* h('div.collapse.navbar-collapse.justify-content-end#menuCollapse', [
|
||||
//h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.topbar_whatIsCryptpad), // Moved the FAQ
|
||||
h('a.nav-item.nav-link', { href: '/faq.html'}, Msg.faq_link),
|
||||
h('a.nav-item.nav-link', { href: 'https://blog.cryptpad.fr/'}, Msg.blog),
|
||||
h('a.nav-item.nav-link', { href: '/features.html'}, Msg.features),
|
||||
h('a.nav-item.nav-link', { href: '/privacy.html'}, Msg.privacy),
|
||||
h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact),
|
||||
h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about),
|
||||
].concat(rightLinks))*/
|
||||
);
|
||||
};
|
||||
|
||||
return Pages;
|
||||
});
|
128
custom/cryptopad_custom/customize/pages/about.js
Normal file
|
@ -0,0 +1,128 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (h, Msg, Pages) {
|
||||
return function () {
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp-about-intro', [
|
||||
h('div.container', [
|
||||
h('center', [
|
||||
h('h1', Msg.about),
|
||||
Pages.setHTML(h('p'), Msg.about_intro),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row', [
|
||||
h('div.cp-develop-about.col-12',[
|
||||
h('div.cp-icon-cent'),
|
||||
h('h2.text-center', Msg.about_core)
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
|
||||
h('img.img-fluid', {'src': '/customize/images/CalebJames.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
|
||||
h('h3', "Caleb James Delisle"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioCaleb'), '<p>Caleb is a cryptography developer, Machine Technology graduate of the Franklin County Technical School and lifelong tinkerer.<br/>In 2011, he started the cjdns Open Source project to show that secure networking could be invisible and easily deployed.<br/>After joining XWiki SAS in 2014, he started the CryptPad project with the intent of bringing the same transparent security to collaborative editing.<br/>He\'s always trying to learn from more experienced colleagues and when someone passes through the Research Team office, his favorite words are "Pull up a chair!".</p>'),
|
||||
h('a.cp-soc-media', { href : 'https://twitter.com/cjdelisle'}, [
|
||||
h('i.fa.fa-twitter')
|
||||
]),
|
||||
h('a.cp-soc-media', { href : 'https://github.com/cjdelisle'}, [
|
||||
h('i.fa.fa-github')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center',[
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-2.cp-bio-avatar.cp-bio-avatar-right', [
|
||||
h('img.img-fluid', {'src': '/customize/images/AaronMacSween.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-1.cp-profile-det',[
|
||||
h('h3', "Aaron MacSween"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioAaron'), '<p>Aaron transitioned into distributed systems development from a background in jazz and live stage performance. <br/> He appreciates the elegance of biological systems and functional programming, and focused on both as a student at the University of Toronto, where he studied cognitive and computer sciences.<br/>He moved to Paris in 2015 to work as a research engineer at XWiki SAS, after having dedicated significant time to various cryptography-related software projects.<br/>He spends his spare time experimenting with guitars, photography, science fiction, and spicy food.</p>'),
|
||||
h('a.cp-soc-media', { href : 'https://twitter.com/fc00ansuz'}, [
|
||||
h('i.fa.fa-twitter')
|
||||
]),
|
||||
h('a.cp-soc-media', { href : 'https://github.com/ansuz/'}, [
|
||||
h('i.fa.fa-github')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
|
||||
h('img.img-fluid', {'src': '/customize/images/YannFlory.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
|
||||
h('h3', "Yann Flory"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioYann'), '<p>In 2015, Yann graduated with an engineering degree from Ecole Centrale de Lille majoring in Data Science. In his studies he worked on a project to detect defects in optical fiber using image processing technology.<br/>Upon joining XWiki SAS, Yann developed a Wiki page recommendation system, a common API for accessing data server-side and client-side, and an integrated development environment for development of XWiki applications.<br/>Yann is soft spoken but brutally efficient, he is known to say "It will take 5 minutes".</p>'),
|
||||
h('a.cp-soc-media', { href : 'https://github.com/yflory/'}, [
|
||||
h('i.fa.fa-github')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('div.row', [
|
||||
h('div.cp-develop-about.col-12.cp-contrib',[
|
||||
h('div.cp-icon-cent'),
|
||||
h('h2.text-center', Msg.about_contributors)
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
|
||||
h('img.img-fluid', {'src': '/customize/images/Pierre-new.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
|
||||
h('h3', "Pierre Bondoerffer"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioPierre'), '<p>Resident CSS wizard and emoji extraordinaire, Pierre is passionate about anything related to technology. He loves to hack around computers and put parts together.<br/>He is currently studying at 42, where he learns about algorithms, networking, kernel programming and graphics.<br/>As a part of an internship, he joined XWiki SAS and worked on CryptPad to improve user experience. He also maintains the Spanish translation.</p>'),
|
||||
h('a.cp-soc-media', { href : 'https://twitter.com/pbondoer'}, [
|
||||
h('i.fa.fa-twitter')
|
||||
]),
|
||||
h('a.cp-soc-media', { href : 'https://github.com/pbondoer'}, [
|
||||
h('i.fa.fa-github')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center',[
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-2.cp-bio-avatar.cp-bio-avatar-right', [
|
||||
h('img.img-fluid', {'src': '/customize/images/Catalin.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-1.cp-profile-det',[
|
||||
h('h3', "Catalin Scripcariu"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioCatalin'), '<p> Catalin is a Maths majour and has worked in B2B sales for 12 years. Design was always his passion and 3 years ago he started to dedicate himself to web design and front-end.<br/>At the beginning of 2017 he joined the XWiki, where he worked both on the business and the community side of XWiki, including the research team and CryptPad. </p>'),
|
||||
h('a.cp-soc-media', { href : 'https://twitter.com/catalinscr'}, [
|
||||
h('i.fa.fa-twitter')
|
||||
]),
|
||||
h('a.cp-soc-media', { href : 'https://www.linkedin.com/in/catalinscripcariu/'}, [
|
||||
h('i.fa.fa-linkedin')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center.cp-margin-bot', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
|
||||
h('img.img-fluid', {'src': '/customize/images/LudovicDuboist.jpg'})
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
|
||||
h('h3', "Ludovic Dubost"),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('div#bioLudovic'), '<p>A graduate of PolyTech (X90) and Telecom School in Paris, Ludovic Dubost started his career as a software architect for Netscape Communications Europe. He then became CTO of NetValue, one of the first French start-ups that went public. He left NetValue after the company was purchased by Nielsen/NetRatings and in 2004 launched XWiki, the next generation wiki.<br/>Since the very beginning, Ludovic has been immensely helpful to the CryptPad project. He believed in the idea when there was nothing more than the collaborative pad and his help with sales strategy for the project.</p>'),
|
||||
h('a.cp-soc-media', { href : 'https://twitter.com/ldubost'}, [
|
||||
h('i.fa.fa-twitter')
|
||||
]),
|
||||
h('a.cp-soc-media', { href : 'https://github.com/ldubost'}, [
|
||||
h('i.fa.fa-github')
|
||||
])
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
Pages.infopageFooter()
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
53
custom/cryptopad_custom/customize/pages/contact.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (h, Msg, Pages) {
|
||||
return function () {
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp-contdet', [
|
||||
h('row.col-12.col-sm-12',
|
||||
h('h1.text-center', Msg.contact )
|
||||
)
|
||||
]),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row.cp-iconCont.align-items-center', [
|
||||
h('div.col-12',
|
||||
Pages.setHTML(h('h4.text-center'), Msg.main_about_p26)
|
||||
),
|
||||
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
|
||||
h('a.card', {href : "https://twitter.com/cryptpad"},
|
||||
h('div.card-body',
|
||||
Pages.setHTML(h('p'), Msg.main_about_p22)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
|
||||
h('a.card', {href : "https://github.com/xwiki-labs/cryptpad/issues/"},
|
||||
h('div.card-body',
|
||||
Pages.setHTML(h('p'), Msg.main_about_p23)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
|
||||
h('a.card', {href : "https://riot.im/app/#/room/#cryptpad:matrix.org"},
|
||||
h('div.card-body',
|
||||
Pages.setHTML(h('p'), Msg.main_about_p24)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
|
||||
h('a.card', {href : "mailto:research@xwiki.com"},
|
||||
h('div.card-body',
|
||||
Pages.setHTML(h('p'), Msg.main_about_p25)
|
||||
)
|
||||
)
|
||||
),
|
||||
]),
|
||||
]),
|
||||
Pages.infopageFooter(),
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
61
custom/cryptopad_custom/customize/pages/faq.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function ($, h, Msg, Pages) {
|
||||
return function () {
|
||||
var categories = [];
|
||||
var faq = Msg.faq;
|
||||
Object.keys(faq).forEach(function (c) {
|
||||
var questions = [];
|
||||
Object.keys(faq[c]).forEach(function (q) {
|
||||
var item = faq[c][q];
|
||||
if (typeof item !== "object") { return; }
|
||||
var answer = h('p.cp-faq-questions-a');
|
||||
var hash = c + '-' + q;
|
||||
var question = h('p.cp-faq-questions-q#' + hash);
|
||||
$(question).click(function () {
|
||||
if ($(answer).is(':visible')) {
|
||||
$(question).toggleClass('cp-active-faq');
|
||||
return void $(answer).slideUp();
|
||||
}
|
||||
$(question).toggleClass('cp-active-faq');
|
||||
$(answer).slideDown();
|
||||
var t = $(window).scrollTop();
|
||||
window.location.hash = hash;
|
||||
$(window).scrollTop(t);
|
||||
});
|
||||
questions.push(h('div.cp-faq-questions-items', [
|
||||
Pages.setHTML(question, item.q),
|
||||
Pages.setHTML(answer, item.a)
|
||||
]));
|
||||
});
|
||||
categories.push(h('div.cp-faq-category', [
|
||||
h('h3', faq[c].title),
|
||||
h('div.cp-faq-category-questions', questions)
|
||||
]));
|
||||
});
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
$(categories).find(hash).click();
|
||||
}
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp-faq', [
|
||||
h('div.container',[
|
||||
h('center', h('h1', Msg.faq_title)),
|
||||
]),
|
||||
]),
|
||||
h('div.container.cp-faq-ques-det',[
|
||||
h('div.cp-faq-header.text-center', h('a.nav-item.nav-link', {
|
||||
href: '/what-is-cryptpad.html'
|
||||
}, Pages.setHTML(h('h4'),Msg.faq_whatis))),
|
||||
h('div.cp-faq-container', categories)
|
||||
]),
|
||||
Pages.infopageFooter()
|
||||
]);
|
||||
};
|
||||
|
||||
});
|
||||
|
115
custom/cryptopad_custom/customize/pages/features.js
Normal file
|
@ -0,0 +1,115 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/application_config.js',
|
||||
'/common/outer/local-store.js',
|
||||
'/customize/pages.js'
|
||||
], function ($, h, Msg, AppConfig, LocalStore, Pages) {
|
||||
var origin = encodeURIComponent(window.location.hostname);
|
||||
var accounts = {
|
||||
donateURL: 'https://accounts.cryptpad.fr/#/donate?on=' + origin,
|
||||
upgradeURL: 'https://accounts.cryptpad.fr/#/?on=' + origin,
|
||||
};
|
||||
return function () {
|
||||
Msg.features_f_apps_note = AppConfig.availablePadTypes.map(function (app) {
|
||||
if (AppConfig.registeredOnlyTypes.indexOf(app) !== -1) { return; }
|
||||
return Msg.type[app];
|
||||
}).filter(function (x) { return x; }).join(', ');
|
||||
var premiumButton = h('a', {
|
||||
href: accounts.upgradeURL,
|
||||
target: '_blank',
|
||||
rel: 'noopener noreferrer'
|
||||
}, h('button.cp-features-register-button', Msg.features_f_subscribe));
|
||||
$(premiumButton).click(function (e) {
|
||||
if (LocalStore.isLoggedIn()) { return; }
|
||||
// Not logged in: go to /login with a redirect to this page
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
sessionStorage.redirectTo = '/features.html';
|
||||
window.location.href = '/login/';
|
||||
});
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp_cont_features',[
|
||||
h('div.container',[
|
||||
h('center', h('h1', Msg.features_title)),
|
||||
]),
|
||||
]),
|
||||
h('div.container',[
|
||||
h('div.row.cp-container.cp-features-web.justify-content-sm-center',[
|
||||
h('div.col-12.col-sm-4.cp-anon-user',[
|
||||
h('div.card',[
|
||||
h('div.card-body',[
|
||||
h('h3.text-center',Msg.features_anon)
|
||||
]),
|
||||
h('ul.list-group.list-group-flush',
|
||||
['apps', 'core', 'file0', 'cryptdrive0', 'storage0'].map(function (f) {
|
||||
return h('li.list-group-item', [
|
||||
h('div.cp-check'),
|
||||
h('div.cp-content', [
|
||||
h('div.cp-feature', Msg['features_f_' + f]),
|
||||
h('div.cp-note', Msg['features_f_' + f + '_note'])
|
||||
])
|
||||
]);
|
||||
})
|
||||
),
|
||||
]),
|
||||
]),
|
||||
h('div.col-12.col-sm-4.cp-regis-user',[
|
||||
h('div.card',[
|
||||
h('div.card-body',[
|
||||
h('h3.text-center',Msg.features_registered)
|
||||
]),
|
||||
h('ul.list-group.list-group-flush', [
|
||||
['anon', 'social', 'file1', 'cryptdrive1', 'devices', 'storage1'].map(function (f) {
|
||||
return h('li.list-group-item', [
|
||||
h('div.cp-check'),
|
||||
h('div.cp-content', [
|
||||
h('div.cp-feature', Msg['features_f_' + f]),
|
||||
h('div.cp-note', Msg['features_f_' + f + '_note'])
|
||||
])
|
||||
]);
|
||||
}),
|
||||
]),
|
||||
h('div.card-body',[
|
||||
h('div.cp-features-register#cp-features-register', [
|
||||
h('a', {
|
||||
href: '/register/'
|
||||
}, h('button.cp-features-register-button', Msg.features_f_register))
|
||||
]),
|
||||
h('div.cp-note', Msg.features_f_register_note)
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
h('div.col-12.col-sm-4.cp-anon-user',[
|
||||
h('div.card',[
|
||||
h('div.card-body',[
|
||||
h('h3.text-center',Msg.features_premium)
|
||||
]),
|
||||
h('ul.list-group.list-group-flush', [
|
||||
['reg', 'storage2', 'support', 'supporter'].map(function (f) {
|
||||
return h('li.list-group-item', [
|
||||
h('div.cp-check'),
|
||||
h('div.cp-content', [
|
||||
h('div.cp-feature', Msg['features_f_' + f]),
|
||||
h('div.cp-note', Msg['features_f_' + f + '_note'])
|
||||
])
|
||||
]);
|
||||
}),
|
||||
]),
|
||||
h('div.card-body',[
|
||||
h('div.cp-features-register#cp-features-subscribe', [
|
||||
premiumButton
|
||||
]),
|
||||
LocalStore.isLoggedIn() ? undefined : h('div.cp-note', Msg.features_f_subscribe_note)
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
Pages.infopageFooter()
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
151
custom/cryptopad_custom/customize/pages/index.js
Normal file
|
@ -0,0 +1,151 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/api/config',
|
||||
'/common/hyperscript.js',
|
||||
'/common/common-feedback.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/application_config.js',
|
||||
'/common/outer/local-store.js',
|
||||
'/customize/pages.js'
|
||||
], function ($, Config, h, Feedback, Msg, AppConfig, LocalStore, Pages) {
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
|
||||
var isAvailableType = function (x) {
|
||||
if (!Array.isArray(AppConfig.availablePadTypes)) { return true; }
|
||||
return AppConfig.availablePadTypes.indexOf(x) !== -1;
|
||||
};
|
||||
|
||||
var checkRegisteredType = function (x) {
|
||||
// Return true if we're registered or if the app is not registeredOnly
|
||||
if (LocalStore.isLoggedIn()) { return true; }
|
||||
if (!Array.isArray(AppConfig.registeredOnlyTypes)) { return true; }
|
||||
return AppConfig.registeredOnlyTypes.indexOf(x) === -1;
|
||||
};
|
||||
|
||||
return function () {
|
||||
var showingMore = false;
|
||||
|
||||
var icons = [
|
||||
[ 'pad', Msg.main_richTextPad],
|
||||
[ 'code', Msg.main_codePad],
|
||||
[ 'slide', Msg.main_slidePad],
|
||||
[ 'sheet', Msg.main_sheetPad],
|
||||
[ 'poll', Msg.main_pollPad],
|
||||
[ 'kanban', Msg.main_kanbanPad],
|
||||
[ 'whiteboard', Msg.main_whiteboardPad],
|
||||
[ 'drive', LocalStore.isLoggedIn() ? Msg.main_yourCryptDrive : Msg.main_localPads]
|
||||
].filter(function (x) {
|
||||
return isAvailableType(x[0]) && checkRegisteredType(x[0]);
|
||||
})
|
||||
.map(function (x, i) {
|
||||
var s = 'div.bs-callout.cp-callout-' + x[0];
|
||||
if (i > 8) { s += '.cp-more.cp-hidden'; }
|
||||
var icon = AppConfig.applicationsIcon[x[0]];
|
||||
var font = icon.indexOf('cptools') === 0 ? 'cptools' : 'fa';
|
||||
return h('a', [
|
||||
{ href: '/'+ x[0] +'/' },
|
||||
h(s, [
|
||||
h('i.' + font + '.' + icon),
|
||||
h('div.pad-button-text', [ h('h4', x[1]) ])
|
||||
])
|
||||
]);
|
||||
});
|
||||
|
||||
var more = icons.length < 9? undefined: h('div.bs-callout.cp-callout-more', [
|
||||
h('div.cp-callout-more-lessmsg.cp-hidden', [
|
||||
"see less ",
|
||||
h('i.fa.fa-caret-up')
|
||||
]),
|
||||
h('div.cp-callout-more-moremsg', [
|
||||
"see more ",
|
||||
h('i.fa.fa-caret-down')
|
||||
]),
|
||||
{
|
||||
onclick: function () {
|
||||
if (showingMore) {
|
||||
$('.cp-more, .cp-callout-more-lessmsg').addClass('cp-hidden');
|
||||
$('.cp-callout-more-moremsg').removeClass('cp-hidden');
|
||||
} else {
|
||||
$('.cp-more, .cp-callout-more-lessmsg').removeClass('cp-hidden');
|
||||
$('.cp-callout-more-moremsg').addClass('cp-hidden');
|
||||
}
|
||||
showingMore = !showingMore;
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
var _link = h('a', {
|
||||
href: "https://opencollective.com/cryptpad/contribute",
|
||||
target: '_blank',
|
||||
rel: 'noopener',
|
||||
});
|
||||
|
||||
var crowdFunding = AppConfig.disableCrowdfundingMessages ? undefined : h('button', [
|
||||
Msg.crowdfunding_button
|
||||
]);
|
||||
|
||||
$(crowdFunding).click(function () {
|
||||
_link.click();
|
||||
Feedback.send('HOME_SUPPORT_CRYPTPAD');
|
||||
});
|
||||
|
||||
var blocks = h('div.container',[
|
||||
h('div.row.justify-content-sm-center',[
|
||||
h('div.col-12.col-sm-4.cp-index-block.cp-index-block-host', h('div', [
|
||||
Pages.setHTML(h('span'), Msg.home_host),
|
||||
h('div.cp-img-container', [
|
||||
h('img.agpl', {
|
||||
src: "/customize/images/AGPL.png",
|
||||
title: Msg.home_host_agpl
|
||||
}),
|
||||
h('a.img', {
|
||||
href: 'https://blog.cryptpad.fr/2018/11/13/CryptPad-receives-NGI-Startup-Award/',
|
||||
target: '_blank'
|
||||
}, h('img.ngi', {
|
||||
src: "/customize/images/ngi.png",
|
||||
title: Msg.home_ngi
|
||||
}))
|
||||
])
|
||||
])),
|
||||
h('div.col-12.col-sm-4.cp-index-block.cp-index-block-product', h('div', [
|
||||
Msg.home_product
|
||||
])),
|
||||
h('div.col-12.col-sm-4.cp-index-block.cp-index-block-help', h('div', [
|
||||
Msg.crowdfunding_home1,
|
||||
h('br'),
|
||||
Msg.crowdfunding_home2,
|
||||
h('br'),
|
||||
crowdFunding,
|
||||
_link
|
||||
])),
|
||||
])
|
||||
]);
|
||||
|
||||
return [
|
||||
h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row', [
|
||||
h('div.cp-title.col-12.col-sm-6', [
|
||||
h('img', { src: '/customize/cryptpad-new-logo-colors-logoonly.png?' + urlArgs }),
|
||||
h('h1', 'CryptPad'),
|
||||
h('p', Msg.main_catch_phrase)
|
||||
]),
|
||||
h('div.col-12.col-sm-6', [
|
||||
icons,
|
||||
more
|
||||
])
|
||||
]),
|
||||
//blocks,
|
||||
/*h('div.row', [
|
||||
h('div.cp-crowdfunding', [
|
||||
crowdFunding
|
||||
])
|
||||
])*/
|
||||
]),
|
||||
]),
|
||||
//Pages.infopageFooter(),
|
||||
];
|
||||
};
|
||||
});
|
||||
|
43
custom/cryptopad_custom/customize/pages/login.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/common/common-interface.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (h, UI, Msg, Pages) {
|
||||
return function () {
|
||||
return [h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row.align-items-center', [
|
||||
h('div#data.hidden.col-md-6', Pages.setHTML(h('p.left'), Msg.main_info)),
|
||||
h('div#userForm.form-group.hidden.col-md-6', [
|
||||
h('input.form-control#name', {
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
'name': 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
h('div.checkbox-container', [
|
||||
UI.createCheckbox('import-recent', Msg.register_importRecent),
|
||||
]),
|
||||
h('div.extra', [
|
||||
h('button.login.first.btn', Msg.login_login),
|
||||
h('button#register.first.btn', Msg.login_register)
|
||||
])
|
||||
])
|
||||
]),
|
||||
]),
|
||||
Pages.infopageFooter(),
|
||||
])];
|
||||
};
|
||||
});
|
||||
|
46
custom/cryptopad_custom/customize/pages/privacy.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (h, Msg, Pages) {
|
||||
return function () {
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('.container-fluid.cp-privacy-top', [
|
||||
h('div.container',[
|
||||
h('center', h('h1', Msg.policy_title)),
|
||||
]),
|
||||
]),
|
||||
h('div.container.cp-container.cp-privacy',[
|
||||
h('h3', Msg.policy_whatweknow),
|
||||
h('hr'),
|
||||
Pages.setHTML(h('p'), Msg.policy_whatweknow_p1),
|
||||
|
||||
h('h3', Msg.policy_howweuse),
|
||||
h('hr'),
|
||||
h('p', Msg.policy_howweuse_p1),
|
||||
h('p', Msg.policy_howweuse_p2),
|
||||
|
||||
h('h3', Msg.policy_whatwetell),
|
||||
h('hr'),
|
||||
h('p', Msg.policy_whatwetell_p1),
|
||||
|
||||
h('h3', Msg.policy_links),
|
||||
h('hr'),
|
||||
h('p', Msg.policy_links_p1),
|
||||
|
||||
h('h3', Msg.policy_ads),
|
||||
h('hr'),
|
||||
h('p', Msg.policy_ads_p1),
|
||||
|
||||
h('h3', Msg.policy_choices),
|
||||
h('hr'),
|
||||
h('p', Msg.policy_choices_open),
|
||||
Pages.setHTML(h('p'), Msg.policy_choices_vpn),
|
||||
]),
|
||||
Pages.infopageFooter()
|
||||
]);
|
||||
};
|
||||
|
||||
});
|
||||
|
69
custom/cryptopad_custom/customize/pages/register.js
Normal file
|
@ -0,0 +1,69 @@
|
|||
define([
|
||||
'jquery',
|
||||
'/common/hyperscript.js',
|
||||
'/common/common-interface.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function ($, h, UI, Msg, Pages) {
|
||||
return function () {
|
||||
return [h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp-register-wel',[
|
||||
h('div.container',[
|
||||
h('div.row',[
|
||||
h('div.col-12',[
|
||||
h('h1.text-center', Msg.register_header)
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row.cp-register-det', [
|
||||
h('div#data.hidden.col-md-6', [
|
||||
Pages.setHTML(h('p.register-explanation'), Msg.register_explanation)
|
||||
]),
|
||||
h('div#userForm.form-group.hidden.col-md-6', [
|
||||
h('a', {
|
||||
href: '/features.html'
|
||||
}, Msg.register_whyRegister),
|
||||
h('input.form-control#username', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
h('input.form-control#password-confirm', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_confirm,
|
||||
}),
|
||||
h('div.checkbox-container', [
|
||||
UI.createCheckbox('import-recent', Msg.register_importRecent, true)
|
||||
]),
|
||||
h('div.checkbox-container', [
|
||||
$(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0]
|
||||
]),
|
||||
h('button#register.btn.cp-login-register', Msg.login_register)
|
||||
])
|
||||
]),
|
||||
h('div.row.cp-register-test',[
|
||||
h('hr'),
|
||||
h('div.col-12', [
|
||||
Pages.setHTML(h('p.test-details'), " \"Tools like Etherpad and Google Docs [...] all share a weakness, which is that whomever owns the document server can see everything you're typing. Cryptpad is a free/open project that uses some of the ideas behind blockchain to implement a \"zero-knowledge\" version of a collaborative document editor, ensuring that only the people working on a document can see it.\" "),
|
||||
h('a.cp-test-source.pull-right', { href : 'http://boingboing.net/2016/09/26/cryptpad-a-freeopen-end-to.html'}, "Cory Doctorow")
|
||||
])
|
||||
])
|
||||
]),
|
||||
|
||||
Pages.infopageFooter(),
|
||||
])];
|
||||
};
|
||||
|
||||
});
|
||||
|
21
custom/cryptopad_custom/customize/pages/terms.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
define([
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (h, Msg, Pages) {
|
||||
return function () {
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container.cp-container', [
|
||||
h('center', h('h1', Msg.tos_title)),
|
||||
h('p', Msg.tos_legal),
|
||||
h('p', Msg.tos_availability),
|
||||
h('p', Msg.tos_e2ee),
|
||||
h('p', Msg.tos_logs),
|
||||
h('p', Msg.tos_3rdparties),
|
||||
]),
|
||||
Pages.infopageFooter()
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
64
custom/cryptopad_custom/customize/pages/what-is-cryptpad.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
define([
|
||||
'/api/config',
|
||||
'/common/hyperscript.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js'
|
||||
], function (Config, h, Msg, Pages) {
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
return function () {
|
||||
return h('div#cp-main', [
|
||||
Pages.infopageTopbar(),
|
||||
h('div.container-fluid.cp-what-is',[
|
||||
h('div.container',[
|
||||
h('div.row',[
|
||||
h('div.col-12.text-center', h('h1', Msg.whatis_title)),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
h('div.container.cp-container', [
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6', [
|
||||
Pages.setHTML(h('h2'), Msg.whatis_collaboration),
|
||||
Pages.setHTML(h('p'), Msg.whatis_collaboration_p1),
|
||||
Pages.setHTML(h('p'), Msg.whatis_collaboration_p2),
|
||||
Pages.setHTML(h('p'), Msg.whatis_collaboration_p3),
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6', [
|
||||
h('img', { src: '/customize/images/pad_screenshot.png?' + urlArgs }),
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-2', [
|
||||
Pages.setHTML(h('h2'), Msg.whatis_zeroknowledge),
|
||||
Pages.setHTML(h('p'), Msg.whatis_zeroknowledge_p1),
|
||||
Pages.setHTML(h('p'), Msg.whatis_zeroknowledge_p2),
|
||||
Pages.setHTML(h('p'), Msg.whatis_zeroknowledge_p3),
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-1', [
|
||||
h('img#zeroknowledge', { src: '/customize/images/zeroknowledge_small.png?' + urlArgs }),
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6', [
|
||||
Pages.setHTML(h('h2'), Msg.whatis_drive),
|
||||
Pages.setHTML(h('p'), Msg.whatis_drive_p1),
|
||||
Pages.setHTML(h('p'), Msg.whatis_drive_p2),
|
||||
Pages.setHTML(h('p'), Msg.whatis_drive_p3),
|
||||
]),
|
||||
h('div.col-12.col-sm-12.col-md-12.col-lg-6', [
|
||||
h('img', { src: '/customize/images/drive_screenshot.png?' + urlArgs }),
|
||||
]),
|
||||
]),
|
||||
h('div.row.align-items-center', [
|
||||
h('div.col-12', [
|
||||
Pages.setHTML(h('h2.text-center'), Msg.whatis_business),
|
||||
Pages.setHTML(h('p'), Msg.whatis_business_p1),
|
||||
Pages.setHTML(h('p'), Msg.whatis_business_p2),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
Pages.infopageFooter(),
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
16
custom/cryptopad_custom/customize/privacy.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<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"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<noscript>
|
||||
<p><strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.</p>
|
||||
<p><strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.</p>
|
||||
</noscript>
|
||||
</html>
|
25
custom/cryptopad_custom/customize/readme.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Customizing CryptPad
|
||||
|
||||
In order allow a variety of features to be changed and to allow site-specific changes
|
||||
to CryptPad apps while still keeping the git repository pristine, this directory exists
|
||||
to allow a set of hooks to be run.
|
||||
|
||||
The server is configured to load files from the `/customize/` path preferentially from
|
||||
`cryptpad/customize/`, and to fall back to `cryptpad/customize.dist/` if they are not found
|
||||
|
||||
If you wish to customize cryptpad, please **copy**
|
||||
`/customize.dist/` to `/customize` and then edit it there, this way you will still be able
|
||||
to pull from (and make pull requests to (!) the git repository.
|
||||
|
||||
## Files you may be interested in
|
||||
|
||||
* index.html is the main page
|
||||
* main.js contains javascript for the home page
|
||||
* application_config.js allows you to modify settings used by the various applications
|
||||
* messages.js contains functions for applying translations to various pages
|
||||
* look inside `/translations/` for the rest of the files which contain translated strings
|
||||
* `/share/` implements an iframe RPC which allows multiple domains to access the same localStorage
|
||||
* `/src/` contains source files for html and css (in the form of html templates and .less stylesheets)
|
||||
|
||||
All other content which is placed in this directory will be referencable at the `/customize/`
|
||||
URL location.
|