Skip to content

Commit

Permalink
ログイン画面をスマートフォンに対応した fix baserproject#1387
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Mar 13, 2020
1 parent 963e3f6 commit 3e3aaf8
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/webroot/theme/admin-third/Layouts/admin/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<meta charset="UTF-8">
<meta name="robots" content="noindex,nofollow" />
<?php $this->BcBaser->title() ?>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<?php
$this->BcBaser->css([
'../js/admin/vendors/bootstrap-4.1.3/bootstrap.min',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?php echo $this->BcForm->create($userModel, ['url' => ['action' => 'reset_password', $this->request->params['prefix'] => true]]) ?>
<?php endif ?>
<div class="submit">
<?php echo $this->BcForm->input($userModel . '.email', array('type' => 'text', 'size' => 60)) ?>
<?php echo $this->BcForm->input($userModel . '.email', array('type' => 'text', 'size' => 34)) ?>
<?php echo $this->BcForm->submit(__d('baser', '送信'), array('div' => false, 'class' => 'btn-red button bca-btn', 'data-bca-btn-status' => 'warning')) ?>
</div>
<?php echo $this->BcForm->end() ?>
Expand Down
4 changes: 4 additions & 0 deletions app/webroot/theme/admin-third/__assets/css/base/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ body {
min-width: 960px; // old
height: 100%; // old
line-height: 1.15; // normalize.css for bootstrap4の上書き防止
background-color: $color_footer;
@include mq(sp) {
min-width: auto;
}
}

body * {
Expand Down
26 changes: 26 additions & 0 deletions app/webroot/theme/admin-third/__assets/css/base/_mixin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$smallRange: 768px;
$mediumRange: 768px;
$largeRange: 1000px;
$mediumRangeForModal: 1110px;
@mixin mq($media) {
@if $media == sp {
@media screen and (max-width: #{$smallRange}) {
@content;
}
}
@if $media == md {
@media screen and (max-width: #{$mediumRange}) {
@content;
}
}
@if $media == pc {
@media screen and (max-width: #{$largeRange}) {
@content;
}
}
@if $media == spModal {
@media screen and (max-width: #{$mediumRangeForModal}) {
@content;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
display: grid;
min-height: 100vh;
grid-template-rows: auto 1fr auto;
@include mq(sp) {
display: block;
}
.bca-header {

}
Expand All @@ -11,4 +14,4 @@
.bca-footer {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
min-width: 960px;
padding-top: 37px;
padding-bottom: 15px;
@include mq(sp) {
min-width: auto;
}
}

// ログイン前
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
border-radius: 5px;
background: $color_lightest;
font-size: 1.4rem;

@include mq(sp) {
max-width: none!important;
}
&__title {
margin-top: 0;
margin-bottom: 40px;
Expand Down Expand Up @@ -100,4 +102,4 @@
background: none;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
margin: 20px;
background-color: $color_background_secondary;
border: 1px solid $color_main_contents_border_color;
@include mq(sp) {
margin:0;
}
}
&__header {
padding: 10px 20px;
Expand Down
1 change: 1 addition & 0 deletions app/webroot/theme/admin-third/__assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@import "../node_modules/normalize.css/normalize";

@import "base/mixin";
@import 'theme/var/colors';
@import 'theme/var/dimensions';
@import 'theme/var/icons';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@
#CreditScrollerInner {
width: 600px;
margin: 0 auto;
@include mq(sp) {
width:100%;
}
}

/* WidgetSetting
Expand Down Expand Up @@ -782,4 +785,4 @@
content: "";
display: block;
clear: both;
}
}
21 changes: 20 additions & 1 deletion app/webroot/theme/admin-third/css/admin/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e3aaf8

Please sign in to comment.