Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Inline svg icons on storefront
weronkae2082d4e6a55
diff --git a/saleor/static/images/close-icon.svg b/saleor/static/images/close-icon.svgdeleted file mode 100644index 1778dc4c0c..0000000000--- a/saleor/static/images/close-icon.svg+++ /dev/null@@ -1,12 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- viewBox="0 0 85 85" style="enable-background:new 0 0 85 85;" xml:space="preserve">-<g>- <path d="M82.2,66.7c0,1.8-0.6,3.3-1.9,4.5l-9.1,9.1c-1.2,1.2-2.8,1.9-4.5,1.9s-3.3-0.6-4.5-1.9L42.5,60.7L22.9,80.3- c-1.2,1.2-2.8,1.9-4.5,1.9c-1.8,0-3.3-0.6-4.5-1.9l-9.1-9.1c-1.2-1.2-1.9-2.8-1.9-4.5s0.6-3.3,1.9-4.5l19.6-19.6L4.7,22.9- c-1.2-1.2-1.9-2.8-1.9-4.5c0-1.8,0.6-3.3,1.9-4.5l9.1-9.1c1.2-1.2,2.8-1.9,4.5-1.9c1.8,0,3.3,0.6,4.5,1.9l19.6,19.6L62.2,4.7- c1.2-1.2,2.8-1.9,4.5-1.9s3.3,0.6,4.5,1.9l9.1,9.1c1.2,1.2,1.9,2.8,1.9,4.5c0,1.8-0.6,3.3-1.9,4.5L60.7,42.5l19.6,19.6- C81.6,63.4,82.2,64.9,82.2,66.7z"/>-</g>-</svg>diff --git a/saleor/static/images/github_logo.svg b/saleor/static/images/github_logo.svgdeleted file mode 100644index 9b9d1fa244..0000000000--- a/saleor/static/images/github_logo.svg+++ /dev/null@@ -1,14 +0,0 @@-<svg width="45" height="43" viewBox="0 0 45 43" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">-<title>github_logo</title>-<desc>Created using Figma</desc>-<g id="Canvas" transform="translate(548 -592)" figma:type="canvas">-<g id="github_logo" style="mix-blend-mode:normal;" figma:type="frame">-<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">-<use xlink:href="#path0_fill" transform="translate(-548 592)" fill="#FFFFFF" style="mix-blend-mode:normal;"/>-</g>-</g>-</g>-<defs>-<path id="path0_fill" fill-rule="evenodd" d="M 22.4943 -7.16688e-09C 10.0725 -7.16688e-09 7.85499e-09 9.87083 7.85499e-09 22.044C 7.85499e-09 31.7835 6.44383 40.0444 15.3848 42.9636C 16.5095 43.1662 16.9185 42.4827 16.9185 41.8993C 16.9185 41.376 16.9003 39.9888 16.8889 38.1473C 10.6337 39.4789 9.31356 35.1925 9.31356 35.1925C 8.28882 32.6452 6.81419 31.9683 6.81419 31.9683C 4.77152 30.6011 6.97097 30.6256 6.97097 30.6256C 9.22949 30.7837 10.4156 32.8991 10.4156 32.8991C 12.4219 36.268 15.6824 35.2927 16.9639 34.7316C 17.1661 33.3043 17.7501 32.3335 18.3908 31.7813C 13.3943 31.2268 8.1434 29.3364 8.1434 20.8884C 8.1434 18.4814 9.02045 16.5152 10.4587 14.9721C 10.2292 14.4155 9.45443 12.1732 10.6791 9.13826C 10.6791 9.13826 12.5696 8.54374 16.8685 11.4006C 18.6612 10.9107 20.5857 10.6635 22.5011 10.6568C 24.4097 10.6635 26.3365 10.9107 28.1338 11.4006C 32.4282 8.54596 34.3118 9.13826 34.3118 9.13826C 35.5365 12.1732 34.7685 14.4155 34.539 14.9721C 35.9818 16.513 36.8498 18.4814 36.8498 20.8884C 36.8498 29.3609 31.5897 31.2202 26.5774 31.7657C 27.3885 32.447 28.1088 33.792 28.1088 35.8494C 28.1088 38.7953 28.0793 41.1734 28.0793 41.897C 28.0793 42.4871 28.486 43.1729 29.6266 42.9592C 38.5584 40.0378 45 31.779 45 22.0418C 44.9909 9.86861 34.9162 -7.16688e-09 22.4943 -7.16688e-09Z"/>-</defs>-</svg>diff --git a/saleor/static/images/sale_bg.svg b/saleor/static/images/sale_bg.svgdeleted file mode 100644index dc40903746..0000000000--- a/saleor/static/images/sale_bg.svg+++ /dev/null@@ -1,14 +0,0 @@-<svg width="49" height="49" viewBox="0 0 49 49" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">-<title>Group</title>-<desc>Created using Figma</desc>-<g id="Canvas" transform="translate(-313 3408)" figma:type="canvas">-<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">-<g id="Vector 2" style="mix-blend-mode:normal;" figma:type="vector">-<use xlink:href="#path0_fill" transform="translate(313 -3408)" fill="#EB5757" style="mix-blend-mode:normal;"/>-</g>-</g>-</g>-<defs>-<path id="path0_fill" d="M 0 48.5L 0 20L 20.5 0L 48.5 0L 0 48.5Z"/>-</defs>-</svg>diff --git a/saleor/static/images/saleor-logo-black.svg b/saleor/static/images/saleor-logo-black.svgdeleted file mode 100644index e19f3e0991..0000000000--- a/saleor/static/images/saleor-logo-black.svg+++ /dev/null@@ -1,16 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->-<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- viewBox="0 0 282.3 60.9" enable-background="new 0 0 282.3 60.9" xml:space="preserve">-<path id="XMLID_124_" d="M267.7,37.7c6.1-2.8,10-9.2,10-16.7c0-5.7-2-10.1-6.2-14.1c-4.1-4-9.1-5.7-14.9-5.7h-27.2v15.9- c-1-2.9-3.5-5.7-6.1-8.2C217,3,209.5,0,200.4,0s-16.5,3-22.9,8.9c-1.2,1.1-2.1,2.3-3.1,3.5V1.2h-43v44h-19v-44h-16v47.2L77.3,1.2- H62.6L48.4,35.8c-1.8-4.7-6-8.2-13.2-10.8c-3.7-1.4-8.4-2.8-10.4-3.2c-1-0.3-2-0.6-3-1c-1.8-0.8-2.4-1.7-2.4-3.4- c0-2.1,2.3-3.6,6.4-3.6c4.5,0,8,1.5,10.6,4.6l10.6-9C42.3,3.1,35,0,25.3,0c-5.8,0-10.8,1.5-14.9,4.6c-4.1,3.1-6.2,7.4-6.2,13- c0,7.9,4.6,13.6,13.6,17c2.8,1,7,2.3,9.3,3c1.2,0.3,2.4,0.8,3.5,1.2c2.3,0.9,3.3,2,3.3,3.6c0,2.8-2.6,4.2-7.9,4.2- c-6.2,0-11.6-3-14.7-7.3L0,48c2.3,3.5,5.5,6.4,9.7,8.9c4.3,2.4,9.7,3.6,16.3,3.6c5.3,0,9.7-1.1,13.3-2.7l-0.6,1.4h16.9l3.1-7h22.6- l3,7h91.1v-9.9c0,0.9,1.4,1.8,2.3,2.7c6.3,5.9,13.8,8.9,22.9,8.9s16.4-3,22.7-8.9c2.7-2.5,5.1-5.3,6.1-8.2v15.5h16v-18h6.4h0.2- l12,18h18.4L267.7,37.7z M62.8,39.2L69.9,21L77,39.2H62.8z M147.4,15.2h24.9c-1.6,3-2.7,5-3.4,8h-21.5V15.2z M147.4,45.2v-9h21.3- c0.6,4,1.8,6,3.5,9H147.4z M211.9,41.8c-3.1,3.1-6.9,4.7-11.3,4.7c-4.5,0-8.3-1.5-11.4-4.6c-3.1-3.1-4.6-6.9-4.6-11.4- c0-4.4,1.6-8.2,4.7-11.3c3.1-3.2,6.9-4.8,11.3-4.8s8.2,1.6,11.3,4.8c3.2,3.2,4.8,7,4.8,11.3C216.7,34.8,215.1,38.6,211.9,41.8z- M254.8,28.2h-9.4v-13h10.7c3.1,0,5.6,2.4,5.6,6.2C261.7,25.8,259.1,28.2,254.8,28.2z"/>-</svg>diff --git a/saleor/static/images/search-icon.svg b/saleor/static/images/search-icon.svgdeleted file mode 100755index 6eb08bceee..0000000000--- a/saleor/static/images/search-icon.svg+++ /dev/null@@ -1,12 +0,0 @@-<svg width="42" height="42" viewBox="0 0 42 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">-<title></title>-<desc>Created using Figma</desc>-<g id="Canvas" transform="translate(1882 1346)" figma:type="canvas">-<g id="" style="mix-blend-mode:normal;" figma:type="text">-<use xlink:href="#path0_fill" transform="translate(-1882 -1349)" fill="#333333" style="mix-blend-mode:normal;"/>-</g>-</g>-<defs>-<path id="path0_fill" d="M 25.6138 28.8532C 27.8237 26.6434 28.9286 23.99 28.9286 20.8929C 28.9286 17.7958 27.8237 15.1507 25.6138 12.9576C 23.4208 10.7478 20.7757 9.64286 17.6786 9.64286C 14.5815 9.64286 11.928 10.7478 9.71819 12.9576C 7.52511 15.1507 6.42857 17.7958 6.42857 20.8929C 6.42857 23.99 7.52511 26.6434 9.71819 28.8532C 11.928 31.0463 14.5815 32.1429 17.6786 32.1429C 20.7757 32.1429 23.4208 31.0463 25.6138 28.8532ZM 41.7857 41.7857C 41.7857 42.6563 41.4676 43.4096 40.8315 44.0458C 40.1953 44.6819 39.442 45 38.5714 45C 37.6674 45 36.9141 44.6819 36.3114 44.0458L 27.6981 35.4576C 24.7014 37.5335 21.3616 38.5714 17.6786 38.5714C 15.2846 38.5714 12.9911 38.1111 10.798 37.1903C 8.62165 36.2528 6.73828 34.9972 5.14788 33.4236C 3.57422 31.8331 2.31864 29.9498 1.38114 27.7734C 0.460379 25.5804 0 23.2868 0 20.8929C 0 18.4989 0.460379 16.2137 1.38114 14.0374C 2.31864 11.8443 3.57422 9.96094 5.14788 8.38728C 6.73828 6.79688 8.62165 5.5413 10.798 4.62054C 12.9911 3.68304 15.2846 3.21429 17.6786 3.21429C 20.0725 3.21429 22.3577 3.68304 24.534 4.62054C 26.7271 5.5413 28.6105 6.79688 30.1842 8.38728C 31.7746 9.96094 33.0301 11.8443 33.9509 14.0374C 34.8884 16.2137 35.3571 18.4989 35.3571 20.8929C 35.3571 24.5759 34.3192 27.9157 32.2433 30.9124L 40.8566 39.5257C 41.476 40.1451 41.7857 40.8984 41.7857 41.7857Z"/>-</defs>-</svg>diff --git a/saleor/static/images/twitter_logo.svg b/saleor/static/images/twitter_logo.svgdeleted file mode 100644index bb944d1dd4..0000000000--- a/saleor/static/images/twitter_logo.svg+++ /dev/null@@ -1,12 +0,0 @@-<svg width="43" height="43" viewBox="0 0 43 43" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">-<title>Vector</title>-<desc>Created using Figma</desc>-<g id="Canvas" transform="translate(481 -592)" figma:type="canvas">-<g id="Vector" style="mix-blend-mode:normal;" figma:type="vector">-<use xlink:href="#path0_fill" transform="translate(-481 592)" fill="#FFFFFF" style="mix-blend-mode:normal;"/>-</g>-</g>-<defs>-<path id="path0_fill" d="M 21.5011 9.42327e-09C 9.62631 9.42327e-09 9.42327e-09 9.62631 9.42327e-09 21.5011C 9.42327e-09 33.3737 9.62631 43 21.5011 43C 33.3737 43 43 33.3737 43 21.5011C 43 9.62631 33.3737 9.42327e-09 21.5011 9.42327e-09ZM 33.534 18.5587L 33.4615 19.279C 32.5064 26.6261 25.8202 34.3706 15.5922 33.0465C 12.4523 32.6381 9.65046 31.336 7.39539 29.4388C 7.82357 29.5421 8.26492 29.6277 8.71286 29.6826C 11.3193 30.0207 13.8312 29.452 15.926 28.2026C 13.4997 27.8469 11.6574 25.9673 11.2336 23.6705C 11.5652 23.7825 11.9099 23.8638 12.2678 23.9077C 12.7751 23.9735 13.2735 23.9692 13.7588 23.9011C 11.2841 23.0601 9.65705 20.5657 10.0062 17.8737L 10.015 17.8034C 10.711 18.3172 11.5366 18.6795 12.4435 18.8288C 11.0821 17.6387 10.3224 15.8096 10.5705 13.8817C 10.7022 12.8629 11.0997 11.9429 11.6838 11.1831C 13.9893 14.9028 17.799 17.6475 22.3882 18.4775C 22.3465 18.0603 22.3509 17.6277 22.408 17.193C 22.8054 14.1255 25.6182 11.9582 28.6901 12.3557C 30.2886 12.5621 31.6434 13.425 32.5195 14.6393C 33.8194 14.5536 35.0644 14.244 36.226 13.7478C 35.6441 14.9906 34.6253 15.9655 33.3847 16.5035C 34.5287 16.5167 35.6353 16.3564 36.6915 16.0424C 35.8044 17.0634 34.7285 17.922 33.534 18.5587Z"/>-</defs>-</svg>diff --git a/saleor/static/js/components/categoryPage/CategoryFilter.js b/saleor/static/js/components/categoryPage/CategoryFilter.jsindex 52bd17bb6a..8e09e8cf98 100644--- a/saleor/static/js/components/categoryPage/CategoryFilter.js+++ b/saleor/static/js/components/categoryPage/CategoryFilter.js@@ -1,4 +1,7 @@import React, { Component, PropTypes } from 'react';+import InlineSVG from 'react-inlinesvg';++import arrowLeftIcon from '../../../../../templates/svg/arrow-left-icon.svg';export default class CategoryFilter extends Component {@@ -14,7 +17,7 @@ export default class CategoryFilter extends Component {<h2><strong>{category.name}</strong></h2>{parent && (<div className="product-filters__categories__parents">- <i className="fa fa-arrow-left" aria-hidden="true"></i>+ <InlineSVG src={arrowLeftIcon} /><a href={parent.url}>{`${gettext('See all')} ${parent.name}`}</a></div>)}diff --git a/saleor/static/js/components/categoryPage/FilterHeader.js b/saleor/static/js/components/categoryPage/FilterHeader.jsindex a38302b4b1..60298a3eef 100644--- a/saleor/static/js/components/categoryPage/FilterHeader.js+++ b/saleor/static/js/components/categoryPage/FilterHeader.js@@ -2,8 +2,8 @@ import React, { PropTypes } from 'react';import InlineSVG from 'react-inlinesvg';-import chevronUpIcon from '../../../images/chevron-up-icon.svg';-import chevronDownIcon from '../../../images/chevron-down-icon.svg';+import chevronUpIcon from '../../../../../templates/svg/chevron-up-icon.svg';+import chevronDownIcon from '../../../../../templates/svg/chevron-down-icon.svg';const FilterHeader = ({ onClick, title, visibility }) => {const imageSrc = visibility ? (chevronUpIcon) : (chevronDownIcon);diff --git a/saleor/static/js/components/categoryPage/ProductPrice.js b/saleor/static/js/components/categoryPage/ProductPrice.jsindex c420e19f13..4d1c521061 100644--- a/saleor/static/js/components/categoryPage/ProductPrice.js+++ b/saleor/static/js/components/categoryPage/ProductPrice.js@@ -1,7 +1,8 @@import React, { PropTypes } from 'react';import Relay from 'react-relay';+import InlineSVG from 'react-inlinesvg';-import SaleImg from '../../../images/sale_bg.svg';+import SaleImg from '../../../../../templates/svg/sale_bg.svg';const ProductPrice = ({ availability, price }) => {const { discount, priceRange } = availability;@@ -12,7 +13,7 @@ const ProductPrice = ({ availability, price }) => {{isPriceRange && <span>{gettext('from')} </span>} {priceRange.minPrice.grossLocalized}</span>{discount && (- <div className="product-list__sale"><img src={SaleImg}/><span>{gettext('Sale')}</span></div>+ <div className="product-list__sale"><InlineSVG src={SaleImg} /><span>{gettext('Sale')}</span></div>)}</div>);diff --git a/saleor/static/js/components/categoryPage/SortBy.js b/saleor/static/js/components/categoryPage/SortBy.jsindex 3083278466..453860b101 100644--- a/saleor/static/js/components/categoryPage/SortBy.js+++ b/saleor/static/js/components/categoryPage/SortBy.js@@ -1,8 +1,8 @@import React, { Component, PropTypes } from 'react';import InlineSVG from 'react-inlinesvg';-import arrowUpIcon from '../../../images/arrow-up-icon.svg';-import arrowDownIcon from '../../../images/arrow-down-icon.svg';+import arrowUpIcon from '../../../../../templates/svg/arrow-up-icon.svg';+import arrowDownIcon from '../../../../../templates/svg/arrow-down-icon.svg';export default class sortBy extends Component {diff --git a/saleor/static/js/storefront.js b/saleor/static/js/storefront.jsindex dad9a9e61f..8f814908ae 100644--- a/saleor/static/js/storefront.js+++ b/saleor/static/js/storefront.js@@ -68,7 +68,7 @@ $(document).ready((e) => {let $searchIcon = $('.mobile-search-icon');let $closeSearchIcon = $('.mobile-close-search');-let $searchForm = $('.navbar__brand__search');+let $searchForm = $('.search-form');$searchIcon.click((e) => {$searchForm.animate({left: 0}, {duration: 500});});diff --git a/saleor/static/scss/storefront/components/_cards.scss b/saleor/static/scss/storefront/components/_cards.scssindex d5afd4951e..fc3ed4a9c1 100644--- a/saleor/static/scss/storefront/components/_cards.scss+++ b/saleor/static/scss/storefront/components/_cards.scss@@ -27,8 +27,8 @@display: inline-block;a {line-height: 1.15rem;- img {- max-width: 1.15rem;+ svg {+ float: right;cursor: pointer;}}@@ -48,9 +48,6 @@color: $blue;}}- button {- text-transform: uppercase;- }}@include media-breakpoint-down(sm) {form {diff --git a/saleor/static/scss/storefront/components/_filters.scss b/saleor/static/scss/storefront/components/_filters.scssindex dc362752b2..e6bf181a40 100644--- a/saleor/static/scss/storefront/components/_filters.scss+++ b/saleor/static/scss/storefront/components/_filters.scss@@ -85,6 +85,10 @@a {color: $body-color;}+ svg {+ vertical-align: text-top;+ margin-right: $global-margin / 2;+ }}&__childs {padding-left: $global-padding*2.5;diff --git a/saleor/static/scss/storefront/components/_footer.scss b/saleor/static/scss/storefront/components/_footer.scssindex a90facefa4..6f3e8a703f 100644--- a/saleor/static/scss/storefront/components/_footer.scss+++ b/saleor/static/scss/storefront/components/_footer.scss@@ -7,11 +7,13 @@}&__logo {margin-bottom: $global-margin;- @include media-breakpoint-down(md) {- height: 30px;- }- @include media-breakpoint-down(sm) {- height: 40px;+ svg {+ @include media-breakpoint-down(md) {+ height: 30px;+ }+ @include media-breakpoint-down(sm) {+ height: 40px;+ }}}ul {diff --git a/saleor/static/scss/storefront/components/_forms.scss b/saleor/static/scss/storefront/components/_forms.scssindex aa21cf5de3..25b2ffc955 100644--- a/saleor/static/scss/storefront/components/_forms.scss+++ b/saleor/static/scss/storefront/components/_forms.scss@@ -92,7 +92,7 @@top: 0;z-index: 5;margin-top: 0;- .search-input {+ input {padding: $global-padding * 2 $global-padding * 2 $global-padding * 2 $global-padding * 4;border: 0;}diff --git a/saleor/static/scss/storefront/components/_header.scss b/saleor/static/scss/storefront/components/_header.scssindex 360380c17d..3c33e0f21a 100644--- a/saleor/static/scss/storefront/components/_header.scss+++ b/saleor/static/scss/storefront/components/_header.scss@@ -34,13 +34,15 @@.navbar {padding: 0;@include media-breakpoint-down(sm) {- img {+ svg {max-height: 30px;+ width: auto;}}@media (max-width: 370px) {- img {+ svg {max-height: 25px;+ width: auto;}}&__login {@@ -78,15 +80,27 @@text-transform: uppercase;font-size: 0.45rem;}- img {- max-height: 20px;+ svg {vertical-align: top;}}+ svg path {+ fill: #000;+ }}&__search {padding: $global-padding * 2 0;- &__mobile-icon {+ position: relative;+ form {+ svg {+ width: 1.5rem;+ height: 1.5rem;+ vertical-align: middle;+ padding: 0.1rem;+ }+ }+ .mobile-search-icon {+ float: right;padding-right: $global-padding;}}@@ -140,6 +154,13 @@}.cart-label {padding-right: $global-padding / 2;+ display: inline-block;+ }+ .navbar__brand__cart__icon {+ display: inline-block;+ svg {+ vertical-align: middle;+ }}.badge {position: absolute;@@ -165,6 +186,7 @@max-height: 22px;padding-right: $global-padding;padding-left: $global-padding;+ vertical-align: super;}}&__menu {diff --git a/saleor/static/scss/storefront/layouts/_cart.scss b/saleor/static/scss/storefront/layouts/_cart.scssindex 96bd243aa7..b62ea6eb5d 100644--- a/saleor/static/scss/storefront/layouts/_cart.scss+++ b/saleor/static/scss/storefront/layouts/_cart.scss@@ -48,6 +48,9 @@cursor: pointer;display: inline-block;margin-left: $global-margin / 2;+ svg {+ vertical-align: text-top;+ }}}&__total {diff --git a/saleor/static/scss/storefront/layouts/_checkout.scss b/saleor/static/scss/storefront/layouts/_checkout.scssindex 8052d35857..3d0baf6b83 100644--- a/saleor/static/scss/storefront/layouts/_checkout.scss+++ b/saleor/static/scss/storefront/layouts/_checkout.scss@@ -26,14 +26,18 @@a:hover {text-decoration: none;}- img {+ svg {vertical-align: baseline;margin-right: $global-margin;@include media-breakpoint-down(sm) {max-height: 25px;+ width: auto;vertical-align: text-bottom;margin-right: 0;}+ path {+ fill: #000;+ }}h1 {display: inline-block;diff --git a/saleor/static/scss/storefront/layouts/_product-list.scss b/saleor/static/scss/storefront/layouts/_product-list.scssindex c7dfb9bf09..e649029980 100644--- a/saleor/static/scss/storefront/layouts/_product-list.scss+++ b/saleor/static/scss/storefront/layouts/_product-list.scss@@ -13,7 +13,7 @@text-transform: uppercase;}&__sale {- img {+ svg {position: absolute;left: 0;top: 0;diff --git a/saleor/static/scss/storefront/layouts/_product-page.scss b/saleor/static/scss/storefront/layouts/_product-page.scssindex e8fa98a0d0..aaaad94ba7 100644--- a/saleor/static/scss/storefront/layouts/_product-page.scss+++ b/saleor/static/scss/storefront/layouts/_product-page.scss@@ -46,7 +46,7 @@&__gallery {.carousel-control {&-prev {- img {+ svg {transform: rotate(180deg);}}diff --git a/templates/base.html b/templates/base.htmlindex 7a4d109ceb..92b5298974 100644--- a/templates/base.html+++ b/templates/base.html@@ -71,26 +71,26 @@<div class="container"><div class="row no-gutters"><div class="col-8 col-md-4 navbar__logo">- <div class="menu-icon-mobile hidden-md-up">- <img class="navbar__brand__menu-toggle closed open" src="{% static "images/mobile-bar.svg" %}">+ <div class="menu-icon-mobile hidden-md-up navbar__brand__menu-toggle closed open">+ {% include 'svg/mobile-bar.svg' %}<span>{% trans "menu" context "Hamburger button text" %}</span></div><a href="/">- <img src="{% static "images/saleor-logo-black.svg" %}" alt="Saleor demo store" height="38">+ {% include 'svg/saleor-logo.svg' %}</a></div><div class="col-2 col-md-4 navbar__search static">{% if SEARCH_IS_ENABLED %}- <img class="hidden-md-up navbar__search__mobile-icon float-right" src="{% static "images/search-icon.svg" %}">- {% endif %}- {% if SEARCH_IS_ENABLED %}+ <div class="hidden-md-up mobile-search-icon">+ {% include 'svg/search-icon.svg' %}+ </div><form class="form-inline search-form" action="{% url "search:search" %}">- <div class="search-form__close-icon hidden-md-up">- <img src="{% static "images/close-icon.svg" %}">+ <div class="mobile-close-search hidden-md-up">+ {% include 'svg/close-icon.svg' %}</div><input class="form-control" type="text" name="q" value="{% if query %}{{ query }}{% endif %}" placeholder="{% trans "Search for product" %}"><button class="btn btn-link" type="submit">- <img src="{% static "images/search-icon.svg" %}">+ {% include 'svg/search-icon.svg' %}</button></form>{% endif %}@@ -101,7 +101,9 @@<span class="cart-label hidden-sm-down">{% trans "Your Cart" context "Main navigation item" %}</span>- <img class="navbar__brand__cart__icon" src="{% static "images/cart.svg" %}" alt="Cart">+ <div class="navbar__brand__cart__icon">+ {% include 'svg/cart.svg' %}+ </div><span class="badge {% if not cart_counter %}empty{% endif %}">{% if cart_counter %}{{ cart_counter }}@@ -155,8 +157,8 @@<div class="container"><div class="row"><div class="col-md-3">- <a href="/">- <img class="footer__logo" src="{% static "images/saleor-logo.svg" %}" height="40" alt="Saleor demo store">+ <a href="/" class="footer__logo">+ {% include 'svg/saleor-logo.svg' %}</a></div><div class="col-md-3 col-sm-6">@@ -215,10 +217,10 @@</div><div class="col-md-3 col-sm-12"><a target="_blank" rel="noopener" class="github-footer" href="https://github.com/mirumee/saleor">- <img src="{% static "images/github_logo.svg" %}">+ {% include 'svg/github_logo.svg' %}</a><a target="_blank" rel="noopener" href="https://twitter.com/getsaleor">- <img src="{% static "images/twitter_logo.svg" %}">+ {% include 'svg/twitter_logo.svg' %}</a></div></div>diff --git a/templates/cart/index.html b/templates/cart/index.htmlindex a4ad472f23..d0a2b7898d 100644--- a/templates/cart/index.html+++ b/templates/cart/index.html@@ -55,7 +55,9 @@</div>{% csrf_token %}</form>- <img class="cart-item-delete" src="{% static 'images/icon_delete.svg' %}">+ <span class="cart-item-delete">+ {% include 'svg/icon_delete.svg' %}+ </span><small class="cart__line__quantity-error text-danger"></small></div><div class="cart-item-subtotal col-md-5 col-12" data-product-id="{{ line.variant.pk }}">diff --git a/templates/category/_items.html b/templates/category/_items.htmlindex e085d69129..953ab36a5d 100644--- a/templates/category/_items.html+++ b/templates/category/_items.html@@ -25,7 +25,10 @@{% price_range availability.price_range %}{% if availability.discount %}{% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}- <div class="product-list__sale"><img src="{% static "images/sale_bg.svg" %}">+ <div class="product-list__sale">+ <span class="isvg">+ {% include 'svg/sale_bg.svg' %}+ </span><span>{% comment %}Translators: Layout may break if character length is different than four.{% endcomment %}{% trans "Sale" context "Sale (discount) label for item in product list" %}diff --git a/templates/checkout/details.html b/templates/checkout/details.htmlindex 7747d31a8b..60d7eb6b2e 100644--- a/templates/checkout/details.html+++ b/templates/checkout/details.html@@ -13,16 +13,13 @@<header class="checkout__header"><div class="container"><a href="/">- <img src="{% static "images/saleor-logo-black.svg" %}"- alt="{% trans "Saleor demo store" context "Checkout logo alternate text" %}"- height="38">+ {% include 'svg/saleor-logo.svg' %}</a><h1>{% trans "Checkout" context "Checkout title" %}</h1></div></header>{% endblock %}-{% block footer %}{% endblock %}diff --git a/templates/product/details.html b/templates/product/details.htmlindex 17a6f458b1..1fae4a5827 100644--- a/templates/product/details.html+++ b/templates/product/details.html@@ -52,10 +52,10 @@</div>{% if images|length > 1 %}<a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev">- <img class="icon-next" src="{% static "images/gallery-arrow.svg" %}">+ {% include 'svg/gallery-arrow.svg' %}</a><a class="carousel-control-next" href="#carousel-example-generic" role="button" data-slide="next">- <img class="icon-next" src="{% static "images/gallery-arrow.svg" %}">+ {% include 'svg/gallery-arrow.svg' %}</a>{% endif %}<ol class="carousel-indicators hidden-sm-down">diff --git a/templates/styleguide.html b/templates/styleguide.htmlindex 599a30002d..375f9df732 100644--- a/templates/styleguide.html+++ b/templates/styleguide.html@@ -11,9 +11,7 @@<header class="checkout__header"><div class="container"><a href="/">- <img src="{% static "images/saleor-logo-black.svg" %}"- alt="{% trans "Testeor - Saleor demo store" context "Checkout logo alternate text" %}"- height="38">+ {% include 'svg/saleor-logo.svg' %}</a><h1>Style guide</h1></div>@@ -47,7 +45,7 @@<div class="col-md-9 pull-md-3 styleguide__content"><div class="styleguide__content__note"><h3>Note</h3>- <p>If you’re using a recent version of IE, Firefox, Safari or Chrome (though not Opera), you can edit the text in sections marked with edit icon <img src="{% static "images/text-cursor.svg" %}">. Check how our components will look like in your language and with your content.</p>+ <p>If you’re using a recent version of IE, Firefox, Safari or Chrome (though not Opera), you can edit the text in sections marked with edit icon . Check how our components will look like in your language and with your content.</p></div><hr><div id="typography" class="styleguide__content__block">diff --git a/saleor/static/images/arrow-down-icon.svg b/templates/svg/arrow-down-icon.svgsimilarity index 100%rename from saleor/static/images/arrow-down-icon.svgrename to templates/svg/arrow-down-icon.svgdiff --git a/templates/svg/arrow-left-icon.svg b/templates/svg/arrow-left-icon.svgnew file mode 100644index 0000000000..214309d656--- /dev/null+++ b/templates/svg/arrow-left-icon.svg@@ -0,0 +1 @@+<svg width="20" height="20" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 896v128q0 53-32.5 90.5t-84.5 37.5h-704l293 294q38 36 38 90t-38 90l-75 76q-37 37-90 37-52 0-91-37l-651-652q-37-37-37-90 0-52 37-91l651-650q38-38 91-38 52 0 90 38l75 74q38 38 38 91t-38 91l-293 293h704q52 0 84.5 37.5t32.5 90.5z"/></svg>diff --git a/saleor/static/images/arrow-up-icon.svg b/templates/svg/arrow-up-icon.svgsimilarity index 100%rename from saleor/static/images/arrow-up-icon.svgrename to templates/svg/arrow-up-icon.svgdiff --git a/saleor/static/images/cart.svg b/templates/svg/cart.svgsimilarity index 100%rename from saleor/static/images/cart.svgrename to templates/svg/cart.svgdiff --git a/saleor/static/images/chevron-down-icon.svg b/templates/svg/chevron-down-icon.svgsimilarity index 100%rename from saleor/static/images/chevron-down-icon.svgrename to templates/svg/chevron-down-icon.svgdiff --git a/saleor/static/images/chevron-up-icon.svg b/templates/svg/chevron-up-icon.svgsimilarity index 100%rename from saleor/static/images/chevron-up-icon.svgrename to templates/svg/chevron-up-icon.svgdiff --git a/templates/svg/close-icon.svg b/templates/svg/close-icon.svgnew file mode 100644index 0000000000..9e64a2a42e--- /dev/null+++ b/templates/svg/close-icon.svg@@ -0,0 +1 @@+<svg width="30" height="30" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></svg>diff --git a/saleor/static/images/gallery-arrow.svg b/templates/svg/gallery-arrow.svgsimilarity index 100%rename from saleor/static/images/gallery-arrow.svgrename to templates/svg/gallery-arrow.svgdiff --git a/templates/svg/github_logo.svg b/templates/svg/github_logo.svgnew file mode 100644index 0000000000..c8a7210be3--- /dev/null+++ b/templates/svg/github_logo.svg@@ -0,0 +1,3 @@+<svg width="45" height="43" viewBox="0 0 45 43" xmlns="http://www.w3.org/2000/svg">+<path fill="#ffffff" d="M 22.4943 -7.16688e-09C 10.0725 -7.16688e-09 7.85499e-09 9.87083 7.85499e-09 22.044C 7.85499e-09 31.7835 6.44383 40.0444 15.3848 42.9636C 16.5095 43.1662 16.9185 42.4827 16.9185 41.8993C 16.9185 41.376 16.9003 39.9888 16.8889 38.1473C 10.6337 39.4789 9.31356 35.1925 9.31356 35.1925C 8.28882 32.6452 6.81419 31.9683 6.81419 31.9683C 4.77152 30.6011 6.97097 30.6256 6.97097 30.6256C 9.22949 30.7837 10.4156 32.8991 10.4156 32.8991C 12.4219 36.268 15.6824 35.2927 16.9639 34.7316C 17.1661 33.3043 17.7501 32.3335 18.3908 31.7813C 13.3943 31.2268 8.1434 29.3364 8.1434 20.8884C 8.1434 18.4814 9.02045 16.5152 10.4587 14.9721C 10.2292 14.4155 9.45443 12.1732 10.6791 9.13826C 10.6791 9.13826 12.5696 8.54374 16.8685 11.4006C 18.6612 10.9107 20.5857 10.6635 22.5011 10.6568C 24.4097 10.6635 26.3365 10.9107 28.1338 11.4006C 32.4282 8.54596 34.3118 9.13826 34.3118 9.13826C 35.5365 12.1732 34.7685 14.4155 34.539 14.9721C 35.9818 16.513 36.8498 18.4814 36.8498 20.8884C 36.8498 29.3609 31.5897 31.2202 26.5774 31.7657C 27.3885 32.447 28.1088 33.792 28.1088 35.8494C 28.1088 38.7953 28.0793 41.1734 28.0793 41.897C 28.0793 42.4871 28.486 43.1729 29.6266 42.9592C 38.5584 40.0378 45 31.779 45 22.0418C 44.9909 9.86861 34.9162 -7.16688e-09 22.4943 -7.16688e-09Z"/>+</svg>diff --git a/saleor/static/images/icon_delete.svg b/templates/svg/icon_delete.svgsimilarity index 69%rename from saleor/static/images/icon_delete.svgrename to templates/svg/icon_delete.svgindex 5374276847..003d4187f3 100644--- a/saleor/static/images/icon_delete.svg+++ b/templates/svg/icon_delete.svg@@ -1,11 +1,5 @@-<?xml version="1.0" encoding="utf-8"?>-<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- viewBox="0 0 13.2 14.4" style="enable-background:new 0 0 13.2 14.4;" xml:space="preserve">-<style type="text/css">- .st0{fill:#828282;}-</style>-<path class="st0" d="M13.2,2.7v0.6c0,0.1,0,0.2-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1H12v8.9c0,0.5-0.1,1-0.4,1.3+<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="20px" width="20px" viewBox="0 0 13.2 14.4">+<path fill="#828282" d="M13.2,2.7v0.6c0,0.1,0,0.2-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1H12v8.9c0,0.5-0.1,1-0.4,1.3c-0.3,0.4-0.6,0.6-1.1,0.6H2.7c-0.4,0-0.8-0.2-1.1-0.5s-0.4-0.8-0.4-1.3V3.6H0.3c-0.1,0-0.2,0-0.2-0.1C0,3.5,0,3.4,0,3.3V2.7c0-0.1,0-0.2,0.1-0.2c0.1-0.1,0.1-0.1,0.2-0.1h2.9l0.7-1.6C4,0.6,4.1,0.4,4.4,0.2C4.6,0.1,4.9,0,5.1,0h3c0.3,0,0.5,0.1,0.7,0.2c0.2,0.2,0.4,0.4,0.5,0.6L10,2.4h2.9c0.1,0,0.2,0,0.2,0.1C13.2,2.5,13.2,2.6,13.2,2.7z M10.8,12.5V3.6H2.4v8.9c0,0.1,0,0.3,0.1,0.4diff --git a/saleor/static/images/icon_edit.svg b/templates/svg/icon_edit.svgsimilarity index 100%rename from saleor/static/images/icon_edit.svgrename to templates/svg/icon_edit.svgdiff --git a/saleor/static/images/mobile-bar.svg b/templates/svg/mobile-bar.svgsimilarity index 67%rename from saleor/static/images/mobile-bar.svgrename to templates/svg/mobile-bar.svgindex 0db413e434..5bc798808b 100644--- a/saleor/static/images/mobile-bar.svg+++ b/templates/svg/mobile-bar.svg@@ -1,8 +1,6 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- width="136.689px" height="110px" viewBox="0 0 136.689 110" enable-background="new 0 0 136.689 110" xml:space="preserve">+ width="28px" height="20px" viewBox="0 0 136.689 110" enable-background="new 0 0 136.689 110" xml:space="preserve"><g><g><path fill="#333333" d="M9.282,86.005c0,0,0-3.11,3.107-3.11h111.909c0,0,3.11,0,3.11,3.11v12.435c0,0,0,3.106-3.11,3.106H12.39diff --git a/templates/svg/sale_bg.svg b/templates/svg/sale_bg.svgnew file mode 100644index 0000000000..6fabb7b394--- /dev/null+++ b/templates/svg/sale_bg.svg@@ -0,0 +1,3 @@+<svg width="49" height="49" viewBox="0 0 49 49" xmlns="http://www.w3.org/2000/svg">+<path fill="#EB5757" d="M 0 48.5L 0 20L 20.5 0L 48.5 0L 0 48.5Z"/>+</svg>diff --git a/saleor/static/images/saleor-logo.svg b/templates/svg/saleor-logo.svgsimilarity index 88%rename from saleor/static/images/saleor-logo.svgrename to templates/svg/saleor-logo.svgindex c98bb4de15..dc7815c660 100644--- a/saleor/static/images/saleor-logo.svg+++ b/templates/svg/saleor-logo.svg@@ -1,7 +1,6 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --><svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- viewBox="0 0 282.3 60.9" enable-background="new 0 0 282.3 60.9" xml:space="preserve">+ viewBox="0 0 282.3 60.9" height="38px" width="176px" enable-background="new 0 0 282.3 60.9" xml:space="preserve"><path fill="white" id="XMLID_124_" d="M267.7,37.7c6.1-2.8,10-9.2,10-16.7c0-5.7-2-10.1-6.2-14.1c-4.1-4-9.1-5.7-14.9-5.7h-27.2v15.9c-1-2.9-3.5-5.7-6.1-8.2C217,3,209.5,0,200.4,0s-16.5,3-22.9,8.9c-1.2,1.1-2.1,2.3-3.1,3.5V1.2h-43v44h-19v-44h-16v47.2L77.3,1.2H62.6L48.4,35.8c-1.8-4.7-6-8.2-13.2-10.8c-3.7-1.4-8.4-2.8-10.4-3.2c-1-0.3-2-0.6-3-1c-1.8-0.8-2.4-1.7-2.4-3.4diff --git a/templates/svg/search-icon.svg b/templates/svg/search-icon.svgnew file mode 100755index 0000000000..32c30a23f8--- /dev/null+++ b/templates/svg/search-icon.svg@@ -0,0 +1 @@+<svg width="30" height="30" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"/></svg>diff --git a/templates/svg/twitter_logo.svg b/templates/svg/twitter_logo.svgnew file mode 100644index 0000000000..2fa8be8142--- /dev/null+++ b/templates/svg/twitter_logo.svg@@ -0,0 +1,2 @@+<svg width="43" height="43" viewBox="0 0 43 43" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" id="path0_fill" d="M 21.5011 9.42327e-09C 9.62631 9.42327e-09 9.42327e-09 9.62631 9.42327e-09 21.5011C 9.42327e-09 33.3737 9.62631 43 21.5011 43C 33.3737 43 43 33.3737 43 21.5011C 43 9.62631 33.3737 9.42327e-09 21.5011 9.42327e-09ZM 33.534 18.5587L 33.4615 19.279C 32.5064 26.6261 25.8202 34.3706 15.5922 33.0465C 12.4523 32.6381 9.65046 31.336 7.39539 29.4388C 7.82357 29.5421 8.26492 29.6277 8.71286 29.6826C 11.3193 30.0207 13.8312 29.452 15.926 28.2026C 13.4997 27.8469 11.6574 25.9673 11.2336 23.6705C 11.5652 23.7825 11.9099 23.8638 12.2678 23.9077C 12.7751 23.9735 13.2735 23.9692 13.7588 23.9011C 11.2841 23.0601 9.65705 20.5657 10.0062 17.8737L 10.015 17.8034C 10.711 18.3172 11.5366 18.6795 12.4435 18.8288C 11.0821 17.6387 10.3224 15.8096 10.5705 13.8817C 10.7022 12.8629 11.0997 11.9429 11.6838 11.1831C 13.9893 14.9028 17.799 17.6475 22.3882 18.4775C 22.3465 18.0603 22.3509 17.6277 22.408 17.193C 22.8054 14.1255 25.6182 11.9582 28.6901 12.3557C 30.2886 12.5621 31.6434 13.425 32.5195 14.6393C 33.8194 14.5536 35.0644 14.244 36.226 13.7478C 35.6441 14.9906 34.6253 15.9655 33.3847 16.5035C 34.5287 16.5167 35.6353 16.3564 36.6915 16.0424C 35.8044 17.0634 34.7285 17.922 33.534 18.5587Z"/></svg>+diff --git a/templates/userprofile/details.html b/templates/userprofile/details.htmlindex 39edb05ac8..ed52224323 100644--- a/templates/userprofile/details.html+++ b/templates/userprofile/details.html@@ -115,7 +115,7 @@<li><a href="{% url "profile:address-edit" pk=address.pk %}">{% trans "Edit" context "User address action" %}</a></li>- <li><a class="delete-icon"><img class="float-right" src="{% static "images/icon_delete.svg" %}"></a></li>+ <li><a class="delete-icon">{% include 'svg/icon_delete.svg' %}</a></li></ul>{% include "userprofile/address-delete.html" with pk=address.pk %}</div>diff --git a/webpack.config.js b/webpack.config.jsindex 45a07d0a81..a7dfd91d80 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -77,7 +77,8 @@ var config = {resolve('node_modules'),resolve('saleor/static/fonts'),resolve('saleor/static/images'),- resolve('saleor/static/img')+ resolve('saleor/static/img'),+ resolve('templates/svg')]}]