HTML (Xenforo) Дизайн премиум класса входа в панель управления

memer_faud

Участник
Автор темы
57
13
Было:
2025-04-20_20-37-14.png


Стало:
2025-04-20_20-38-56.png


Инструкция по изменению шаблона:
/admin.php?template-modifications Откройте шаблон модификации "login", а затем найдите:
HTML:
<xf:js src="xf/login_signup.js" min="1" />

Добавьте этот код:
HTML:
<xf:css src="login.less" />

Теперь найдите код:
HTML:
<div class="blocks">

Измените его следующим образом:
HTML:
<div class="blocks OriginLoginForm">



Теперь найдите:
HTML:
<xf:textboxrow name="login" value="{$login}" autofocus="autofocus" autocomplete="username"
                              label="{{ phrase('your_name_or_email_address') }}" />
        
                          <xf:passwordboxrow name="password" autocomplete="current-password"
                              label="{{ phrase('password') }}">
        
                              <xf:html>
                                  <a href="{{ link('lost-password') }}" data-xf-click="overlay">{{ phrase('forgot_your_password') }}</a>
                              </xf:html>
                          </xf:passwordboxrow>

И измените его этим кодом:
HTML:
<div class="originicon originiconbg"></div>
        <xf:textboxrow name="login" value="{$login}" autofocus="autofocus" autocomplete="username"
        placeholder="{{ phrase('your_name_or_email_address') }}" />

    <xf:passwordboxrow name="password" autocomplete="current-password"
        placeholder="{{ phrase('password') }}">
    </xf:passwordboxrow>

Найдите код:
HTML:
<xf:checkboxrow>
                              <xf:option name="remember" selected="true">{{ phrase('stay_logged_in') }}</xf:option>
                          </xf:checkboxrow>

И измените код на это:

HTML:
<xf:checkboxrow>
                              <xf:option name="remember" selected="true">{{ phrase('stay_logged_in') }}</xf:option>
                        
                          <xf:html>
                                  <a href="{{ link('lost-password') }}" data-xf-click="overlay">{{ phrase('forgot_your_password') }}</a>
                              </xf:html>
                          </xf:checkboxrow>
                        
                                  <div class="buttonGroup">
                          <button type="submit" class="rgn-button rgn-mavi-button button--cta button button--icon button--icon--login"><span class="button-text">{{ phrase('login') }} </span></button>
                          <em class="Ayrac">veya</em>
                        
                              <a href="/register/"  class="rgn-button rgn-pembe-button button"><span class="button-text"><i class="fal fa-user-plus"></i>{{ phrase('register') }}</span></a>
                        
                          </div>

Теперь найдите этот код:
HTML:
</div>
                      <xf:submitrow icon="login" />
                  </div>
                  <xf:if is="$xf.options.registrationSetup.enabled">
                      <div class="block-outer block-outer--after">
                          <div class="block-outer-middle">
                              {{ phrase('dont_have_account_question') }} <xf:button href="{{ link('register') }}">{{ phrase('register_now') }}</xf:button>
                          </div>
                      </div>
                  </xf:if>
              </xf:form>
        
              <xf:if is="$providers is not empty">
                  <div class="blocks-textJoiner"><span></span><em>{{ phrase('or_separator') }}</em><span></span></div>
        
                  <div class="block">
                      <div class="block-container">
                          <div class="block-body">
                              <xf:formrow rowtype="button"
                                  label="{{ phrase('log_in_using') }}">
        
                                  <ul class="listHeap">
                                      <xf:foreach loop="$providers" value="$provider">
                                          <li>
                                              <xf:macro template="connected_account_macros" name="button"
                                                  arg-provider="{$provider}" />
                                          </li>
                                      </xf:foreach>
                                  </ul>
                              </xf:formrow>
                          </div>
                      </div>
                  </div>
              </xf:if>
          </div>

Измените на это:
HTML:
<xf:if is="$providers is not empty">
                              <xf:formrow rowtype="button">
        
                                  <ul class="listHeaporigin">
                                      <xf:foreach loop="$providers" value="$provider">
                                          <li>
                                              <xf:macro template="connected_account_macros" name="button"
                                                  arg-provider="{$provider}" />
                                          </li>
                                      </xf:foreach>
                                  </ul>
                              </xf:formrow>
                      </xf:if>
                      </div>
                  </div>
              </xf:form>
            
                      </div>

В завершение, необходимо создать файл-шаблон с именем login.less, вставить предложенный код внутрь него, сохранить изменения!
Less:
.OriginLoginForm {
            margin: 0 auto;
        }
      
        .OriginLoginForm .block-body {
            padding: 25px 0;
        }
      
        .OriginLoginForm .input {
            text-align: center;
        }
      
        .buttonGroup {
            display: inline-block;
            vertical-align: top;
            padding-bottom: 20px;
            display: flex;
            margin: 25px 25px;
            justify-content: center;
        }
      
        .buttonGroup > .button {
            width: 50%;
            margin: 8px;
            padding-top: 7px;
            padding-bottom: 7px;
            text-transform: capitalize;
            font-weight: 700;
            float: left;
            border: 0;
      
        }
      
      
      
        .rgn-button {
            flex: 1 1 auto;
            text-transform: capitalize;
            background-size: 200% auto !important;
            color: white;
            text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
        }
      
        .rgn-pembe-button {
            background-image: linear-gradient(to right, #8122d8 0%, #c470e0 51%, #cd43ef 100%) !important;
            color: white !important;
        }
        .rgn-mavi-button {
        background-image: linear-gradient(to right, #248fa0 0%, #4dbdde 51%, #047caa 100%) !important;
        color: white !important;
        }
      
        .rgn-button:hover {
            background-position: right center !important;
        }
      
        .button, a.button{transition: all 0.5s;}
      
        .Ayrac {
            width: 48px;
            height: 41px;
            max-height: 41px;
            display: inline-block;
            position: relative;
            margin: 6px -20px;
            line-height: 41px;
            background: #fff;
            color: #777;
            text-align: center;
            border-radius: 50%;
        }
      
      
      
        .OriginLoginForm .formRow--input>dt,
        .OriginLoginForm .inputGroup-text,
        .OriginLoginForm .formRow>dt,
        .OriginLoginForm .block-outer.block-outer--after,
        .OriginLoginForm .blocks-textJoiner
        {display: none;
        }
      
      
      
      
        .OriginLoginForm .inputChoices {
               display:inline-block;
            margin-right: 25px;
            margin-top: -5px;
        }
      
        .OriginLoginForm .formRow>dd {
            width: 100%;
            padding: 10px 10px 0px 10px;
            text-align: center;
        }
      
        .originiconbg {
            background-color: transparent;
        }
        .originicon {
               background: url(https://i.hizliresim.com/cFaEb7.png) no-repeat;
            animation: donusorigin 4s infinite linear;
            display: block;
            width: 64px;
            height: 64px;
            margin: 0 auto;
            margin-bottom: 6px;
        }
      
        @keyframes donusorigin {
      
            0% {
            -webkit-transform: rotate(0deg);
        }
        100% {
            -webkit-transform: rotate(360deg);
        }}
      
        .fa-user-plus:before {
    content: "\f234";
    margin-right: 5px;
}
        .listHeaporigin {
            list-style: none;
            margin: 0;
            padding: 0;
            margin-top: -35px;
            text-align: center;
        }
 
  • Эм
  • Грустно
Реакции: The Spark и #Northn