diff --git a/customize.dist/images/mastodon.svg b/customize.dist/images/mastodon.svg new file mode 100644 index 000000000..120b91a5f --- /dev/null +++ b/customize.dist/images/mastodon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/customize.dist/pages.js b/customize.dist/pages.js index e6d29c997..5e0c292c2 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -68,7 +68,7 @@ define([ languageSelector() ]) ], ''), - footerCol('footer_applications', [ + /*footerCol('footer_applications', [ footLink('/drive/', 'main_drive'), footLink('/pad/', 'main_richText'), footLink('/code/', 'main_code'), @@ -76,19 +76,31 @@ define([ footLink('/poll/', 'main_poll'), footLink('/kanban/', 'main_kanban'), footLink('/whiteboard/', null, Msg.type.whiteboard) + ]),*/ + footerCol('footer_product', [ + footLink('/faq.html', 'faq_link'), + footLink('https://github.com/xwiki-labs/cryptpad', null, 'GitHub'), + footLink('https://opencollective.com/cryptpad/contribute/', null, 'Donate'), + footLink('https://github.com/xwiki-labs/cryptpad', 'footer_install'), ]), footerCol('footer_aboutUs', [ - footLink('https://blog.cryptpad.fr', 'blog'), - footLink('https://labs.xwiki.com', null, 'XWiki Labs'), + /*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') + footLink('https://www.open-paas.org', null, 'OpenPaaS'), + footLink('/about.html', 'footer_team'), + footLink('/contact.html', 'contact'), + ]), + footerCol('footer_legal', [ + footLink('/terms.html', 'footer_tos'), + footLink('/privacy.html', 'privacy'), ]), - footerCol('footer_contact', [ + /*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.19.0 (Tapir)") @@ -132,12 +144,12 @@ define([ 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: '/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), + //h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact), + //h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about), ].concat(rightLinks)) ); }; diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js index 9150b67ed..113b5054b 100644 --- a/customize.dist/pages/contact.js +++ b/customize.dist/pages/contact.js @@ -1,8 +1,9 @@ define([ + '/api/config', '/common/hyperscript.js', '/customize/messages.js', '/customize/pages.js' -], function (h, Msg, Pages) { +], function (Config, h, Msg, Pages) { return function () { return h('div#cp-main', [ Pages.infopageTopbar(), @@ -12,35 +13,72 @@ define([ ) ]), h('div.container.cp-container', [ + Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr' ? h('div.row.cp-iconCont.align-items-center', [ + h('div.col-12', + Pages.setHTML(h('h4.text-center'), Msg.contact_admin) + ), + h('div.col-12.col-sm-6.col-md-3.col-lg-3', + h('a.card', {href : "mailto:"+Config.adminEmail}, + h('div.card-body', + h('p', [ + h('img', {src: '/customize/images/email.svg'}), + Msg.contact_email || 'Email' + ]) + ) + ) + ), + ]) : undefined, h('div.row.cp-iconCont.align-items-center', [ h('div.col-12', - Pages.setHTML(h('h4.text-center'), Msg.main_about_p26) + Pages.setHTML(h('h4.text-center'), Msg.contact_dev) ), 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.card-body', + h('p', [ + h('img', {src: '/customize/images/twitter.svg'}), + Msg.contact_devTwitter || 'Twitter' + ]) + ) + ) + ), + h('div.col-12.col-sm-6.col-md-3.col-lg-3', + h('a.card', {href : "https://social.weho.st/@cryptpad"}, + h('div.card-body', + h('p', [ + h('img', {src: '/customize/images/mastodon.svg'}), + Msg.contact_devMastodon || 'Mastodon' + ]) ) ) ), 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.card-body', + h('p', [ + h('img', {src: '/customize/images/issue.svg'}), + Msg.contact_devBug || 'Bug report' + ]) ) ) ), 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.card-body', + h('p', [ + h('img', {src: '/customize/images/sayhi.svg'}), + Msg.contact_devChat || 'Chat' + ]) ) ) ), 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) + h('a.card', {href : "mailto:contact@cryptpad.fr"}, + h('div.card-body', + h('p', [ + h('img', {src: '/customize/images/email.svg'}), + Msg.contact_email || 'Email' + ]) ) ) ), diff --git a/customize.dist/src/less2/pages/page-contact.less b/customize.dist/src/less2/pages/page-contact.less index 10150f597..9f4ed74af 100644 --- a/customize.dist/src/less2/pages/page-contact.less +++ b/customize.dist/src/less2/pages/page-contact.less @@ -19,10 +19,8 @@ } div { .card { - padding: 4em 1em 0.5em 1em; box-shadow: 0 5px 15px rgba(69,145,196, 0.3); border-color: #fff; - text-align: center; margin-bottom: 1em; &:hover, &:focus { text-decoration: none; @@ -40,37 +38,17 @@ @media (max-width: 335px) { min-height: 162px; } - } - &:nth-child(2) { - .card { - background-image: url(/customize/images/twitter.svg); - background-repeat: no-repeat; - background-position: 50% 10%; - background-size: 3rem; - } - } - &:nth-child(3) { - .card { - background-image: url(/customize/images/issue.svg); - background-repeat: no-repeat; - background-position: 50% 10%; - background-size: 3rem; + img { + max-width: 50px; + margin-bottom: 10px; } - } - &:nth-child(4) { - .card { - background-image: url(/customize/images/sayhi.svg); - background-repeat: no-repeat; - background-position: 50% 10%; - background-size: 3rem; - } - } - &:nth-child(5) { - .card { - background-image: url(/customize/images/email.svg); - background-repeat: no-repeat; - background-position: 50% 10%; - background-size: 3rem; + p { + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + margin: 0; + height: 100%; } } } diff --git a/server.js b/server.js index 5375f1148..e604425c0 100644 --- a/server.js +++ b/server.js @@ -18,6 +18,11 @@ try { console.log("You can customize the configuration by copying config/config.example.js to config/config.js"); config = require('./config/config.example'); } + +if (config.adminEmail === 'i.did.not.read.my.config@cryptpad.fr') { + console.log("You can configure the administrator email (adminEmail) in your config/config.js file"); +} + var websocketPort = config.websocketPort || config.httpPort; var useSecureWebsockets = config.useSecureWebsockets || false;