diff --git a/customize.dist/images/bkcontact.jpg b/customize.dist/images/bkcontact.jpg
deleted file mode 100644
index bae61ba1a..000000000
Binary files a/customize.dist/images/bkcontact.jpg and /dev/null differ
diff --git a/customize.dist/images/email.svg b/customize.dist/images/email.svg
index e2e566e6e..61f7e6137 100644
--- a/customize.dist/images/email.svg
+++ b/customize.dist/images/email.svg
@@ -1,25 +1,66 @@
-
-
-
+
+
diff --git a/customize.dist/images/github.svg b/customize.dist/images/github.svg
index 16cd68786..18c5b45e8 100644
--- a/customize.dist/images/github.svg
+++ b/customize.dist/images/github.svg
@@ -1,22 +1,77 @@
-
-
-
diff --git a/customize.dist/images/mastodon.svg b/customize.dist/images/mastodon.svg
index 120b91a5f..b0e000e5e 100644
--- a/customize.dist/images/mastodon.svg
+++ b/customize.dist/images/mastodon.svg
@@ -1,4 +1,57 @@
-
\ No newline at end of file
+
+
diff --git a/customize.dist/images/sayhi.svg b/customize.dist/images/sayhi.svg
index 22c7463cb..dfe5e2635 100644
--- a/customize.dist/images/sayhi.svg
+++ b/customize.dist/images/sayhi.svg
@@ -1,17 +1,69 @@
-
-
-
diff --git a/customize.dist/images/support.svg b/customize.dist/images/support.svg
new file mode 100644
index 000000000..38a666420
--- /dev/null
+++ b/customize.dist/images/support.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/customize.dist/images/twiitter.svg b/customize.dist/images/twiitter.svg
index bed259b76..785e36cc2 100644
--- a/customize.dist/images/twiitter.svg
+++ b/customize.dist/images/twiitter.svg
@@ -1,17 +1,69 @@
-
-
-
diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js
index 83ee5b8f0..41acbabd8 100644
--- a/customize.dist/pages/contact.js
+++ b/customize.dist/pages/contact.js
@@ -2,54 +2,85 @@ define([
'/api/config',
'/common/hyperscript.js',
'/customize/messages.js',
- '/customize/pages.js'
-], function (Config, h, Msg, Pages) {
+ '/customize/pages.js',
+ '/common/outer/local-store.js'
+], function (Config, h, Msg, Pages, LocalStore) {
+
+ // XXX
+ Msg.contact_adminHint = "For any issues related to your account, storage limit, or availability of the service." // existing key
+
+
return function () {
+ var adminEmail = Config.adminEmail && Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr';
+ var adminMailbox = Config.supportMailbox;
return h('div#cp-main', [
Pages.infopageTopbar(),
- h('div.container-fluid.cp-contdet', [
- h('row.col-12.col-sm-12',
- h('h1.text-center', Msg.contact )
- )
- ]),
h('div.container.cp-container', [
- Config.adminEmail && Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr' ? h('div.row.cp-iconCont.align-items-center', [
+ h('div.row.cp-page-title',[
+ h('div.col-12.text-center', h('h1', Msg.contact)),
+ ]),
+ (adminEmail || adminMailbox) ? h('div.row.cp-iconCont.align-items-center', [
h('div.col-12',
- Pages.setHTML(h('h4.text-center'), Msg.contact_admin),
+ Pages.setHTML(h('h2.text-center'), Msg.contact_admin),
h('p', Msg.contact_adminHint)
),
- h('div.col-12.col-sm-6.col-md-3.col-lg-3',
+ adminEmail ? 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'}),
+ h('img', {
+ src: '/customize/images/email.svg',
+ alt: '',
+ 'aria-hidden': 'true'
+ }),
Msg.contact_email || 'Email'
])
)
)
- ),
+ ) : undefined,
+ (adminMailbox && LocalStore.isLoggedIn()) ? h('div.col-12.col-sm-6.col-md-3.col-lg-3', // XXX show "disabled" support if not logged in
+ h('a.card', {href : "/support/"},
+ h('div.card-body',
+ h('p', [
+ h('img', {
+ src: '/customize/images/support.svg',
+ alt: '',
+ 'aria-hidden': 'true'
+ }),
+ Msg.supportPage || 'Support'
+ ])
+ )
+ )
+ ) : undefined,
]) : undefined,
h('div.row.cp-iconCont.align-items-center', [
h('div.col-12',
- Pages.setHTML(h('h4.text-center'), Msg.contact_dev),
+ Pages.setHTML(h('h2.text-center'), Msg.contact_dev),
h('p', Msg.contact_devHint)
),
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
- h('a.card', {href : "https://twitter.com/cryptpad"},
+ h('a.card', {href : "https://twitter.com/cryptpad"},
h('div.card-body',
h('p', [
// this is not a typo. adblock plus blocks images with src *twitter* apparently
- h('img', {src: '/customize/images/twiitter.svg'}),
+ h('img', {
+ src: '/customize/images/twiitter.svg',
+ alt: '',
+ 'aria-hidden': 'true'}),
'Twitter'
])
)
)
),
h('div.col-12.col-sm-6.col-md-3.col-lg-3',
- h('a.card', {href : "https://social.weho.st/@cryptpad"},
+ h('a.card', {href : "https://social.weho.st/@cryptpad"},
h('div.card-body',
h('p', [
- h('img', {src: '/customize/images/mastodon.svg'}),
+ h('img', {
+ src: '/customize/images/mastodon.svg',
+ alt: '',
+ 'aria-hidden': 'true'
+ }),
'Mastodon'
])
)
@@ -59,17 +90,24 @@ define([
h('a.card', {href : "https://github.com/xwiki-labs/cryptpad/issues/"},
h('div.card-body',
h('p', [
- h('img', {src: '/customize/images/issue.svg'}),
+ h('img', {
+ src: '/customize/images/github.svg',
+ alt: '',
+ 'aria-hidden': 'true'}),
Msg.contact_bug || '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('a.card', {href : "https://app.element.io/#/room/#cryptpad:matrix.xwiki.com"},
h('div.card-body',
h('p', [
- h('img', {src: '/customize/images/sayhi.svg'}),
+ h('img', {
+ src: '/customize/images/sayhi.svg',
+ alt: '',
+ 'aria-hidden': 'true'
+ }),
Msg.contact_chat || 'Chat'
])
)
@@ -79,7 +117,11 @@ define([
h('a.card', {href : "mailto:contact@cryptpad.fr"},
h('div.card-body',
h('p', [
- h('img', {src: '/customize/images/email.svg'}),
+ h('img', {
+ src: '/customize/images/email.svg',
+ alt: '',
+ 'aria-hidden': 'true'
+ }),
Msg.contact_email || 'Email'
])
)
diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less
index 160f22507..789a518dc 100644
--- a/customize.dist/src/less2/include/colortheme.less
+++ b/customize.dist/src/less2/include/colortheme.less
@@ -5,6 +5,7 @@
@colortheme_logo-1: #326599;
@colortheme_logo-2: #0087FF; // XXX Testing if this color works
+@colortheme_logo_2_light: lighten(@colortheme_logo-2, 40%);
@colortheme_link-color: #0275D8;
@colortheme_link-color-visited: #005999;
diff --git a/customize.dist/src/less2/pages/page-contact.less b/customize.dist/src/less2/pages/page-contact.less
index 9f4ed74af..4ae651d61 100644
--- a/customize.dist/src/less2/pages/page-contact.less
+++ b/customize.dist/src/less2/pages/page-contact.less
@@ -7,11 +7,9 @@
.fa {
padding-right: 0.25em;
}
- #cp-main {
- background-color: #fff;
- }
+
.cp-container {
- background: #fff;
+
.cp-iconCont {
h4 {
margin-top: 1.5em;
@@ -19,12 +17,13 @@
}
div {
.card {
- box-shadow: 0 5px 15px rgba(69,145,196, 0.3);
- border-color: #fff;
+ .cp-shadow();
+ border-radius: 0;
margin-bottom: 1em;
+ border: 0;
&:hover, &:focus {
text-decoration: none;
- transform: scale(1.05);
+ background-color: @colortheme_logo_2_light;
}
@media (max-width: 1200px) and (min-width: 769px) {
min-height: 139px;
@@ -39,7 +38,7 @@
min-height: 162px;
}
img {
- max-width: 50px;
+ width: 80px;
margin-bottom: 10px;
}
p {
@@ -49,22 +48,11 @@
align-items: center;
margin: 0;
height: 100%;
+ font-size: 1.3em;
}
}
}
}
}
- .cp-contdet {
- padding-top: 3em;
- padding-bottom: 3em;
- background-image: url(/customize/images/bkcontact.jpg);
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
- h1 {
- font-weight: 700;
- color: #fff;
- }
- }
}