Browse Source

redesigned mobile view

version-14
Faris Ansari 9 years ago
committed by Faris Ansari
parent
commit
16827f022d
13 changed files with 121 additions and 16 deletions
  1. +1
    -0
      frappe/public/css/docs.css
  2. +1
    -0
      frappe/public/css/navbar.css
  3. +22
    -1
      frappe/public/css/website.css
  4. +1
    -0
      frappe/public/less/navbar.less
  5. +27
    -1
      frappe/public/less/website.less
  6. +3
    -2
      frappe/templates/includes/list/list.html
  7. +5
    -3
      frappe/templates/includes/navbar/navbar.html
  8. +3
    -3
      frappe/templates/includes/search_box.html
  9. +2
    -2
      frappe/templates/includes/web_sidebar.html
  10. +3
    -3
      frappe/templates/web.html
  11. +17
    -1
      frappe/www/me.html
  12. +22
    -0
      frappe/www/profile.html
  13. +14
    -0
      frappe/www/profile.py

+ 1
- 0
frappe/public/css/docs.css View File

@@ -236,6 +236,7 @@ body {
} }
.toggle-sidebar { .toggle-sidebar {
margin-right: 15px; margin-right: 15px;
border: 0;
} }
.navbar-default .navbar-nav > li > a, .navbar-default .navbar-nav > li > a,
.navbar-default .navbar-brand { .navbar-default .navbar-brand {


+ 1
- 0
frappe/public/css/navbar.css View File

@@ -102,6 +102,7 @@
} }
.toggle-sidebar { .toggle-sidebar {
margin-right: 15px; margin-right: 15px;
border: 0;
} }
.navbar-default .navbar-nav > li > a, .navbar-default .navbar-nav > li > a,
.navbar-default .navbar-brand { .navbar-default .navbar-brand {


+ 22
- 1
frappe/public/css/website.css View File

@@ -579,7 +579,6 @@ fieldset {
font-weight: 500 !important; font-weight: 500 !important;
} }
.web-sidebar .sidebar-items { .web-sidebar .sidebar-items {
margin-top: 30px;
margin-bottom: 30px; margin-bottom: 30px;
} }
.web-sidebar .sidebar-items .title { .web-sidebar .sidebar-items .title {
@@ -597,6 +596,14 @@ fieldset {
.list-group-item { .list-group-item {
border-radius: 0px !important; border-radius: 0px !important;
} }
.no-results {
text-align: center;
}
.no-results .octicon-telescope {
display: block;
padding: 10px;
padding-top: 20px;
}
.website-list { .website-list {
min-height: 200px; min-height: 200px;
padding-bottom: 15px; padding-bottom: 15px;
@@ -927,6 +934,15 @@ body {
padding-left: 50px; padding-left: 50px;
padding-right: 50px; padding-right: 50px;
} }
@media screen and (max-width: 480px) {
.page-content {
padding-top: 20px;
}
.page-content.with-sidebar {
padding-left: 20px;
padding-right: 20px;
}
}
.content-header { .content-header {
padding-bottom: 20px; padding-bottom: 20px;
} }
@@ -969,6 +985,7 @@ li .footer-child-item {
} }
.item-search { .item-search {
border-bottom: 1px solid #d1d8dd; border-bottom: 1px solid #d1d8dd;
width: 100%;
} }
.item-search .item-search-input { .item-search .item-search-input {
position: relative; position: relative;
@@ -977,6 +994,10 @@ li .footer-child-item {
margin-right: 5px; margin-right: 5px;
padding: 7px; padding: 7px;
padding-left: 0px; padding-left: 0px;
width: 95px;
}
.item-search i {
padding: 10px 10px 10px 0;
} }
.vert-line { .vert-line {
overflow: hidden; overflow: hidden;


+ 1
- 0
frappe/public/less/navbar.less View File

@@ -112,6 +112,7 @@


.toggle-sidebar { .toggle-sidebar {
margin-right: 15px; margin-right: 15px;
border: 0;
} }


.navbar-default .navbar-nav > li > a, .navbar-default .navbar-nav > li > a,


+ 27
- 1
frappe/public/less/website.less View File

@@ -255,7 +255,7 @@ fieldset {
} }


.sidebar-items { .sidebar-items {
margin-top:30px;
// margin-top:30px;
margin-bottom:30px; margin-bottom:30px;
.title{ .title{
font-size: 14px; font-size: 14px;
@@ -279,6 +279,16 @@ fieldset {
border-radius: 0px !important; border-radius: 0px !important;
} }


.no-results {
text-align: center;
.octicon-telescope {
display: block;
padding: 10px;
padding-top: 20px;
}
}

.website-list { .website-list {
min-height: 200px; min-height: 200px;
padding-bottom: 15px; padding-bottom: 15px;
@@ -531,6 +541,17 @@ a.active {
padding-right: 50px; padding-right: 50px;
} }


@media screen and (max-width: 480px) {
.page-content {
padding-top: 20px;
}
.page-content.with-sidebar {
padding-left: 20px;
padding-right: 20px;
}
}


.content-header { .content-header {
padding-bottom:20px; padding-bottom:20px;
} }
@@ -581,6 +602,7 @@ li .footer-child-item {


.item-search { .item-search {
border-bottom: 1px solid @border-color; border-bottom: 1px solid @border-color;
width: 100%;


.item-search-input { .item-search-input {
position: relative; position: relative;
@@ -589,6 +611,10 @@ li .footer-child-item {
margin-right: 5px; margin-right: 5px;
padding: 7px; padding: 7px;
padding-left: 0px; padding-left: 0px;
width: 95px;
}
i {
padding: 10px 10px 10px 0;
} }
} }




+ 3
- 2
frappe/templates/includes/list/list.html View File

@@ -1,6 +1,7 @@
{% if not result -%} {% if not result -%}
<div class="text-muted" style="min-height: 200px;">
{{ no_result_message or _("Nothing to show") }}
<div class="text-muted no-results" style="min-height: 300px;">
<i class="mega-octicon octicon-telescope"></i>
{{ no_result_message or _("Nothing to show") }}
</div> </div>
{% else %} {% else %}
<div class="website-list" data-doctype="{{ doctype }}" <div class="website-list" data-doctype="{{ doctype }}"


+ 5
- 3
frappe/templates/includes/navbar/navbar.html View File

@@ -2,10 +2,12 @@
<nav class="navbar navbar-default navbar-main" role="navigation"> <nav class="navbar navbar-default navbar-main" role="navigation">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand ellipsis" href="{{ url_prefix }}{{ home_page or "/" }}">
<!-- <a class="navbar-brand ellipsis" href="{{ url_prefix }}{{ home_page or "/" }}"> -->
<a class="navbar-brand ellipsis"
href="{{ url_prefix }}{% if frappe.user=="Guest" %} {{ home_page or "/"}} {% else %} /me {% endif %}">
<span>{{ brand_html or (frappe.get_hooks("brand_html") or ["Home"])[0] }}</span> <span>{{ brand_html or (frappe.get_hooks("brand_html") or ["Home"])[0] }}</span>
</a> </a>
<a class="pull-right toggle-sidebar visible-xs">
<a class="pull-right visible-xs navbar-toggle toggle-sidebar">
<i class="octicon octicon-three-bars"></i> <i class="octicon octicon-three-bars"></i>
</a> </a>
</div> </div>
@@ -16,4 +18,4 @@
</div> </div>
</div> </div>
</nav> </nav>
</header>
</header>

+ 3
- 3
frappe/templates/includes/search_box.html View File

@@ -1,10 +1,10 @@
<div class="item-search text-muted pull-right"> <div class="item-search text-muted pull-right">
<input type="text" class="item-search-input" <input type="text" class="item-search-input"
placeholder="Search" autocomplete="off"> placeholder="Search" autocomplete="off">
<i class="octicon octicon-search" style='cursor: pointer;'></i>
<i class="octicon octicon-search pull-right" style='cursor: pointer;'></i>
</div> </div>
<div class="clearfix pull-right" style="width:300px;">
<h5 class="item-search-results text-muted text-right" style="margin-right: 30px;"></h5>
<div class="clearfix pull-right" style="width:100%;">
<h5 class="item-search-results text-muted" style="margin-right: 30px;"></h5>
<p class="pull-right" style="margin-top: -28px;"> <p class="pull-right" style="margin-top: -28px;">
<a style="display: none;" href="javascript:history.back();" class="octicon octicon-x text-extra-muted clear" title="Clear Search" ></a> <a style="display: none;" href="javascript:history.back();" class="octicon octicon-x text-extra-muted clear" title="Clear Search" ></a>
</p> </p>


+ 2
- 2
frappe/templates/includes/web_sidebar.html View File

@@ -1,5 +1,5 @@
<div class="web-sidebar"> <div class="web-sidebar">
<div class="your-account-info-sidebar">
<!-- <div class="your-account-info-sidebar">
<div class="row"> <div class="row">
<div class="col-xs-2"> <div class="col-xs-2">
<span class="user-image-sidebar"></span> <span class="user-image-sidebar"></span>
@@ -12,7 +12,7 @@
</a> </a>
</div> </div>
</div> </div>
</div>
</div> -->
<div class="sidebar-items"> <div class="sidebar-items">
<ul class="list-unstyled"> <ul class="list-unstyled">
{% if sidebar_title %} {% if sidebar_title %}


+ 3
- 3
frappe/templates/web.html View File

@@ -6,14 +6,14 @@
{% if page_or_generator=="Generator" %}data-doctype="{{ doctype }}"{% endif %}> {% if page_or_generator=="Generator" %}data-doctype="{{ doctype }}"{% endif %}>
<div class="row {% if show_sidebar %}vert-line{% endif %}"> <div class="row {% if show_sidebar %}vert-line{% endif %}">
{% if show_sidebar %} {% if show_sidebar %}
<div class="col-sm-3 sidebar-block">
<div class="col-sm-3 sidebar-block hidden-xs">
{% include "templates/includes/web_sidebar.html" %} {% include "templates/includes/web_sidebar.html" %}
</div> </div>
{% endif %} {% endif %}
<div class="{% if show_sidebar %}page-content with-sidebar col-sm-9{% else %} page-content col-sm-12 {% endif %}"> <div class="{% if show_sidebar %}page-content with-sidebar col-sm-9{% else %} page-content col-sm-12 {% endif %}">
<div class="page-content-wrapper"> <div class="page-content-wrapper">
<div class="row page-head"> <div class="row page-head">
<div class="col-sm-8">
<div class="col-sm-8 col-xs-6">
{% if not no_breadcrumbs and parents %} {% if not no_breadcrumbs and parents %}
<div class="page-breadcrumbs"> <div class="page-breadcrumbs">
{% block breadcrumbs %} {% block breadcrumbs %}
@@ -23,7 +23,7 @@
{% endif %} {% endif %}
{% block header %}{% endblock %} {% block header %}{% endblock %}
</div> </div>
<div class="col-sm-4">
<div class="col-sm-4 col-xs-6">
{% if show_search %} {% if show_search %}
<div class="page-search-block"> <div class="page-search-block">
{% block search %} {% block search %}


+ 17
- 1
frappe/www/me.html View File

@@ -10,7 +10,7 @@
{% block page_content %} {% block page_content %}


<!-- no-cache --> <!-- no-cache -->
<div class="row your-account-info" style="min-height: 400px; padding-bottom: 50px;">
<div class="row your-account-info hidden-xs" style="min-height: 400px; padding-bottom: 50px;">
<div class="col-sm-4"> <div class="col-sm-4">
<span class="user-image-myaccount"></span> <span class="user-image-myaccount"></span>
<div> <div>
@@ -32,5 +32,21 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row visible-xs" style="min-height: 400px; padding: 20px; width: 110%">
<ul class="list-group">
<li class="list-group-item">
<a href="/profile">Profile</a>
</li>
{% for item in my_account_list -%}
{% if item.count or (not item.reference_doctype) or item.show_always %}
<li class="list-group-item">
<a href="{{ item.route }}" {% if item.target %}target="{{ item.target }}"{% endif %}>
{{ _(item.title) }}
</a>
</li>
{% endif %}
{%- endfor %}
</ul>
</div>
{% endblock %} {% endblock %}



+ 22
- 0
frappe/www/profile.html View File

@@ -0,0 +1,22 @@
<div class="row your-account-info" style="min-height: 400px; padding-bottom: 50px;">
<div class="col-sm-4">
<span class="user-image-myaccount"></span>
<div>
<ul class="list-unstyled">
<li><a href="/update-password">
<h6 class="text-muted">{{ _("Reset Password") }}</h6>
</a></li>
<li><a href="/edit-profile">
<h6 class="text-muted">{{ _("Edit Profile") }}</h6>
</a></li>

</ul>
</div>
</div>
<div class="col-sm-8 pull-left">
<div class="row">
<div class="col-xs-4 text-right text-muted">{{ _("Name") }}</div>
<div class="col-xs-8">{{ fullname }}</div>
</div>
</div>
</div>

+ 14
- 0
frappe/www/profile.py View File

@@ -0,0 +1,14 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils.user import get_fullname_and_avatar
import frappe.www.list

no_cache = 1
no_sitemap = 1

def get_context(context):
context.show_sidebar=True

Loading…
Cancel
Save