改进后台日期显示

改进登录页面居中问题
This commit is contained in:
fen
2013-12-10 10:31:38 +08:00
parent 528ed53624
commit 5346434a2b
4 changed files with 74 additions and 56 deletions

View File

@@ -600,8 +600,10 @@ button {
.latest-link span {
display: inline-block;
margin-right: 4px;
width: 45px;
padding-right: 8px;
border-right: 1px solid #ECECEC;
width: 37px;
text-align: right;
color: #999; }
.update-check {
@@ -610,11 +612,16 @@ button {
/**
* 登录框
*/
.typecho-login-wrap {
display: table;
margin: 0 auto;
height: 100%; }
.typecho-login {
margin: 150px auto 0;
display: table-cell;
width: 280px;
height: 100%;
text-align: center; }
text-align: center;
vertical-align: middle; }
.typecho-login h1 {
margin-bottom: 1em; }

View File

@@ -9,34 +9,35 @@ Typecho_Cookie::delete('__typecho_remember_name');
include 'header.php';
?>
<div class="typecho-login">
<h1><a href="http://typecho.org" class="i-logo">Typecho</a></h1>
<form action="<?php $options->loginAction(); ?>" method="post" name="login" role="form">
<p>
<label for="name" class="sr-only"><?php _e('用户名'); ?></label>
<input type="text" id="name" name="name" value="<?php echo $rememberName; ?>" placeholder="<?php _e('用户名'); ?>" class="text-l w-100" />
<div class="typecho-login-wrap">
<div class="typecho-login">
<h1><a href="http://typecho.org" class="i-logo">Typecho</a></h1>
<form action="<?php $options->loginAction(); ?>" method="post" name="login" role="form">
<p>
<label for="name" class="sr-only"><?php _e('用户名'); ?></label>
<input type="text" id="name" name="name" value="<?php echo $rememberName; ?>" placeholder="<?php _e('用户名'); ?>" class="text-l w-100" />
</p>
<p>
<label for="password" class="sr-only"><?php _e('密码'); ?></label>
<input type="password" id="password" name="password" class="text-l w-100" placeholder="<?php _e('密码'); ?>" />
</p>
<p class="submit">
<button type="submit" class="btn-l w-100 primary"><?php _e('登录'); ?></button>
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer')); ?>" />
</p>
<p>
<label for="remember"><input type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('记住我'); ?></label>
</p>
</form>
<p class="more-link">
<a href="<?php $options->siteUrl(); ?>"><?php _e('返回首页'); ?></a>
<?php if($options->allowRegister): ?>
&bull;
<a href="<?php $options->registerUrl(); ?>"><?php _e('用户注册'); ?></a>
<?php endif; ?>
</p>
<p>
<label for="password" class="sr-only"><?php _e('密码'); ?></label>
<input type="password" id="password" name="password" class="text-l w-100" placeholder="<?php _e('密码'); ?>" />
</p>
<p class="submit">
<button type="submit" class="btn-l w-100 primary"><?php _e('登录'); ?></button>
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer')); ?>" />
</p>
<p>
<label for="remember"><input type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('记住我'); ?></label>
</p>
</form>
<p class="more-link">
<a href="<?php $options->siteUrl(); ?>"><?php _e('返回首页'); ?></a>
<?php if($options->allowRegister): ?>
&bull;
<a href="<?php $options->registerUrl(); ?>"><?php _e('用户注册'); ?></a>
<?php endif; ?>
</p>
</div>
</div>
<?php
include 'common-js.php';
@@ -44,6 +45,7 @@ include 'common-js.php';
<script>
$(document).ready(function () {
$('#name').focus();
$('body').css('height', '100%');
});
</script>
<?php

View File

@@ -11,28 +11,29 @@ Typecho_Cookie::delete('__typecho_remember_mail');
include 'header.php';
?>
<div class="typecho-login">
<h1><a href="http://typecho.org" class="i-logo">Typecho</a></h1>
<form action="<?php $options->registerAction(); ?>" method="post" name="register" role="form">
<p>
<label for="name" class="sr-only"><?php _e('用户名'); ?></label>
<input type="text" id="name" name="name" placeholder="<?php _e('用户名'); ?>" value="<?php echo $rememberName; ?>" class="text-l w-100" />
<div class="typecho-login-wrap">
<div class="typecho-login">
<h1><a href="http://typecho.org" class="i-logo">Typecho</a></h1>
<form action="<?php $options->registerAction(); ?>" method="post" name="register" role="form">
<p>
<label for="name" class="sr-only"><?php _e('用户名'); ?></label>
<input type="text" id="name" name="name" placeholder="<?php _e('用户名'); ?>" value="<?php echo $rememberName; ?>" class="text-l w-100" />
</p>
<p>
<label for="mail" class="sr-only"><?php _e('Email'); ?></label>
<input type="email" id="mail" name="mail" placeholder="<?php _e('Email'); ?>" value="<?php echo $rememberMail; ?>" class="text-l w-100" />
</p>
<p class="submit">
<button type="submit" class="btn-l w-100 primary"><?php _e('注册'); ?></button>
</p>
</form>
<p class="more-link">
<a href="<?php $options->siteUrl(); ?>"><?php _e('返回首页'); ?></a>
&bull;
<a href="<?php $options->adminUrl('login.php'); ?>"><?php _e('用户登录'); ?></a>
</p>
<p>
<label for="mail" class="sr-only"><?php _e('Email'); ?></label>
<input type="email" id="mail" name="mail" placeholder="<?php _e('Email'); ?>" value="<?php echo $rememberMail; ?>" class="text-l w-100" />
</p>
<p class="submit">
<button type="submit" class="btn-l w-100 primary"><?php _e('注册'); ?></button>
</p>
</form>
<p class="more-link">
<a href="<?php $options->siteUrl(); ?>"><?php _e('返回首页'); ?></a>
&bull;
<a href="<?php $options->adminUrl('login.php'); ?>"><?php _e('用户登录'); ?></a>
</p>
</div>
</div>
<?php
include 'common-js.php';
@@ -40,6 +41,7 @@ include 'common-js.php';
<script>
$(document).ready(function () {
$('#name').focus();
$('body').css('height', '100%');
});
</script>
<?php

View File

@@ -276,8 +276,10 @@ a.button:hover, a.balloon-button:hover {
span {
display: inline-block;
margin-right: 4px;
width: 45px;
padding-right: 8px;
border-right: 1px solid #ECECEC;
width: 37px;
text-align: right;
color: #999;
}
}
@@ -289,11 +291,16 @@ a.button:hover, a.balloon-button:hover {
/**
* 登录框
*/
.typecho-login {
margin: 150px auto 0;
width: 280px;
.typecho-login-wrap {
display: table;
margin: 0 auto;
height: 100%;
}
.typecho-login {
display: table-cell;
width: 280px;
text-align: center;
vertical-align: middle;
h1 {
margin-bottom: 1em;
}