XF 2.3 Login & register : FA icons

Old Nick

Well-known member
What is the best way to replace the Login and Register texts (navbar) with FA icons on mobile view only?
Thanks.
 
Solution
Hi @Old Nick!

I would go with this in extra.less template:
Less:
@media (max-width: @xf-responsiveMedium) {
    .p-navgroup-link--logIn, .p-navgroup-link--register {
        .p-navgroup-linkText {
            display: none;
        }
    }
}
Hi @Old Nick!

I would go with this in extra.less template:
Less:
@media (max-width: @xf-responsiveMedium) {
    .p-navgroup-link--logIn, .p-navgroup-link--register {
        .p-navgroup-linkText {
            display: none;
        }
    }
}
 
Solution
Great ! Thank you very much.

Less:
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--logIn:before,
.p-offCanvasRegisterLink [href*="login"]:before {
       .m-faIcon(@fa-var-key);
}
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--register:before,
.p-offCanvasRegisterLink [href*="register"]:before {
       .m-faIcon(@fa-var-clipboard);
}

@media (max-width: @xf-responsiveMedium) {
    .p-navgroup-link--logIn, .p-navgroup-link--register {
        .p-navgroup-linkText {
            display: none;
        }
    }
}
 
Back
Top Bottom