From 2299cc85f96e9425a6ae9885a2e53fa406361ead Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 11 Mar 2022 13:06:31 +0530 Subject: [PATCH] apply even spacing in home page footer ...depending on whether legal column is displayed --- customize.dist/pages.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index b438e4a58..8080968b1 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -73,12 +73,13 @@ define([ return select; }; - var footerCol = function (title, L, literal) { - return h('div.col-sm-3', [ + var footerCol = function (title, L, n) { + n = n || 3; + return h('div.col-sm-' + n, [ h('ul.list-unstyled', [ h('li.footer-title', { 'data-localization': title, - }, title? Msg[title]: literal ) + }, Msg[title]) ].concat(L.map(function (l) { return h('li', [ l ]); })) @@ -153,10 +154,12 @@ define([ ]); } + var n = legalFooter ? 3: 4; + return h('footer', [ h('div.container', [ h('div.row', [ - h('div.col-sm-3', [ + h('div.col-sm-' + n, [ h('div.cp-logo-foot', [ h('img', { src: '/customize/CryptPad_logo.svg', @@ -165,21 +168,21 @@ define([ }), 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, ]) ]),