瀏覽代碼

Adaptation thème page de connexion

refactoring
Guillaume Bourgeois 5 年之前
父節點
當前提交
077df8385c
共有 4 個文件被更改,包括 78 次插入16 次删除
  1. +5
    -0
      backend/views/layouts/main-login.php
  2. +5
    -15
      backend/views/site/login.php
  3. +34
    -0
      backend/web/css/screen.css
  4. +34
    -1
      backend/web/sass/_adminlte.scss

+ 5
- 0
backend/views/layouts/main-login.php 查看文件

@@ -42,6 +42,11 @@ use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */

if (class_exists('backend\assets\AppAsset')) {
backend\assets\AppAsset::register($this);
} else {
app\assets\AppAsset::register($this);
}
dmstr\web\AdminLteAsset::register($this);
?>
<?php $this->beginPage() ?>

+ 5
- 15
backend/views/site/login.php 查看文件

@@ -59,16 +59,16 @@ $fieldOptions2 = [

<div class="login-box">
<div class="login-logo">
<a href="#"><b>Admin</b>LTE</a>
<img src="<?= Yii::$app->urlManagerBackend->getBaseUrl(); ?>/img/laboulange4.png" />
La boîte à pain
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Sign in to start your session</p>

<?php $form = ActiveForm::begin(['id' => 'login-form', 'enableClientValidation' => false]); ?>

<?= $form
->field($model, 'username', $fieldOptions1)
->field($model, 'email', $fieldOptions1)
->label(false)
->textInput(['placeholder' => $model->getAttributeLabel('username')]) ?>

@@ -83,7 +83,7 @@ $fieldOptions2 = [
</div>
<!-- /.col -->
<div class="col-xs-4">
<?= Html::submitButton('Sign in', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']) ?>
<?= Html::submitButton('Connexion', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']) ?>
</div>
<!-- /.col -->
</div>
@@ -91,17 +91,7 @@ $fieldOptions2 = [

<?php ActiveForm::end(); ?>

<div class="social-auth-links text-center">
<p>- OR -</p>
<a href="#" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in
using Facebook</a>
<a href="#" class="btn btn-block btn-social btn-google-plus btn-flat"><i class="fa fa-google-plus"></i> Sign
in using Google+</a>
</div>
<!-- /.social-auth-links -->

<a href="#">I forgot my password</a><br>
<a href="register.html" class="text-center">Register a new membership</a>
<a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/request-password-reset']) ; ?>">J'ai oublié mon mot de passe</a><br>

</div>
<!-- /.login-box-body -->

+ 34
- 0
backend/web/css/screen.css 查看文件

@@ -1392,3 +1392,37 @@ a:hover, a:focus, a:active {
.main-header .messages-menu, .main-header .notifications-menu, .main-header .tasks-menu, .main-header .link-control-sidebar {
display: none;
}

/* line 8, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: #F8F1DD;
}
/* line 12, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: "comfortaalight";
}
/* line 15, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 50px;
}
/* line 20, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #BB8757;
border-color: #BB8757;
padding: 5px 10px;
}
/* line 25, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #c29469;
border-color: #BB8757;
}
/* line 31, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #BB8757;
}
/* line 33, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #c29469;
}

+ 34
- 1
backend/web/sass/_adminlte.scss 查看文件

@@ -3,4 +3,37 @@
.messages-menu, .notifications-menu, .tasks-menu, .link-control-sidebar {
display: none ;
}
}
}

body.login-page {
background: none ;
background-color: $color2 ;
.login-box {
.login-logo {
text-align: center ;
font-family: 'comfortaalight' ;
img {
width: 50px ;
}
}
.login-box-body {
.btn-primary {
background-color: $color1 ;
border-color: $color1 ;
padding: 5px 10px ;

&:active {
background-color: lighten($color1, 5) ;
border-color: $color1 ;
}
}

a {
color: $color1 ;
&:hover {
color: lighten($color1, 5) ;
}
}
}
}
}

Loading…
取消
儲存