0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Refactored users settings page

Improved standards of CSS and also refactored HTML markup. Search bar
also is implemented, with a prototype animation for displaying input
field.
This commit is contained in:
Matthew Harrison-Jones 2013-06-14 14:01:33 +01:00
parent f2e913ddfd
commit 0d75b737b8
2 changed files with 168 additions and 120 deletions

View file

@ -14,7 +14,6 @@
============================================================================= */ ============================================================================= */
.settings { .settings {
// The main white bg for the page // The main white bg for the page
.wrapper { .wrapper {
background: #fff; background: #fff;
@ -217,95 +216,130 @@
right:0; right:0;
left:0; left:0;
bottom:0; bottom:0;
overflow:auto;
padding:40px; padding:40px;
overflow:auto;
@include breakpoint($netbook) { padding-left:15px; } @include breakpoint($netbook) { padding-left:15px; }
@include breakpoint($letterbox) { top: 0; } @include breakpoint($letterbox) { top: 0; }
.sub{
color: rgb(158, 157, 149);
padding-bottom: 20px;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: -moz-use-text-color -moz-use-text-color #EDECE4;
border-image: none;
border-right: 0 none;
border-style: none none solid;
border-width: 0 0 1px;
margin-bottom: 0px;
} }
ul.users{
list-style: none;
.user-group-header {
margin-bottom: 0px;
padding-bottom: 20px;
border: 0 none;
border-bottom: 1px solid darken($lightbrown, 10%);
h3 {
display: inline-block;
margin: 0;
color: $midbrown;
font-weight: normal;
font-size: 1.1em;
line-height: 1em;
}
}
.user-search {
display: inline-block;
float: right;
label { margin: 0}
&:hover .user-search-input, .user-search-input:focus {
width: 260px;
padding: 0 10px;
}
.user-search-input {
@include box-sizing(border-box);
width: 0px;
padding: 0;
border: none;
border-bottom: lighten($lightbrown, 2%) 1px solid;
@include transition(width 0.2s ease-in-out);
box-shadow: none;
}
.search-icon {
@include icon($i-search, 1em, $midbrown);
}
}
.users {
padding: 0px; padding: 0px;
margin-top: 0px; margin-top: 0px;
width: 75%; list-style: none;
clear: both; }
li{
.user {
@include box-sizing(border-box);
display: block; display: block;
width: 100%; width: 100%;
padding: 20px; padding: 20px;
@include box-sizing(border-box); border: 0 none;
-moz-border-bottom-colors: none; border-top: 1px solid $lightgrey;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: -moz-use-text-color -moz-use-text-color #EDECE4;
border-image: none;
border-right: 0 none;
border-style: none none solid;
border-width: 0 0 1px;
&:last-child{ &:first-child {
border: none; border: none;
} }
.user_image{
float: left; .user-image {
display: inline-block;
width: 40px; width: 40px;
height: 40px; height: 40px;
margin-right: 17px; margin-right: 17px;
background-color: #ccc; vertical-align: middle;
background-color: $lightbrown;
border-radius: 20px; border-radius: 20px;
img{ &.invite {
@include box-sizing(border-box);
padding-top: 8px;
text-align: center;
@include icon($i-mail, 1em, $brown);
}
img {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 20px; border-radius: 20px;
} }
} }
.user_info{ .user-meta {
float: left; display: inline-block;
span{ vertical-align: middle;
display: block;
line-height: 1em; .user-name {
&.name{ margin: 0;
margin-top: 0.4em; margin-top: 0.4em;
font-weight: bold; font-weight: 400;
font-size: 1.2em; font-size: 1.2em;
line-height: 1em;
}
.user-last-seen {
line-height: 1em;
} }
} }
} }
label{ .user-role {
padding: 2px 8px;
float: right; float: right;
font-size: 0.8em;
color: #fff; color: #fff;
padding: 4px 8px; text-transform: uppercase;
margin-right: 20px;
&.admin{ &.admin {
background-color: #DE523A; background-color: #DE523A;
} }
&.editor {
&.editor{
background-color: #4A8CBD; background-color: #4A8CBD;
} }
} }
}
}
}
}//.settings-content }//.settings-content
}//.settings }//.settings

View file

@ -157,45 +157,59 @@
<header> <header>
<h2 class="title">Users</h2> <h2 class="title">Users</h2>
<section class="page-actions"> <section class="page-actions">
<button class="button-add">Add User</button> <button class="button-add">New User</button>
</section> </section>
</header> </header>
<section class="content"> <section class="content">
<h6 class="sub">Invited Users</h6> <section id="users-pending" class="user-group">
<header class="user-group-header"><h3>Invited Users</h3></header>
<ul class="users"> <ul class="users">
<li class="clearfix"> <li class="user">
<div class="user_image"></div> <figure class="user-image invite"></figure>
<div class="user_info"> <section class="user-meta">
<span class="name">Some Name</span> <h4 class="user-name">Some Name</h4>
<span class="timestamp">Invitation Sent: 7 hours ago</span> <span class="user-last-seen">Invitation Sent: 7 hours ago</span>
</div> </section>
</li> </li>
</ul> </ul>
<h6 class="sub">Active Users</h6> </section>
<section id="users-active" class="user-group">
<header class="user-group-header">
<h3>Active Users</h3>
<form class="user-search">
<label>
<i class="search-icon"></i>
<input class="user-search-input" type="text"/>
</label>
</form>
</header>
<ul class="users"> <ul class="users">
<li class="clearfix"> <li class="user">
<div class="user_image"> <figure class="user-image">
<img src="/core/admin/assets/img/user.jpg" alt="user"/> <img src="/core/admin/assets/img/user.jpg" alt="user"/>
</div> </figure>
<div class="user_info"> <section class="user-meta">
<span class="name">Some Name</span> <h4 class="user-name">Some Name</h4>
<span class="timestamp">Last Seen: 7 hours ago</span> <span class="user-last-seen">Last Seen: 7 hours ago</span>
</div> </section>
<label class="admin">Admin</label> <span class="user-role admin">Admin</span>
</li> </li>
<li class="clearfix"> <li class="user">
<div class="user_image"> <figure class="user-image">
<img src="/core/admin/assets/img/user.jpg" alt="user"/> <img src="/core/admin/assets/img/user.jpg" alt="user"/>
</div> </figure>
<div class="user_info"> <section class="user-meta">
<span class="name">Some Name</span> <h4 class="user-name">Some Name</h4>
<span class="timestamp">Last Seen: 2 days ago</span> <span class="user-last-seen">Last Seen: 2 days ago</span>
</div> </section>
<label class="editor">Editor</label> <span class="user-role editor">Editor</span>
</li> </li>
</ul> </ul>
</section> </section>
</section> </section>
</section>
<section id="appearance" class="settings-content"> <section id="appearance" class="settings-content">
<header> <header>
<h2 class="title">Appearance</h2> <h2 class="title">Appearance</h2>