[design] improvements to login page, activity

This commit is contained in:
Anand Doshi 2015-01-05 14:12:27 +05:30
parent 3a1e58fcd3
commit 41dfa18231
9 changed files with 533 additions and 48 deletions

View file

@ -28,6 +28,14 @@
height:8px;
width:8px;
border-radius:8px;
background: #d1d8dd;
}
.date-indicator.blue {
color: #5e64ff;
}
.date-indicator.blue::after {
background: #5e64ff;
}

View file

@ -84,7 +84,7 @@ frappe.ActivityFeed = Class.extend({
pdate = dateutil.global_date_format(date);
}
data.date_sep = pdate;
data.date_class = "date-indicator";
data.date_class = pdate=='Today' ? "date-indicator blue" : "date-indicator";
} else {
data.date_sep = null;
data.date_class = "";

View file

@ -2,7 +2,7 @@
<div class="col-xs-3 text-right activity-date"><span class="{%= date_class %}">
{%= date_sep || "" %}</span></div>
<div class="col-xs-9 activity-message" data-doctype="{%= doc_type %}" data-docname="{%= doc_name %}"
title="{%= by %} / {%= dateutil.obj_to_user(creation) %}">
title="{%= by %} / {%= dateutil.str_to_user(creation) %}">
<span class="avatar avatar-small">
<img src="{%= imgsrc %}">
</span>

View file

@ -3,7 +3,7 @@
"public/css/bootstrap.css",
"public/css/font-awesome.css",
"public/css/nprogress.css",
"website/css/website.css"
"public/css/website.css"
],
"js/frappe-web.min.js": [
"public/js/lib/bootstrap.min.js",

View file

@ -0,0 +1,434 @@
@media (min-width: 768px) {
.login-wrapper {
border-right: 1px solid #f2f2f2;
}
}
/*h1, h2, h3, h4, h5 {
font-weight: bold;
}
*/
a {
cursor: pointer;
}
img {
max-width: 100%;
}
.content {
margin-bottom: 22px;
}
.banner {
margin-top: 20px;
padding: 0px 20px;
}
.missing-image {
background-color: #eee;
padding: 40px;
width: 112px;
font-size: 32px;
color: #888;
}
.social-icons i {
font-size: 120%;
}
.social-icons a:hover {
text-decoration: none;
}
.social-icons a i:hover {
text-decoration: none;
}
.social-icons i {
margin-left: 5px;
}
.web-footer {
padding: 20px 0px;
min-height: 140px;
}
.avatar {
display: inline-block;
vertical-align: middle;
overflow: hidden;
background-color: #ddd;
border: 1px solid #eee;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
.avatar-small {
margin-right: 5px;
width: 30px;
height: 30px;
border-radius: 30px;
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
}
.avatar-small img {
width: 30px;
}
.avatar-medium {
margin-right: 5px;
width: 48px;
height: 48px;
border-radius: 48px;
-moz-border-radius: 48px;
-webkit-border-radius: 48px;
}
.avatar-medium img {
width: 48px;
}
.avatar-large {
margin-right: 10px;
width: 72px;
height: 72px;
border-radius: 72px;
-moz-border-radius: 72px;
-webkit-border-radius: 72px;
}
.avatar-large img {
width: 72px;
}
.avatar-x-large {
margin-right: 10px;
width: 100px;
height: 100px;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
}
.avatar-x-large img {
width: 100px;
}
.carousel-control .icon {
position: absolute;
top: 50%;
left: 50%;
z-index: 5;
display: inline-block;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
}
.hidden-xs-inline,
.hidden-xs-inline-block {
display: none;
}
@media (min-width: 768px) {
.hidden-xs-inline {
display: inline;
}
.hidden-xs-inline-block {
display: inline-block;
}
}
.visible-xs-inline {
display: inline;
}
.visible-xs-inline-block {
display: inline-block;
}
@media (min-width: 768px) {
.visible-xs-inline,
.visible-xs-inline-block {
display: none;
}
}
/* the element that this class is applied to, should have a max width for this to work*/
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
.navbar {
box-shadow: none;
border-radius: 0px;
margin-bottom: 0px;
padding-top: 15px;
padding-bottom: 15px;
}
.navbar-brand {
padding-right: 30px;
max-width: 80%;
min-height: 20px;
height: auto;
}
.navbar a.active {
font-weight: bold;
}
@media (min-width: 768px) {
.navbar-brand {
max-width: 300px;
}
}
.panel-container {
margin-top: 35px;
}
.panel-heading,
.panel-body {
padding-left: 15px;
}
fieldset {
margin-bottom: 20px;
}
.message-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1040;
background-color: #fff;
display: table;
}
.message-overlay .content {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.web-page-editable {
margin: -15px;
padding: 15px;
border-radius: 4px;
}
.slide-image {
width: 100%;
}
.page-header {
margin: 0px;
margin-bottom: 20px;
padding: 25px 0px;
}
.page-header h1,
.page-header h2,
.page-header h3 {
margin: 5px auto;
}
.page-header .lead {
margin-bottom: 5px;
}
.sidebar-item {
/*background-color: #f7f7f7;*/
border-left: 1px solid #eee;
margin-left: -30px;
padding: 5px 15px;
color: #999;
font-size: 85%;
}
.sidebar-item:first-child {
padding-top: 10px;
}
.sidebar-item:last-child {
padding-bottom: 10px;
}
.sidebar-item a {
color: #999;
text-decoration: none;
}
.sidebar-item a:hover,
.sidebar-item a:focus,
.sidebar-item a:active {
color: #333;
text-decoration: none;
/* thanks medium: https://medium.com/designing-medium/crafting-link-underlines-on-medium-7c03a9274f9 */
background-image: linear-gradient(to bottom, transparent 50%, rgba(153, 153, 153, 0.5) 50%);
background-repeat: repeat-x;
background-size: 5% 20%;
background-position: 0 100%;
}
.sidebar-item a.active {
color: #000;
font-weight: bold;
}
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto;
/* Negative indent footer by its height */
margin: auto;
margin: 0 auto -140px;
/* Pad bottom by footer height */
padding: 0 0 140px;
}
/* Set the fixed height of the footer here */
#wrap-footer {
margin-top: 30px;
min-height: 140px;
background-color: #f5f5f5;
}
.page-footer {
margin: 20px 0px 0px;
padding: 15px 0px;
border-top: 1px solid #eee;
}
/* website group */
.view-selector {
margin-bottom: 15px;
}
/* post and post list */
.post {
padding: 15px 0px;
word-wrap: break-word;
border-bottom: 1px solid #eee;
}
.post:first-child {
margin-top: 15px !important;
}
.post .img-responsive {
border-radius: 4px;
}
.post .media-link {
display: block;
min-width: 50px;
min-height: 50px;
}
.post .media-object {
border-radius: 4px;
max-width: 50px;
}
.post .media-heading {
margin-bottom: 12px;
}
.parent-post .post {
border: none;
}
.child-post {
border: 1px solid #eee;
padding-left: 15px;
background-color: #f8f8f8;
margin-top: 0px;
}
textarea {
resize: vertical;
}
.post-add-textarea {
height: 200px !important;
}
/* needs review */
.btn-small,
.post-editor .btn {
padding: 5px;
font-size: 90%;
}
.btn-right,
.post-editor .btn {
margin-left: 5px;
}
.no-posts {
margin-top: 15px;
}
.full-page {
margin: 30px;
}
.user-profile {
min-height: 50px;
min-width: 70px;
}
.visible-xs {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: inline-block !important;
}
}
.nav-tabs > li > a {
padding: 7px 10px;
}
.btn-more {
margin-top: 15px;
}
.post-content img {
margin: 10px 0px;
}
.assigned-label,
.event-label {
display: inline-block;
padding: .4em .6em .4em;
margin-bottom: 7px;
}
a.no-decoration {
text-decoration: none;
color: inherit;
}
a.active {
pointer-events: none;
cursor: default;
}
:target {
background-color: #ffa;
}
.page-breadcrumbs .breadcrumb {
padding: 0px;
margin-bottom: 2px;
background-color: transparent;
border-radius: 0px;
font-size: 85%;
}
.breadcrumb a {
color: inherit;
}
@media (min-width: 768px) {
.page-sidebar {
padding-left: 3em;
}
}
@media (max-width: 767px) {
.page-sidebar {
padding-bottom: 15px;
margin-bottom: 15px;
border-bottom: 1px solid #eee;
}
.page-sidebar .sidebar-item {
margin-left: 17px;
}
}
.post:last-child {
border-bottom: none;
}
/* end - needs review */
/* docs */
.docs-attr-name {
font-size: 120%;
}
.docs-attr-desc {
padding-left: 30px;
}
a.grey,
.sidebar-section a,
.nav-pills a,
.control-value a,
.data-row a {
color: inherit;
border-bottom: 1px solid transparent;
margin-bottom: 0.4em;
}
a.grey:hover,
.sidebar-section a:hover,
.nav-pills a:hover,
.control-value a:hover,
.data-row a:hover {
border-bottom: 1px solid #212a33;
color: #212a33;
}
.text-muted {
color: #8d99a6 !important;
}
.text-extra-muted {
color: #d1d8dd !important;
}
a.text-muted,
a.text-extra-muted {
border-bottom: 1px solid transparent;
}
a.text-muted:hover,
a.text-muted:focus,
a.text-extra-muted:hover,
a.text-extra-muted:focus {
color: inherit;
border-bottom: 1px solid #8d99a6;
}

View file

@ -17,7 +17,7 @@ $.extend(frappe.datetime, {
},
obj_to_user: function(d) {
return frappe.datetime.str_to_user(moment(d).format("YYYY-MM-DD HH:mm:ss"));
return moment(d).format(dateutil.get_user_fmt().toUpperCase());
},
get_diff: function(d1, d2) {

View file

@ -1,3 +1,5 @@
@import "variables.less";
@media (min-width: 768px) {
.login-wrapper {
border-right: 1px solid #f2f2f2;
@ -480,3 +482,37 @@ a.active {
.docs-attr-desc {
padding-left: 30px;
}
// links and text
a.grey, .sidebar-section a, .nav-pills a, .control-value a, .data-row a {
color: inherit;
border-bottom: 1px solid transparent;
margin-bottom: 0.4em;
}
a.grey:hover, .sidebar-section a:hover, .nav-pills a:hover, .control-value a:hover, .data-row a:hover {
border-bottom: 1px solid @grey-link-color;
color: @grey-link-color;
}
.text-muted {
color: @text-muted !important;
}
.text-extra-muted {
color: @border-color !important;
}
a.text-muted, a.text-extra-muted {
border-bottom: 1px solid transparent;
}
a.text-muted:hover,
a.text-muted:focus,
a.text-extra-muted:hover,
a.text-extra-muted:focus {
color: inherit;
border-bottom: 1px solid @text-muted;
}

View file

@ -2,18 +2,22 @@
display: none;
}
#wrap {
background-color: #f2f2f2;
}
.page-content {
right: 0%;
width: 100%;
}
#wrap {
background-color: #fafbfc;
}
.form-signin {
max-width: 330px;
padding: 15px;
max-width: 360px;
padding: 30px;
margin: 0 auto;
border: 1px solid #d1d8dd;
border-radius: 5px;
background-color: #fff;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
@ -43,4 +47,8 @@ input#login_password, input#signup_email {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
.btn-social {
margin: 10px;
}

View file

@ -1,9 +1,28 @@
{% block style %}{% include "templates/includes/login.css" %}{% endblock %}
{% block content %}
<div class="login-content container" style="max-width: 800px;">
<div class="login-content container" style="max-width: 800px; padding-top: 30px;">
<form class="form-signin form-login" role="form">
<h2 class="form-signin-heading">{{ _("Login") }}</h2>
{%- if social_login -%}
<h4 class="form-signin-heading text-center">{{ _("Sign in using") }}</h4>
<p class="text-center" style="margin-top: 15px">
{%- if facebook_login is defined %}
<a href="{{ facebook_login }}" class="grey btn-social btn-facebook">
<i class="icon-facebook-sign"></i> {{ _("Facebook") }}</a>
{%- endif -%}
{%- if google_login is defined %}
<a href="{{ google_login }}" class="grey btn-social btn-google">
<i class="icon-google-plus-sign"></i> {{ _("Google") }}</a>
{%- endif -%}
{%- if github_login is defined %}
<a href="{{ github_login }}" class="grey btn-social btn-github">
<i class="icon-github-sign"></i> {{ _("GitHub") }}</a>
{%- endif -%}
</p>
<p class="text-muted text-center" style="margin: 20px 0px">{{ _("or") }}</p>
{%- endif -%}
<input type="text" id="login_email"
class="form-control" placeholder="{{ _('Email address') }}" required autofocus>
<input type="password" id="login_password"
@ -12,58 +31,38 @@
<input type="checkbox" value="remember-me"> Remember me
</label> -->
<br>
<button class="btn btn-lg btn-primary btn-block btn-login" type="submit">{{ _("Sign in") }}</button>
{%- if social_login -%}
<p class="text-muted text-center" style="margin: 10px;">or login via</p>
<p class="text-muted text-center" style="margin: 10px;">
{%- if facebook_login is defined %}
<a href="{{ facebook_login }}" class="btn btn-lg btn-block btn-primary btn-facebook">
<i class="icon-facebook-sign"></i> {{ _("Facebook") }}</a>
{%- endif -%}
{%- if google_login is defined %}
<a href="{{ google_login }}" class="btn btn-lg btn-block btn-primary btn-google">
<i class="icon-google-plus-sign"></i> {{ _("Google") }}</a>
{%- endif -%}
{%- if github_login is defined %}
<a href="{{ github_login }}" class="btn btn-lg btn-block btn-primary btn-github">
<i class="icon-github-sign"></i> {{ _("GitHub") }}</a>
{%- endif -%}
<button class="btn btn-lg btn-default btn-block btn-login" type="submit">{{ _("Sign in") }}</button>
<div style="margin-top: 15px">
{%- if not disable_signup -%}
<p class="text-center small">
<a href="#signup" class="grey">{{ _("Not a user yet? Sign up") }}</a>
</p>
{%- endif -%}
{%- if not disable_signup -%}
<p class="text-center">
<br><a href="#signup">{{ _("Not a user yet? Sign up") }}</a>
</p>
{%- endif -%}
<p class="text-center">
<br><a href="#forgot" class="text-muted">{{ _("Forgot Password?") }}</a>
</p>
{%- endif -%}
<p class="text-center small">
<a href="#forgot" class="grey">{{ _("Forgot Password?") }}</a>
</p>
</div>
</form>
<form class="form-signin form-signup hide" role="form">
<h2 class="form-signin-heading">{{ _("Sign Up") }}</h2>
<input type="text" id="signup_fullname"
class="form-control" placeholder="{{ _('Full Name') }}" required autofocus>
<input type="email" id="signup_email"
class="form-control" placeholder="{{ _('Email Id') }}" required>
<button class="btn btn-lg btn-primary btn-block btn-signup" type="submit">{{ _("Sign up") }}</button>
<p class="text-center">
<br><a href="#login">{{ _("Have an account? Login") }}</a>
<button class="btn btn-lg btn-default btn-block btn-signup" type="submit">{{ _("Sign up") }}</button>
<p class="text-center small">
<br><a href="#login" class="grey">{{ _("Have an account? Login") }}</a>
</p>
</form>
<form class="form-signin form-forgot hide" role="form">
<h2 class="form-signin-heading">{{ _("Forgot Password") }}</h2>
<input type="email" id="forgot_email"
class="form-control" placeholder="{{ _('Email Id') }}" required autofocus>
<br>
<button class="btn btn-lg btn-primary btn-block btn-forgot" type="submit">{{ _("Send Password") }}</button>
<p class="text-center">
<br><a href="#login">{{ _("Back to Login") }}</a>
<button class="btn btn-lg btn-default btn-block btn-forgot" type="submit">{{ _("Send Password") }}</button>
<p class="text-center small">
<br><a href="#login" class="grey">{{ _("Back to Login") }}</a>
</p>
</form>