Fix footer

- make responsive behavior more robust
- add placeholder translation
- remove old code
master
David Benqué 3 years ago
parent f0263d82c2
commit 2778f51656

@ -167,57 +167,7 @@ define([
Pages.docsLink = footLink('https://docs.cryptpad.fr', 'docs_link'); Pages.docsLink = footLink('https://docs.cryptpad.fr', 'docs_link');
Pages.roadmapLink = footLink(customURLs.roadmap, 'footer_roadmap'); Pages.roadmapLink = footLink(customURLs.roadmap, 'footer_roadmap');
Pages.infopageOldFooter = function () { // XXX DB: not used, kept to copy/paste Msg.footer_website = "Project Website"; // XXX
//var terms = footLink('/terms.html', 'footer_tos'); // FIXME this should be configurable like the other legal pages
var legalFooter;
// only display the legal part of the footer if it has content
if (Pages.termsLink || Pages.privacyLink || Pages.imprintLink) {
legalFooter = footerCol('footer_legal', [
Pages.termsLink,
Pages.privacyLink,
Pages.imprintLink,
]);
}
var n = legalFooter ? 3: 4;
return h('footer', [
h('div.container', [
h('div.row', [
h('div.col-sm-' + n, [
h('div.cp-logo-foot', [
h('img', {
src: '/customize/CryptPad_logo.svg',
"aria-hidden": true,
alt: ''
}),
h('span.logo-font', 'CryptPad')
])
]),
footerCol('footer_product', [
footLink('/what-is-cryptpad.html', 'topbar_whatIsCryptpad'),
Pages.docsLink,
footLink('/features.html', Pages.areSubscriptionsAllowed()? 'pricing': 'features'), // Messages.pricing, Messages.features
Pages.sourceLink,
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate'),
], n),
footerCol('footer_aboutUs', [
footLink('https://blog.cryptpad.fr/', 'blog'),
footLink('/contact.html', 'contact'),
footLink('https://github.com/xwiki-labs/cryptpad/wiki/Contributors', 'footer_team'),
footLink('http://www.xwiki.com', null, 'XWiki SAS'),
Pages.roadmapLink,
], n),
legalFooter,
])
]),
h('div.cp-version-footer', [
languageSelector(),
h('span', "CryptPad " + Pages.versionString)
])
]);
};
Pages.infopageFooter = function () { Pages.infopageFooter = function () {
return h('footer.cp-footer', [ return h('footer.cp-footer', [
@ -230,8 +180,11 @@ define([
}), }),
h('span.logo-font', 'CryptPad') h('span.logo-font', 'CryptPad')
]), ]),
footLink('https://cryptpad.org', null, 'Website', 'link'), h('div.cp-logo-btns', [
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate', null, 'money') // XXX DB: add OpenCollective icon footLink('https://cryptpad.org', null, Msg.footer_website, 'link'),
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', [

@ -146,51 +146,30 @@ body.html {
} }
footer { footer {
background-color: @cp_static-footer; background-color: @cp_static-footer;
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
box-shadow: inset 0px 7px 15px -7px rgba(0,0,0,0.3); box-shadow: inset 0px 7px 15px -7px rgba(0,0,0,0.3);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-direction: row; flex-direction: row;
@media screen and (max-width: 830px) { flex-wrap: wrap;
flex-direction: column;
div {
margin-bottom: 10px;
}
}
.cp-footer-left, .cp-footer-right { .cp-footer-left, .cp-footer-right {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap;
align-items: center; align-items: center;
a { a {
margin-left: 10px; margin-right: 10px;
} }
} }
a {
background-color: @cp_static-card-bg;
border-radius: @infopages-radius;
padding: 0.5em 0.7em;
* {
display: inline;
}
i {
margin-right: 5px;
}
&:hover {
color: @cryptpad_text_col;
}
}
.cp-logo-foot { .cp-logo-foot {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
width: 100%;
align-items: center; align-items: center;
margin-right: 20px; padding: 10px;
img { img {
max-height: 40px; max-height: 40px;
display: block;
margin-right: 10px; margin-right: 10px;
} }
.logo-font { .logo-font {
@ -203,7 +182,26 @@ body.html {
} }
.cp-logo-btns {
padding: 10px;
a {
background-color: @cp_static-card-bg;
border-radius: @infopages-radius;
padding: 0.5em 0.7em;
white-space: nowrap;
display: inline-block;
i {
margin-right: 5px;
}
&:hover {
color: @cryptpad_text_col;
}
}
}
.cp-footer-language { .cp-footer-language {
padding: 10px;
margin-right: 10px; margin-right: 10px;
i { i {
font-size: 1.3em; font-size: 1.3em;
@ -219,6 +217,7 @@ body.html {
} }
} }
.cp-footer-version { .cp-footer-version {
padding: 10px;
font-family: 'IBM Plex Mono'; font-family: 'IBM Plex Mono';
} }
// .cp-version-footer { // .cp-version-footer {

Loading…
Cancel
Save