Add icons to nav buttons

This commit is contained in:
David Benqué 2022-05-06 11:10:44 +01:00
parent e444154866
commit d344743308
2 changed files with 10 additions and 3 deletions

View file

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

View file

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