apply even spacing in home page footer

...depending on whether legal column is displayed
pull/1/head
ansuz 3 years ago
parent 14f6d65c7a
commit 2299cc85f9

@ -73,12 +73,13 @@ define([
return select; return select;
}; };
var footerCol = function (title, L, literal) { var footerCol = function (title, L, n) {
return h('div.col-sm-3', [ n = n || 3;
return h('div.col-sm-' + n, [
h('ul.list-unstyled', [ h('ul.list-unstyled', [
h('li.footer-title', { h('li.footer-title', {
'data-localization': title, 'data-localization': title,
}, title? Msg[title]: literal ) }, Msg[title])
].concat(L.map(function (l) { ].concat(L.map(function (l) {
return h('li', [ l ]); return h('li', [ l ]);
})) }))
@ -153,10 +154,12 @@ define([
]); ]);
} }
var n = legalFooter ? 3: 4;
return h('footer', [ return h('footer', [
h('div.container', [ h('div.container', [
h('div.row', [ h('div.row', [
h('div.col-sm-3', [ h('div.col-sm-' + n, [
h('div.cp-logo-foot', [ h('div.cp-logo-foot', [
h('img', { h('img', {
src: '/customize/CryptPad_logo.svg', src: '/customize/CryptPad_logo.svg',
@ -165,21 +168,21 @@ define([
}), }),
h('span.logo-font', 'CryptPad') h('span.logo-font', 'CryptPad')
]) ])
], ''), ]),
footerCol('footer_product', [ footerCol('footer_product', [
footLink('/what-is-cryptpad.html', 'topbar_whatIsCryptpad'), footLink('/what-is-cryptpad.html', 'topbar_whatIsCryptpad'),
Pages.docsLink, Pages.docsLink,
footLink('/features.html', Pages.areSubscriptionsAllowed()? 'pricing': 'features'), // Messages.pricing, Messages.features footLink('/features.html', Pages.areSubscriptionsAllowed()? 'pricing': 'features'), // Messages.pricing, Messages.features
Pages.sourceLink, Pages.sourceLink,
footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate'), footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate'),
]), ], n),
footerCol('footer_aboutUs', [ footerCol('footer_aboutUs', [
footLink('https://blog.cryptpad.fr/', 'blog'), footLink('https://blog.cryptpad.fr/', 'blog'),
footLink('/contact.html', 'contact'), footLink('/contact.html', 'contact'),
footLink('https://github.com/xwiki-labs/cryptpad/wiki/Contributors', 'footer_team'), footLink('https://github.com/xwiki-labs/cryptpad/wiki/Contributors', 'footer_team'),
footLink('http://www.xwiki.com', null, 'XWiki SAS'), footLink('http://www.xwiki.com', null, 'XWiki SAS'),
Pages.roadmapLink, Pages.roadmapLink,
]), ], n),
legalFooter, legalFooter,
]) ])
]), ]),

Loading…
Cancel
Save