diff --git a/frappe/public/images/ui-states/empty-app-state.svg b/frappe/public/images/ui-states/empty-app-state.svg new file mode 100644 index 0000000000..b7e346f310 --- /dev/null +++ b/frappe/public/images/ui-states/empty-app-state.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frappe/public/js/frappe/web_form/web_form_list.js b/frappe/public/js/frappe/web_form/web_form_list.js index de45b3ac11..f4d41c2a0b 100644 --- a/frappe/public/js/frappe/web_form/web_form_list.js +++ b/frappe/public/js/frappe/web_form/web_form_list.js @@ -139,8 +139,6 @@ export default class WebFormList { make_table_head() { // Create Heading let thead = this.table.createTHead(); - thead.style.backgroundColor = "#f7fafc"; - thead.style.color = "#8d99a6"; let row = thead.insertRow(); let th = document.createElement("th"); diff --git a/frappe/public/scss/common/css_variables.scss b/frappe/public/scss/common/css_variables.scss index a14c19af2a..e5a0052f04 100644 --- a/frappe/public/scss/common/css_variables.scss +++ b/frappe/public/scss/common/css_variables.scss @@ -165,6 +165,16 @@ --bg-pink: var(--pink-50); --bg-cyan: var(--cyan-50); + //font sizes + --text-xs: 11px; + --text-sm: 12px; + --text-md: 13px; + --text-base: 14px; + --text-lg: 16px; + --text-xl: 18px; + --text-2xl: 20px; + --text-3xl: 22px; + --text-on-blue: var(--blue-600); --text-on-light-blue: var(--blue-500); --text-on-dark-blue: var(--blue-700); diff --git a/frappe/public/scss/desk/css_variables.scss b/frappe/public/scss/desk/css_variables.scss index 4a2a27f8d1..0912cb278b 100644 --- a/frappe/public/scss/desk/css_variables.scss +++ b/frappe/public/scss/desk/css_variables.scss @@ -4,15 +4,6 @@ $input-height: 28px !default; :root, [data-theme="light"] { - --text-xs: 11px; - --text-sm: 12px; - --text-md: 13px; - --text-base: 14px; - --text-lg: 16px; - --text-xl: 18px; - --text-2xl: 20px; - --text-3xl: 22px; - // breakpoints --xxl-width: map-get($grid-breakpoints, '2xl'); --xl-width: map-get($grid-breakpoints, 'xl'); diff --git a/frappe/public/scss/login.bundle.scss b/frappe/public/scss/login.bundle.scss index 3963fbecc6..0c8c2d58e2 100644 --- a/frappe/public/scss/login.bundle.scss +++ b/frappe/public/scss/login.bundle.scss @@ -1,7 +1,9 @@ @import "./desk/variables"; body { - background-color: var(--bg-light-gray); + @include media-breakpoint-up(sm) { + background-color: var(--bg-light-gray); + } } .for-forgot, diff --git a/frappe/public/scss/website/footer.scss b/frappe/public/scss/website/footer.scss index dc73fd180e..f3bdfed07f 100644 --- a/frappe/public/scss/website/footer.scss +++ b/frappe/public/scss/website/footer.scss @@ -94,6 +94,8 @@ max-width: 300px; border: 1px solid var(--dark-border-color); box-shadow: none; + border-radius: var(--border-radius); + font-size: $font-size-sm; } } } \ No newline at end of file diff --git a/frappe/public/scss/website/index.scss b/frappe/public/scss/website/index.scss index c4f66b803b..69a7b205c4 100644 --- a/frappe/public/scss/website/index.scss +++ b/frappe/public/scss/website/index.scss @@ -27,6 +27,14 @@ @import 'navbar'; @import 'footer'; @import 'error-state'; +@import 'my_account'; + + +body { + @include media-breakpoint-up(sm) { + background-color: var(--bg-color); + } +} .ql-editor.read-mode { padding: 0; @@ -166,6 +174,10 @@ a.card { font-size: inherit; } +.indicator-pill { + font-size: var(--font-size-xs) +} + h4.modal-title { font-size: 1em; } @@ -298,3 +310,7 @@ h5.modal-title { margin: 70px auto; font-size: $font-size-sm; } + +.empty-list-icon { + height: 70px; +} \ No newline at end of file diff --git a/frappe/public/scss/website/my_account.scss b/frappe/public/scss/website/my_account.scss new file mode 100644 index 0000000000..bdc52588aa --- /dev/null +++ b/frappe/public/scss/website/my_account.scss @@ -0,0 +1,116 @@ +//styles for my account and edit-profile page +@include media-breakpoint-up(sm) { + body[data-path="me"], + body[data-path="list"] { + background-color: var(--bg-color); + } +} + +@include media-breakpoint-down(sm) { + #page-me { + .side-list { + .list-group { + display: none; + } + } + } +} + +.my-account-header { + color: var(--gray-900); + margin-bottom: var(--margin-lg); + font-weight: bold; + + @include media-breakpoint-down(sm) { + margin-left: -1rem; + } +} + +.account-info { + background-color: var(--fg-color); + border-radius: var(--border-radius-md); + padding: var(--padding-sm) 25px; + max-width: 850px; + + @include media-breakpoint-up(sm) { + margin-left: 0; + } + + @include media-breakpoint-down(sm) { + padding: 0; + } + + .my-account-name, + .my-account-item { + color: var(--gray-900); + font-weight: var(--text-bold); + } + + .my-account-avatar { + + .avatar { + height: 60px; + width: 60px; + } + } + + .my-account-item-desc { + color: var(--gray-700); + font-size: var(--text-md); + } + + .my-account-item-link { + font-size: var(--text-md); + + a { + text-decoration: none; + + .edit-profile-icon { + stroke: var(--blue-500); + } + } + + .right-icon { + @include media-breakpoint-up(sm) { + display: none; + } + } + + .item-link-text { + @include media-breakpoint-down(sm) { + display: none; + } + } + } + + .col { + padding: var(--padding-md) 0; + border-bottom: 1px solid var(--border-color); + + .form-group { + margin-right: var(--margin-lg); + } + } + + :last-child { + border: 0; + } +} + +//styles for third party apps page +//center wrt to outer most container and not immediate parent +.empty-apps-state { + position: relative; + padding-top: 10rem; + margin-left: -250px; + text-align: center; + + @include media-breakpoint-down(sm) { + margin: auto; + padding-top: 5rem; + } + + @include media-breakpoint-down(md) { + margin-left: 0; + } +} \ No newline at end of file diff --git a/frappe/public/scss/website/web_form.scss b/frappe/public/scss/website/web_form.scss index 6a6547d79e..cb79f88266 100644 --- a/frappe/public/scss/website/web_form.scss +++ b/frappe/public/scss/website/web_form.scss @@ -1,5 +1,31 @@ @import "../common/form"; + +[data-doctype="Web Form"] { + .page-content-wrapper { + + .breadcrumb-container.container { + @include media-breakpoint-up(sm) { + padding-left: var(--padding-sm); + } + } + + .container { + max-width: 800px; + + &.my-4 { + background-color: var(--fg-color); + + @include media-breakpoint-up(sm) { + padding: 1.8rem; + border-radius: var(--border-radius-md); + box-shadow: var(--card-shadow); + } + } + } + } +} + .web-form-wrapper { .form-control { color: var(--text-color); @@ -16,6 +42,7 @@ .form-column { padding: 0 var(--padding-md); + &:first-child { padding-left: 0; } @@ -24,4 +51,24 @@ padding-right: 0; } } +} + +.web-form-wrapper~#datatable { + .table { + thead { + th { + border: 0; + font-weight: normal; + color: var(--text-muted) + } + } + + tr { + color: var(--text-color); + + td { + border-top: 1px solid var(--border-color); + } + } + } } \ No newline at end of file diff --git a/frappe/templates/includes/list/list.html b/frappe/templates/includes/list/list.html index fba5f20ed5..14769ccf93 100644 --- a/frappe/templates/includes/list/list.html +++ b/frappe/templates/includes/list/list.html @@ -2,8 +2,9 @@

{{ sub_title }}

{% endif %} {% if not result -%} -
- {{ no_result_message or _("Nothing to show") }} +
+ +
{{ no_result_message or _("Nothing to show") }}
{% else %}
{{ _(title) }} +

{{ _(title) }}

{% endblock %} {% block breadcrumbs %} @@ -29,8 +29,8 @@ data-web-form="{{ name }}" data-web-form-doctype="{{ doc_type }}" data-login-req {% if is_list %} {# web form list #}
-
-
+
+
{% else %} {# web form #} @@ -38,7 +38,7 @@ data-web-form="{{ name }}" data-web-form-doctype="{{ doc_type }}" data-login-req

- +
{% if show_attachments and not frappe.form_dict.new and attachments %} diff --git a/frappe/website/doctype/web_form/test_web_form.py b/frappe/website/doctype/web_form/test_web_form.py index 91ee4195df..3e05b221d8 100644 --- a/frappe/website/doctype/web_form/test_web_form.py +++ b/frappe/website/doctype/web_form/test_web_form.py @@ -66,7 +66,7 @@ class TestWebForm(unittest.TestCase): def test_webform_render(self): content = get_response_content('request-data') - self.assertIn('

Request Data

', content) + self.assertIn('

Request Data

', content) self.assertIn('data-doctype="Web Form"', content) self.assertIn('data-path="request-data"', content) self.assertIn('source-type="Generator"', content) diff --git a/frappe/www/list.html b/frappe/www/list.html index 842d55ff92..06c494b804 100644 --- a/frappe/www/list.html +++ b/frappe/www/list.html @@ -5,7 +5,7 @@ {% endblock %} {% block header %} -

{{ title or (_("{0} List").format(_(doctype))) }}

+

{{ title or (_("{0} List").format(_(doctype))) }}

{% endblock %} {% block breadcrumbs %} @@ -23,11 +23,9 @@ {% endblock %} {% block page_content %} - -{% if introduction %}

{{ introduction }}

{% endif %} -{% include list_template or "templates/includes/list/list.html" %} -{% if list_footer %}{{ list_footer }}{% endif %} - + {% if introduction %}

{{ introduction }}

{% endif %} + {% include list_template or "templates/includes/list/list.html" %} + {% if list_footer %}{{ list_footer }}{% endif %} {% endblock %} {% block script %} diff --git a/frappe/www/me.html b/frappe/www/me.html index 4f9a59cac5..196457ae0b 100644 --- a/frappe/www/me.html +++ b/frappe/www/me.html @@ -1,31 +1,94 @@ +{% from "frappe/templates/includes/avatar_macro.html" import avatar %} {% extends "templates/web.html" %} - -{% block title %}{{ _("My Account") }}{% endblock %} -{% block header %}

{{ _("My Account") }}

{% endblock %} - +{% block title %} +{{ _("My Account") }} +{% endblock %} +{% block header %} +

{{_("My Account") }}

+{% endblock %} {% block page_content %} -
-
- +
-
+
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/frappe/www/me.py b/frappe/www/me.py index fbb6d53ac6..0ec73117ac 100644 --- a/frappe/www/me.py +++ b/frappe/www/me.py @@ -10,5 +10,6 @@ no_cache = 1 def get_context(context): if frappe.session.user=='Guest': frappe.throw(_("You need to be logged in to access this page"), frappe.PermissionError) - + + context.current_user = frappe.get_doc("User", frappe.session.user) context.show_sidebar=True \ No newline at end of file diff --git a/frappe/www/third_party_apps.html b/frappe/www/third_party_apps.html index db31a4d1c8..0763382f70 100644 --- a/frappe/www/third_party_apps.html +++ b/frappe/www/third_party_apps.html @@ -2,7 +2,7 @@ {% block title %} {{ _("Third Party Apps") }} {% endblock %} {% block header %} -

{{ _("Third Party Apps") }}

+ {% endblock %} {% block page_sidebar %} @@ -52,9 +52,15 @@
{% endfor %} {% else %} -
+
+ +
{{ _("No Active Sessions")}}
+
+ {{ _("Looks like you haven’t added any third party apps.")}} +
+
{% endif %}