Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Replace fa icons to svg

Krzysztof Białogłowicz8b18d2541097
diff --git a/saleor/static/img/arrow-down-icon.svg b/saleor/static/img/arrow-down-icon.svg
new file mode 100644
index 0000000000..58cc54b36a
--- /dev/null
+++ b/saleor/static/img/arrow-down-icon.svg
@@ -0,0 +1,9 @@
+<?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 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
+<path d="M29.6,14.3c0,0.7-0.2,1.2-0.7,1.7L16.7,28.2c-0.5,0.5-1.1,0.7-1.7,0.7c-0.7,0-1.2-0.2-1.7-0.7L1.1,16
+ c-0.5-0.5-0.7-1-0.7-1.7c0-0.7,0.2-1.2,0.7-1.7l1.4-1.4c0.5-0.5,1.1-0.7,1.7-0.7c0.7,0,1.2,0.2,1.7,0.7l5.5,5.5V3.5
+ c0-0.7,0.2-1.2,0.7-1.7c0.5-0.5,1-0.7,1.7-0.7h2.4c0.7,0,1.2,0.2,1.7,0.7c0.5,0.5,0.7,1,0.7,1.7v13.2l5.5-5.5c0.5-0.5,1-0.7,1.7-0.7
+ c0.7,0,1.2,0.2,1.7,0.7l1.4,1.4C29.4,13.1,29.6,13.6,29.6,14.3z"/>
+</svg>
diff --git a/saleor/static/img/arrow-up-icon.svg b/saleor/static/img/arrow-up-icon.svg
new file mode 100644
index 0000000000..9d5a9dad04
--- /dev/null
+++ b/saleor/static/img/arrow-up-icon.svg
@@ -0,0 +1,9 @@
+<?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 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
+<path d="M29.6,15.8c0,0.6-0.2,1.2-0.7,1.7l-1.4,1.4c-0.5,0.5-1,0.7-1.7,0.7c-0.7,0-1.2-0.2-1.7-0.7l-5.5-5.5v13.2
+ c0,0.7-0.2,1.2-0.7,1.6c-0.5,0.4-1,0.6-1.7,0.6h-2.4c-0.7,0-1.2-0.2-1.7-0.6c-0.5-0.4-0.7-0.9-0.7-1.6V13.4l-5.5,5.5
+ c-0.5,0.5-1,0.7-1.7,0.7s-1.2-0.2-1.7-0.7l-1.4-1.4c-0.5-0.5-0.7-1-0.7-1.7c0-0.7,0.2-1.2,0.7-1.7L13.3,1.9c0.4-0.5,1-0.7,1.7-0.7
+ c0.7,0,1.2,0.2,1.7,0.7l12.2,12.2C29.4,14.6,29.6,15.2,29.6,15.8z"/>
+</svg>
diff --git a/saleor/static/img/chevron-down-icon.svg b/saleor/static/img/chevron-down-icon.svg
new file mode 100644
index 0000000000..a8d3567c53
--- /dev/null
+++ b/saleor/static/img/chevron-down-icon.svg
@@ -0,0 +1,8 @@
+<?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 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
+<path d="M29.2,10.6L15.8,24c-0.2,0.2-0.5,0.3-0.8,0.3s-0.6-0.1-0.8-0.3L0.8,10.6c-0.2-0.2-0.3-0.5-0.3-0.8S0.6,9.2,0.8,9l3-3
+ c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.6,0.1,0.8,0.3l9.6,9.6L24.6,6c0.2-0.2,0.5-0.3,0.8-0.3s0.6,0.1,0.8,0.3l3,3
+ c0.2,0.2,0.3,0.5,0.3,0.8S29.4,10.4,29.2,10.6z"/>
+</svg>
diff --git a/saleor/static/img/chevron-up-icon.svg b/saleor/static/img/chevron-up-icon.svg
new file mode 100644
index 0000000000..0afa31e2cd
--- /dev/null
+++ b/saleor/static/img/chevron-up-icon.svg
@@ -0,0 +1,8 @@
+<?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 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
+<path d="M29.2,21l-3,3c-0.2,0.2-0.5,0.3-0.8,0.3s-0.6-0.1-0.8-0.3L15,14.4L5.4,24c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3
+ l-3-3c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8L14.2,6c0.2-0.2,0.5-0.3,0.8-0.3s0.6,0.1,0.8,0.3l13.3,13.3
+ c0.2,0.2,0.3,0.5,0.3,0.8C29.5,20.5,29.4,20.8,29.2,21z"/>
+</svg>
diff --git a/saleor/static/js/components/categoryPage/PriceFilter.js b/saleor/static/js/components/categoryPage/PriceFilter.js
index 2376a3dcd8..9d4ea41ba6 100644
--- a/saleor/static/js/components/categoryPage/PriceFilter.js
+++ b/saleor/static/js/components/categoryPage/PriceFilter.js
@@ -40,7 +40,7 @@ export default class PriceFilter extends Component {
<div className="price-range">
<h3 onClick={this.changeVisibility}>
Price range
- <i className={visibility ? ('fa fa-chevron-up pull-right') : ('fa fa-chevron-down pull-right')} aria-hidden="true"></i>
+ <img className="float-right" src={visibility ? ('/static/img/chevron-up-icon.svg') : ('/static/img/chevron-down-icon.svg')} width="20" />
</h3>
{visibility || minPrice || maxPrice ? (
<div>
diff --git a/saleor/static/js/components/categoryPage/ProductFilters.js b/saleor/static/js/components/categoryPage/ProductFilters.js
index b6a198bd1a..15c00f251e 100644
--- a/saleor/static/js/components/categoryPage/ProductFilters.js
+++ b/saleor/static/js/components/categoryPage/ProductFilters.js
@@ -52,7 +52,7 @@ class ProductFilters extends Component {
<div key={attribute.id}>
<h3 className={attribute.name} onClick={() => this.changeVisibility(attribute.name)}>
{attribute.display}
- <i className={visibility[attribute.name] ? ('fa fa-chevron-up pull-right') : ('fa fa-chevron-down pull-right')} aria-hidden="true" ></i>
+ <img className="float-right" src={visibility[attribute.name] ? ('/static/img/chevron-up-icon.svg') : ('/static/img/chevron-down-icon.svg')} width="20" />
</h3>
<ul id={attribute.name}>
{attribute.values.map((value) => {
diff --git a/saleor/static/js/components/categoryPage/SortBy.js b/saleor/static/js/components/categoryPage/SortBy.js
index 53e51507b2..6484f60f5c 100644
--- a/saleor/static/js/components/categoryPage/SortBy.js
+++ b/saleor/static/js/components/categoryPage/SortBy.js
@@ -37,12 +37,12 @@ export default class sortBy extends Component {
sortedValue.search('-') ? (
<div>
<span>Sort by: <strong>{sortedValue}</strong></span>
- <i className="fa fa-arrow-up" aria-hidden="true"></i>
+ <img src="/static/img/arrow-up-icon.svg" width="15" />
</div>
) : (
<div>
<span>Sort by: <strong>{sortedValue.replace('-','')}</strong></span>
- <i className="fa fa-arrow-down" aria-hidden="true"></i>
+ <img src="/static/img/arrow-down-icon.svg" width="15" />
</div>
)
) : (
@@ -56,14 +56,14 @@ export default class sortBy extends Component {
<div className="col-md-6">Sort by <strong>Name</strong></div>
<div className="col-md-6">
<span className="name" onClick={this.setSorting}>ascending</span>
- <i className="fa fa-arrow-up pull-right" aria-hidden="true"></i>
+ <img className="float-right" src="/static/img/arrow-up-icon.svg" width="15" />
</div>
</div>
<div className="row">
<div className="col-md-6"></div>
<div className="col-md-6">
<span className="-name" onClick={this.setSorting}>descending</span>
- <i className="fa fa-arrow-down pull-right" aria-hidden="true"></i>
+ <img className="float-right" src="/static/img/arrow-down-icon.svg" width="15" />
</div>
</div>
</li>
@@ -72,14 +72,14 @@ export default class sortBy extends Component {
<div className="col-md-6">Sort by <strong>Price</strong></div>
<div className="col-md-6">
<span className="price" onClick={this.setSorting}>ascending</span>
- <i className="fa fa-arrow-up pull-right" aria-hidden="true"></i>
+ <img className="float-right" src="/static/img/arrow-up-icon.svg" width="15" />
</div>
</div>
<div className="row">
<div className="col-md-6"></div>
<div className="col-md-6">
<span className="-price" onClick={this.setSorting}>descending</span>
- <i className="fa fa-arrow-down pull-right" aria-hidden="true"></i>
+ <img className="float-right" src="/static/img/arrow-down-icon.svg" width="15" />
</div>
</div>
</li>
diff --git a/saleor/static/scss/storefront/components/_category-page.scss b/saleor/static/scss/storefront/components/_category-page.scss
index 4301297d39..1ca91c57b9 100644
--- a/saleor/static/scss/storefront/components/_category-page.scss
+++ b/saleor/static/scss/storefront/components/_category-page.scss
@@ -33,8 +33,8 @@
color: $body-color;
padding-right: $global-padding;
outline: 0;
- i {
- padding-left: $global-padding/2;
+ img {
+ margin-left: $global-padding/2;
}
}
ul {
@@ -59,8 +59,8 @@
text-decoration: underline;
}
}
- i {
- padding-top: $global-padding/3;
+ img {
+ margin-top: $global-padding/3;
}
&:last-child {
border: none;