[cXF] Icons For Login And Register Buttons

Tutorial/教程 [cXF] Icons For Login And Register Buttons

  • 主题发起人 主题发起人 oksgo
  • 开始时间 开始时间

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • 很荣幸 游客 的到来!开始前请阅读 社区规则 确保您顺利的熟悉本社区。注册用户可以提交资源,如果您有已发布资源的新版本,您可以随时更新版本!

    文件链接损坏,请在文件下方留言,我们将会及时更新来自备份服务器的新链接。

  • 我们拥有多账户检测系统,对于重复注册我们将采取严厉措施!提示:如果您的账户超过180天处于非活动状态,系统将自动删除您的账户!

    We have a multi account detection system, and we will take strict measures against duplicate registrations! Tip: If your account has been inactive for more than 180 days, the system will automatically delete your account!

oksgo

Administrator

管理成员
贡献: 27%
注册
10 16, 2023
消息
1,460
G
6,182 G
  • 主题 作者
  • #1
For XenForo 2.2 add below code to your extra.less template :
代码:
/* Icons for Login and Register buttons */
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--logIn:before,
.p-offCanvasRegisterLink [href*="login"]:before {
    .m-faBase();
    .m-faContent(@fa-var-sign-in, 1em);
    color: #E6BB5C;
}
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--register:before,
.p-offCanvasRegisterLink [href*="register"]:before {
    .m-faBase();
    .m-faContent(@fa-var-key, 1em);
    color: #E6BB5C;
}
/**********/
Or if you want a Pro icon of a specific style change .m-faBase(); like this :
.m-faBase('Pro', @faWeight-solid);

For XenForo 2.3 add below code to your extra.less template :
代码:
/* Icons for Login and Register buttons */
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--logIn:before,
.p-offCanvasRegisterLink [href*="login"]:before {
    .m-faContent(@fa-var-sign-in);
    color: #E6BB5C;
}
.p-navgroup-link.p-navgroup-link--textual.p-navgroup-link--register:before,
.p-offCanvasRegisterLink [href*="register"]:before {
    .m-faContent(@fa-var-key);
    color: #E6BB5C;
}
/**********/
If you want an icon with one of the Font Awesome 5 Pro styles - light, solid or duotone - use the above code like this (example): .m-faContent(@fa-var-duotone-sign-in);. As you can see, you add the style name (in that case duotone) inside the code right after the var-.
 
后退
顶部