From 178c0b61f2deacfeca3c985871390c16dc86e9ea Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Thu, 19 May 2022 18:50:23 -0600 Subject: [PATCH 1/2] Add ability for customers to change password from account --- src/static/styles/main.css | 17 +++++++- .../templates/storefront/customer_detail.html | 40 ++++++++++--------- .../templates/storefront/customer_form.html | 3 ++ src/templates/account/password_change.html | 21 ++++++++++ 4 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 src/templates/account/password_change.html diff --git a/src/static/styles/main.css b/src/static/styles/main.css index 613d29b..7cfbe56 100644 --- a/src/static/styles/main.css +++ b/src/static/styles/main.css @@ -485,7 +485,7 @@ section:not(:last-child) { background-blend-mode: multiply; background-size: cover; background-position: center; - color: white; + color: #f1e8e2; text-align: center; padding: 2rem 1rem; font-family: 'Vollkorn', serif; @@ -577,6 +577,11 @@ article > header { display: flex; justify-content: space-between; align-items: center; + align-content: center; +} + +.article__header--with-action h1 { + margin-bottom: 0; } article + article { @@ -883,6 +888,16 @@ article + article { } +/* ========================================================================== + Customer/User + ========================================================================== */ +.customer__detail-section { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4rem; +} + + /* ========================================================================== diff --git a/src/storefront/templates/storefront/customer_detail.html b/src/storefront/templates/storefront/customer_detail.html index 52cba99..e833612 100644 --- a/src/storefront/templates/storefront/customer_detail.html +++ b/src/storefront/templates/storefront/customer_detail.html @@ -11,25 +11,27 @@

Info

-

- Email address
- {{customer.email}}
- Manage -

-

- Default shipping address - {% with shipping_address=customer.default_shipping_address %} -

- {{shipping_address.first_name}} - {{shipping_address.last_name}}
- {{shipping_address.street_address_1}}
- {% if shipping_address.street_address_2 %} - {{shipping_address.street_address_2}}
- {% endif %} - {{shipping_address.city}}, {{shipping_address.state}}, {{shipping_address.postal_code}} -
- {% endwith %} -

+
+
+ Email address
+ {{customer.email}}
+ Manage +
+
+ Default shipping address + {% with shipping_address=customer.default_shipping_address %} +
+ {{shipping_address.first_name}} + {{shipping_address.last_name}}
+ {{shipping_address.street_address_1}}
+ {% if shipping_address.street_address_2 %} + {{shipping_address.street_address_2}}
+ {% endif %} + {{shipping_address.city}}, {{shipping_address.state}}, {{shipping_address.postal_code}} +
+ {% endwith %} +
+

Your addresses

diff --git a/src/storefront/templates/storefront/customer_form.html b/src/storefront/templates/storefront/customer_form.html index db37b6c..b63ba12 100644 --- a/src/storefront/templates/storefront/customer_form.html +++ b/src/storefront/templates/storefront/customer_form.html @@ -5,6 +5,9 @@

← Back

Update your profile

+

+ Change password +

diff --git a/src/templates/account/password_change.html b/src/templates/account/password_change.html new file mode 100644 index 0000000..466b1fd --- /dev/null +++ b/src/templates/account/password_change.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% load i18n %} + +{% block head_title %}{% trans "Change Password" %}{% endblock %} + +{% block content %} +
+{% endblock %} From 4c48a9e39e885864edd3c3f0447cb042e8532c3b Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Thu, 19 May 2022 18:50:52 -0600 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..264f98f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.3.7] - 2022-05-19 +### Added +- Visual enhancements +- Change password from account +- Changelog!