Merge branch 'sandpaper-static' into 4.15-candidate

master
ansuz 3 years ago
commit 0a9419c248

@ -212,9 +212,9 @@ define([
h('span.logo-font', 'CryptPad') h('span.logo-font', 'CryptPad')
]), ]),
footLink('https://cryptpad.org', null, 'Website', 'link'), footLink('https://cryptpad.org', null, 'Website', 'link'),
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate') // XXX DB: add OpenCollective icon footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate', null, 'money') // XXX DB: add OpenCollective icon
]), ]),
h('.div.cp-footer-center', [ h('div.cp-footer-center', [
h('div.cp-footer-language', [ h('div.cp-footer-language', [
h('i.fa.fa-language', {'aria-hidden': 'true'}), h('i.fa.fa-language', {'aria-hidden': 'true'}),
languageSelector() languageSelector()
@ -254,17 +254,16 @@ define([
]); ]);
} }
/* // var button = h('button.navbar-toggler', {
var button = h('button.navbar-toggler', { // 'type':'button',
'type':'button', // 'data-toggle':'collapse',
/*'data-toggle':'collapse', // 'data-target':'#menuCollapse',
'data-target':'#menuCollapse', // 'aria-controls': 'menuCollapse',
'aria-controls': 'menuCollapse', // 'aria-expanded':'false',
'aria-expanded':'false', // 'aria-label':'Toggle navigation'
'aria-label':'Toggle navigation' // }, h('i.fa.fa-bars '));
}, h('i.fa.fa-bars ')); */
// // XXX button to collapse navbar on small screens
// XXX button to collapse navbar on small screens
// $(button).click(function () { // $(button).click(function () {
// if ($('#menuCollapse').is(':visible')) { // if ($('#menuCollapse').is(':visible')) {
// return void $('#menuCollapse').slideUp(); // return void $('#menuCollapse').slideUp();
@ -273,7 +272,7 @@ define([
// }); // });
return h('nav.navbar.navbar-expand-lg', return h('nav.navbar.navbar-expand-lg',
// XXX add link back to index.html on footer logo // XXX DB add link back to index.html on other pages
// h('a.navbar-brand', { href: '/index.html'}, [ // h('a.navbar-brand', { href: '/index.html'}, [
// h('img', { // h('img', {
// src: '/customize/CryptPad_logo.svg?', // src: '/customize/CryptPad_logo.svg?',
@ -281,14 +280,15 @@ define([
// alt: '' // alt: ''
// }), 'CryptPad' // }), 'CryptPad'
// ]), // ]),
//button, XXX collapse button // button, // XXX collapse button
h('div', [ // add .collapse.navbar-collapse.justify-content-end#menuCollapse to div below to enable collapse button
[
// XXX remove about page // XXX remove about page
// h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.about), // 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('a.nav-item.nav-link', { href: 'https://docs.cryptpad.fr'},
[h('i.fa.fa-book', {'aria-hidden':'true'}),Msg.docs_link]), [h('i.fa.fa-book', {'aria-hidden':'true'}),Msg.docs_link]),
].concat(rightLinks)) ].concat(rightLinks)
); );
}; };

@ -116,6 +116,9 @@ define([
var fastLink = k => pageLink(Pages.customURLs[k], k); var fastLink = k => pageLink(Pages.customURLs[k], k);
// XXX DB
Msg.terms = "Terms of Service";
// XXX DB: this may be wrong, pasted over form pages.js // XXX DB: this may be wrong, pasted over form pages.js
var imprintLink = fastLink('imprint'); var imprintLink = fastLink('imprint');
var privacyLink = fastLink('privacy'); var privacyLink = fastLink('privacy');
@ -191,9 +194,9 @@ define([
h('i.fa.fa-map-pin', {'aria-hidden': 'true'}), h('i.fa.fa-map-pin', {'aria-hidden': 'true'}),
'Encrypted data is hosted in: France (OVH)' // XXX Use instance location 'Encrypted data is hosted in: France (OVH)' // XXX Use instance location
]), ]),
termsLink, // XXX DB: insert link to ToS if available termsLink,
privacyLink, // XXX DB: insert link to privacy policy if available privacyLink,
imprintLink // XXX DB: insert link to imprint if available imprintLink
]), ]),
h('div.col-md-6', [ h('div.col-md-6', [
h('div.cp-app-grid', [ h('div.cp-app-grid', [
@ -207,8 +210,8 @@ define([
]), ]),
h('a.cp-app-drive', {'href': '/drive/'}, [ // XXX check this is correct h('a.cp-app-drive', {'href': '/drive/'}, [ // XXX check this is correct
h('i.fa.fa-hdd-o', {'aria-hidden': 'true'}), h('i.fa.fa-hdd-o', {'aria-hidden': 'true'}),
'Drive: 1GB' // XXX Use instance default storage 'Drive: 1GB' // XXX DB TODO: Use instance default storage
]) // XXX DB TODO: add drive link ])
]) ])
]), ]),
notice notice

@ -5,6 +5,7 @@ define([
'/customize/pages.js', '/customize/pages.js',
'/api/config', '/api/config',
], function (h, UI, Msg, Pages, Config) { ], function (h, UI, Msg, Pages, Config) {
Msg.login_instance = "Connect to your account on {0}"; // XXX insert instance name
return function () { return function () {
document.title = Msg.login_login; document.title = Msg.login_login;
return [h('div#cp-main', [ return [h('div#cp-main', [
@ -14,6 +15,7 @@ define([
h('div.row', [ h('div.row', [
h('div.col-md-3'), h('div.col-md-3'),
h('div#userForm.form-group.hidden.col-md-6', [ h('div#userForm.form-group.hidden.col-md-6', [
h('div.cp-login-instance',Msg.login_instance),
h('input.form-control#name', { h('input.form-control#name', {
name: 'name', name: 'name',
type: 'text', type: 'text',
@ -33,11 +35,11 @@ define([
UI.createCheckbox('import-recent', Msg.register_importRecent), UI.createCheckbox('import-recent', Msg.register_importRecent),
]), ]),
h('div.extra', [ h('div.extra', [
h('button.login', Msg.login_login),
(Config.restrictRegistration? (Config.restrictRegistration?
undefined: undefined:
h('button#register.cp-secondary', Msg.login_register) h('button#register.cp-secondary', Msg.login_register)
) ),
h('button.login', Msg.login_login)
]) ])
]), ]),
h('div.col-md-3') h('div.col-md-3')

@ -27,8 +27,8 @@ define([
h('div.row.cp-page-title', h('h1', Msg.register_header)), h('div.row.cp-page-title', h('h1', Msg.register_header)),
//h('div.row.cp-register-det', content), //h('div.row.cp-register-det', content),
].concat(content)), ].concat(content)),
Pages.infopageFooter(),
]), ]),
Pages.infopageFooter(),
]; ];
}; };
@ -45,6 +45,8 @@ define([
termsCheck = h('div.checkbox-container', tos); termsCheck = h('div.checkbox-container', tos);
} }
Msg.register_instance = "Creating a new account on {0}"; // XXX DB
return frame([ return frame([
h('div.row.cp-register-det', [ h('div.row.cp-register-det', [
h('div#data.hidden.col-md-6', [ h('div#data.hidden.col-md-6', [
@ -52,13 +54,13 @@ define([
Pages.setHTML(h('div.cp-register-notes'), Msg.register_notes) Pages.setHTML(h('div.cp-register-notes'), Msg.register_notes)
]), ]),
h('div.cp-reg-form.col-md-6', [ h('div.cp-reg-form.col-md-6', [
h('img.img-fluid', {
src: '/customize/images/swallow-the-key.png?' + urlArgs
}),
h('div#userForm.form-group.hidden', [ h('div#userForm.form-group.hidden', [
h('a', { h('div.cp-register-instance', [
href: '/features.html' Msg.register_instance, , h('br'),
}, Msg.register_whyRegister), h('a', {
href: '/features.html'
}, Msg.register_whyRegister)
]),
h('input.form-control#username', { h('input.form-control#username', {
type: 'text', type: 'text',
autocomplete: 'off', autocomplete: 'off',

@ -266,6 +266,7 @@
@cp_static-footer-border: @cryptpad_color_grey_600; @cp_static-footer-border: @cryptpad_color_grey_600;
@cp_static-topbar-fg: @cryptpad_color_brand_300; @cp_static-topbar-fg: @cryptpad_color_brand_300;
@cp_static-card-bg: @cryptpad_color_grey_800; @cp_static-card-bg: @cryptpad_color_grey_800;
@cp_static-danger: @cryptpad_color_red_fade;
@cp_static-img-invert-filter: hue-rotate(200grad) invert(); @cp_static-img-invert-filter: hue-rotate(200grad) invert();
// Limit // Limit

@ -265,6 +265,7 @@
@cp_static-footer-border: @cryptpad_color_white; @cp_static-footer-border: @cryptpad_color_white;
@cp_static-topbar-fg: @cryptpad_color_brand; @cp_static-topbar-fg: @cryptpad_color_brand;
@cp_static-card-bg: @cryptpad_color_white; @cp_static-card-bg: @cryptpad_color_white;
@cp_static-danger: fade(@cryptpad_color_red, 30%);
@cp_static-img-invert-filter: none; @cp_static-img-invert-filter: none;
// Limit // Limit

@ -112,7 +112,7 @@ body.html {
border: none; border: none;
padding: 10px 20px; padding: 10px 20px;
margin-right: 10px; margin-right: 10px;
border-radius: 0px; border-radius: @infopages-radius;
cursor: pointer; cursor: pointer;
&:hover, &:focus { &:hover, &:focus {
background-color: contrast(@cp_buttons-primary-text, darken(@cp_buttons-primary, 10%), lighten(@cp_buttons-primary, 10%)); background-color: contrast(@cp_buttons-primary-text, darken(@cp_buttons-primary, 10%), lighten(@cp_buttons-primary, 10%));
@ -125,9 +125,9 @@ body.html {
} }
.form-group { .form-group {
& > * { // & > * {
margin-top: 0.5em; // margin-bottom: 0.5em;
} // }
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -145,7 +145,6 @@ body.html {
} }
} }
footer { footer {
background-color: @cp_static-footer; background-color: @cp_static-footer;
padding: 10px; padding: 10px;
align-self: normal; // override align-items:center from parent in index.html align-self: normal; // override align-items:center from parent in index.html
@ -153,15 +152,13 @@ body.html {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
// .container { flex-direction: row;
// margin-bottom: 20px; @media screen and (max-width: 830px) {
// a { flex-direction: column;
// color: @cp_static-link; div {
// &:visited { margin-bottom: 10px;
// color: @cp_static-link; }
// } }
// }
// }
.cp-footer-left, .cp-footer-right { .cp-footer-left, .cp-footer-right {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -267,7 +264,7 @@ body.html {
} }
.nav-link { .nav-link {
padding: 0.5em 0.7em; padding: 0.5em 0.7em;
margin-left: 10px; margin: 5px;
color: @cp_static-link; color: @cp_static-link;
display: inline-block; display: inline-block;
&:hover { &:hover {
@ -294,26 +291,5 @@ body.html {
color: @cp_static-topbar-fg; color: @cp_static-topbar-fg;
} }
} }
@media (max-width: 1000px) {
#menuCollapse {
text-align: right;
/* @media (min-width: 576px) {
top: 100%;
background: rgba(255,255,255,0.8);
position: absolute;
right: 0px;
padding: 0 20px;
z-index: 1;
}
*/
}
.navbar-nav a {
text-align: right !important;
}
.cp-register-btn {
margin-right: 13px;
text-align: center;
}
}
} }

@ -22,10 +22,11 @@
.cp-shadow(); .cp-shadow();
border: none; border: none;
background-color: @cp_static-card-bg; background-color: @cp_static-card-bg;
border-radius: 0px;; border-radius: @infopages-radius;
.title-card { .title-card {
background-color: @cryptpad_color_brand; background-color: @cryptpad_color_brand;
padding: 20px; padding: 20px;
border-radius: @infopages-radius @infopages-radius 0 0 ;
} }
.card-body, .title-card { .card-body, .title-card {
display: flex; display: flex;

@ -10,11 +10,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.container {
@media only screen and (max-device-width : 576px) {
margin-top: 6em;
}
}
& > .cp-container { & > .cp-container {
flex: 1; flex: 1;
display: flex; display: flex;

@ -23,11 +23,16 @@
.cp-shadow(); .cp-shadow();
background-color: @cp_static-card-bg; background-color: @cp_static-card-bg;
padding: 10px; padding: 10px;
margin: 0 10px 10px 10px;
border-radius: @infopages-radius-L;
.cp-login-instance {
margin-bottom: 10px;
}
.form-control { .form-control {
border-radius: 0; border-radius: @infopages-radius;
color: @cryptpad_text_col; color: @cryptpad_text_col;
background-color: @cp_forms-bg; background-color: @cp_forms-bg;
margin-bottom: 5px; margin-bottom: 10px;
&:focus { &:focus {
border-color: @cryptpad_color_brand; border-color: @cryptpad_color_brand;
} }
@ -43,14 +48,8 @@
} }
.extra { .extra {
margin-top: 1em; margin-top: 1em;
button.login {
#register { margin-right: 0px;
border-color: @cryptpad_color_brand;
background: @cryptpad_color_white;
color: @cryptpad_color_brand;
padding: 10px;
border-radius: 0;
margin: 0px;
} }
} }
} }

@ -13,13 +13,9 @@
.cp-container { .cp-container {
.form-group { .form-group {
.checkbox-container { .cp-register-instance {
&:nth-of-type(1) { text-align: center;
margin-top: 2em; margin-bottom: 10px;
}
&:last-of-type {
margin-bottom: 1em;
}
} }
#register { #register {
&.btn { &.btn {
@ -85,12 +81,13 @@
position: relative; position: relative;
z-index: 2; z-index: 2;
margin-bottom: 100px; margin-bottom: 100px;
border-radius: @infopages-radius-L;
.cp-shadow(); .cp-shadow();
.form-control { .form-control {
border-radius: 0; border-radius: @infopages-radius;
color: @cryptpad_text_col; color: @cryptpad_text_col;
background-color: @cp_forms-bg; background-color: @cp_forms-bg;
margin-top: 5px; margin-bottom: 10px;
&:focus { &:focus {
border-color: @cryptpad_color_brand; border-color: @cryptpad_color_brand;
} }
@ -100,7 +97,7 @@
color: @cryptpad_text_col; color: @cryptpad_text_col;
} }
button#register { button#register {
margin: 0px; margin-top: 10px;
} }
} }
@ -119,7 +116,7 @@
content: "\f071"; content: "\f071";
} }
.red { .red {
color: @cryptpad_color_red; background-color: @cp_static-danger;
} }
} }
} }

Loading…
Cancel
Save