Skip to content

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

Remove static files - js and scss

IKarbowiak614c2674849d
diff --git a/saleor/static/js/components/address-form.js b/saleor/static/js/components/address-form.js
deleted file mode 100644
index 4a3c74b467..0000000000
--- a/saleor/static/js/components/address-form.js
+++ /dev/null
@@ -1,50 +0,0 @@
-export default $(document).ready(e => {
- $(function() {
- const $i18nAddresses = $(".i18n-address");
- $i18nAddresses.each(function() {
- const $form = $(this).closest("form");
- const $countryField = $form.find("select[name=country]");
- const $previewField = $form.find("input.preview");
- $countryField.on("change", () => {
- $previewField.val("on");
- $form.submit();
- });
- });
- });
-
- let $deleteAdressIcons = $(".icons");
- let $deleteAdressIcon = $(".delete-icon");
- let $deleteAddress = $(".address-delete");
-
- $deleteAdressIcon.on("click", e => {
- if ($deleteAddress.hasClass("none")) {
- $deleteAddress.removeClass("none");
- $deleteAdressIcons.addClass("none");
- } else {
- $deleteAddress.addClass("none");
- }
- });
-
- $deleteAddress.find(".cancel").on("click", e => {
- $deleteAddress.addClass("none");
- $deleteAdressIcons.removeClass("none");
- });
-
- // New address dropdown
-
- let $addressShow = $(".address_show label");
- let $addressHide = $(".address_hide label");
- let $addressForm = $(".checkout__new-address");
- let $initialValue = $("#address_new_address").prop("checked");
- $addressShow.click(e => {
- $addressForm.slideDown("slow");
- });
- $addressHide.click(e => {
- $addressForm.slideUp("slow");
- });
- if ($initialValue) {
- $addressForm.slideDown(0);
- } else {
- $addressForm.slideUp(0);
- }
-});
diff --git a/saleor/static/js/components/checkout.js b/saleor/static/js/components/checkout.js
deleted file mode 100644
index b943a29310..0000000000
--- a/saleor/static/js/components/checkout.js
+++ /dev/null
@@ -1,180 +0,0 @@
-import { getAjaxError } from "./misc";
-
-export const summaryLink = $("html").data("checkout-summary-url");
-export const $checkoutDropdown = $(".checkout-preview-dropdown");
-export const $checkoutIcon = $(".checkout__icon");
-export const $addToCheckoutError = $(".product__info__form-error small");
-export const $removeProductSuccess = $(".remove-product-alert");
-
-export const onAddToCheckoutError = response => {
- $addToCheckoutError.html(getAjaxError(response));
-};
-
-export const onAddToCheckoutSuccess = () => {
- $.get(summaryLink, data => {
- $checkoutDropdown.html(data);
- $addToCheckoutError.html("");
- var newQunatity = $(".checkout-preview-dropdown__total").data("quantity");
- $(".badge")
- .html(newQunatity)
- .removeClass("empty");
- $checkoutDropdown.addClass("show");
- $checkoutIcon.addClass("hover");
- $checkoutDropdown
- .find(".checkout-preview-dropdown__list")
- .scrollTop(
- $checkoutDropdown.find(".checkout-preview-dropdown__list")[0]
- .scrollHeight
- );
- setTimeout(e => {
- $checkoutDropdown.removeClass("show");
- $checkoutIcon.removeClass("hover");
- }, 2500);
- });
-};
-
-export default $(document).ready(e => {
- // Checkout dropdown
- $.get(summaryLink, data => {
- $checkoutDropdown.html(data);
- });
- $(".navbar__brand__checkout").hover(
- e => {
- $checkoutDropdown.addClass("show");
- $checkoutIcon.addClass("hover");
- },
- e => {
- $checkoutDropdown.removeClass("show");
- $checkoutIcon.removeClass("hover");
- }
- );
- $(".product-form button").click(e => {
- e.preventDefault();
- let $target = $(e.target.form);
- let quantity = $target.find('input[name="quantity"]').val();
- let variant = $target.find('[name="variant"]').val();
- $.ajax({
- url: $target.attr("action"),
- type: "POST",
- data: {
- variant: variant,
- quantity: quantity
- },
- success: () => {
- onAddToCheckoutSuccess();
- },
- error: response => {
- onAddToCheckoutError(response);
- }
- });
- });
- $(".checkout-preview__clear").click(e => {
- $.ajax({
- url: $(".checkout-preview__clear").data("action"),
- method: "POST",
- data: {},
- success: response => {
- $(".badge").html(response.numItems);
- $.cookie("alert", "true", { path: "/checkout" });
- location.reload();
- }
- });
- });
-
- // Checkout quantity form
-
- let $checkoutLine = $(".checkout-preview__line");
- let $total = $(".checkout-preview-subtotal");
- let $checkoutBadge = $(".navbar__brand__checkout .badge");
- let $closeMsg = $(".close-msg");
- $closeMsg.on("click", e => {
- $removeProductSuccess.addClass("d-none");
- });
- $checkoutLine.each(function() {
- let $quantityInput = $(this).find("#id_quantity");
- let checkoutFormUrl = $(this)
- .find(".form-checkout")
- .attr("action");
- let $qunatityError = $(this).find(
- ".checkout-preview__line__quantity-error"
- );
- let $subtotal = $(this).find(".checkout-preview-item-price p");
- let $deleteIcon = $(this).find(".checkout-preview-item-delete");
- $(this).on("change", $quantityInput, e => {
- let newQuantity = $quantityInput.val();
- $.ajax({
- url: checkoutFormUrl,
- method: "POST",
- data: { quantity: newQuantity },
- success: response => {
- if (newQuantity === 0) {
- if (response.checkout.numLines === 0) {
- $.cookie("alert", "true", { path: "/checkout" });
- location.reload();
- } else {
- $removeProductSuccess.removeClass("d-none");
- $(this).fadeOut();
- }
- } else {
- $subtotal.html(response.subtotal);
- }
- $checkoutBadge.html(response.checkout.numItems);
- $qunatityError.html("");
- $checkoutDropdown.load(summaryLink);
- deliveryAjax();
- },
- error: response => {
- $qunatityError.html(getAjaxError(response));
- }
- });
- });
- $deleteIcon.on("click", e => {
- $.ajax({
- url: checkoutFormUrl,
- method: "POST",
- data: { quantity: 0 },
- success: response => {
- if (response.checkout.numLines >= 1) {
- $(this).fadeOut();
- $total.html(response.total);
- $checkoutBadge.html(response.checkout.numItems);
- $checkoutDropdown.load(summaryLink);
- $removeProductSuccess.removeClass("d-none");
- } else {
- $.cookie("alert", "true", { path: "/checkout" });
- location.reload();
- }
- deliveryAjax();
- }
- });
- });
- });
-
- // Delivery information
-
- let $deliveryForm = $(".deliveryform");
- let crsfToken = $deliveryForm.data("crsf");
- let countrySelect = "#id_country";
- let $checkoutSubtotal = $(".checkout__subtotal");
- let deliveryAjax = e => {
- let newCountry = $(countrySelect).val();
- $.ajax({
- url: $("html").data("shipping-options-url"),
- type: "POST",
- data: {
- csrfmiddlewaretoken: crsfToken,
- country: newCountry
- },
- success: data => {
- $checkoutSubtotal.html(data);
- }
- });
- };
-
- $checkoutSubtotal.on("change", countrySelect, deliveryAjax);
-
- if ($.cookie("alert") === "true") {
- $removeProductSuccess.removeClass("d-none");
- $.cookie("alert", "false", { path: "/checkout" });
- }
-});
diff --git a/saleor/static/js/components/description-json.js b/saleor/static/js/components/description-json.js
deleted file mode 100644
index 0d819a460d..0000000000
--- a/saleor/static/js/components/description-json.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import draftToHtml from "draftjs-to-html";
-
-export default $(document).ready(e => {
- const data = "data-description-json";
- const description = document.querySelector(`[${data}]`);
- if (description) {
- const parsed = JSON.parse(description.getAttribute(data));
- const content = draftToHtml(parsed);
- description.innerHTML = content;
- }
-});
diff --git a/saleor/static/js/components/footer.js b/saleor/static/js/components/footer.js
deleted file mode 100644
index 5739c9495e..0000000000
--- a/saleor/static/js/components/footer.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export default $(document).ready(e => {
- let navbarHeight = $(".navbar").outerHeight(true);
- let footerHeight = $(".footer").outerHeight(true);
- let windowHeight = $(window).height();
- $(".maincontent").css(
- "min-height",
- windowHeight - navbarHeight - footerHeight
- );
-});
diff --git a/saleor/static/js/components/language-picker.js b/saleor/static/js/components/language-picker.js
deleted file mode 100644
index c80346a15e..0000000000
--- a/saleor/static/js/components/language-picker.js
+++ /dev/null
@@ -1,10 +0,0 @@
-$(".language-pick").on("click", e => {
- const $option = $(e.currentTarget);
- const $langCode = $option.data("lang");
- const $input = $(
- `<input name="language" type="hidden" value="${$langCode}">`
- );
- const $languagePickerForm = $("#language-picker");
- $languagePickerForm.append($input);
- $languagePickerForm.submit();
-});
diff --git a/saleor/static/js/components/misc.js b/saleor/static/js/components/misc.js
deleted file mode 100644
index 16a35b8a4e..0000000000
--- a/saleor/static/js/components/misc.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import "lazysizes";
-import SVGInjector from "svg-injector-2";
-
-export const getAjaxError = response => {
- let ajaxError = $.parseJSON(response.responseText).error.quantity;
- return ajaxError;
-};
-export const csrftoken = $.cookie("csrftoken");
-
-export default $(document).ready(e => {
- function csrfSafeMethod(method) {
- return /^(GET|HEAD|OPTIONS|TRACE)$/.test(method);
- }
-
- new SVGInjector().inject(document.querySelectorAll("svg[data-src]"));
-
- $.ajaxSetup({
- beforeSend: function(xhr, settings) {
- if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
- xhr.setRequestHeader("X-CSRFToken", csrftoken);
- }
- }
- });
-
- // Open tab from the link
-
- let hash = window.location.hash;
- $('.nav-tabs a[href="' + hash + '"]').tab("show");
-
- // Preload all images
- window.lazySizesConfig.preloadAfterLoad = true;
-
- // Function for update product image height
- function updateProductImageHeight() {
- let productImageWidth = $(".product-image").width();
- $(".product-image").css({ height: productImageWidth + "px" });
- }
-
- // Update product-image height when window is initialized
- updateProductImageHeight();
-
- // Update product-image height
- $(window).bind("resized", function() {
- updateProductImageHeight();
- });
-});
diff --git a/saleor/static/js/components/navbar.js b/saleor/static/js/components/navbar.js
deleted file mode 100644
index 713b3c14e1..0000000000
--- a/saleor/static/js/components/navbar.js
+++ /dev/null
@@ -1,60 +0,0 @@
-const $toogleIcon = $(".navbar__brand__menu-toggle");
-const $mobileNav = $("nav");
-const $searchIcon = $(".mobile-search-icon");
-const $closeSearchIcon = $(".mobile-close-search");
-const $searchForm = $(".search-form");
-
-const renderNavbar = () => {
- const $desktopLinkBar = $(".navbar__login");
- const $mobileLinkBar = $(".navbar__menu__login");
- const windowWidth = window.innerWidth;
- const $languagePicker = $(".language-picker");
- const $languagePickerButton = $("#language-picker-button");
-
- if (windowWidth < 768) {
- const $desktopLinks = $desktopLinkBar.find("a").not(".dropdown-link");
- if ($desktopLinks.length) {
- $searchForm.addClass("search-form--hidden");
- $mobileNav.append('<ul class="nav navbar-nav navbar__menu__login"></ul>');
- $languagePicker
- .appendTo(".navbar__menu__login")
- .wrap('<li class="nav-item login-item"></li>')
- .addClass("nav-link");
- $desktopLinks
- .appendTo(".navbar__menu__login")
- .wrap('<li class="nav-item login-item"></li>')
- .addClass("nav-link");
- $desktopLinkBar.find("li").remove();
- }
- $languagePickerButton.attr("data-target", "#languagePickerModal");
- $languagePickerButton.attr("data-toggle", "modal");
- } else {
- const $mobileLinks = $mobileLinkBar.find("a").not(".dropdown-link");
- if ($mobileLinks.length) {
- $searchForm.removeClass("search-form--hidden");
- $languagePicker
- .appendTo(".navbar__login ul")
- .wrap("<li></li>")
- .removeClass("nav-link");
- $mobileLinks
- .appendTo(".navbar__login ul")
- .wrap("<li></li>")
- .removeClass("nav-link");
- $mobileLinkBar.remove();
- }
- $languagePickerButton.attr("data-target", "");
- $languagePickerButton.attr("data-toggle", "dropdown");
- }
-};
-
-// -----
-
-renderNavbar();
-$toogleIcon.on("click", e => {
- $mobileNav.toggleClass("open");
- e.stopPropagation();
-});
-$(document).on("click", () => $mobileNav.removeClass("open"));
-$(window).on("resize", renderNavbar);
-$searchIcon.on("click", () => $searchForm.removeClass("search-form--hidden"));
-$closeSearchIcon.on("click", () => $searchForm.addClass("search-form--hidden"));
diff --git a/saleor/static/js/components/password-input.js b/saleor/static/js/components/password-input.js
deleted file mode 100644
index 353d42c6a2..0000000000
--- a/saleor/static/js/components/password-input.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import passwordIvisible from "../../images/pass-invisible.svg";
-import passwordVisible from "../../images/pass-visible.svg";
-
-export default $(document).ready(e => {
- let $inputPassword = $("input[type=password]");
- $('<img class="passIcon" src=' + passwordIvisible + " />").insertAfter(
- $inputPassword
- );
- $inputPassword.parent().addClass("relative");
- $(".passIcon").on("click", e => {
- let $input = $(e.target)
- .parent()
- .find("input");
- if ($input.attr("type") === "password") {
- $input.attr("type", "text");
- $(e.target).attr("src", passwordVisible);
- } else {
- $input.attr("type", "password");
- $(e.target).attr("src", passwordIvisible);
- }
- });
-});
diff --git a/saleor/static/js/components/product-filters.js b/saleor/static/js/components/product-filters.js
deleted file mode 100644
index a00a0f175d..0000000000
--- a/saleor/static/js/components/product-filters.js
+++ /dev/null
@@ -1,21 +0,0 @@
-$(".filters-menu").on("click", e => {
- const menuContainer = $(".filters-menu__body");
- if (menuContainer.hasClass("d-none")) {
- menuContainer.removeClass("d-none");
- } else {
- menuContainer.addClass("d-none");
- }
-});
-
-$(".filter-section__header").on("click", event => {
- const $target = $(event.currentTarget).parent();
- if ($target.attr("aria-expanded") === "true") {
- $target.attr("aria-expanded", "false").addClass("filter-section--closed");
- } else {
- $target.attr("aria-expanded", "true").removeClass("filter-section--closed");
- }
-});
-
-$(".filters-toggle").on("click", () => {
- $(".filters-menu__body").toggleClass("d-none");
-});
diff --git a/saleor/static/js/components/sorter.js b/saleor/static/js/components/sorter.js
deleted file mode 100644
index 793ecec7e9..0000000000
--- a/saleor/static/js/components/sorter.js
+++ /dev/null
@@ -1,19 +0,0 @@
-export default $(document).ready(e => {
- $(document).ready(e => {
- $(".sort-by button").on("click", e => {
- const parentContainer = $(e.currentTarget).parent();
- const list = parentContainer.find(".sort-list");
- if (list.hasClass("d-none")) {
- list.removeClass("d-none");
- parentContainer.find(".click-area").removeClass("d-none");
- } else {
- list.addClass("d-none");
- parentContainer.find(".click-area").addClass("d-none");
- }
- });
- $(".sort-by .click-area").on("click", e => {
- $(".sort-by .sort-list").addClass("d-none");
- $(e.currentTarget).addClass("d-none");
- });
- });
-});
diff --git a/saleor/static/js/components/styleguide.js b/saleor/static/js/components/styleguide.js
deleted file mode 100644
index 563693087f..0000000000
--- a/saleor/static/js/components/styleguide.js
+++ /dev/null
@@ -1,10 +0,0 @@
-export default $(document).ready(function() {
- let styleGuideMenu = $(".styleguide__nav");
- $(window).scroll(function() {
- if ($(this).scrollTop() > 100) {
- styleGuideMenu.addClass("fixed");
- } else {
- styleGuideMenu.removeClass("fixed");
- }
- });
-});
diff --git a/saleor/static/js/components/variant-picker.js b/saleor/static/js/components/variant-picker.js
deleted file mode 100644
index 875a42e6d5..0000000000
--- a/saleor/static/js/components/variant-picker.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from "react";
-import ReactDOM from "react-dom";
-
-import VariantPicker from "./variantPicker/VariantPicker";
-import VariantPrice from "./variantPicker/VariantPrice";
-import variantPickerStore from "../stores/variantPicker";
-
-import { onAddToCheckoutSuccess, onAddToCheckoutError } from "./checkout";
-
-export default $(document).ready(e => {
- const variantPickerContainer = document.getElementById("variant-picker");
- const variantPriceContainer = document.getElementById(
- "variant-price-component"
- );
-
- if (variantPickerContainer) {
- const variantPickerData = JSON.parse(
- variantPickerContainer.dataset.variantPickerData
- );
- ReactDOM.render(
- <VariantPicker
- onAddToCheckoutError={onAddToCheckoutError}
- onAddToCheckoutSuccess={onAddToCheckoutSuccess}
- store={variantPickerStore}
- url={variantPickerContainer.dataset.action}
- variantAttributes={variantPickerData.variantAttributes}
- variants={variantPickerData.variants}
- />,
- variantPickerContainer
- );
-
- if (variantPriceContainer) {
- ReactDOM.render(
- <VariantPrice
- availability={variantPickerData.availability}
- priceDisplay={variantPickerData.priceDisplay}
- store={variantPickerStore}
- />,
- variantPriceContainer
- );
- }
- }
-});
diff --git a/saleor/static/js/components/variantPicker/AttributeSelectionWidget.js b/saleor/static/js/components/variantPicker/AttributeSelectionWidget.js
deleted file mode 100644
index 5a03aeb4c3..0000000000
--- a/saleor/static/js/components/variantPicker/AttributeSelectionWidget.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import React, { Component } from "react";
-import PropTypes from "prop-types";
-import classNames from "classnames";
-
-export default class AttributeSelectionWidget extends Component {
- static propTypes = {
- attribute: PropTypes.object.isRequired,
- handleChange: PropTypes.func.isRequired,
- selected: PropTypes.string
- };
-
- handleChange = (attrPk, valuePk) => {
- this.props.handleChange(attrPk.toString(), valuePk.toString());
- };
-
- render() {
- const { attribute, selected } = this.props;
- return (
- <div className="variant-picker">
- <div className="variant-picker__label">{attribute.name}</div>
- <div className="btn-group" data-toggle="buttons">
- {attribute.values.map((value, i) => {
- const active = selected === value.pk.toString();
- const labelClass = classNames({
- "btn btn-secondary variant-picker__option": true,
- active: active
- });
- return (
- <label
- className={labelClass}
- key={i}
- onClick={() => this.handleChange(attribute.pk, value.pk)}
- >
- <input defaultChecked={active} name={value.pk} type="radio" />
- {value.name}
- </label>
- );
- })}
- </div>
- </div>
- );
- }
-}
diff --git a/saleor/static/js/components/variantPicker/QuantityInput.js b/saleor/static/js/components/variantPicker/QuantityInput.js
deleted file mode 100644
index dcc0fabfd7..0000000000
--- a/saleor/static/js/components/variantPicker/QuantityInput.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import classNames from "classnames";
-import React, { Component } from "react";
-import PropTypes from "prop-types";
-
-export default class QuantityInput extends Component {
- static propTypes = {
- errors: PropTypes.array,
- handleChange: PropTypes.func.isRequired,
- quantity: PropTypes.number.isRequired
- };
-
- render() {
- const { errors, quantity } = this.props;
- const formGroupClasses = classNames({
- "form-group": true,
- "has-error": errors && !!errors.length,
- product__info__quantity: true
- });
- return (
- <div className={formGroupClasses}>
- <label
- className="control-label product__variant-picker__label"
- htmlFor="id_quantity"
- >
- {pgettext("Add to cart form field label", "Quantity")}
- </label>
- <input
- className="form-control"
- defaultValue={quantity}
- id="id_quantity"
- max="999"
- min="0"
- name="quantity"
- onChange={this.props.handleChange}
- type="number"
- />
- {errors && <span className="help-block">{errors.join(" ")}</span>}
- </div>
- );
- }
-}
diff --git a/saleor/static/js/components/variantPicker/VariantPicker.js b/saleor/static/js/components/variantPicker/VariantPicker.js
deleted file mode 100644
index d218897a2e..0000000000
--- a/saleor/static/js/components/variantPicker/VariantPicker.js
+++ /dev/null
@@ -1,198 +0,0 @@
-import _ from "lodash";
-import $ from "jquery";
-import classNames from "classnames";
-import { observer } from "mobx-react";
-import React, { Component } from "react";
-import PropTypes from "prop-types";
-
-import AttributeSelectionWidget from "./AttributeSelectionWidget";
-import QuantityInput from "./QuantityInput";
-import * as queryString from "query-string";
-
-export default observer(
- class VariantPicker extends Component {
- static propTypes = {
- onAddToCheckoutError: PropTypes.func.isRequired,
- onAddToCheckoutSuccess: PropTypes.func.isRequired,
- store: PropTypes.object.isRequired,
- url: PropTypes.string.isRequired,
- variantAttributes: PropTypes.array.isRequired,
- variants: PropTypes.array.isRequired
- };
-
- constructor(props) {
- super(props);
- const { variants } = this.props;
-
- const variant = variants.filter(
- v => !!Object.keys(v.attributes).length
- )[0];
- const params = queryString.parse(location.search);
- let selection = {};
- if (Object.keys(params).length) {
- Object.keys(params).some(name => {
- const valueName = params[name];
- const attribute = this.matchAttributeBySlug(name);
- const value = this.matchAttributeValueByName(attribute, valueName);
- if (attribute && value) {
- selection[attribute.pk] = value.pk.toString();
- } else {
- // if attribute doesn't exist - show variant
- selection = variant ? variant.attributes : {};
- // break
- return true;
- }
- });
- } else if (Object.keys(variant).length) {
- selection = variant.attributes;
- }
- this.state = {
- errors: {},
- quantity: 1,
- selection: selection
- };
- this.matchVariantFromSelection();
- }
-
- checkVariantAvailability = () => {
- const { store } = this.props;
- return store.variant.availability;
- };
-
- handleAddToCheckout = () => {
- const {
- onAddToCheckoutSuccess,
- onAddToCheckoutError,
- store
- } = this.props;
- const { quantity } = this.state;
- if (quantity > 0 && !store.isEmpty) {
- $.ajax({
- url: this.props.url,
- method: "post",
- data: {
- quantity: quantity,
- variant: store.variant.id
- },
- success: () => {
- onAddToCheckoutSuccess();
- },
- error: response => {
- onAddToCheckoutError(response);
- }
- });
- }
- };
-
- handleAttributeChange = (attrId, valueId) => {
- this.setState(
- {
- selection: Object.assign({}, this.state.selection, {
- [attrId]: valueId
- })
- },
- () => {
- this.matchVariantFromSelection();
- let params = {};
- Object.keys(this.state.selection).forEach(attrId => {
- const attribute = this.matchAttribute(attrId);
- const value = this.matchAttributeValue(
- attribute,
- this.state.selection[attrId]
- );
- if (attribute && value) {
- params[attribute.slug] = value.slug;
- }
- });
- history.pushState(null, null, "?" + queryString.stringify(params));
- }
- );
- };
-
- handleQuantityChange = event => {
- this.setState({ quantity: parseInt(event.target.value) });
- };
-
- matchAttribute = id => {
- const { variantAttributes } = this.props;
- const match = variantAttributes.filter(
- attribute => attribute.pk.toString() === id
- );
- return match.length > 0 ? match[0] : null;
- };
-
- matchAttributeBySlug = slug => {
- const { variantAttributes } = this.props;
- const match = variantAttributes.filter(
- attribute => attribute.slug === slug
- );
- return match.length > 0 ? match[0] : null;
- };
-
- matchAttributeValue = (attribute, id) => {
- const match = attribute.values.filter(
- attribute => attribute.pk.toString() === id
- );
- return match.length > 0 ? match[0] : null;
- };
-
- matchAttributeValueByName = (attribute, name) => {
- const match = attribute
- ? attribute.values.filter(value => value.slug === name)
- : [];
- return match.length > 0 ? match[0] : null;
- };
-
- matchVariantFromSelection() {
- const { store, variants } = this.props;
- let matchedVariant = null;
- variants.forEach(variant => {
- if (_.isEqual(this.state.selection, variant.attributes)) {
- matchedVariant = variant;
- }
- });
- store.setVariant(matchedVariant);
- }
-
- render() {
- const { store, variantAttributes } = this.props;
- const { errors, selection, quantity } = this.state;
- const disableAddToCheckout =
- store.isEmpty || !this.checkVariantAvailability();
-
- const addToCheckoutBtnClasses = classNames({
- "btn btn-primary": true,
- disabled: disableAddToCheckout
- });
-
- return (
- <div>
- {variantAttributes.map((attribute, i) => (
- <AttributeSelectionWidget
- attribute={attribute}
- handleChange={this.handleAttributeChange}
- key={i}
- selected={selection[attribute.pk]}
- />
- ))}
- <div className="clearfix">
- <QuantityInput
- errors={errors.quantity}
- handleChange={this.handleQuantityChange}
- quantity={quantity}
- />
- <div className="form-group product__info__button">
- <button
- className={addToCheckoutBtnClasses}
- onClick={this.handleAddToCheckout}
- disabled={disableAddToCheckout}
- >
- {pgettext("Product details primary action", "Add to cart")}
- </button>
- </div>
- </div>
- </div>
- );
- }
- }
-);
diff --git a/saleor/static/js/components/variantPicker/VariantPrice.js b/saleor/static/js/components/variantPicker/VariantPrice.js
deleted file mode 100644
index 4db5ee2729..0000000000
--- a/saleor/static/js/components/variantPicker/VariantPrice.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import { observer } from "mobx-react";
-import React, { Component } from "react";
-import PropTypes from "prop-types";
-
-export default observer(
- class VariantPrice extends Component {
- static propTypes = {
- availability: PropTypes.object.isRequired,
- priceDisplay: PropTypes.object.isRequired,
- store: PropTypes.object
- };
-
- render() {
- let priceText, priceUndiscountedText, priceLocalCurrency, isDiscount;
- const { availability, priceDisplay, store } = this.props;
- const { displayGross, handleTaxes } = priceDisplay;
- const variant = store.variant;
- const taxRate = availability.taxRate;
- if (!store.isEmpty) {
- // variant price
- isDiscount = variant.price.gross !== variant.priceUndiscounted.gross;
- if (displayGross) {
- priceText = `${variant.price.grossLocalized}`;
- priceUndiscountedText = `${variant.priceUndiscounted.grossLocalized}`;
- if (variant.priceLocalCurrency) {
- priceLocalCurrency = variant.priceLocalCurrency.grossLocalized;
- }
- } else {
- priceText = `${variant.price.netLocalized}`;
- priceUndiscountedText = `${variant.priceUndiscounted.netLocalized}`;
- if (variant.priceLocalCurrency) {
- priceLocalCurrency = variant.priceLocalCurrency.netLocalized;
- }
- }
- } else {
- // if there's no variant, fall back to product price
- const { discount, priceRange, priceRangeUndiscounted } = availability;
- isDiscount = discount && !!Object.keys(discount).length;
- if (displayGross) {
- priceText = `${priceRange.minPrice.grossLocalized}`;
- priceUndiscountedText = `${priceRangeUndiscounted.minPrice.grossLocalized}`;
- if (availability.priceRangeLocalCurrency) {
- priceLocalCurrency =
- availability.priceRangeLocalCurrency.minPrice.grossLocalized;
- }
- } else {
- priceText = `${priceRange.minPrice.netLocalized}`;
- priceUndiscountedText = `${priceRangeUndiscounted.minPrice.netLocalized}`;
- if (availability.priceRangeLocalCurrency) {
- priceLocalCurrency =
- availability.priceRangeLocalCurrency.minPrice.netLocalized;
- }
- }
- }
- return (
- <h2 className="product__info__price">
- <span>{priceText}&nbsp;</span>
- {isDiscount && (
- <small className="product__info__price__undiscounted">
- {priceUndiscountedText}
- </small>
- )}
- {priceLocalCurrency && (
- <p>
- <small className="text-info">&asymp; {priceLocalCurrency}</small>
- </p>
- )}
- {handleTaxes && [
- displayGross ? (
- <small>including {taxRate}% VAT</small>
- ) : (
- <small>excluding {taxRate}% VAT</small>
- )
- ]}
- </h2>
- );
- }
- }
-);
diff --git a/saleor/static/js/storefront.js b/saleor/static/js/storefront.js
deleted file mode 100644
index 0595d9ee89..0000000000
--- a/saleor/static/js/storefront.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import "jquery";
-import "jquery.cookie";
-import "bootstrap";
-
-import "../scss/storefront.scss";
-
-import "./components/address-form";
-import "./components/checkout";
-import "./components/footer";
-import "./components/language-picker";
-import "./components/misc";
-import "./components/navbar";
-import "./components/password-input";
-import "./components/product-filters";
-import "./components/sorter";
-import "./components/styleguide";
-import "./components/variant-picker";
-import "./components/description-json";
diff --git a/saleor/static/js/stores/variantPicker.js b/saleor/static/js/stores/variantPicker.js
deleted file mode 100644
index 68d93b847c..0000000000
--- a/saleor/static/js/stores/variantPicker.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import { extendObservable } from "mobx";
-
-class VariantPickerStore {
- constructor() {
- extendObservable(this, {
- variant: {},
- get isEmpty() {
- return !this.variant.id;
- }
- });
- }
-
- setVariant(variant) {
- this.variant = variant || {};
- }
-}
-
-const store = new VariantPickerStore();
-export default store;
diff --git a/saleor/static/scss/components/_breadcrumbs.scss b/saleor/static/scss/components/_breadcrumbs.scss
deleted file mode 100644
index be9673de75..0000000000
--- a/saleor/static/scss/components/_breadcrumbs.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-.breadcrumbs {
- margin: $global-margin 0 $global-margin * 1.5;
- text-transform: uppercase;
- li {
- display: inline;
- &:last-of-type {
- a {
- color: $skull-gray;
- font-weight: 600;
- }
- }
- &:not(:first-of-type) {
- margin-left: $global-margin / 3;
- }
- &:not(:last-of-type):after {
- content: "\\";
- display: inline-block;
- margin-left: $global-margin / 3;
- }
- a {
- color: $gray;
- }
- }
-}
diff --git a/saleor/static/scss/components/_buttons.scss b/saleor/static/scss/components/_buttons.scss
deleted file mode 100644
index d16c7b31f3..0000000000
--- a/saleor/static/scss/components/_buttons.scss
+++ /dev/null
@@ -1,98 +0,0 @@
-a.btn {
- display: inline-block;
-}
-.btn {
- transition: 0.3s;
- border-radius: $button-border-radius;
- text-transform: uppercase;
- font-weight: 300;
- font-size: 1rem;
- cursor: pointer;
- font-family: $font-family-sans-serif;
- white-space: normal;
- line-height: 1.25;
- &.home__button {
- text-transform: uppercase;
- font-size: $h3-font-size;
- color: $white;
- background-color: transparent;
- border: 1px solid $white;
- padding: $global-padding $global-padding * 2;
- &:hover {
- background-color: $white;
- color: $body-color;
- }
- }
- &-primary {
- border: none;
- color: $white;
- padding: $global-padding $global-padding * 4;
- &:hover {
- background-color: #42beab;
- border: none;
- color: $white;
- }
- }
- &.secondary {
- border: 1px solid $light-turquoise;
- padding: $global-padding $global-padding * 2;
- background-color: $white;
- color: $light-turquoise;
- &:hover {
- border-color: #42beab;
- color: #42beab;
- }
- }
- &.danger {
- border: 1px solid $red;
- background-color: transparent;
- color: $red;
- padding: $global-padding $global-padding * 4;
- &:hover {
- background-color: $dark-red;
- color: $white;
- }
- }
- &.narrow {
- padding: $global-padding / 2 $global-padding * 2.5;
- }
- &.gray {
- background-color: $gray;
- border: 0;
- color: $white;
- padding: $global-padding $global-padding * 4;
- &:hover {
- background-color: $darken-gray;
- }
- }
- &.btn-link {
- padding: 0;
- vertical-align: baseline;
- color: $gray;
- text-transform: none;
- }
- &.social-btn {
- svg {
- vertical-align: text-bottom;
- border-right: 1px solid $white;
- margin-right: $global-margin / 4;
- padding-right: $global-margin / 4;
- }
- &.facebook {
- background: #3b5998;
- &:hover {
- background: darken(#3b5998, 10%);
- }
- }
- &.google {
- background: #dd4b39;
- &:hover {
- background: darken(#dd4b39, 10%);
- }
- }
- }
- &:focus {
- outline: none;
- box-shadow: none;
- }
-}
diff --git a/saleor/static/scss/components/_cards.scss b/saleor/static/scss/components/_cards.scss
deleted file mode 100644
index 0c7282dc98..0000000000
--- a/saleor/static/scss/components/_cards.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-.card-deck {
- .card {
- width: 100%;
- border-radius: 3px;
- margin-bottom: $global-margin * 2;
- padding: $global-padding;
- @include transition(background, 0.3s);
- @include media-breakpoint-down(sm) {
- width: 100%;
- display: inline-block;
- &:first-of-type {
- margin-bottom: $global-margin;
- }
- }
- p {
- margin-bottom: 0;
- }
- ul.icons {
- list-style: none;
- margin-bottom: 0;
- padding: 0;
- li {
- width: 49%;
- display: inline-block;
- a {
- line-height: 1.15rem;
- svg {
- float: right;
- cursor: pointer;
- }
- svg:hover path {
- fill: $darken-blue;
- }
- }
- }
- }
- .none {
- display: none;
- }
- .address-delete {
- margin-top: $global-margin / 4;
- .cancel {
- line-height: 2rem;
- padding-right: $global-padding;
- cursor: pointer;
- color: $blue;
- &:hover {
- color: $blue;
- }
- }
- }
- @include media-breakpoint-down(sm) {
- form {
- text-align: center;
- }
- }
- }
-}
-
-.card {
- border-radius: 12px;
- &-default {
- background-color: $light-gray;
- }
-}
diff --git a/saleor/static/scss/components/_checkout-dropdown.scss b/saleor/static/scss/components/_checkout-dropdown.scss
deleted file mode 100644
index fc5ec2da14..0000000000
--- a/saleor/static/scss/components/_checkout-dropdown.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-.checkout-preview-dropdown {
- position: absolute;
- width: 33rem;
- top: 7.4rem;
- right: 0;
- z-index: 3;
- display: none;
- border: solid 1px $gray;
- border-radius: 4px 0 4px 4px;
- background-color: $white;
- .container {
- padding-top: $global-padding * 2;
- padding-bottom: $global-padding * 2;
- max-height: 28rem;
- }
- &__list {
- max-height: 10rem;
- overflow-y: auto;
- overflow-x: hidden;
- border-top: solid 1px $gray;
- border-bottom: solid 1px $gray;
- &:first-child {
- border-top: none;
- }
- &.overflow {
- overflow-y: hidden;
- }
- background: $white;
- .item {
- height: 5rem;
- border-bottom: solid 1px $gray;
- h3 {
- margin-bottom: 0;
- padding: $global-padding * 1.4;
- span {
- color: $darken-gray;
- }
- p {
- margin-bottom: 0;
- padding-top: $global-padding * 0.2;
- color: $darken-gray;
- }
- }
- &:last-child {
- border-bottom: 0;
- }
- }
- }
- &__total {
- h3 {
- padding-top: $global-padding * 1.4;
- padding-left: $global-padding * 5;
- span {
- color: $darken-gray;
- font-size: 0.9rem;
- }
- &.price {
- padding-right: $global-padding * 2.3;
- &.single {
- padding-right: $global-padding * 1.4;
- }
- }
- }
- }
- &__image {
- float: left;
- width: 60px;
- height: 60px;
- margin: $global-margin * 0.6;
- }
- &__actions {
- margin-top: $global-margin * 2;
- }
- &__empty {
- img {
- margin: $global-margin 0;
- }
- }
- @include media-breakpoint-up(md) {
- &.show {
- display: block !important;
- }
- }
-}
diff --git a/saleor/static/scss/components/_filters.scss b/saleor/static/scss/components/_filters.scss
deleted file mode 100644
index 0e34eebc7e..0000000000
--- a/saleor/static/scss/components/_filters.scss
+++ /dev/null
@@ -1,265 +0,0 @@
-.product-filters {
- padding-bottom: $global-padding * 2;
- .btn {
- padding: $global-padding;
- }
- .hide {
- display: none;
- }
- .filter-section {
- &--closed {
- .filter-section {
- &__icon {
- img {
- transform: rotate(180deg);
- }
- }
- &__content {
- max-height: $global-padding * 0.5;
- }
- }
- }
- &__header {
- border-bottom: 1px solid $gray;
- cursor: pointer;
- display: grid;
- grid-template-columns: calc(100% - 20px) 20px;
- margin-bottom: 0.5rem;
- padding-bottom: 0.5rem;
- h3 {
- font-weight: bold;
- padding-right: $global-padding * 0.5;
- margin: 0;
- text-overflow: ellipsis;
- overflow: hidden;
- }
- }
- &__content {
- transition: $transition-base;
- overflow: hidden;
- max-height: 500px;
- .price-field {
- padding: $global-padding 0;
- input {
- width: 40%;
- display: inline-block;
- }
- span {
- width: 20%;
- text-align: center;
- display: inline-block;
- }
- }
- }
- &__icon {
- display: flex;
- align-items: center;
- justify-content: center;
- transition: $transition-base;
- img {
- width: 8px;
- height: 8px;
- }
- }
- }
- ul {
- padding: $global-padding / 2 0;
- list-style: none;
- margin-bottom: 0;
- li {
- input {
- position: relative;
- top: -2px;
- margin-right: $global-margin;
- }
- }
- }
- button {
- width: 100%;
- }
- &__attributes {
- ul {
- li {
- label {
- cursor: pointer;
- outline: 0;
- }
- }
- }
- }
- &__categories {
- padding: $global-padding 0 0;
- @include media-breakpoint-down(sm) {
- padding: $global-padding * 3 0 $global-padding * 2;
- }
- @media (max-width: 370px) {
- padding-top: 5rem;
- }
- h2 {
- font-size: 1.8rem;
- color: $body-color;
- padding-bottom: 0;
- }
- ul {
- list-style: none;
- padding: 0 $global-padding;
- margin-bottom: 0;
- li {
- padding-left: 0;
- a {
- font-size: 1.2rem;
- color: $body-color;
- padding-right: $global-padding/2;
- }
- }
- }
- &__parents {
- padding-left: $global-padding;
- a {
- color: $body-color;
- }
- svg {
- vertical-align: text-top;
- margin-right: $global-margin / 2;
- }
- }
- &__childs {
- padding-left: $global-padding * 2.5;
- a {
- font-size: 1rem;
- }
- &.no-parent {
- padding-left: $global-padding;
- }
- }
- }
-}
-
-.filters-menu {
- &__label {
- text-transform: uppercase;
- cursor: pointer;
- padding-left: $global-padding;
- }
- &__icon {
- display: inline-block;
- width: 10px;
- height: 10px;
- background: $blue;
- margin-left: $global-margin/2;
- border-radius: 50%;
- }
- &__wrapper {
- @include media-breakpoint-down(sm) {
- padding-top: 8px;
- }
- }
-}
-
-.filters-toggle {
- margin: 1.1rem 0 1rem;
- cursor: pointer;
-}
-.sort-by {
- text-align: left;
- position: relative;
- margin-bottom: $global-margin;
- .btn-link {
- font-size: 14px;
- padding-right: $global-padding;
- color: $body-color;
- text-transform: uppercase;
- outline: 0;
- svg {
- vertical-align: baseline;
- margin-left: $global-padding/2;
- height: 10px;
- width: 15px;
- }
- }
- ul {
- width: 20rem;
- list-style: none;
- background: $light-gray;
- box-shadow: 3px 3px 3px 0px rgba($gray, 0.75);
- position: absolute;
- top: 2.5rem;
- z-index: 999;
- padding: $global-padding $global-padding * 2;
- li {
- text-align: left;
- padding-top: $global-padding/2;
- overflow: hidden;
- border-bottom: solid 1px $gray;
- padding-bottom: $global-padding;
- .col-6 {
- div {
- cursor: pointer;
- }
- }
- span {
- &:hover {
- text-decoration: underline;
- }
- }
- svg {
- margin-top: $global-padding/3;
- }
- a {
- color: inherit;
- }
- &:last-child {
- border: none;
- padding-bottom: 0;
- }
- &:after {
- content: "";
- }
- }
- &:before {
- content: "";
- display: block;
- width: 15px;
- height: 10px;
- position: absolute;
- top: -10px;
- right: 15px;
- background-color: $light-gray;
- clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
- }
- }
- .click-area {
- width: 100%;
- height: 100%;
- opacity: 0;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 998;
- &.hide {
- display: none;
- }
- }
- .sort-order-icon {
- display: inline-block;
- width: 15px;
- height: 15px;
- img {
- height: 10px;
- }
- svg {
- width: 8px;
- height: 8px;
- }
- }
-}
-
-.clear-filters {
- display: inline-block;
- margin: $global-margin * 0.5 0 $global-margin;
-}
-
-.load-more {
- clear: both;
- text-align: center;
-}
diff --git a/saleor/static/scss/components/_footer.scss b/saleor/static/scss/components/_footer.scss
deleted file mode 100644
index d11ca1cd83..0000000000
--- a/saleor/static/scss/components/_footer.scss
+++ /dev/null
@@ -1,81 +0,0 @@
-.footer {
- &__menus {
- background-color: $light-gray;
- padding: $global-padding * 2 0;
- margin-top: $global-margin * 8;
- @include media-breakpoint-down(xs) {
- text-align: center;
- margin-top: $global-margin * 2;
- }
- .menu__item {
- & > a {
- font-weight: 600;
- }
- }
- &__social {
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- &-container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- height: 100%;
- }
- }
- }
- &__copy {
- padding: $global-padding * 2 0 $global-padding * 3;
- &-text {
- text-align: right;
- }
- }
- &__logo {
- margin-bottom: $global-margin;
- svg {
- height: 38px;
- width: 113px;
- }
- }
- hr {
- margin-top: 0;
- }
- ul {
- list-style: none;
- padding-left: 0;
- a {
- color: $black;
- line-height: 2;
- }
- }
- a {
- transition: 0.3s;
- &:hover {
- text-decoration: none;
- opacity: 0.6;
- }
- &.social-footer {
- background-color: $dark-blue;
- border-radius: 100%;
- display: inline-block;
- height: 36px;
- margin-bottom: $global-margin;
- margin-right: $global-margin;
- width: 36px;
- svg {
- height: 16px;
- margin-top: 8px;
- width: 100%;
- }
- }
- }
-}
-
-.maincontent {
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 7;
- }
-}
diff --git a/saleor/static/scss/components/_forms.scss b/saleor/static/scss/components/_forms.scss
deleted file mode 100644
index 0cc6af607d..0000000000
--- a/saleor/static/scss/components/_forms.scss
+++ /dev/null
@@ -1,228 +0,0 @@
-.form-control,
-select,
-input {
- color: $body-color;
- border-radius: 8px;
- border: 1px solid $gray;
- &:focus {
- color: $body-color;
- border-color: $gray;
- background-color: $beige;
- outline: none;
- }
- &::placeholder {
- color: $gray;
- font-family: $font-family-sans-serif;
- font-weight: 300;
- }
- &[type="checkbox"] {
- -webkit-appearance: none;
- border-color: $turquoise;
- border-radius: 2px;
- cursor: pointer;
- height: 8px;
- transition-duration: 300ms;
- width: 8px;
- &:checked {
- background-color: $turquoise;
- }
- }
-}
-
-.form-group {
- text-align: left;
- position: relative;
- .phone-prefix-input {
- display: grid;
- grid-template-columns: 6rem calc(100% - 6rem);
- align-items: stretch;
- input {
- border-left-color: transparent;
- border: {
- bottom-left-radius: 0;
- top-left-radius: 0;
- }
- }
- select {
- border: {
- bottom-right-radius: 0;
- top-right-radius: 0;
- }
- }
- }
-}
-
-.input-btn {
- position: relative;
- .btn {
- position: absolute;
- top: 0;
- right: 0;
- margin-top: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- }
-}
-
-.deliveryform {
- select {
- @include media-breakpoint-down(md) {
- width: 100%;
- margin-top: $global-margin / 2;
- margin-left: 0;
- }
- background-color: $white;
- height: calc(2.25rem + 2px);
- &:focus {
- outline: none;
- }
- }
-}
-
-.search-form {
- width: 100%;
- position: relative;
- transition: $transition-base;
- &.search-form--hidden {
- transform: translateX(-100vw);
- }
- &__close-icon {
- position: absolute;
- cursor: pointer;
- padding: $global-padding * 1.9 $global-padding;
- img {
- width: 22px;
- }
- }
- .form-control {
- height: 53px;
- width: 100%;
- border-radius: $button-border-radius;
- padding: $global-padding;
- font-size: 0.8rem;
- }
- .btn {
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- height: 100%;
- position: absolute;
- top: 0;
- right: 0;
- cursor: pointer;
- border-left: solid 1px $gray;
- outline: 0;
- display: flex;
- align-items: center;
- @include transition(background, 0.3s) img {
- height: 1.5rem;
- padding: $global-padding / 7;
- }
- }
- @include media-breakpoint-down(sm) {
- display: block;
- left: 0;
- position: absolute;
- max-width: 100%;
- float: right;
- top: 0;
- z-index: 5;
- margin-top: 0;
- .form-control {
- padding: $global-padding * 2 $global-padding * 2 $global-padding * 2
- $global-padding * 4;
- border: 0;
- height: 5.9rem;
- }
- .mobile-close-search {
- position: absolute;
- top: 1.7rem;
- left: 0.5rem;
- }
- .btn {
- border-radius: 0;
- height: 6rem;
- right: 0;
- top: 0;
- }
- }
-}
-
-input#id_quantity {
- padding: $global-padding / 2;
- &:focus {
- outline: none;
- }
-}
-
-.help-block {
- font-size: 0.8rem;
- margin-top: $global-margin / 2;
-}
-
-.has-error {
- .help-block {
- color: $red;
- }
-}
-
-.radio {
- margin-bottom: $global-margin / 2;
- ul {
- list-style: none;
- padding-left: 0;
- }
- input {
- -webkit-appearance: none;
- cursor: pointer;
- border: 1px solid $turquoise;
- display: inline-block;
- height: 14px;
- margin: $global-margin / 4 $global-margin / 2 0 0;
- position: relative;
- vertical-align: top;
- width: 14px;
- &:checked {
- &:after {
- background: $turquoise;
- border-radius: 100%;
- content: "";
- height: 8px;
- left: 2px;
- position: absolute;
- top: 2px;
- width: 8px;
- }
- }
- }
- span,
- .address-details {
- display: inline-block;
- }
- label {
- margin-right: $global-margin;
- span {
- display: inline;
- }
- }
-}
-
-.relative {
- position: relative;
-}
-
-.passIcon {
- max-width: 15px;
- max-height: 15px;
- position: absolute;
- top: 2.8rem;
- right: 0.5rem;
- cursor: pointer;
-}
-
-// ATM there is no better solution to set
-// border-radius on select inputs - 12.2017
-select.form-control {
- appearance: none;
- border-radius: 2px;
- background: url("../images/arrow-select.svg") 100% 50% no-repeat / 24px 14px;
-}
diff --git a/saleor/static/scss/components/_header.scss b/saleor/static/scss/components/_header.scss
deleted file mode 100644
index 7cb826a054..0000000000
--- a/saleor/static/scss/components/_header.scss
+++ /dev/null
@@ -1,339 +0,0 @@
-.navigation {
- ul {
- border-bottom: 1px solid $gray;
- margin-bottom: $global-margin;
- display: block;
- text-align: center;
- &.no-border {
- border-bottom: 0;
- margin-bottom: 0;
- }
- @include media-breakpoint-down(sm) {
- border-bottom: 0;
- }
- .nav-item {
- display: inline;
- + .nav-item {
- margin-left: 0;
- }
- a {
- color: $body-color;
- transition: 0.3s;
- text-transform: uppercase;
- display: inline-block;
- padding: $global-padding * 1.5;
- font-size: 1.5rem;
- &:hover {
- color: rgba($body-color, 0.6);
- }
- }
-
- @include media-breakpoint-up(md) {
- &__dropdown {
- display: inline-block;
- position: relative;
-
- &:hover > a {
- border-bottom: 3px solid black;
- }
-
- & > a {
- padding: 0.5rem;
- margin: 1rem;
- box-sizing: border-box;
- border-bottom: 3px solid $white;
- }
- }
-
- &__dropdown-content {
- display: none;
- position: absolute;
- z-index: 3;
- border: solid 1px $gray;
- background-color: $white;
- text-align: left;
-
- a {
- padding: 0;
- font-size: initial;
- text-transform: none;
- text-decoration: none;
- }
-
- .container {
- padding: $global-padding;
- max-height: 28rem;
-
- > ul {
- min-width: 120px;
- width: 360px;
- display: flex;
- flex-wrap: wrap;
-
- li {
- display: inline-block;
- max-width: 110px;
-
- &:not(:last-child) {
- margin-right: $global-padding * 2;
- }
- }
- }
- }
- }
-
- &:hover .nav-item__dropdown-content {
- display: block;
- }
- }
- }
- }
-}
-
-.menu {
- .menu__item {
- ul {
- border-bottom: none;
- list-style-type: none;
- padding-left: 0;
- text-align: left;
- margin-bottom: 0;
-
- ul {
- padding-left: $global-padding;
- }
-
- li {
- text-align: left;
- }
- }
-
- a {
- text-decoration: none;
- }
-
- @include media-breakpoint-down(sm) {
- .nav-item__submenu ul {
- text-align: center;
- font-size: 0.8rem;
-
- ul {
- padding-left: 0;
- font-size: 0.7rem;
- }
-
- li {
- text-align: center;
- }
- }
- }
- }
-}
-
-.navbar {
- padding: 0;
- @include media-breakpoint-down(sm) {
- > .container-fluid {
- padding: 0;
- }
- svg {
- max-height: 30px;
- width: auto;
- }
- }
- @media (max-width: 370px) {
- svg {
- max-height: 23px;
- width: auto;
- }
- }
- &__login {
- p {
- font-size: 0.7rem;
- margin-bottom: 0;
- color: $skull-gray;
- line-height: 1.9rem;
- text-transform: uppercase;
- width: 100%;
- }
- ul {
- list-style: none;
- margin-bottom: 0;
- li {
- display: inline-block;
- padding: 0 $global-padding / 2;
- line-height: 1.9rem;
- a {
- color: $body-color;
- font-size: 0.7rem;
- text-transform: uppercase;
- }
- }
- }
- }
- &__logo {
- padding: $global-padding * 2 0;
- display: flex;
- align-items: center;
- a svg {
- height: 38px;
- width: auto;
- max-width: 113px;
- }
- .menu-icon-mobile {
- position: relative;
- display: inline-block;
- span {
- position: absolute;
- top: 1.3rem;
- left: 1.1rem;
- text-transform: uppercase;
- font-size: 0.45rem;
- }
- svg {
- height: 30px;
- vertical-align: top;
- }
- @media (max-width: 370px) {
- top: 0;
- }
- }
- }
- &__search {
- padding: $global-padding * 2 0;
- position: relative;
- form {
- svg {
- width: 18px;
- height: 18px;
- margin-left: 10px;
- vertical-align: middle;
- }
- .btn {
- padding: $global-padding;
- }
- }
- .mobile-search-icon {
- float: right;
- padding-right: $global-padding;
- }
- }
- &__brand {
- background-color: $light-gray;
- @include media-breakpoint-down(sm) {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- background-color: $white;
- z-index: 5;
- border-bottom: 1px solid $gray;
- }
- .static {
- position: static;
- }
- &__checkout {
- z-index: 4;
- @include media-breakpoint-up(md) {
- line-height: 2.4rem;
- }
- .checkout__icon {
- color: $body-color;
- display: block;
- border: solid 1px transparent;
- border-radius: 4px 4px 0 0;
- padding: $global-padding * 2.5 $global-padding * 1.5;
- position: absolute;
- right: 0;
- top: 0;
- z-index: 4;
- @include media-breakpoint-down(sm) {
- position: relative;
- padding: 2rem 1rem 2rem 0;
- }
- &.hover {
- text-decoration: none;
- background: $white;
- border-top: solid 1px $gray;
- border-left: solid 1px $gray;
- border-right: solid 1px $gray;
- border-bottom: solid 1px $white;
- @include media-breakpoint-down(sm) {
- border: solid 1px transparent;
- background: none;
- padding: 2rem 1rem 2rem 0;
- }
- }
- &:hover {
- text-decoration: none;
- }
- .checkout-label {
- padding-right: $global-padding / 2;
- display: inline-block;
- }
- .navbar__brand__checkout__icon {
- display: inline-block;
- svg {
- vertical-align: middle;
- }
- }
- .badge {
- position: absolute;
- right: 10px;
- top: 30px;
- background-color: $light-turquoise;
- border-radius: 100px;
- color: $white;
- width: 30px;
- height: 30px;
- text-align: center;
- line-height: 2;
- &.empty {
- background-color: $darken-gray;
- }
- @include media-breakpoint-down(sm) {
- right: 0;
- top: 20px;
- }
- }
- }
- }
- &__menu-toggle {
- padding-right: $global-padding;
- padding-left: $global-padding;
- vertical-align: super;
- }
- }
- &__menu {
- @include media-breakpoint-down(sm) {
- .navigation {
- position: fixed;
- left: -180px;
- top: 75px;
- height: 100vh;
- width: 180px;
- z-index: 4;
- background-color: $white;
- padding-left: 0;
- padding-right: $global-padding;
- padding-top: $global-padding * 2;
- transition: 0.3s ease-in-out;
- ul {
- text-align: left;
- .nav-item {
- width: 100%;
- text-align: left;
- a {
- padding: $global-padding / 2 $global-padding;
- font-size: 1rem;
- }
- }
- }
- &.open {
- left: 0;
- box-shadow: 1px 1px 10px 1px $gray;
- }
- }
- }
- }
-}
diff --git a/saleor/static/scss/components/_labels.scss b/saleor/static/scss/components/_labels.scss
deleted file mode 100644
index e3b6eadc3d..0000000000
--- a/saleor/static/scss/components/_labels.scss
+++ /dev/null
@@ -1,26 +0,0 @@
-.label {
- &:before {
- content: '';
- display: inline-block;
- height: 0.5rem;
- width: 0.5rem;
- border-radius: 1rem;
- margin-bottom: 1px;
- margin-right: $global-margin / 2;
- }
- &-success {
- &:before {
- background-color: $green;
- }
- }
- &-danger {
- &:before {
- background-color: $red;
- }
- }
- &-default {
- &:before {
- background-color: $gray;
- }
- }
-}
diff --git a/saleor/static/scss/components/_language-picker.scss b/saleor/static/scss/components/_language-picker.scss
deleted file mode 100644
index 7ce082b7e6..0000000000
--- a/saleor/static/scss/components/_language-picker.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-#languagePickerModal {
- text-align: center;
- padding: 0!important;
-
- &:before {
- content: '';
- display: inline-block;
- height: 100%;
- vertical-align: middle;
- }
- .modal-body {
- height: 25em;
- overflow-y: auto;
- label {
- margin-bottom: 0rem;
- padding-bottom: 0.5rem;
- cursor: pointer;
- width: 100%;
- }
- @include media-breakpoint-up(sm) {
- height: 40em;
- }
- }
- .modal-dialog {
- display: inline-block;
- text-align: left;
- vertical-align: middle;
- }
-}
-
-.language-picker {
- cursor: pointer;
- user-select: none;
- .scrollable-menu {
- height: auto;
- max-height: 40rem;
- overflow-x: hidden;
- }
-}
diff --git a/saleor/static/scss/components/_loader.scss b/saleor/static/scss/components/_loader.scss
deleted file mode 100644
index db60cadcd0..0000000000
--- a/saleor/static/scss/components/_loader.scss
+++ /dev/null
@@ -1,15 +0,0 @@
-@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
-}
-
-.loader {
- max-width: 5rem;
- padding-top: $global-padding;
- margin: auto;
-
- svg {
- -webkit-animation: spin 2s linear infinite;
- animation: spin 2s linear infinite;
- }
-}
diff --git a/saleor/static/scss/components/_pagination.scss b/saleor/static/scss/components/_pagination.scss
deleted file mode 100644
index 869ea257d5..0000000000
--- a/saleor/static/scss/components/_pagination.scss
+++ /dev/null
@@ -1,27 +0,0 @@
-.pagination {
- list-style: none;
- display: block;
- text-align: center;
- .page-item {
- display: inline-block;
- font-size: $small-font-size;
- .page-link {
- color: $body-color;
- padding: $global-padding / 2 $global-padding;
- border: none;
- &:hover {
- text-decoration: none;
- background-color: $light-gray;
- }
- }
- &.active {
- a {
- background-color: $gray;
- color: $white;
- &:hover {
- color: $white;
- }
- }
- }
- }
-}
diff --git a/saleor/static/scss/components/_table.scss b/saleor/static/scss/components/_table.scss
deleted file mode 100644
index 839b4d0b15..0000000000
--- a/saleor/static/scss/components/_table.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-.table {
- &__header {
- border-bottom: 1px solid $gray;
- padding-bottom: $global-padding / 2;
- small {
- color: $skull-gray;
- text-transform: uppercase;
- }
- }
- &__row {
- border-bottom: 1px solid $gray;
- padding: $global-padding 0;
- p {
- margin-bottom: 0;
- }
-
- &.fulfillment__row {
- padding: 0;
- }
- }
-}
diff --git a/saleor/static/scss/components/_tabs.scss b/saleor/static/scss/components/_tabs.scss
deleted file mode 100644
index 25be4ea43a..0000000000
--- a/saleor/static/scss/components/_tabs.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-.nav-tabs {
- display: block;
- text-align: center;
- border-bottom: solid 1px $gray;
- @include media-breakpoint-down(xs) {
- text-align: center;
- padding-right: 0;
- padding-bottom: $global-padding / 2;
- }
- .nav-item {
- display: inline;
- @include media-breakpoint-down(xs) {
- display: inline-block;
- float: none;
- }
- & + .nav-item {
- margin-left: 0;
- }
- .nav-link {
- padding: $global-padding / 2 $global-padding * 2;
- margin-top: $global-margin / 2;
- display: inline-block;
- transition: 0.3s;
- border: 0;
- text-transform: uppercase;
- @include media-breakpoint-down(sm) {
- padding: $global-padding / 2 $global-padding;
- }
- h3 {
- color: $skull-gray;
- @include media-breakpoint-down(sm) {
- font-size: 1rem;
- }
- }
- &:hover, &.active {
- h3 {
- border: 0;
- color: $body-color;
- }
- }
- }
- }
-}
-.tab-pane {
- margin-top: $global-margin;
-}
-
diff --git a/saleor/static/scss/components/_typography.scss b/saleor/static/scss/components/_typography.scss
deleted file mode 100644
index 5927f44fde..0000000000
--- a/saleor/static/scss/components/_typography.scss
+++ /dev/null
@@ -1,45 +0,0 @@
-@font-face {
- font-family: "Lato";
- src: url("../fonts/Lato-Light.woff2") format("woff2"),
- url("../fonts/Lato-Light.woff") format("woff"),
- url("../fonts/Lato-Light.ttf") format("truetype");
- font-weight: 300;
-}
-@font-face {
- font-family: "Lato";
- src: url("../fonts/Lato-Regular.woff2") format("woff2"),
- url("../fonts/Lato-Regular.woff") format("woff"),
- url("../fonts/Lato-Regular.ttf") format("truetype");
- font-weight: 400;
-}
-@font-face {
- font-family: "Lato";
- src: url("../fonts/Lato-Bold.woff2") format("woff2"),
- url("../fonts/Lato-Bold.woff") format("woff"),
- url("../fonts/Lato-Bold.ttf") format("truetype");
- font-weight: 700;
-}
-
-h3 {
- text-transform: uppercase;
-}
-
-a {
- color: $turquoise;
- text-decoration: none;
- &:hover {
- text-decoration: underline;
- }
- &.link--styled {
- font-size: 0.8rem;
- color: $body-color;
- text-decoration: underline;
- display: block;
- }
- &.link--clean {
- color: $body-color;
- &:hover {
- text-decoration: none;
- }
- }
-}
diff --git a/saleor/static/scss/components/_variant-picker.scss b/saleor/static/scss/components/_variant-picker.scss
deleted file mode 100644
index 4f2170b0d8..0000000000
--- a/saleor/static/scss/components/_variant-picker.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-.variant-picker {
- margin-bottom: $global-margin;
- .btn-group {
- display: inline-block;
- }
- &__label {
- margin-bottom: $global-margin;
-
- }
- &__options {
- display: block;
- }
- &__option {
- margin-bottom: 0;
- margin-bottom: $global-margin / 4;
- border-color: $gray;
- float: left;
- &.active {
- border-color: $darken-gray;
- }
- input {
- display: none;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_account.scss b/saleor/static/scss/layouts/_account.scss
deleted file mode 100644
index e367425153..0000000000
--- a/saleor/static/scss/layouts/_account.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-.account {
- h2 {
- text-align: center;
- text-transform: uppercase;
- }
- &__user {
- h2 {
- margin-right: $global-margin;
- margin-bottom: $global-margin * 2;
- }
- img {
- margin-top: $global-margin / 2;
- }
- }
- &__nav {
- margin-top: $global-margin * 2;
- }
- &__orders {
- &-empty {
- margin-top: $global-margin * 2;
- }
- }
- &__password {
- margin-top: $global-margin * 2;
- .btn {
- margin-top: $global-margin;
- float: right;
- }
- }
- &__addresses {
- display: table;
- min-width: 100%;
- border-spacing: $global-margin;
- margin: 0;
- }
- &__address-edit {
- h2 {
- text-align: center;
- text-transform: uppercase;
- padding-bottom: $global-padding;
- font-size: 1.3rem;
- }
- }
- h3 {
- font-size: 1rem;
- }
-
- &__deleted {
- text-align: center;
- margin-top: $global-margin * 6;
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- h1 {
- font-weight: 300;
- margin-top: -$global-margin * 0.5;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_checkout.scss b/saleor/static/scss/layouts/_checkout.scss
deleted file mode 100644
index e86612abe2..0000000000
--- a/saleor/static/scss/layouts/_checkout.scss
+++ /dev/null
@@ -1,386 +0,0 @@
-.checkout {
- margin-bottom: $global-margin * 5;
- h2,
- h3 {
- text-transform: uppercase;
- margin: 0 0 $global-margin * 2 0;
- }
- hr:not(.margin-default) {
- margin: $global-margin * 3 0 $global-margin * 2;
- }
- .primary {
- margin-top: $global-margin;
- }
- &__edit-link {
- margin-top: $global-margin;
- }
- &__header {
- background-color: $light-gray;
- padding: $global-padding * 1.5 0 $global-padding;
- margin-bottom: $global-margin;
- @include media-breakpoint-down(sm) {
- padding: $global-padding 0;
- & ~ .maincontent {
- margin-top: 0;
- }
- }
- a:hover {
- text-decoration: none;
- }
- svg {
- vertical-align: baseline;
- margin-right: $global-margin;
- padding-bottom: 2px;
- width: 113px;
- @include media-breakpoint-down(sm) {
- max-height: 34px;
- vertical-align: text-bottom;
- margin-right: 0;
- padding-bottom: 5px;
- }
- }
- h1 {
- display: inline-block;
- font-weight: 300;
- text-transform: uppercase;
- @include media-breakpoint-down(sm) {
- font-size: 1.8rem;
- margin-bottom: 0;
- }
- }
- }
- &__login {
- margin: $global-margin * 5 0 $global-margin * 3;
- border: 1px solid $gray;
- border-radius: $button-border-radius;
- text-align: center;
- h3 {
- margin-bottom: $global-margin * 3;
- }
- .btn {
- margin: $global-margin * 2 auto 0;
- }
- &__continue {
- padding: $global-padding * 2 0 $global-padding;
- }
- &__form {
- background-color: $light-gray;
- padding: $global-padding * 2 $global-padding * 6 $global-padding * 2;
- @include media-breakpoint-down(md) {
- padding: $global-padding * 2;
- }
- .form-group {
- &:last-of-type {
- margin-bottom: 0;
- }
- }
- }
- }
- &__review {
- background-color: $light-gray;
- padding: $global-padding $global-padding * 2;
- border-radius: 3px;
- h3 {
- margin: $global-margin 0;
- }
- &__section {
- border-top: 1px solid $gray;
- padding-top: $global-padding;
- .input-btn {
- input {
- border-radius: 12px;
- }
- .btn {
- height: calc(2.25rem + 2px);
- padding: $global-padding / 2;
- }
- .btn-voucher-remove {
- position: relative;
- }
- }
- input {
- padding: $global-padding;
- }
- }
- &__tittle {
- margin-bottom: $global-margin * 2;
- }
- &__variant {
- color: $skull-gray;
- }
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- }
- &__thankyoupage {
- text-align: center;
- margin-top: $global-margin * 6;
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- h3 {
- margin-bottom: $global-margin * 3;
- }
- .btn {
- margin-top: $global-margin;
- }
- span {
- color: $darken-gray;
- }
- h1 {
- font-weight: 300;
- margin-top: -$global-margin * 4;
- }
- &__form {
- margin-top: $global-margin * 6;
- margin-bottom: $global-margin * 3;
- border: 1px solid $light-gray;
- border-radius: $button-border-radius;
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- .col-md-6 {
- padding: $global-padding * 3 0 $global-padding * 2;
- &:first-of-type {
- background-color: $light-gray;
- padding: $global-padding * 3 $global-padding * 4 $global-padding * 2;
- @include media-breakpoint-down(md) {
- padding: $global-padding * 3 $global-padding * 2 $global-padding * 2;
- }
- }
- }
- img {
- margin-bottom: $global-margin * 1.2;
- @include media-breakpoint-only(md) {
- margin-bottom: $global-margin * 2.4;
- }
- }
- }
- }
- &__new-address {
- grid-column-end: span 2;
- @include media-breakpoint-down(md) {
- grid-column-end: span 1;
- }
- &-container {
- grid-column-end: span 2;
- @include media-breakpoint-down(md) {
- grid-column-end: span 1;
- }
- }
- }
- &__shipping {
- .btn {
- grid-column-start: 2;
- width: 100%;
- @include media-breakpoint-down(md) {
- grid-column-start: 1;
- }
- }
- }
- &__shipping-methods {
- p {
- margin: $global-margin * 2 0;
- }
- .address {
- width: calc(50% - #{$global-margin});
- }
- .btn {
- grid-column-start: 2;
- width: 100%;
- @include media-breakpoint-down(md) {
- grid-column-start: 1;
- }
- }
- &-form {
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-column-gap: $global-margin * 2;
- grid-row-gap: $global-margin;
- @include media-breakpoint-down(md) {
- grid-template-columns: 1fr;
- }
- label {
- cursor: pointer;
- display: block;
- margin: 0;
- }
- .btn {
- @include media-breakpoint-down(md) {
- width: 100%;
- }
- }
- }
- }
- &__payment {
- h3 {
- margin: $global-margin * 2 0 $global-margin;
- }
- &-form {
- label {
- cursor: pointer;
- display: block;
- margin: 0;
- }
- .btn {
- @include media-breakpoint-down(md) {
- width: 100%;
- }
- }
- &__choice {
- margin-bottom: $global-margin;
- }
- }
- }
- &__payments {
- &-card-expiry-slash {
- pointer-events: none;
- font-size: 1.5rem;
- font-weight: 100;
- }
- }
- &__street_address_2 {
- padding-top: $global-padding * 2;
- }
- &__addresses {
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-column-gap: $global-margin * 2;
- &--full-width {
- grid-template-columns: 1fr;
- }
- @include media-breakpoint-down(md) {
- grid-template-columns: 1fr;
- }
- &-panel {
- label {
- cursor: pointer;
- display: block;
- margin-right: 0;
- }
- }
- }
- &__billing {
- &-form {
- p {
- margin: $global-margin * 2 0;
- }
- }
- }
-}
-
-.checkout-preview {
- h3 {
- color: $skull-gray;
- }
- &__line {
- &.last {
- border-bottom-color: $skull-gray;
- }
- .col-5 {
- margin-top: $global-margin / 2;
- @include media-breakpoint-down(sm) {
- text-align: right;
- }
- }
- &__product {
- a {
- transition: 0.3s;
- &:hover {
- color: $skull-gray;
- }
- p {
- display: inline-block;
- margin-top: $global-margin / 2;
- margin-bottom: 0;
- line-height: 1rem;
- small {
- color: $skull-gray;
- }
- }
- img {
- vertical-align: top;
- margin-right: $global-margin;
- }
- }
- }
- &__quantity {
- @include media-breakpoint-down(sm) {
- margin-bottom: $global-margin / 2;
- }
- form {
- display: inline-block;
- input {
- width: 62px;
- margin-right: 10px;
- }
- }
- &-error {
- display: block;
- }
- img {
- max-width: 18px;
- }
- }
- }
- &__total {
- padding-top: $global-padding;
- margin-bottom: $global-margin;
- p {
- margin-bottom: 0;
- }
- &__subtotal {
- color: $skull-gray;
- @include media-breakpoint-up(sm) {
- padding-left: calc(60px + #{$global-padding} * 2);
- }
- &--shipping {
- color: $body-color;
- }
- }
- }
- &__delivery-info {
- p {
- margin-bottom: 0;
- color: $body-color;
- display: inline-block;
- }
- &__price {
- text-transform: uppercase;
- }
- }
- &__empty {
- text-align: center;
- img {
- margin: $global-margin * 2 0;
- }
- .btn {
- margin: $global-margin * 2 0 $global-margin * 5;
- }
- }
- &__submit {
- @media (max-width: 370px) {
- width: 100%;
- }
- }
- &__clear {
- @media (max-width: 400px) {
- margin-top: $global-margin;
- }
- @media (min-width: 470px) {
- margin-right: $global-margin;
- }
- @media (max-width: 370px) {
- width: 100%;
- }
- margin-right: $global-margin;
- }
- &-item-delete {
- cursor: pointer;
- display: inline-block;
- margin-left: $global-margin / 2;
- svg {
- vertical-align: text-top;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_home.scss b/saleor/static/scss/layouts/_home.scss
deleted file mode 100644
index 4aa8fbac4a..0000000000
--- a/saleor/static/scss/layouts/_home.scss
+++ /dev/null
@@ -1,72 +0,0 @@
-.home {
- text-align: center;
- color: $white;
- h1 {
- font-weight: 300;
- text-transform: uppercase;
- @include media-breakpoint-down(sm) {
- font-size: 2.5rem;
- }
- }
- .btn {
- margin-top: $global-margin;
- }
- &--content-wrapper {
- display: table;
- width: 100%;
- height: 100%;
- }
- &--content-inner {
- display: table-cell;
- text-align: center;
- vertical-align: middle;
- color: white;
- padding-left: $global-padding;
- padding-right: $global-padding;
- }
- &--content {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- }
- &--square {
- background-size: cover;
- position: relative;
- &:before {
- content: "";
- display: block;
- padding-top: 100%;
- }
- }
- &__block1 {
- .home--square {
- background-image: url('../images/block1.jpg');
- @include media-breakpoint-up(md) {
- &:before {
- padding-top: 50%;
- }
- }
- }
- }
- &__block2 {
- margin-top: $global-margin * 2;
- .home--square {
- background-image: url('../images/block2.jpg');
- }
- }
- &__block3 {
- margin-top: $global-margin * 2;
- .home--square {
- background-image: url('../images/block3.jpg');
- }
- }
- &__featured {
- color: $body-color;
- h2 {
- text-transform: uppercase;
- margin: $global-margin * 2 0;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_login.scss b/saleor/static/scss/layouts/_login.scss
deleted file mode 100644
index 7a40fa686c..0000000000
--- a/saleor/static/scss/layouts/_login.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-.login {
- margin-top: $global-padding * 2;
- border-radius: 4px;
- border: 1px solid $gray;
- @include media-breakpoint-down(sm) {
- padding-top: 0;
- }
- .col-md-6 {
- text-align: center;
- }
- h3 {
- margin-bottom: $global-margin * 2;
- }
- .btn {
- margin: auto;
- margin-top: $global-margin;
- }
- &__btn-group {
- text-align: center;
- img {
- display: block;
- margin: 0 auto;
- }
- }
- &__register {
- padding: $global-padding * 2;
- &-link {
- img {
- margin: $global-margin / 2 auto $global-margin * 0.9;
- display: block;
- @include media-breakpoint-up(md) {
- &.checkout-pirate {
- margin-bottom: $global-margin * 3.2;
- }
- }
- }
- }
- }
- a.social-btn {
- color: $white;
- text-decoration: none;
- }
- &__form {
- background: $light-gray;
- padding: $global-padding * 2 $global-padding * 5;
- @include media-breakpoint-down(md) {
- padding: $global-padding * 2;
- }
- }
- &__btn-group {
- a {
- margin-top: $global-margin;
- display: block;
- }
- }
- &__forgot-password {
- h2 {
- padding-top: $global-padding * 2;
- text-transform: uppercase;
- }
- p {
- font-size: 1rem;
- padding-top: $global-padding;
- }
- fieldset {
- max-width: 60%;
- margin: auto;
- padding-bottom: $global-padding;
- @include media-breakpoint-down(sm) {
- max-width: 80%;
- }
- }
- .login__btn-group {
- img {
- padding-top: $global-padding * 2;
- }
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_no-results.scss b/saleor/static/scss/layouts/_no-results.scss
deleted file mode 100644
index b21d8c9f19..0000000000
--- a/saleor/static/scss/layouts/_no-results.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-.no-results {
- max-width: 30rem;
- margin: auto;
- text-align: center;
- h2 {
- padding-top: $global-padding;
- font-size: 2.5rem;
- @include media-breakpoint-down(sm) {
- font-size: 1.5rem
- }
- }
- img, svg {
- width: 100%;
- padding-top: $global-padding * 2;
- padding-bottom: $global-padding * 2;
- }
- p {
- margin-bottom: 0;
- font-size: 1.5rem;
- @include media-breakpoint-down(sm) {
- font-size: 1rem
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_order-details.scss b/saleor/static/scss/layouts/_order-details.scss
deleted file mode 100644
index b6212e220b..0000000000
--- a/saleor/static/scss/layouts/_order-details.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-.order-details {
- &__header {
- margin: $global-margin 0 $global-margin * 2;
- }
- &__addresses {
- margin-top: $global-margin * 2;
- }
- &__product {
- .col-3 {
- margin-top: $global-margin / 2;
- }
- &__description {
- a {
- transition: 0.3s;
- &:hover {
- color: $skull-gray;
- }
- }
- img {
- vertical-align: top;
- margin-right: $global-margin;
- }
- span {
- line-height: 60px;
- }
- }
- }
- &__total {
- padding-top: $global-padding;
- color: $skull-gray;
- }
- &__last-row {
- border-bottom-color: $skull-gray;
- }
- &__table-footer {
- @include media-breakpoint-up(sm) {
- padding-left: calc(60px + #{$global-padding} * 2);
- }
- }
- &__table-header {
- margin-top: 2rem;
- }
-}
-
-.order-notes {
- margin-top: 2 * $global-margin;
- > p {
- white-space: pre-wrap;
- }
-}
diff --git a/saleor/static/scss/layouts/_payment.scss b/saleor/static/scss/layouts/_payment.scss
deleted file mode 100644
index ef24248cb9..0000000000
--- a/saleor/static/scss/layouts/_payment.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-// Razorpay does not support custom button classes
-// so we need to reimplement the bootstrap button.
-.razorpay-payment-button {
- cursor: pointer;
- @include button-variant($primary, $primary);
- @include button-size(
- $btn-padding-y, $btn-padding-x,
- $font-size-base, $btn-line-height, $btn-border-radius);
- @include transition($btn-transition);
-}
diff --git a/saleor/static/scss/layouts/_product-list.scss b/saleor/static/scss/layouts/_product-list.scss
deleted file mode 100644
index 76562e2f15..0000000000
--- a/saleor/static/scss/layouts/_product-list.scss
+++ /dev/null
@@ -1,68 +0,0 @@
-#product-list-image {
- background-position: top;
- background-repeat: repeat-x;
- background-size: cover;
- @include media-breakpoint-down(sm) {
- padding: 17 * $global-padding 0 0;
- margin-top: -1 * $global-margin;
- }
- @include media-breakpoint-up(md) {
- padding: 20 * $global-padding 0 0;
- }
-}
-
-.product-image {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.product-list {
- text-align: center;
- margin-bottom: $global-margin * 2;
- img {
- max-width: 100%;
- }
- &-item-name {
- margin: $global-margin / 2 0;
- display: block;
- }
- .panel-footer {
- color: $skull-gray;
- text-transform: uppercase;
- }
- .text-center {
- position: relative;
- }
- &__sale {
- svg {
- position: absolute;
- left: 0;
- top: 0;
- }
- &__text {
- position: absolute;
- top: 0.5rem;
- left: 0.15rem;
- color: $white;
- font-size: 0.8rem;
- text-transform: uppercase;
- transform: rotate(-45deg);
- font-weight: 500;
- }
- }
- &__header {
- @include media-breakpoint-down(sm) {
- padding: $global-padding * 2 0;
- }
- @media (max-width: 370px) {
- padding-top: 5rem;
- }
- h1 {
- font-size: 2.5rem;
- color: $body-color;
- padding-bottom: 0;
- text-align: left;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_product-page.scss b/saleor/static/scss/layouts/_product-page.scss
deleted file mode 100644
index 7899403264..0000000000
--- a/saleor/static/scss/layouts/_product-page.scss
+++ /dev/null
@@ -1,116 +0,0 @@
-.product {
- a {
- color: $darken-gray;
- text-decoration: underline;
- }
- &__info {
- @include media-breakpoint-down(sm) {
- h1 {
- font-size: 2rem;
- }
- }
- h3 {
- text-transform: uppercase;
- }
- &__name {
- font-weight: 300;
- }
- &__price {
- color: $skull-gray;
- &__undiscounted {
- text-decoration: line-through;
- }
- margin-bottom: $global-margin;
- }
- label {
- margin-bottom: $global-margin;
- }
- &__quantity {
- width: 17%;
- float: left;
- @include media-breakpoint-down(sm) {
- width: 47%;
- }
- input {
- height: 54px;
- }
- }
- &__button {
- width: 80%;
- float: right;
- margin-top: $global-margin * 2.5;
- button {
- min-width: 100%;
- }
- @include media-breakpoint-down(sm) {
- width: 50%;
- .btn.primary {
- padding: $global-padding;
- }
- }
- }
- td {
- padding-right: $global-padding;
- }
- &__form-error {
- margin-top: -$global-padding / 2;
- margin-bottom: $global-margin;
- }
- &__description {
- blockquote {
- margin: 1rem 0;
- padding: 0 2rem;
- font-style: italic;
- }
- img {
- max-width: 100%;
- }
- }
- }
- &__gallery {
- .carousel-control {
- &-prev {
- svg {
- transform: rotate(180deg);
- }
- }
- }
- .carousel-item {
- flex-flow: column;
- img {
- width: 100%;
- }
- }
- .carousel-indicators {
- position: relative;
- top: 100%;
- width: auto;
- left: 0;
- display: block;
- text-align: center;
- z-index: 3;
- li {
- display: inline;
- text-indent: 0;
- margin: 0;
- img {
- border: 1px solid $light-gray;
- padding: 10px;
- width: 80px;
- }
- &.active {
- img {
- box-shadow: 0 2px 0 0 $light-turquoise;
- }
- }
- }
- }
- }
- &__collections {
- padding-top: $global-padding * 4;
- h2 {
- text-align: center;
- text-transform: uppercase;
- }
- }
-}
diff --git a/saleor/static/scss/layouts/_styleguide.scss b/saleor/static/scss/layouts/_styleguide.scss
deleted file mode 100644
index 917995fd39..0000000000
--- a/saleor/static/scss/layouts/_styleguide.scss
+++ /dev/null
@@ -1,164 +0,0 @@
-.styleguide {
- &__nav {
- a {
- display: block;
- }
- margin-bottom: $global-margin * 2;
- &.fixed {
- position: fixed;
- top: 20px;
- @include media-breakpoint-down(sm) {
- position: relative;
- }
- }
- }
- &__section {
- border: 2px solid $light-gray;
- padding: $global-padding;
- border-radius: 0px;
- margin-bottom: $global-margin;
- p {
- margin-bottom: 0;
- }
- [contenteditable='true'] {
- &:focus {
- outline: none;
- opacity: 0.9;
- }
- }
- }
- &__tittle {
- background-color: $light-gray;
- margin-bottom: 0;
- padding: $global-padding;
- p {
- margin-bottom: 0;
- padding-top: $global-padding;
- }
- h3 {
- margin-bottom: 0;
- padding-top: 0;
-
- }
- }
- &__sub-tittle {
- background-color: $light-gray;
- padding: $global-padding;
- margin-bottom: 0;
- margin-top: -$global-padding;
- p {
- margin-bottom: 0;
- }
- }
- &__content {
- &__block {
- padding-bottom: $global-padding * 3;
- border-top: 1px solid $gray;
- &__bold {
- font-weight: 700;
- }
- &__light {
- font-weight: 300;
- }
- &__color {
- text-align: center;
- div {
- width: 100px;
- height: 100px;
- border-radius: 150px;
- margin: 0 auto $global-margin;
- }
- &--body-color {
- background-color: $body-color;
- }
- &--white {
- background-color: $white;
- border: 1px solid $gray;
- }
- &--light-gray {
- background-color: $light-gray;
- }
- &--gray {
- background-color: $gray;
- }
- &--darken-gray {
- background-color: $darken-gray;
- }
- &--skull-gray {
- background-color: $skull-gray;
- }
- &--blue {
- background-color: $blue;
- }
- &--darken-blue {
- background-color: $darken-blue;
- }
- &--red {
- background-color: $red;
- }
- &--dark-red {
- background-color: $dark-red;
- }
- &--green {
- background-color: $green;
- }
- &--beige {
- background-color: $beige;
- border: 1px solid $gray;
- }
- }
- &__grid {
- text-align: center;
- &:not(:last-of-type) {
- margin-bottom: $global-margin;
- }
- p {
- background-color: $light-gray;
- padding: $global-padding 0;
- }
- }
- &#helpers {
- .styleguide__section {
- div {
- margin-bottom: $global-margin * 2;
- }
- }
- }
- &#icons {
- svg {
- width: 35px;
- height: 35px;
- display: inline-block;
- margin-right: $global-margin;
- }
- }
- &#buttons {
- button {
- margin: $global-margin / 2;
- }
- .home__block1 {
- margin-top: $global-margin;
- }
- }
- .deliveryform {
- label, select {
- float: left;
- }
- }
- .search-form {
- @include media-breakpoint-down(sm) {
- margin-bottom: $global-margin;
- position: relative;
- left: 0;
- .btn {
- top: 0;
- right: 0;
- }
- }
- }
- .product-list, .card-block, .alert:last-of-type, .form-group {
- margin-bottom: 0;
- }
- }
- }
-}
diff --git a/saleor/static/scss/storefront.scss b/saleor/static/scss/storefront.scss
deleted file mode 100644
index a104fb7e17..0000000000
--- a/saleor/static/scss/storefront.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-@import "variables";
-@import "~bootstrap/scss/bootstrap";
-
-@import "components/breadcrumbs";
-@import "components/buttons";
-@import "components/cards";
-@import "components/checkout-dropdown";
-@import "components/filters";
-@import "components/footer";
-@import "components/forms";
-@import "components/header";
-@import "components/labels";
-@import "components/loader";
-@import "components/pagination";
-@import "components/table";
-@import "components/tabs";
-@import "components/typography";
-@import "components/variant-picker";
-@import "components/language-picker";
-
-@import "layouts/account";
-@import "layouts/checkout";
-@import "layouts/home";
-@import "layouts/login";
-@import "layouts/no-results";
-@import "layouts/order-details";
-@import "layouts/payment";
-@import "layouts/product-list";
-@import "layouts/product-page";
-@import "layouts/styleguide";
diff --git a/saleor/static/scss/variables.scss b/saleor/static/scss/variables.scss
deleted file mode 100644
index ec580673ec..0000000000
--- a/saleor/static/scss/variables.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-// GLOBAL
-$global-padding: 1rem;
-$global-margin: 1rem;
-$button-border-radius: 12px;
-
-// COLORS
-$body-color: #333333;
-$white: #fff;
-$light-gray: #f1f5f5;
-$gray: #d3d1d0;
-$darken-gray: darken($gray, 10%);
-$skull-gray: #828282;
-$blue: #26a5d4;
-$darken-blue: darken($blue, 10%);
-$dark-blue: #21125e;
-$red: #eb5757;
-$dark-red: #c53636;
-$green: #27ae60;
-$beige: #fffaec;
-$turquoise: #13bebb;
-$light-turquoise: #3ee7cd;
-
-// TYPOGRAPHY
-$font-family-sans-serif: "Lato", sans-serif;
-$h1-font-size: 3rem;
-$h2-font-size: 1.3rem;
-$h3-font-size: 1rem;
-
-$theme-colors: (
- primary: $light-turquoise,
- secondary: $white,
- success: $green,
- info: $turquoise,
- warning: #ffc107,
- danger: $red,
- light: #f8f9fa,
- dark: #343a40
-);