From 8aa5c499ebfbf46d5bf5d2990957613cf898ff2a Mon Sep 17 00:00:00 2001 From: ps74 Date: Fri, 3 Sep 2021 10:05:05 +0200 Subject: [PATCH] nr.1 test --- .../app/storefront/src/assets/.gitkeep | 0 src/Resources/app/storefront/src/main.js | 0 .../storefront/src/scss/_header-search.scss | 1 + .../app/storefront/src/scss/base.scss | 1 + .../app/storefront/src/scss/overrides.scss | 8 ++++ src/Resources/theme.json | 22 ++++++++++ .../storefront/layout/header/header.html.twig | 43 +++++++++++++++++++ src/Unsertheme.php | 14 ++++++ 8 files changed, 89 insertions(+) create mode 100644 src/Resources/app/storefront/src/assets/.gitkeep create mode 100644 src/Resources/app/storefront/src/main.js create mode 100644 src/Resources/app/storefront/src/scss/_header-search.scss create mode 100644 src/Resources/app/storefront/src/scss/base.scss create mode 100644 src/Resources/app/storefront/src/scss/overrides.scss create mode 100644 src/Resources/theme.json create mode 100644 src/Resources/views/storefront/layout/header/header.html.twig create mode 100644 src/Unsertheme.php diff --git a/src/Resources/app/storefront/src/assets/.gitkeep b/src/Resources/app/storefront/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/Resources/app/storefront/src/main.js b/src/Resources/app/storefront/src/main.js new file mode 100644 index 0000000..e69de29 diff --git a/src/Resources/app/storefront/src/scss/_header-search.scss b/src/Resources/app/storefront/src/scss/_header-search.scss new file mode 100644 index 0000000..2e1d159 --- /dev/null +++ b/src/Resources/app/storefront/src/scss/_header-search.scss @@ -0,0 +1 @@ +.header-search { margin: 0;} \ No newline at end of file diff --git a/src/Resources/app/storefront/src/scss/base.scss b/src/Resources/app/storefront/src/scss/base.scss new file mode 100644 index 0000000..aabe37f --- /dev/null +++ b/src/Resources/app/storefront/src/scss/base.scss @@ -0,0 +1 @@ +@import "header-search.scss"; diff --git a/src/Resources/app/storefront/src/scss/overrides.scss b/src/Resources/app/storefront/src/scss/overrides.scss new file mode 100644 index 0000000..61b108c --- /dev/null +++ b/src/Resources/app/storefront/src/scss/overrides.scss @@ -0,0 +1,8 @@ +/* +Override variable defaults +================================================== +This file is used to override default SCSS variables from the Shopware Storefront or Bootstrap. + +Because of the !default flags, theme variable overrides have to be declared beforehand. +https://getbootstrap.com/docs/4.0/getting-started/theming/#variable-defaults +*/ \ No newline at end of file diff --git a/src/Resources/theme.json b/src/Resources/theme.json new file mode 100644 index 0000000..1098bf6 --- /dev/null +++ b/src/Resources/theme.json @@ -0,0 +1,22 @@ +{ + "name": "Unsertheme", + "author": "Shopware AG", + "views": [ + "@Storefront", + "@Plugins", + "@Unsertheme" + ], + "style": [ + "app/storefront/src/scss/overrides.scss", + "@Storefront", + "app/storefront/src/scss/base.scss" + ], + "script": [ + "@Storefront", + "app/storefront/dist/storefront/js/unsertheme.js" + ], + "asset": [ + "@Storefront", + "app/storefront/src/assets" + ] +} \ No newline at end of file diff --git a/src/Resources/views/storefront/layout/header/header.html.twig b/src/Resources/views/storefront/layout/header/header.html.twig new file mode 100644 index 0000000..75df69c --- /dev/null +++ b/src/Resources/views/storefront/layout/header/header.html.twig @@ -0,0 +1,43 @@ +{% sw_extends "@Storefront/storefront/layout/header/header.html.twig" %} + +{% block layout_header_navigation %} +
+ + + {% block layout_header_search %} +
+
+
+ {% block layout_header_navigation_toggle_tablet %} + {{ parent() }} + {% endblock %} +
+
+ {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %} +
+
+
+ {% endblock %} + + {% block layout_header_logo %} +
+ {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %} +
+ {% endblock %} + + {% block layout_header_actions %} + {{ parent() }} + + {% endblock %} + + {#{% block dump_vars %} +
+ {{ dump() }} +
+ {% endblock %}#} +
+ + + {% endblock %} + + \ No newline at end of file diff --git a/src/Unsertheme.php b/src/Unsertheme.php new file mode 100644 index 0000000..e1ed7ee --- /dev/null +++ b/src/Unsertheme.php @@ -0,0 +1,14 @@ +