From d3447433088cfb0677d78f3c6d339c2dc6ad9d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Fri, 6 May 2022 11:10:44 +0100 Subject: [PATCH] Add icons to nav buttons --- customize.dist/pages.js | 10 +++++++--- customize.dist/src/less2/include/infopages.less | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 370043368..9f914ddc2 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -246,8 +246,9 @@ define([ // }); var isHome = ['/', '/index.html'].includes(window.location.pathname); - var homeLink = h('a.nav-item.nav-link' /* .navbar-brand */, { href: '/index.html' }, [ - 'Home page', // XXX replace with image or whatever + var homeLink = h('a.nav-item.nav-link.cp-back-home' /* .navbar-brand */, { href: '/index.html' }, [ + h('i.fa.fa-arrow-left'), + Msg.homePage ]); return h('nav.navbar.navbar-expand-lg', @@ -263,7 +264,10 @@ define([ // add .collapse.navbar-collapse.justify-content-end#menuCollapse to div below to enable collapse button [ !isHome? homeLink: undefined, - h('a.nav-item.nav-link', { href: '/features.html'}, Pages.areSubscriptionsAllowed()? Msg.pricing: Msg.features), + h('a.nav-item.nav-link', { href: '/features.html'}, [ + h('i.fa.fa-info-circle'), + Pages.areSubscriptionsAllowed()? Msg.pricing: Msg.features + ]), h('a.nav-item.nav-link', { href: 'https://docs.cryptpad.fr'}, [h('i.fa.fa-book', {'aria-hidden':'true'}),Msg.docs_link]), ].concat(rightLinks) diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index 2b3f1fabd..1aec1703c 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -266,6 +266,9 @@ body.html { margin: 5px; color: @cp_static-link; display: inline-block; + &.cp-back-home { + margin-right: auto; + } &:hover { color: @cryptpad_text_col; }