Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
ansuz 7 years ago
commit 252f40748a

@ -76,6 +76,29 @@ define([
]);
};
var infopageTopbar = function () {
return h('div.cp-topbar',
h('div',
h('a.navbar-brand', { href: 'index.html'}, [
h( 'img', { src: '/customize/CryptPad-white-logo.svg' })
])
),
h('div.navbar.navbar-toggleable-md.navbar-light.navbar-inverse',
h('button.navbar-toggler.navbar-toggler-right', {'type':'button'}, {'data-toggle':'collapse'}, {'data-target':'#menuCollapse'}, {'aria-controls': 'menuCollapse'}, {'aria-expanded':'false'}, {'aria-label':'Toggle navigation'},
[h('i.fa.fa-bars ')
]),
h('div.collapse.navbar-collapse.justify-content-end.flex-column#menuCollapse', [
h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.topbar_whatIsCryptpad),
h('a.nav-item.nav-link', { href: 'https://blog.cryptpad.fr/'}, Msg.blog),
h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact),
h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about),
h('a.cp-login-btn', { href: '/login'}, Msg.login_login),
h('a.cp-register-btn', { href: '/register'}, Msg.login_register)
])
)
);
};
Pages['/about.html'] = function () {
return h('div#cp-main.cp-page-about', [
infopageTopbar(),
@ -214,49 +237,6 @@ define([
]);
};
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 infopageTopbar = function () {
return h('div.cp-topbar',
h('div',
h('a.navbar-brand', { href: 'index.html'}, [
h( 'img', { src: '/customize/CryptPad-white-logo.svg' })
])
),
h('div.navbar.navbar-toggleable-md.navbar-light.navbar-inverse',
h('button.navbar-toggler.navbar-toggler-right', {'type':'button'}, {'data-toggle':'collapse'}, {'data-target':'#menuCollapse'}, {'aria-controls': 'menuCollapse'}, {'aria-expanded':'false'}, {'aria-label':'Toggle navigation'},
[h('i.fa.fa-bars ')
]),
h('div.collapse.navbar-collapse.justify-content-end.flex-column#menuCollapse', [
h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.topbar_whatIsCryptpad),
h('a.nav-item.nav-link', { href: 'https://blog.cryptpad.fr/'}, Msg.blog),
h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact),
h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about),
h('a.cp-login-btn', { href: '/login'}, Msg.login_login),
h('a.cp-register-btn', { href: '/register'}, Msg.login_register)
])
)
);
};
Pages['/'] = Pages['/index.html'] = function () {
var showingMore = false;
return [

@ -3,50 +3,15 @@ define([
'/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 ($, h, Cryptpad, Pages) {
$(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|todo)\/$/.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')]);
@ -54,67 +19,6 @@ $(function () {
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.12.0 (Minotaur)")
]));
var pathname = location.pathname;
if (isMainApp()) {

@ -104,11 +104,7 @@ define(function () {
out.main_p2 = 'Este proyecto utiliza el editor de texto visual <a href="http://ckeditor.com/">CKEditor</a>, <a href="https://codemirror.net/">CodeMirror</a>, y el motor en tiempo real <a href="https://github.com/xwiki-contrib/chainpad">ChainPad</a>.';
out.main_howitworks = '¿Cómo funciona?';
out.main_howitworks_p1 = "CryptPad utiliza una variante del algoritmo de <a href='https://en.wikipedia.org/wiki/Operational_transformation'>transformación operacional</a> (página en inglés) que es capaz de encontrar un consenso distribuido usando un <a href='https://bitcoin.org/bitcoin.pdf'>Blockchain Nakamoto</a> (página en inglés), popularizado por <a href='https://es.wikipedia.org/wiki/Bitcoin'>Bitcoin</a>. De esta manera el algoritmo puede evitar la necesidad de un servidor central para resolver conflictos de edición de la transformación operacional y sin necesidad de resolver conflictos, el servidor puede mantenerse inconsciente del contenido que se está editando en el pad.";
<<<<<<< HEAD
out.main_about_p2 = 'Si tienes preguntas o comentarios, puedes <a href="https://twitter.com/cryptpad"><i class="fa fa-twitter"></i>enviarnos un tweet</a>, abrir un issue <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="nuestro issue tracker">en <i class="fa fa-github"></i>GitHub</a>. saludarnos en <a href="https://riot.im/app/#/room/#cryptpad:matrix.org" title="Matrix">nuestro <i class="fa fa-comment"></i>canal Matrix</a> o en IRC (#cryptpad on irc.freenode.net), o <a href="mailto:research@xwiki.com"><i class="fa fa-envelope"></i>envianos un email</a>.';
=======
out.main_about_p2 = 'Si tienes preguntas o comentarios, puedes <a href="https://twitter.com/cryptpad">enviarnos un tweet</a>, abrir un issue <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="nuestro issue tracker">en GitHub</a>, saludarnos en nuestro canal IRC (<a href="http://webchat.freenode.net?channels=%23cryptpad&uio=MT1mYWxzZSY5PXRydWUmMTE9Mjg3JjE1PXRydWUe7" title="freenode webchat">irc.freenode.net</a>), o <a href="mailto:research@xwiki.com">envíanos un email</a>.';
>>>>>>> fb13e656b7b3ee611bf195a1f1ccf7475f2f1ee4
out.button_newpad = 'Crear nuevo pad de texto enriquecido';
out.button_newcode = 'Crear nuevo pad de código';
@ -546,11 +542,6 @@ define(function () {
out.settings_logoutEverywhereButton = "Cerrar sesión";
out.upload_title = "Subir archivo";
<<<<<<< HEAD
// 1.13.0 - Naiad
out.topbar_whatIsCryptpad = "Qué es CryptPad";
=======
// 1.12.0 - Minotaur
out.userlist_pending = "Pendiente...";
out.contacts_typeHere = "Escribe un mensaje aquí...";
@ -563,6 +554,9 @@ define(function () {
out.todo_markAsCompleteTitle = "Marcar esta tarea como completa";
out.todo_markAsIncompleteTitle = "Marcar esta tarea como incompleta";
out.todo_removeTaskTitle = "Borrar esta tarea de la lista";
>>>>>>> fb13e656b7b3ee611bf195a1f1ccf7475f2f1ee4
// 1.13.0 - Naiad
out.topbar_whatIsCryptpad = "Qué es CryptPad";
return out;
});

Loading…
Cancel
Save