Merge branch 'master' into master
@ -1,15 +1,10 @@
|
||||
node_modules/
|
||||
www/bower_components/
|
||||
www/code/codemirror*
|
||||
www/common/chainpad.js
|
||||
storage/kad.js
|
||||
www/common/otaml.js
|
||||
www/common/pdfjs/
|
||||
|
||||
server.js
|
||||
NetFluxWebsocketSrv.js
|
||||
NetFluxWebsocketServer.js
|
||||
WebRTCSrv.js
|
||||
www/common/media-tag.js
|
||||
www/scratch
|
||||
|
||||
www/common/toolbar.js
|
||||
www/common/hyperscript.js
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 14 KiB 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 |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,521 @@
|
||||
define([
|
||||
'/api/config',
|
||||
'/common/hyperscript.js',
|
||||
'/common/cryptpad-common.js',
|
||||
], function (Config, h, Cryptpad) {
|
||||
var Pages = {};
|
||||
var Msg = Cryptpad.Messages;
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
|
||||
var setHTML = function (e, html) {
|
||||
e.innerHTML = html;
|
||||
return e;
|
||||
};
|
||||
|
||||
var indexContent = function () {
|
||||
return [
|
||||
h('div.page.category.first#knowmore', [
|
||||
h('center', [
|
||||
h('h1', Msg.main_howitworks)
|
||||
])
|
||||
]),
|
||||
h('div.page', [
|
||||
h('div.info-container', [
|
||||
h('div.left.image', [
|
||||
h('img', {
|
||||
src: '/customize/images/zeroknowledge_small.png?' + urlArgs ,
|
||||
alt: 'Zero Knowledge'
|
||||
})
|
||||
]),
|
||||
h('div.right', [
|
||||
h('h2', Msg.main_zeroKnowledge),
|
||||
setHTML(h('p'), Msg.main_zeroKnowledge_p)
|
||||
])
|
||||
])
|
||||
]),
|
||||
h('div.page.even', [
|
||||
h('div.info-container', [
|
||||
h('div.left', [
|
||||
h('h2', Msg.main_writeItDown),
|
||||
h('p', Msg.main_writeItDown_p)
|
||||
]),
|
||||
h('div.right.image', [
|
||||
h('img', {
|
||||
alt: "User account",
|
||||
src: '/customize/images/realtime_small.png?' + urlArgs,
|
||||
})
|
||||
])
|
||||
])
|
||||
]),
|
||||
h('div.page', [
|
||||
h('div.info-container', [
|
||||
h('div.left.image', [
|
||||
h('img', {
|
||||
src: '/customize/images/key_small.png?' + urlArgs,
|
||||
alt: 'User account'
|
||||
})
|
||||
]),
|
||||
h('div.right', [
|
||||
h('h2', Msg.main_share),
|
||||
h('p', Msg.main_share_p)
|
||||
])
|
||||
])
|
||||
]),
|
||||
h('div.page.even', [
|
||||
h('div.info-container', [
|
||||
h('div.left', [
|
||||
h('h2', Msg.main_organize),
|
||||
h('p', Msg.main_organize_p)
|
||||
]),
|
||||
h('div.right.image', [
|
||||
h('img', {
|
||||
src: '/customize/images/organize.png?' + urlArgs,
|
||||
alt: 'User account'
|
||||
})
|
||||
])
|
||||
])
|
||||
])
|
||||
];
|
||||
};
|
||||
|
||||
Pages['/about.html'] = function () {
|
||||
return h('div#main_other', [
|
||||
h('center', [
|
||||
h('h1', Msg.about)
|
||||
]),
|
||||
setHTML(h('p'), Msg.main_p2),
|
||||
h('h2', Msg.main_howitworks),
|
||||
setHTML(h('p'), Msg.main_howitworks_p1)
|
||||
].concat(indexContent()));
|
||||
};
|
||||
|
||||
Pages['/privacy.html'] = function () {
|
||||
return h('div#main_other', [
|
||||
h('center', h('h1', Msg.policy_title)),
|
||||
h('h2', Msg.policy_whatweknow),
|
||||
h('p', Msg.policywhatweknow_p1),
|
||||
|
||||
h('h2', Msg.policy_howweuse),
|
||||
h('p', Msg.policy_howweuse_p1),
|
||||
h('p', Msg.policy_howweuse_p2),
|
||||
|
||||
h('h2', Msg.policy_whatwetell),
|
||||
h('p', Msg.policy_whatwetell_p1),
|
||||
|
||||
h('h2', Msg.policy_links),
|
||||
h('p', Msg.policy_links_p1),
|
||||
|
||||
h('h2', Msg.policy_ads),
|
||||
h('p', Msg.policy_ads_p1),
|
||||
|
||||
h('h2', Msg.policy_choices),
|
||||
h('p', Msg.policy_choices_open),
|
||||
setHTML(h('p'), Msg.policy_choices_vpn),
|
||||
|
||||
h('br')
|
||||
]);
|
||||
};
|
||||
|
||||
Pages['/terms.html'] = function () {
|
||||
return h('div#main_other', [
|
||||
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['/contact.html'] = function () {
|
||||
return h('div#main_other', [
|
||||
h('center', h('h1', Msg.contact)),
|
||||
setHTML(h('p'), Msg.main_about_p2)
|
||||
]);
|
||||
};
|
||||
|
||||
var userForm = function () {
|
||||
return h('div#userForm.form-group.hidden', [
|
||||
h('input#name.form-control', {
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
placeholder: Msg.login_username
|
||||
}),
|
||||
h('input#password.form-control', {
|
||||
name: 'password',
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password
|
||||
}),
|
||||
h('div', {
|
||||
style: { display: 'none' }
|
||||
}, [
|
||||
h('span.remember.form-check', [
|
||||
h('label.form-check-label', {
|
||||
'for': 'rememberme',
|
||||
placeholder: Msg.login_remember,
|
||||
}, [
|
||||
h('input#rememberme.form-check-input', {
|
||||
type: 'checkbox',
|
||||
checked: true
|
||||
})
|
||||
])
|
||||
])
|
||||
]),
|
||||
h('button.btn.btn-secondary.login.half.first', Msg.login_login),
|
||||
h('button.btn.btn-success.register.half', Msg.login_register),
|
||||
h('p.separator', Msg.login_orNoLogin),
|
||||
h('p#buttons.buttons'),
|
||||
h('p.driveLink', [
|
||||
h('a.gotodrive', {
|
||||
href: '/drive/'
|
||||
}, Msg.login_nologin)
|
||||
])
|
||||
]);
|
||||
};
|
||||
|
||||
|
||||
var appButton = function (alt, h2, img, p, url, btn, id) {
|
||||
return h('div.app', [
|
||||
h('center', [
|
||||
h('h2', h2),
|
||||
h('img', {
|
||||
alt: 'Rich Text application',
|
||||
src: img,
|
||||
})
|
||||
]),
|
||||
setHTML(h('p'), p),
|
||||
h('p.buttons', [
|
||||
h('a#' + id, {
|
||||
href: url,
|
||||
}, [
|
||||
h('button.btn.btn-secondary', btn),
|
||||
])
|
||||
])
|
||||
]);
|
||||
};
|
||||
|
||||
var tryIt = function () {
|
||||
return [
|
||||
h('div.class.category#tryit', [
|
||||
h('center', [
|
||||
h('h1', Msg.tryIt)
|
||||
])
|
||||
]),
|
||||
h('div.page', [
|
||||
h('div.app-container', [
|
||||
h('div.app-row', [
|
||||
appButton("Rich Text application",
|
||||
Msg.main_richText,
|
||||
'/customize/images/pad.png?' + urlArgs,
|
||||
Msg.main_richText_p,
|
||||
'/pad/',
|
||||
Msg.button_newpad,
|
||||
'create-pad'),
|
||||
appButton('Code application',
|
||||
Msg.main_code,
|
||||
'/customize/images/code.png?' + urlArgs,
|
||||
Msg.main_code_p,
|
||||
'/code/',
|
||||
Msg.button_newcode,
|
||||
'create-code'),
|
||||
appButton('Slide application',
|
||||
Msg.main_slide,
|
||||
'/customize/images/slide.png?' + urlArgs,
|
||||
Msg.main_slide_p,
|
||||
'/slide/',
|
||||
Msg.button_newslide,
|
||||
'create-slide'),
|
||||
appButton('Poll application',
|
||||
Msg.main_poll,
|
||||
'/customize/images/poll.png?' + urlArgs,
|
||||
Msg.main_poll_p,
|
||||
'/poll/',
|
||||
Msg.button_newpoll,
|
||||
'create-poll')
|
||||
])
|
||||
])
|
||||
])
|
||||
];
|
||||
};
|
||||
|
||||
Pages['/'] = Pages['/index.html'] = function () {
|
||||
return [
|
||||
h('div#main', [
|
||||
h('div.mainOverlay'),
|
||||
h('div#align-container', [
|
||||
h('div#main-container', [
|
||||
h('div#data.hidden', [
|
||||
setHTML(h('p.left'), Msg.main_info),
|
||||
]),
|
||||
userForm(),
|
||||
h('div#loggedIn.hidden', [
|
||||
h('p#loggedInHello'),
|
||||
h('p', [
|
||||
h('button.btn.btn-primary.gotodrive', Msg.login_accessDrive),
|
||||
]),
|
||||
h('p', [
|
||||
h('button#loggedInLogout.btn.btn-secondary', Msg.logoutButton)
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
])
|
||||
]
|
||||
.concat(tryIt());
|
||||
};
|
||||
|
||||
var loadingScreen = function () {
|
||||
return h('div#loading',
|
||||
h('div.loadingContainer', [
|
||||
h('img.cryptofist', {
|
||||
src: '/customize/cryptofist_small.png?' + urlArgs
|
||||
}),
|
||||
h('div.spinnerContainer',
|
||||
h('span.fa.fa-spinner.fa-pulse.fa-4x.fa-fw')),
|
||||
h('p', Msg.loading)
|
||||
])
|
||||
);
|
||||
};
|
||||
loadingScreen = loadingScreen; // TODO use this
|
||||
|
||||
Pages['/user/'] = Pages['/user/index.html'] = function () {
|
||||
return h('div#container');
|
||||
};
|
||||
|
||||
Pages['/register/'] = Pages['/register/index.html'] = function () {
|
||||
return [h('div#main', [
|
||||
h('div.mainOverlay'),
|
||||
h('div#align-container', [
|
||||
h('div#data.hidden', [
|
||||
h('h1', Msg.register_header),
|
||||
h('br'),
|
||||
setHTML(h('p.left.register-explanation'), Msg.register_explanation)
|
||||
]),
|
||||
h('div#userForm.form-group.hidden', [
|
||||
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('input#import-recent', {
|
||||
type: 'checkbox',
|
||||
checked: true
|
||||
}),
|
||||
h('label', {
|
||||
'for': 'import-recent',
|
||||
}, Msg.register_importRecent),
|
||||
h('br'),
|
||||
h('input#accept-terms', {
|
||||
type: 'checkbox'
|
||||
}),
|
||||
setHTML(h('label', {
|
||||
'for': 'accept-terms',
|
||||
}), Msg.register_acceptTerms),
|
||||
h('br'),
|
||||
h('button#register.btn.btn-primary', Msg.login_register)
|
||||
])
|
||||
])
|
||||
])];
|
||||
};
|
||||
|
||||
Pages['/login/'] = Pages['/login/index.html'] = function () {
|
||||
return [h('div#main', [
|
||||
h('div.mainOverlay'),
|
||||
h('div#align-container',
|
||||
h('div#main-container', [
|
||||
h('div#data.hidden', setHTML(h('p.left'), Msg.main_info)),
|
||||
h('div#userForm.form-group.hidden', [
|
||||
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('button.btn.btn-primary.login.first', Msg.login_login),
|
||||
h('div.extra', [
|
||||
h('p', Msg.login_notRegistered),
|
||||
h('button#register.btn.btn-success.register', Msg.login_register)
|
||||
])
|
||||
])
|
||||
])
|
||||
)
|
||||
])];
|
||||
};
|
||||
|
||||
var appToolbar = function () {
|
||||
return h('div#toolbar.toolbar-container');
|
||||
};
|
||||
|
||||
Pages['/whiteboard/'] = Pages['/whiteboard/index.html'] = function () {
|
||||
return [
|
||||
appToolbar(),
|
||||
h('div#canvas-area', h('canvas#canvas', {
|
||||
width: 600,
|
||||
height: 600
|
||||
})),
|
||||
h('div#controls', {
|
||||
style: {
|
||||
display: 'block',
|
||||
}
|
||||
}, [
|
||||
h('button#clear', Msg.canvas_clear), ' ',
|
||||
h('button#toggleDraw', Msg.canvas_disable),
|
||||
h('button#delete', {
|
||||
style: {
|
||||
display: 'none',
|
||||
}
|
||||
}),
|
||||
h('input#width', {
|
||||
type: 'range',
|
||||
value: "5",
|
||||
min: "1",
|
||||
max: "100"
|
||||
}),
|
||||
h('label', {
|
||||
'for': 'width'
|
||||
}, Msg.canvas_width),
|
||||
h('input#opacity', {
|
||||
type: 'range',
|
||||
value: "1",
|
||||
min: "0.1",
|
||||
max: "1",
|
||||
step: "0.1"
|
||||
}),
|
||||
h('label', {
|
||||
'for': 'width',
|
||||
}),
|
||||
h('span.selected')
|
||||
]),
|
||||
setHTML(h('div#colors'), ' '),
|
||||
loadingScreen(),
|
||||
h('div#cursors', {
|
||||
style: {
|
||||
display: 'none',
|
||||
background: 'white',
|
||||
'text-align': 'center',
|
||||
}
|
||||
}),
|
||||
h('div#pickers'),
|
||||
];
|
||||
};
|
||||
|
||||
Pages['/poll/'] = Pages['/poll/index.html'] = function () {
|
||||
return [
|
||||
appToolbar(),
|
||||
h('div#content', [
|
||||
h('div#poll', [
|
||||
h('div#howItWorks', [
|
||||
h('h1', 'CryptPoll'),
|
||||
setHTML(h('h2'), Msg.poll_subtitle),
|
||||
h('p', Msg.poll_p_save),
|
||||
h('p', Msg.poll_p_encryption)
|
||||
]),
|
||||
h('div.upper', [
|
||||
h('button#publish', {
|
||||
style: { display: 'none' }
|
||||
}, Msg.poll_publish_button),
|
||||
h('button#admin', {
|
||||
style: { display: 'none' },
|
||||
title: Msg.poll_admin_button
|
||||
}, Msg.poll_admin_button),
|
||||
h('button#help', {
|
||||
title: Msg.poll_show_help_button,
|
||||
style: { display: 'none' }
|
||||
}, Msg.poll_show_help_button)
|
||||
]),
|
||||
h('div.realtime', [
|
||||
h('br'),
|
||||
h('center', [
|
||||
h('textarea#description', {
|
||||
rows: "5",
|
||||
cols: "50",
|
||||
disabled: true
|
||||
}),
|
||||
h('br')
|
||||
]),
|
||||
h('div#tableContainer', [
|
||||
h('div#tableScroll'),
|
||||
h('button#create-user', {
|
||||
title: Msg.poll_create_user
|
||||
}, h('span.fa.fa-plus')),
|
||||
h('button#create-option', {
|
||||
title: Msg.poll_create_option
|
||||
}, h('span.fa.fa-plus')),
|
||||
h('button#commit', {
|
||||
title: Msg.poll_commit
|
||||
}, h('span.fa.fa-check'))
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
loadingScreen()
|
||||
];
|
||||
};
|
||||
|
||||
Pages['/drive/'] = Pages['/drive/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/file/'] = Pages['/file/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/contacts/'] = Pages['/contacts/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/pad/'] = Pages['/pad/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/code/'] = Pages['/code/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/slide/'] = Pages['/slide/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/invite/'] = Pages['/invite/index.html'] = function () {
|
||||
return loadingScreen();
|
||||
};
|
||||
|
||||
Pages['/settings/'] = Pages['/settings/index.html'] = function () {
|
||||
return [
|
||||
h('div#toolbar'),
|
||||
h('div#container'),
|
||||
loadingScreen()
|
||||
];
|
||||
};
|
||||
|
||||
Pages['/profile/'] = Pages['/profile/index.html'] = function () {
|
||||
return [
|
||||
h('div#toolbar'),
|
||||
h('div#container'),
|
||||
loadingScreen()
|
||||
];
|
||||
};
|
||||
|
||||
return Pages;
|
||||
});
|
@ -1,85 +0,0 @@
|
||||
var Fs = require("fs");
|
||||
|
||||
// read a file
|
||||
var read = function (path) {
|
||||
return Fs.readFileSync(path, 'utf-8');
|
||||
};
|
||||
|
||||
// write a file
|
||||
var write = function (path, src) {
|
||||
return Fs.writeFileSync(path, src);
|
||||
};
|
||||
|
||||
// basic templating
|
||||
var swap = function (src, dict) {
|
||||
return src.replace(/\{\{(.*?)\}\}/g, function (a, b) {
|
||||
return dict[b] || b;
|
||||
});
|
||||
};
|
||||
|
||||
// read the template file
|
||||
var template = read('./template.html');
|
||||
|
||||
// read page fragments
|
||||
var fragments = {};
|
||||
[ 'index',
|
||||
'fork',
|
||||
'topbar',
|
||||
'terms',
|
||||
'privacy',
|
||||
'about',
|
||||
'contact',
|
||||
'logo',
|
||||
'noscript',
|
||||
'footer',
|
||||
'empty',
|
||||
'script',
|
||||
'appscript'
|
||||
].forEach(function (name) {
|
||||
fragments[name] = read('./fragments/' + name + '.html');
|
||||
});
|
||||
|
||||
// build static pages
|
||||
['index', 'privacy', 'terms', 'about', 'contact'].forEach(function (page) {
|
||||
var source = swap(template, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
main: swap(fragments[page] || fragments.empty, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
}),
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
script: fragments.script
|
||||
});
|
||||
write('../' + page + '.html', source);
|
||||
});
|
||||
|
||||
// build static pages
|
||||
[
|
||||
'../www/settings/index',
|
||||
'../www/user/index'
|
||||
].forEach(function (page) {
|
||||
var source = swap(template, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
main: swap(fragments[page] || fragments.empty, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
}),
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
script: fragments.appscript
|
||||
});
|
||||
write('../' + page + '.html', source);
|
||||
});
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
<div id="main_other">
|
||||
<center>
|
||||
<h1 data-localization="about">About</h1>
|
||||
</center>
|
||||
|
||||
<p data-localization="main_p2"><!-- CkEditor, CodeMirror, Chainpad --></p>
|
||||
|
||||
<h2 id="howitworks" data-localization="main_howitworks"></h2>
|
||||
<p data-localization="main_howitworks_p1"><!-- Operational transform, Nakamoto blockchain, server kept unaware of the content--></p>
|
||||
</div>
|
||||
|
@ -1,2 +0,0 @@
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
@ -1,8 +0,0 @@
|
||||
<div id="main_other">
|
||||
<center>
|
||||
<h1 data-localization="contact">Contact</h1>
|
||||
</center>
|
||||
|
||||
<p data-localization="main_about_p2"><!-- Contact us--></p>
|
||||
</div>
|
||||
|
@ -1 +0,0 @@
|
||||
<div id="container"></div>
|
@ -1,43 +0,0 @@
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ul class="list-unstyled">
|
||||
<li class="title">CryptPad</li>
|
||||
<li><a href="/about.html" data-localization="about"></a></li>
|
||||
<li><a href="/terms.html" data-localization="terms"></a></li>
|
||||
<li><a href="/privacy.html" data-localization="privacy"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col">
|
||||
<ul class="list-unstyled">
|
||||
<li class="title" data-localization="footer_applications"><li>
|
||||
<li><a href="/pad/" data-localization="main_richText"></a></li>
|
||||
<li><a href="/code/" data-localization="main_code"></a></li>
|
||||
<li><a href="/slide/" data-localization="main_slide"></a></li>
|
||||
<li><a href="/poll/" data-localization="main_poll"></a></li>
|
||||
<li><a href="/drive/" data-localization="main_drive"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col">
|
||||
<ul class="list-unstyled">
|
||||
<li class="title" data-localization="footer_aboutUs"><li>
|
||||
<li><a href="https://blog.cryptpad.fr" target="_blank" data-localization="blog" rel="noopener noreferrer">Blog</a></li>
|
||||
<li><a href="https://labs.xwiki.com" target="_blank" rel="noopener noreferrer">XWiki Labs</a></li>
|
||||
<li><a href="http://www.xwiki.com" target="_blank" rel="noopener noreferrer">XWiki SAS</a></li>
|
||||
<li><a href="https://www.open-paas.org/" target="_blank" rel="noopener noreferrer">OpenPaaS</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col">
|
||||
<ul class="list-unstyled">
|
||||
<li class="title" data-localization="footer_contact"><li>
|
||||
<li><a href="https://riot.im/app/#/room/#cryptpad:matrix.org" target="_blank" rel="noopener noreferrer">Chat</a></li>
|
||||
<li><a href="https://twitter.com/cryptpad" target="_blank" rel="noopener noreferrer">Twitter</a></li>
|
||||
<li><a href="https://github.com/xwiki-labs/cryptpad" target="_blank" rel="noopener noreferrer">GitHub</a></li>
|
||||
<li><a href="/contact.html">Email</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="version-footer">CryptPad v1.9.0 (Jackelope)</div>
|
||||
</footer>
|
@ -1,3 +0,0 @@
|
||||
<a data-localization-title="github_ribbon" href="https://github.com/xwiki-labs/cryptpad" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="position: absolute; top: 50px; border: 0; left: 0; transform: scale(-1, 1);z-index:2;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
|
||||
<!-- Thanks! http://tholman.com/github-corners/ -->
|
||||
|
@ -1,127 +0,0 @@
|
||||
{{fork}}
|
||||
|
||||
<div id="main">
|
||||
<div class="mainOverlay"></div>
|
||||
<div id="align-container">
|
||||
<div id="main-container">
|
||||
<div id="data" class="hidden">
|
||||
<p class="left" data-localization="main_info"><!-- Collaborate in Confidence. --></p>
|
||||
</div>
|
||||
|
||||
<div id="userForm" class="form-group hidden">
|
||||
<input type="text" id="name" name="name" class="form-control" data-localization-placeholder="login_username">
|
||||
<input type="password" id="password" name="password" class="form-control" data-localization-placeholder="login_password">
|
||||
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
||||
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-success register half" data-localization="login_register"></button>
|
||||
<p class="separator" data-localization="login_orNoLogin"></p>
|
||||
<p id="buttons" class="buttons"></p>
|
||||
<p class="driveLink"><a class="gotodrive" href="/drive/" data-localization="login_nologin"></a></p>
|
||||
</div>
|
||||
<div id="loggedIn" class="hidden">
|
||||
<p id="loggedInHello"></p>
|
||||
<p><button class="btn btn-primary gotodrive" data-localization="login_accessDrive"></button></p>
|
||||
<p><button id="loggedInLogOut" class="btn btn-secondary" data-localization="logoutButton"></button></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page category first" id="knowmore">
|
||||
<center>
|
||||
<h1 data-localization="main_howitworks"></h1>
|
||||
</center>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="info-container">
|
||||
<div class="left image">
|
||||
<img src="customize/images/zeroknowledge_small.png" alt="Zero Knowledge" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<h2 data-localization="main_zeroKnowledge"></h2>
|
||||
<p data-localization="main_zeroKnowledge_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page even">
|
||||
<div class="info-container">
|
||||
<div class="left">
|
||||
<h2 data-localization="main_writeItDown"></h2>
|
||||
<p data-localization="main_writeItDown_p"></p>
|
||||
</div>
|
||||
<div class="right image">
|
||||
<img src="customize/images/realtime_small.png" alt="User account" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="info-container">
|
||||
<div class="left image">
|
||||
<img src="customize/images/key_small.png" alt="User account" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<h2 data-localization="main_share"></h2>
|
||||
<p data-localization="main_share_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page even">
|
||||
<div class="info-container">
|
||||
<div class="left">
|
||||
<h2 data-localization="main_organize"></h2>
|
||||
<p data-localization="main_organize_p"></p>
|
||||
</div>
|
||||
<div class="right image">
|
||||
<img src="customize/images/organize.png" alt="User account" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page category" id="tryit">
|
||||
<center>
|
||||
<h1 data-localization="tryIt">Try it out!</h1>
|
||||
</center>
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="app-container">
|
||||
<div class="app-row">
|
||||
<div class="app">
|
||||
<center>
|
||||
<h2 data-localization="main_richText"></h2>
|
||||
<img src="customize/images/pad.png" alt="Rich Text application" />
|
||||
</center>
|
||||
<p data-localization="main_richText_p"></p>
|
||||
<p class="buttons">
|
||||
<a id="create-pad" href="/pad/"><button class="btn btn-secondary" data-localization="button_newpad"></button></a>
|
||||
</p>
|
||||
</div><div class="app">
|
||||
<center>
|
||||
<h2 data-localization="main_code"></h2>
|
||||
<img src="customize/images/code.png" alt="Code application" />
|
||||
</center>
|
||||
<p data-localization="main_code_p"></p>
|
||||
<p class="buttons">
|
||||
<a id="create-code" href="/code/"><button class="btn btn-secondary" data-localization="button_newcode"></button></a>
|
||||
</p>
|
||||
</div><!--
|
||||
--></div><!--
|
||||
--><div class="app-row"><!--
|
||||
--><div class="app">
|
||||
<center>
|
||||
<h2 data-localization="main_slide"></h2>
|
||||
<img src="customize/images/slide.png" alt="Slide applcation" />
|
||||
</center>
|
||||
<p data-localization="main_slide_p"></p>
|
||||
<p class="buttons">
|
||||
<a id="create-slide" href="/slide/"><button class="btn btn-secondary" data-localization="button_newslide"></button></a>
|
||||
</p>
|
||||
</div><div class="app">
|
||||
<center>
|
||||
<h2 data-localization="main_poll"></h2>
|
||||
<img src="customize/images/poll.png" alt="Poll application" />
|
||||
</center>
|
||||
<p data-localization="main_poll_p"></p>
|
||||
<p class="buttons">
|
||||
<a id="create-poll" href="/poll/"><button class="btn btn-secondary" data-localization="button_newpoll"></button></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,3 +0,0 @@
|
||||
<center>
|
||||
<a href="/"><img class="imgcenter cryptofist" src="/customize/cryptofist_small.png" /></a>
|
||||
</center>
|
@ -1,14 +0,0 @@
|
||||
<noscript>
|
||||
<div id="noscriptContainer">
|
||||
<div class="mainOverlay"></div>
|
||||
<div id="noscript">
|
||||
<p>
|
||||
<strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
<strong>OUPS</strong> Afin de pouvoir réaliser le chiffrement dans votre navigateur, Javascript est <strong>vraiment</strong> nécessaire.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
@ -1,29 +0,0 @@
|
||||
<div id="main_other">
|
||||
<center>
|
||||
<h1 data-localization="policy_title"></h1>
|
||||
</center>
|
||||
|
||||
<h2 data-localization="policy_whatweknow"></h2>
|
||||
<p data-localization="policy_whatweknow_p1"><!-- HTTP headers, IP address--></p>
|
||||
|
||||
<h2 data-localization="policy_howweuse"></h2>
|
||||
<p data-localization="policy_howweuse_p1"><!-- Referrer : promoting--></p>
|
||||
<p data-localization="policy_howweuse_p2"><!-- Browser : prioritizing new features--></p>
|
||||
|
||||
<h2 data-localization="policy_whatwetell"></h2>
|
||||
<p data-localization="policy_whatwetell_p1"></p>
|
||||
|
||||
<h2 data-localization="policy_links"></h2>
|
||||
<p data-localization="policy_links_p1"></p>
|
||||
|
||||
<h2 data-localization="policy_ads"></h2>
|
||||
<p data-localization="policy_ads_p1"></p>
|
||||
|
||||
<h2 data-localization="policy_choices"></h2>
|
||||
<p data-localization="policy_choices_open"></p>
|
||||
<p data-localization="policy_choices_vpn"></p>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
<script data-bootload="/customize/main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
@ -1,14 +0,0 @@
|
||||
<!--<table class="recent scroll" style="display:none">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th data-localization="table_type"></th>
|
||||
<th data-localization="table_link"></th>
|
||||
<th data-localization="table_created"></th>
|
||||
<th data-localization="table_last"></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>-->
|
||||
|
@ -1,12 +0,0 @@
|
||||
<div id="main_other">
|
||||
<center>
|
||||
<h1 data-localization="tos_title"></h1>
|
||||
</center>
|
||||
|
||||
<p data-localization="tos_legal"></p>
|
||||
<p data-localization="tos_availability"></p>
|
||||
<p data-localization="tos_e2ee"></p>
|
||||
<p data-localization="tos_logs"></p>
|
||||
<p data-localization="tos_3rdparties"></p>
|
||||
</div>
|
||||
|
@ -1,30 +0,0 @@
|
||||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!--<span class="slogan" data-localization="main_slogan"></span>-->
|
||||
|
||||
<span id="user-menu" class="right dropdown-bar"></span>
|
||||
<span id="language-selector" class="right dropdown-bar"></span>
|
||||
<span class="link right">
|
||||
<a href="/about.html" data-localization="about">About</a>
|
||||
</span>
|
||||
<span class="link right">
|
||||
<a href="/privacy.html" data-localization="privacy">Privacy</a>
|
||||
</span>
|
||||
<span class="link right">
|
||||
<a href="/terms.html" data-localization="terms">ToS</a>
|
||||
</span>
|
||||
<span class="link right">
|
||||
<a href="/contact.html" data-localization="contact">Contact</a>
|
||||
</span>
|
||||
<span class="link right">
|
||||
<a href="https://blog.cryptpad.fr/" data-localization="blog">Blog</a>
|
||||
</span>
|
||||
<span class="link right">
|
||||
<button id="upgrade" class="upgrade btn buttonSuccess" style="display: none;"></button>
|
||||
</span>
|
||||
</div>
|
@ -0,0 +1,97 @@
|
||||
@import '/customize/src/less/variables.less';
|
||||
@import '/customize/src/less/mixins.less';
|
||||
|
||||
@leftside-bg: #eee;
|
||||
@leftside-color: #000;
|
||||
@rightside-color: #000;
|
||||
@description-color: #777;
|
||||
|
||||
@button-width: 400px;
|
||||
@button-bg: #3066e5;
|
||||
@button-alt-bg: #fff;
|
||||
@button-red-bg: #e54e4e;
|
||||
|
||||
|
||||
.cp {
|
||||
input[type="text"] {
|
||||
padding-left: 10px;
|
||||
}
|
||||
#container {
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
#leftSide {
|
||||
color: @leftside-color;
|
||||
width: 250px;
|
||||
background: @leftside-bg;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
.categories {
|
||||
flex: 1;
|
||||
.category {
|
||||
.leftsideCategory();
|
||||
}
|
||||
}
|
||||
}
|
||||
#rightSide {
|
||||
flex: 1;
|
||||
padding: 5px 20px;
|
||||
color: @rightside-color;
|
||||
overflow: auto;
|
||||
.element {
|
||||
label:not(.noTitle), .label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.description {
|
||||
display: block;
|
||||
color: @description-color;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
[type="text"], button {
|
||||
vertical-align: middle;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.inputBlock {
|
||||
display: inline-flex;
|
||||
width: @button-width;
|
||||
input {
|
||||
flex: 1;
|
||||
border-radius: 0.25em 0 0 0.25em;
|
||||
border: 1px solid #adadad;
|
||||
border-right: 0px;
|
||||
}
|
||||
button {
|
||||
border-radius: 0 0.25em 0.25em 0;
|
||||
//border: 1px solid #adadad;
|
||||
border-left: 0px;
|
||||
}
|
||||
}
|
||||
button.btn {
|
||||
background-color: @button-bg;
|
||||
border-color: darken(@button-bg, 10%);
|
||||
color: white;
|
||||
&:hover {
|
||||
background-color: darken(@button-bg, 10%);
|
||||
}
|
||||
&.btn-danger {
|
||||
background-color: @button-red-bg;
|
||||
border-color: darken(@button-red-bg, 10%);
|
||||
color: white;
|
||||
&:hover {
|
||||
background-color: darken(@button-red-bg, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
&>div {
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,198 @@
|
||||
define([
|
||||
'jquery',
|
||||
'/common/hyperscript.js',
|
||||
'/common/cryptpad-common.js',
|
||||
'/customize/pages.js',
|
||||
'/api/config',
|
||||
|
||||
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||
], function ($, h, Cryptpad, Pages, Config) {
|
||||
$(function () {
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
var Messages = Cryptpad.Messages;
|
||||
var $body = $('body');
|
||||
var isMainApp = function () {
|
||||
return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile)\/$/.test(location.pathname);
|
||||
};
|
||||
|
||||
var rightLink = function (ref, loc, txt) {
|
||||
return h('span.link.right', [
|
||||
h('a', { href: ref, 'data-localization': loc}, txt)
|
||||
]);
|
||||
};
|
||||
|
||||
var $topbar = $(h('div#cryptpadTopBar', [
|
||||
h('span', [
|
||||
h('a.gotoMain', {href: '/'}, [
|
||||
h('img.cryptpad-logo', {
|
||||
src: '/customize/cryptofist_mini.png?' + urlArgs,
|
||||
alt: '',
|
||||
}),
|
||||
'CryptPad'
|
||||
])
|
||||
]),
|
||||
h('span#user-menu.right.dropdown-bar'),
|
||||
h('span#language-selector.right.dropdown-bar'),
|
||||
|
||||
rightLink('/about.html', 'about', 'About'),
|
||||
rightLink('/privacy.html', 'privacy', 'Privacy'),
|
||||
rightLink('/terms.html', 'terms', 'ToS'),
|
||||
rightLink('/contact.html', 'contact', 'Contact'),
|
||||
rightLink('https://blog.cryptpad.fr/', 'blog', 'Blog'),
|
||||
h('span.link.right', [
|
||||
h('button#upgrade.upgrade.btn.buttonSuccess', {
|
||||
style: { display: 'none' }
|
||||
})
|
||||
])
|
||||
]
|
||||
));
|
||||
|
||||
var infoPage = function () {
|
||||
return h('div#mainBlock.hidden', typeof(Pages[location.pathname]) === 'function'?
|
||||
Pages[location.pathname](): [h('div#container')]);
|
||||
};
|
||||
|
||||
var $main = $(infoPage());
|
||||
|
||||
var footerCol = function (title, L, literal) {
|
||||
return h('div.col', [
|
||||
h('ul.list-unstyled', [
|
||||
h('li.title', {
|
||||
'data-localization': title,
|
||||
}, title? Messages[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 = Messages[loc];
|
||||
}
|
||||
return h('a', attrs, text);
|
||||
};
|
||||
|
||||
var $footer = $(h('footer', [
|
||||
h('div.container', [
|
||||
h('div.row', [
|
||||
footerCol(null, [
|
||||
footLink('/about.html', 'about'),
|
||||
footLink('/terms.html', 'terms'),
|
||||
footLink('/privacy.html', 'privacy'),
|
||||
], 'CryptPad'),
|
||||
footerCol('footer_applications', [
|
||||
footLink('/drive/', 'main_drive'),
|
||||
footLink('/pad/', 'main_richText'),
|
||||
footLink('/code/', 'main_code'),
|
||||
footLink('/slide/', 'main_slide'),
|
||||
footLink('/poll/', 'main_poll'),
|
||||
footLink('/whiteboard/', null, Messages.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.version-footer', "CryptPad v1.11.0 (Lutin)")
|
||||
]));
|
||||
|
||||
var pathname = location.pathname;
|
||||
|
||||
if (isMainApp()) {
|
||||
if (typeof(Pages[pathname]) === 'function') {
|
||||
var $flash = $('body, #iframe-container, #pad-iframe, textarea');
|
||||
$flash.css({
|
||||
display: 'none',
|
||||
opacity: 0,
|
||||
overflow: 'hidden',
|
||||
});
|
||||
var ready = function () {
|
||||
$flash.css({
|
||||
display: '',
|
||||
opacity: '',
|
||||
overflow: '',
|
||||
});
|
||||
};
|
||||
|
||||
require([
|
||||
'less!/customize/src/less/loading.less'
|
||||
], function () {
|
||||
if (/whiteboard/.test(pathname)) {
|
||||
$('body').html(h('body', Pages[pathname]()).innerHTML);
|
||||
require(['/whiteboard/main.js'], ready);
|
||||
} else if (/poll/.test(pathname)) {
|
||||
$('body').html(h('body', Pages[pathname]()).innerHTML);
|
||||
require(['/poll/main.js'], ready);
|
||||
} else if (/drive/.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require(['/drive/main.js'], ready);
|
||||
} else if (/\/file\//.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/file/main.js' ], ready);
|
||||
} else if (/contacts/.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/contacts/main.js' ], ready);
|
||||
} else if (/pad/.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/pad/main.js' ], ready);
|
||||
} else if (/code/.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/code/main.js' ], ready);
|
||||
} else if (/slide/.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/slide/main.js' ], ready);
|
||||
} else if (/^\/settings\//.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/settings/main.js', ], ready);
|
||||
} else if (/^\/profile\//.test(pathname)) {
|
||||
$('body').append(h('body', Pages[pathname]()).innerHTML);
|
||||
require([ '/profile/main.js', ], ready);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
require([
|
||||
'less!/customize/src/less/cryptpad.less',
|
||||
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
], function () {
|
||||
$body.append($topbar).append($main).append($footer);
|
||||
|
||||
if (/^\/user\//.test(pathname)) {
|
||||
require([ '/user/main.js'], function () {});
|
||||
} else if (/^\/register\//.test(pathname)) {
|
||||
require([ '/register/main.js' ], function () {});
|
||||
} else if (/^\/login\//.test(pathname)) {
|
||||
require([ '/login/main.js' ], function () {});
|
||||
} else if (/^\/($|^\/index\.html$)/.test(pathname)) {
|
||||
// TODO use different top bar
|
||||
require([ '/customize/main.js', ], function () {});
|
||||
} else if (/invite/.test(pathname)) {
|
||||
require([ '/invite/main.js'], function () {});
|
||||
} else {
|
||||
require([ '/customize/main.js', ], function () {});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@ -1,581 +0,0 @@
|
||||
/* The container <div> - needed to position the dropdown content */
|
||||
.dropdown-bar {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.dropdown-bar .fa {
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
.dropdown-bar button .fa-caret-down {
|
||||
margin-right: 0px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 250px;
|
||||
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1000;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content.left {
|
||||
right: 0;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content:hover {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content a {
|
||||
color: black !important;
|
||||
padding: 5px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
float: none;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content a:hover {
|
||||
background-color: #f1f1f1;
|
||||
color: black !important;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content a.active {
|
||||
background-color: #e8e8e8;
|
||||
color: black !important;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content hr {
|
||||
margin: 5px 0px;
|
||||
height: 1px;
|
||||
background: #bbb;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p {
|
||||
min-width: 160px;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
white-space: normal;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users {
|
||||
text-align: baseline;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .yourself,
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .anonymous,
|
||||
.dropdown-bar .dropdown-bar-content p.cryptpad-dropdown-users .viewer {
|
||||
font-style: italic;
|
||||
}
|
||||
.dropdown-bar .dropdown-bar-content p h2 {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background-color: #EEEEEE;
|
||||
padding: 5px 0px;
|
||||
margin: 5px 0px;
|
||||
font-size: 16px;
|
||||
white-space: normal;
|
||||
}
|
||||
.unselectable {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.toolbar-container {
|
||||
font: 12px Arial, Helvetica, Tahoma, Verdana, sans-serif;
|
||||
background: -webkit-linear-gradient(#f5f5f5, #DDDDDD);
|
||||
/* For Safari 5.1 to 6.0 */
|
||||
background: -o-linear-gradient(#f5f5f5, #DDDDDD);
|
||||
/* For Opera 11.1 to 12.0 */
|
||||
background: -moz-linear-gradient(#f5f5f5, #DDDDDD);
|
||||
/* For Firefox 3.6 to 15 */
|
||||
background: linear-gradient(#f5f5f5, #DDDDDD);
|
||||
/* Standard syntax */
|
||||
}
|
||||
.toolbar-container .cryptpad-toolbar select {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.cryptpad-toolbar {
|
||||
box-sizing: border-box;
|
||||
padding: 0px 6px;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
font: normal normal normal 12px Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
|
||||
color: #000;
|
||||
width: 100%;
|
||||
z-index: 9001;
|
||||
}
|
||||
.cryptpad-toolbar .fa {
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
.cryptpad-toolbar a {
|
||||
float: right;
|
||||
}
|
||||
.cryptpad-toolbar button {
|
||||
font: 12px Ubuntu, Arial, sans-serif;
|
||||
border: 1px solid transparent;
|
||||
border-radius: .25rem;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.cryptpad-toolbar button * {
|
||||
font: 12px Ubuntu, Arial, sans-serif;
|
||||
}
|
||||
.cryptpad-toolbar button#shareButton,
|
||||
.cryptpad-toolbar button.buttonSuccess {
|
||||
color: #fff;
|
||||
background: #5cb85c;
|
||||
border-color: #5cb85c;
|
||||
}
|
||||
.cryptpad-toolbar button#shareButton:hover,
|
||||
.cryptpad-toolbar button.buttonSuccess:hover {
|
||||
color: #fff;
|
||||
background: #449d44;
|
||||
border: 1px solid #419641;
|
||||
}
|
||||
.cryptpad-toolbar button#shareButton span,
|
||||
.cryptpad-toolbar button.buttonSuccess span {
|
||||
color: #fff;
|
||||
}
|
||||
.cryptpad-toolbar button#shareButton .large,
|
||||
.cryptpad-toolbar button.buttonSuccess .large {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.cryptpad-toolbar button#newdoc,
|
||||
.cryptpad-toolbar button.buttonPrimary {
|
||||
color: #fff;
|
||||
background: #0275d8;
|
||||
border-color: #0275d8;
|
||||
}
|
||||
.cryptpad-toolbar button#newdoc:hover,
|
||||
.cryptpad-toolbar button.buttonPrimary:hover {
|
||||
color: #fff;
|
||||
background: #025aa5;
|
||||
border: 1px solid #01549b;
|
||||
}
|
||||
.cryptpad-toolbar button#newdoc span,
|
||||
.cryptpad-toolbar button.buttonPrimary span {
|
||||
color: #fff;
|
||||
}
|
||||
.cryptpad-toolbar button#newdoc .large,
|
||||
.cryptpad-toolbar button.buttonPrimary .large {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.cryptpad-toolbar button.hidden {
|
||||
display: none;
|
||||
}
|
||||
.cryptpad-toolbar button:hover {
|
||||
color: #292b2c;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #adadad;
|
||||
}
|
||||
.cryptpad-toolbar button.upgrade {
|
||||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-limit {
|
||||
box-sizing: border-box;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
margin: 0px;
|
||||
margin-right: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-limit span {
|
||||
color: red;
|
||||
cursor: pointer;
|
||||
margin: auto;
|
||||
font-size: 20px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag {
|
||||
height: 20px;
|
||||
width: 23px;
|
||||
background: transparent;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
margin: 3px;
|
||||
vertical-align: top;
|
||||
box-sizing: content-box;
|
||||
text-align: center;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
margin: 0;
|
||||
margin-right: 1px;
|
||||
background: black;
|
||||
vertical-align: bottom;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid black;
|
||||
transition: background 1s, border 1s;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span.bar1 {
|
||||
height: 5px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span.bar2 {
|
||||
height: 10px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span.bar3 {
|
||||
height: 15px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag span.bar4 {
|
||||
height: 20px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag0 span {
|
||||
background: transparent;
|
||||
border-color: red;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag1 .bar2,
|
||||
.cryptpad-toolbar .cryptpad-lag.lag1 .bar3,
|
||||
.cryptpad-toolbar .cryptpad-lag.lag1 .bar4 {
|
||||
background: transparent;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag1 span {
|
||||
background-color: orange;
|
||||
border-color: orange;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag2 .bar3,
|
||||
.cryptpad-toolbar .cryptpad-lag.lag2 .bar4 {
|
||||
background: transparent;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag2 span {
|
||||
background-color: orange;
|
||||
border-color: orange;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag3 .bar4 {
|
||||
background: transparent;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag3 span {
|
||||
background-color: #5cb85c;
|
||||
border-color: #5cb85c;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-lag.lag4 span {
|
||||
background-color: #5cb85c;
|
||||
border-color: #5cb85c;
|
||||
}
|
||||
.cryptpad-toolbar div {
|
||||
white-space: normal;
|
||||
}
|
||||
.cryptpad-toolbar div.cryptpad-back {
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
}
|
||||
.cryptpad-toolbar button,
|
||||
.cryptpad-toolbar select,
|
||||
.cryptpad-toolbar .rightside-element {
|
||||
height: 26px;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
margin: 3px 2px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.cryptpad-toolbar .dropdown-bar-content {
|
||||
margin-top: -3px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.cryptpad-toolbar .cryptpad-state {
|
||||
line-height: 32px;
|
||||
/* equivalent to 26px + 2*2px margin used for buttons */
|
||||
}
|
||||
.cryptpad-toolbar .rightside-button {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cryptpad-toolbar .leftside-button {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
}
|
||||
.cryptpad-toolbar .rightside-element {
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cryptpad-toolbar .rightside-element.float {
|
||||
float: right;
|
||||
}
|
||||
.cryptpad-toolbar select {
|
||||
border: 0px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
padding-left: 5px;
|
||||
border: 1px solid #A6A6A6;
|
||||
border-bottom-color: #979797;
|
||||
vertical-align: top;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.cryptpad-toolbar select option {
|
||||
height: 24px;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.cryptpad-toolbar .big {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 801px) {
|
||||
.cryptpad-toolbar .big {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.cryptpad-toolbar .small {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 801px) {
|
||||
.cryptpad-toolbar .small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.cryptpad-toolbar .med-big {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 601px) {
|
||||
.cryptpad-toolbar .med-big {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.cryptpad-toolbar .med-small {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 601px) {
|
||||
.cryptpad-toolbar .med-small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.cryptpad-toolbar .large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 401px) {
|
||||
.cryptpad-toolbar .large {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.cryptpad-toolbar .narrow {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 401px) {
|
||||
.cryptpad-toolbar .narrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top {
|
||||
height: 67px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-link,
|
||||
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-user {
|
||||
top: 35px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 601px) {
|
||||
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-link,
|
||||
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-user {
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
.cryptpad-toolbar-top {
|
||||
display: block;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
position: relative;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title .title,
|
||||
.cryptpad-toolbar-top .cryptpad-title .pencilIcon {
|
||||
font-size: 1.5em;
|
||||
vertical-align: middle;
|
||||
line-height: 32px;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title .pencilIcon {
|
||||
margin-left: 11px;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title .pencilIcon:hover {
|
||||
color: #999;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title .pencilIcon span {
|
||||
cursor: pointer;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title:not(input):hover .editable {
|
||||
border: 1px solid #888;
|
||||
border-radius: 2px 0px 0px 2px;
|
||||
background: white;
|
||||
padding: 5px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title:not(input):hover .pencilIcon {
|
||||
cursor: pointer;
|
||||
border: 1px solid #888;
|
||||
border-radius: 0px 2px 2px 0px;
|
||||
background: white;
|
||||
padding: 5px;
|
||||
display: inline;
|
||||
margin-left: -1px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-title input {
|
||||
font-size: 1.5em;
|
||||
vertical-align: middle;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid black;
|
||||
background: #fff;
|
||||
cursor: auto;
|
||||
width: 300px;
|
||||
padding: 5px 5px;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-link {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
height: 32px;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo {
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
padding: 0px 5px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo:hover span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo img {
|
||||
vertical-align: middle;
|
||||
height: 32px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo span {
|
||||
font-size: 1.5em;
|
||||
margin-left: 5px;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-user {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-user :not(.cryptpad-lag) span {
|
||||
vertical-align: top;
|
||||
}
|
||||
.cryptpad-toolbar-top .cryptpad-user button span.fa {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.cryptpad-toolbar-leftside {
|
||||
float: left;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.cryptpad-toolbar-leftside .cryptpad-dropdown-users pre {
|
||||
/* needed for ckeditor */
|
||||
white-space: pre;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.cryptpad-toolbar-leftside button {
|
||||
margin: 2px 4px 2px 0px;
|
||||
}
|
||||
.cryptpad-toolbar-leftside .dropdown-bar-content {
|
||||
margin-top: -1px;
|
||||
}
|
||||
.cryptpad-toolbar-rightside {
|
||||
text-align: right;
|
||||
}
|
||||
.cryptpad-toolbar-history {
|
||||
display: none;
|
||||
text-align: center;
|
||||
}
|
||||
.cryptpad-toolbar-history .next {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 20px;
|
||||
}
|
||||
.cryptpad-toolbar-history .previous {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 20px;
|
||||
}
|
||||
.cryptpad-toolbar-history .goto {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
.cryptpad-toolbar-history .goto input {
|
||||
width: 75px;
|
||||
}
|
||||
.cryptpad-toolbar-history .gotoInput {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cke_toolbox .cryptpad-toolbar-history input.gotoInput {
|
||||
background: white;
|
||||
height: 20px;
|
||||
padding: 3px 3px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.cryptpad-spinner > span {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin: 8px;
|
||||
line-height: 16px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.cryptpad-readonly {
|
||||
margin-right: 5px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.cryptpad-user p.accountData {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
.cryptpad-user p.accountData > span {
|
||||
font-weight: bold;
|
||||
}
|
||||
.cryptpad-user p.accountData > span span {
|
||||
font-weight: normal;
|
||||
}
|
||||
.cryptpad-user .buttonTitle .fa:not(.fa-caret-down) {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.cryptpad-user .buttonTitle .account-name {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.cryptpad-dropdown-share a .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.lag {
|
||||
height: 15px !important;
|
||||
width: 15px !important;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
.lag-green {
|
||||
background-color: #46E981;
|
||||
}
|
||||
.lag-red {
|
||||
background-color: #FA5858;
|
||||
}
|
||||
.lag-orange {
|
||||
background-color: #FE9A2E;
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
max-height: 100%;
|
||||
min-height: auto;
|
||||
}
|
||||
.CodeMirror {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
min-width: 20%;
|
||||
max-width: 80%;
|
||||
resize: horizontal;
|
||||
}
|
||||
.CodeMirror.transition {
|
||||
transition: width 500ms, min-width 500ms, max-width 500ms;
|
||||
}
|
||||
.CodeMirror.fullPage {
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
}
|
||||
.CodeMirror-focused .cm-matchhighlight {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
#editorContainer {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#previewContainer {
|
||||
flex: 1;
|
||||
padding: 5px 20px;
|
||||
overflow: auto;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
border-left: 1px solid black;
|
||||
box-sizing: border-box;
|
||||
font-family: Calibri, Ubuntu, sans-serif;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
#previewContainer media-tag * {
|
||||
max-width: 100%;
|
||||
}
|
||||
#preview {
|
||||
max-width: 40vw;
|
||||
margin: auto;
|
||||
}
|
||||
#preview table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#preview table tr th {
|
||||
border: 3px solid black;
|
||||
padding: 15px;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.CodeMirror {
|
||||
flex: 1;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
}
|
||||
#previewContainer {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
define([
|
||||
'jquery',
|
||||
|
||||
'cm/lib/codemirror',
|
||||
|
||||
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||
'less!/code/code.less',
|
||||
'less!/customize/src/less/toolbar.less',
|
||||
'less!/customize/src/less/cryptpad.less',
|
||||
'css!cm/lib/codemirror.css',
|
||||
'css!cm/addon/dialog/dialog.css',
|
||||
'css!cm/addon/fold/foldgutter.css',
|
||||
|
||||
'cm/mode/markdown/markdown',
|
||||
'cm/addon/mode/loadmode',
|
||||
'cm/mode/meta',
|
||||
'cm/addon/mode/overlay',
|
||||
'cm/addon/mode/multiplex',
|
||||
'cm/addon/mode/simple',
|
||||
'cm/addon/edit/closebrackets',
|
||||
'cm/addon/edit/matchbrackets',
|
||||
'cm/addon/edit/trailingspace',
|
||||
'cm/addon/selection/active-line',
|
||||
'cm/addon/search/search',
|
||||
'cm/addon/search/match-highlighter',
|
||||
'cm/addon/search/searchcursor',
|
||||
'cm/addon/dialog/dialog',
|
||||
'cm/addon/fold/foldcode',
|
||||
'cm/addon/fold/foldgutter',
|
||||
'cm/addon/fold/brace-fold',
|
||||
'cm/addon/fold/xml-fold',
|
||||
'cm/addon/fold/markdown-fold',
|
||||
'cm/addon/fold/comment-fold',
|
||||
'cm/addon/display/placeholder',
|
||||
], function ($, CMeditor) {
|
||||
window.CodeMirror = CMeditor;
|
||||
$('.loading-hidden').removeClass('loading-hidden');
|
||||
});
|
@ -0,0 +1,64 @@
|
||||
/*@flow*/
|
||||
/*:: const define = () => {}; */
|
||||
define([
|
||||
'/api/config',
|
||||
'/bower_components/less/dist/less.min.js'
|
||||
], function (Config, Less) { /*::});module.exports = (function() {
|
||||
const Config = (undefined:any);
|
||||
const Less = (undefined:any);
|
||||
*/
|
||||
|
||||
var module = { exports: {} };
|
||||
var key = Config.requireConf.urlArgs;
|
||||
var localStorage = window.localStorage || {};
|
||||
|
||||
var fixURL = function (url) {
|
||||
var mark = (url.indexOf('?') !== -1) ? '&' : '?';
|
||||
return url + mark + key;
|
||||
};
|
||||
|
||||
var doXHR = Less.FileManager.prototype.doXHR;
|
||||
Less.FileManager.prototype.doXHR = function (url, type, callback, errback) {
|
||||
url = fixURL(url);
|
||||
//console.log("xhr: " + url);
|
||||
return doXHR(url, type, callback, errback);
|
||||
};
|
||||
|
||||
var inject = function (cssText, url) {
|
||||
var curStyle = document.createElement('style');
|
||||
curStyle.setAttribute('data-original-src', url);
|
||||
curStyle.type = 'text/css';
|
||||
curStyle.appendChild(document.createTextNode(cssText));
|
||||
if (!document.head) { throw new Error(); }
|
||||
document.head.appendChild(curStyle);
|
||||
};
|
||||
|
||||
var checkCache = function () {
|
||||
if (localStorage['LESS_CACHE'] === key) { return; }
|
||||
Object.keys(localStorage).forEach(function (k) {
|
||||
if (k.indexOf('LESS_CACHE|') !== 0) { return; }
|
||||
delete localStorage[k];
|
||||
});
|
||||
localStorage['LESS_CACHE'] = key;
|
||||
};
|
||||
|
||||
module.exports.load = function (url /*:string*/, cb /*:()=>void*/) {
|
||||
checkCache();
|
||||
if (localStorage['LESS_CACHE|' + key + '|' + url]) {
|
||||
inject(localStorage['LESS_CACHE|' + key + '|' + url], url);
|
||||
cb();
|
||||
return;
|
||||
}
|
||||
Less.render('@import (multiple) "' + url + '";', {}, function(err, css) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
localStorage['LESS_CACHE|' + key + '|' + url] = css.css;
|
||||
inject(css.css, url);
|
||||
cb();
|
||||
}, window.less);
|
||||
};
|
||||
|
||||
return module.exports;
|
||||
})/*::()*/;
|
@ -0,0 +1,12 @@
|
||||
define([
|
||||
'/common/LessLoader.js'
|
||||
], function (LessLoader) {
|
||||
var api = {};
|
||||
api.normalize = function(name, normalize) {
|
||||
return normalize(name);
|
||||
};
|
||||
api.load = function(cssId, req, load /*, config */) {
|
||||
LessLoader.load(cssId, load);
|
||||
};
|
||||
return api;
|
||||
});
|
@ -0,0 +1,51 @@
|
||||
define([
|
||||
'/common/curve.js',
|
||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||
], function (Curve, Listmap) {
|
||||
var Edit = {};
|
||||
|
||||
Edit.create = function (config, cb) { //network, channel, theirs, mine, cb) {
|
||||
var network = config.network;
|
||||
var channel = config.channel;
|
||||
var keys = config.keys;
|
||||
|
||||
try {
|
||||
var encryptor = Curve.createEncryptor(keys);
|
||||
var lm = Listmap.create({
|
||||
network: network,
|
||||
data: {},
|
||||
channel: channel,
|
||||
readOnly: false,
|
||||
validateKey: keys.validateKey || undefined,
|
||||
crypto: encryptor,
|
||||
userName: 'lol',
|
||||
logLevel: 1,
|
||||
});
|
||||
|
||||
var done = function () {
|
||||
// TODO make this abort and disconnect the session after the
|
||||
// user has finished making changes to the object, and they
|
||||
// have propagated.
|
||||
};
|
||||
|
||||
lm.proxy
|
||||
.on('create', function () {
|
||||
console.log('created');
|
||||
})
|
||||
.on('ready', function () {
|
||||
console.log('ready');
|
||||
cb(lm, done);
|
||||
})
|
||||
.on('disconnect', function () {
|
||||
console.log('disconnected');
|
||||
})
|
||||
.on('change', [], function (o, n, p) {
|
||||
console.log(o, n, p);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
};
|
||||
|
||||
return Edit;
|
||||
});
|
@ -0,0 +1,86 @@
|
||||
define([
|
||||
'/bower_components/tweetnacl/nacl-fast.min.js',
|
||||
], function () {
|
||||
var Nacl = window.nacl;
|
||||
var Curve = {};
|
||||
|
||||
var concatenateUint8s = function (A) {
|
||||
var len = 0;
|
||||
var offset = 0;
|
||||
A.forEach(function (uints) {
|
||||
len += uints.length || 0;
|
||||
});
|
||||
var c = new Uint8Array(len);
|
||||
A.forEach(function (x) {
|
||||
c.set(x, offset);
|
||||
offset += x.length;
|
||||
});
|
||||
return c;
|
||||
};
|
||||
|
||||
var encodeBase64 = Nacl.util.encodeBase64;
|
||||
var decodeBase64 = Nacl.util.decodeBase64;
|
||||
var decodeUTF8 = Nacl.util.decodeUTF8;
|
||||
var encodeUTF8 = Nacl.util.encodeUTF8;
|
||||
|
||||
Curve.encrypt = function (message, secret) {
|
||||
var buffer = decodeUTF8(message);
|
||||
var nonce = Nacl.randomBytes(24);
|
||||
var box = Nacl.box.after(buffer, nonce, secret);
|
||||
return encodeBase64(nonce) + '|' + encodeBase64(box);
|
||||
};
|
||||
|
||||
Curve.decrypt = function (packed, secret) {
|
||||
var unpacked = packed.split('|');
|
||||
var nonce = decodeBase64(unpacked[0]);
|
||||
var box = decodeBase64(unpacked[1]);
|
||||
var message = Nacl.box.open.after(box, nonce, secret);
|
||||
return encodeUTF8(message);
|
||||
};
|
||||
|
||||
Curve.signAndEncrypt = function (msg, cryptKey, signKey) {
|
||||
var packed = Curve.encrypt(msg, cryptKey);
|
||||
return encodeBase64(Nacl.sign(decodeUTF8(packed), signKey));
|
||||
};
|
||||
|
||||
Curve.openSigned = function (msg, cryptKey /*, validateKey STUBBED*/) {
|
||||
var content = decodeBase64(msg).subarray(64);
|
||||
return Curve.decrypt(encodeUTF8(content), cryptKey);
|
||||
};
|
||||
|
||||
Curve.deriveKeys = function (theirs, mine) {
|
||||
var pub = decodeBase64(theirs);
|
||||
var secret = decodeBase64(mine);
|
||||
|
||||
var sharedSecret = Nacl.box.before(pub, secret);
|
||||
var salt = decodeUTF8('CryptPad.signingKeyGenerationSalt');
|
||||
|
||||
// 64 uint8s
|
||||
var hash = Nacl.hash(concatenateUint8s([salt, sharedSecret]));
|
||||
var signKp = Nacl.sign.keyPair.fromSeed(hash.subarray(0, 32));
|
||||
var cryptKey = hash.subarray(32, 64);
|
||||
|
||||
return {
|
||||
cryptKey: encodeBase64(cryptKey),
|
||||
signKey: encodeBase64(signKp.secretKey),
|
||||
validateKey: encodeBase64(signKp.publicKey)
|
||||
};
|
||||
};
|
||||
|
||||
Curve.createEncryptor = function (keys) {
|
||||
var cryptKey = decodeBase64(keys.cryptKey);
|
||||
var signKey = decodeBase64(keys.signKey);
|
||||
var validateKey = decodeBase64(keys.validateKey);
|
||||
|
||||
return {
|
||||
encrypt: function (msg) {
|
||||
return Curve.signAndEncrypt(msg, cryptKey, signKey);
|
||||
},
|
||||
decrypt: function (packed) {
|
||||
return Curve.openSigned(packed, cryptKey, validateKey);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return Curve;
|
||||
});
|