More responsive nav and footer

master
David Benqué 3 years ago
parent 418201ba3f
commit 657323c80d

@ -210,9 +210,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()
@ -252,17 +252,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();
@ -279,14 +278,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)
); );
}; };

@ -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%));
@ -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;
}
}
} }

@ -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;

Loading…
Cancel
Save