|
|
@ -86,11 +86,12 @@ define([
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var footLink = function (ref, loc, text) {
|
|
|
|
var footLink = function (ref, loc, text, icon) {
|
|
|
|
if (!ref) { return; }
|
|
|
|
if (!ref) { return; }
|
|
|
|
var attrs = {
|
|
|
|
var attrs = {
|
|
|
|
href: ref,
|
|
|
|
href: ref,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
var iconName = '';
|
|
|
|
if (!/^\//.test(ref)) {
|
|
|
|
if (!/^\//.test(ref)) {
|
|
|
|
attrs.target = '_blank';
|
|
|
|
attrs.target = '_blank';
|
|
|
|
attrs.rel = 'noopener noreferrer';
|
|
|
|
attrs.rel = 'noopener noreferrer';
|
|
|
@ -99,13 +100,17 @@ define([
|
|
|
|
attrs['data-localization'] = loc;
|
|
|
|
attrs['data-localization'] = loc;
|
|
|
|
text = Msg[loc];
|
|
|
|
text = Msg[loc];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return h('a', attrs, text);
|
|
|
|
if (icon) {
|
|
|
|
|
|
|
|
iconName = 'i.fa.fa-' + icon;
|
|
|
|
|
|
|
|
icon = h(iconName)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return h('a', attrs, [icon, text]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ?
|
|
|
|
var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ?
|
|
|
|
'/imprint.html' : AppConfig.imprint);
|
|
|
|
'/imprint.html' : AppConfig.imprint);
|
|
|
|
|
|
|
|
|
|
|
|
Pages.versionString = "v4.13.0";
|
|
|
|
Pages.versionString = "4.13.0";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// used for the about menu
|
|
|
|
// used for the about menu
|
|
|
@ -115,7 +120,7 @@ define([
|
|
|
|
Pages.docsLink = footLink('https://docs.cryptpad.fr', 'docs_link');
|
|
|
|
Pages.docsLink = footLink('https://docs.cryptpad.fr', 'docs_link');
|
|
|
|
Pages.roadmapLink = footLink(AppConfig.roadmap, 'footer_roadmap');
|
|
|
|
Pages.roadmapLink = footLink(AppConfig.roadmap, 'footer_roadmap');
|
|
|
|
|
|
|
|
|
|
|
|
Pages.infopageFooter = function () {
|
|
|
|
Pages.infopageOldFooter = function () { // XXX DB: not used, kept to copy/paste
|
|
|
|
var terms = footLink('/terms.html', 'footer_tos'); // FIXME this should be configurable like the other legal pages
|
|
|
|
var terms = footLink('/terms.html', 'footer_tos'); // FIXME this should be configurable like the other legal pages
|
|
|
|
var legalFooter;
|
|
|
|
var legalFooter;
|
|
|
|
|
|
|
|
|
|
|
@ -165,23 +170,55 @@ define([
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pages.infopageFooter = function () {
|
|
|
|
|
|
|
|
return h('footer.cp-footer', [
|
|
|
|
|
|
|
|
h('div.cp-footer-left', [
|
|
|
|
|
|
|
|
h('div.cp-logo-foot', [
|
|
|
|
|
|
|
|
h('img', {
|
|
|
|
|
|
|
|
src: '/customize/CryptPad_logo.svg',
|
|
|
|
|
|
|
|
"aria-hidden": true,
|
|
|
|
|
|
|
|
alt: ''
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
h('span.logo-font', 'CryptPad')
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
footLink('https://cryptpad.org', null, 'Website', 'link'),
|
|
|
|
|
|
|
|
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate') // XXX DB: add OpenCollective icon
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
h('.div.cp-footer-center', [
|
|
|
|
|
|
|
|
h('div.cp-footer-language', [
|
|
|
|
|
|
|
|
h('i.fa.fa-language', {'aria-hidden': 'true'}),
|
|
|
|
|
|
|
|
languageSelector()
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
h('div.cp-footer-right', [
|
|
|
|
|
|
|
|
h('span.cp-footer-version', 'Version: ' + Pages.versionString) // XXX DB: translate 'Version' ?
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Pages.infopageTopbar = function () {
|
|
|
|
Pages.infopageTopbar = function () {
|
|
|
|
var rightLinks;
|
|
|
|
var rightLinks;
|
|
|
|
var username = window.localStorage.getItem('User_name');
|
|
|
|
var username = window.localStorage.getItem('User_name');
|
|
|
|
var registerLink;
|
|
|
|
var registerLink;
|
|
|
|
|
|
|
|
|
|
|
|
if (!ApiConfig.restrictRegistration) {
|
|
|
|
if (!ApiConfig.restrictRegistration) {
|
|
|
|
registerLink = h('a.nav-item.nav-link.cp-register-btn', { href: '/register/'}, Msg.login_register);
|
|
|
|
registerLink = h('a.nav-item.nav-link.cp-register-btn', { href: '/register/'}, [
|
|
|
|
|
|
|
|
h('i.fa.fa-user', {'aria-hidden':'true'}),
|
|
|
|
|
|
|
|
Msg.login_register
|
|
|
|
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (username === null) {
|
|
|
|
if (username === null) {
|
|
|
|
rightLinks = [
|
|
|
|
rightLinks = [
|
|
|
|
h('a.nav-item.nav-link.cp-login-btn', { href: '/login/'}, Msg.login_login),
|
|
|
|
h('a.nav-item.nav-link.cp-login-btn', { href: '/login/'}, [
|
|
|
|
|
|
|
|
h('i.fa.fa-sign-in', {'aria-hidden':'true'}),
|
|
|
|
|
|
|
|
Msg.login_login
|
|
|
|
|
|
|
|
]),
|
|
|
|
registerLink,
|
|
|
|
registerLink,
|
|
|
|
];
|
|
|
|
];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/' }, [
|
|
|
|
rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/' }, [
|
|
|
|
h('i.fa.fa-user-circle'),
|
|
|
|
h('i.fa.fa-user-circle', {'aria-hidden':'true'}),
|
|
|
|
" ",
|
|
|
|
" ",
|
|
|
|
username
|
|
|
|
username
|
|
|
|
]);
|
|
|
|
]);
|
|
|
@ -196,26 +233,30 @@ define([
|
|
|
|
'aria-label':'Toggle navigation'*/
|
|
|
|
'aria-label':'Toggle navigation'*/
|
|
|
|
}, h('i.fa.fa-bars '));
|
|
|
|
}, h('i.fa.fa-bars '));
|
|
|
|
|
|
|
|
|
|
|
|
$(button).click(function () {
|
|
|
|
// XXX button to collapse navbar on small screens
|
|
|
|
if ($('#menuCollapse').is(':visible')) {
|
|
|
|
// $(button).click(function () {
|
|
|
|
return void $('#menuCollapse').slideUp();
|
|
|
|
// if ($('#menuCollapse').is(':visible')) {
|
|
|
|
}
|
|
|
|
// return void $('#menuCollapse').slideUp();
|
|
|
|
$('#menuCollapse').slideDown();
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
// $('#menuCollapse').slideDown();
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
return h('nav.navbar.navbar-expand-lg',
|
|
|
|
return h('nav.navbar.navbar-expand-lg',
|
|
|
|
h('a.navbar-brand', { href: '/index.html'}, [
|
|
|
|
// XXX add link back to index.html on footer logo
|
|
|
|
h('img', {
|
|
|
|
// h('a.navbar-brand', { href: '/index.html'}, [
|
|
|
|
src: '/customize/CryptPad_logo.svg?',
|
|
|
|
// h('img', {
|
|
|
|
'aria-hidden': true,
|
|
|
|
// src: '/customize/CryptPad_logo.svg?',
|
|
|
|
alt: ''
|
|
|
|
// 'aria-hidden': true,
|
|
|
|
}), 'CryptPad'
|
|
|
|
// alt: ''
|
|
|
|
]),
|
|
|
|
// }), 'CryptPad'
|
|
|
|
button,
|
|
|
|
// ]),
|
|
|
|
h('div.collapse.navbar-collapse.justify-content-end#menuCollapse', [
|
|
|
|
//button, XXX collapse button
|
|
|
|
h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.about),
|
|
|
|
h('div', [
|
|
|
|
h('a.nav-item.nav-link', { href: 'https://docs.cryptpad.fr'}, Msg.docs_link),
|
|
|
|
// XXX remove about page
|
|
|
|
|
|
|
|
// h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.about),
|
|
|
|
h('a.nav-item.nav-link', { href: '/features.html'}, Pages.areSubscriptionsAllowed()? Msg.pricing: Msg.features),
|
|
|
|
h('a.nav-item.nav-link', { href: '/features.html'}, Pages.areSubscriptionsAllowed()? Msg.pricing: Msg.features),
|
|
|
|
|
|
|
|
h('a.nav-item.nav-link', { href: 'https://docs.cryptpad.fr'},
|
|
|
|
|
|
|
|
[h('i.fa.fa-book', {'aria-hidden':'true'}),Msg.docs_link]),
|
|
|
|
].concat(rightLinks))
|
|
|
|
].concat(rightLinks))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|