Move the "Sign up now!" button to the header

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,829
Được Like
12,691
Vnxf.vn - This template modification will allow you to move the "Sign up now!" button to the header:

Screenshot_1.png

Firstly it is necessary to increase the height of the header to put the button. To do this go to "Style Properties", "Header and Navigation" and in "Height of Header Logo" put 60px instead of 50px.

Now go to the templates of your style and search for "ad_header". Replace its content with this:
Mã:
<xen:hook name="ad_header" />

<xen:if is="!{$visitor.user_id}">

<div class="loginButton">
        <label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:if $xenOptions.registrationSetup.enabled, {xen:phrase sign_up_now}, {xen:phrase log_in}}</a></label>
</div>

</xen:if>

After doing this search for "EXTRA.css" and add this:
Mã:
#header #SignupButton
{
    float: right;
    margin: 10px 0;
    width: 165px;
}

.sidebar .loginButton
{
    display: none;
}

<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveMediumWidth)
{
    .Responsive #loginBarHandle
    {
        display: inherit;
    }

    .Responsive #header #SignupButton
    {
        display: none;
    }

    .Responsive .sidebar .loginButton
    {
        display: inherit;
    }
}
</xen:if>

This will allow to make the button of the header like the button of the sidebar, but also make the responsiveness perfect.

Video preview: http://screencast.com/t/o3pTujcQCnDM


Nguồn: xenforo.com​
 
  • Like
Reactions: THB

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom