forked from Sylius/SyliusDemo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature Sylius#60 Update demo + add version switcher (pamil, bartoszp…
…ietrzak1994) This PR was merged into the 1.3 branch. Discussion ---------- ![screenshot 2019-01-30 at 16 02 14](https://user-images.githubusercontent.com/1897953/51990024-76568c80-24a8-11e9-9a96-28a92ec1bfd3.png) ![screenshot 2019-01-30 at 16 02 22](https://user-images.githubusercontent.com/1897953/51990025-76568c80-24a8-11e9-9f9e-aea9d7fca51f.png) Commits ------- 0f0cd1f Update demo + add version switcher 0daa637 Missing .gitignore file in image directory 5c9f101 Missing test routing
- Loading branch information
Showing
14 changed files
with
1,411 additions
and
902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
/public/css | ||
/public/js | ||
/public/media | ||
!/public/media/image/.gitignore | ||
|
||
/vendor | ||
/node_modules | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sylius_test_plugin_main: | ||
path: /test/main | ||
controller: FrameworkBundle:Template:template | ||
defaults: | ||
template: "@SyliusTestPlugin/main.html.twig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sylius_test_plugin_main: | ||
path: /test/main | ||
controller: FrameworkBundle:Template:template | ||
defaults: | ||
template: "@SyliusTestPlugin/main.html.twig" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{% set is_stable = 'DEV' not in sylius_meta.version %} | ||
{% set version_descriptor = ' (v' ~ sylius_meta.version ~ ')' %} | ||
|
||
<style> | ||
.version-switch { | ||
position: fixed; | ||
bottom: 0; | ||
right: 30px; | ||
display: flex; | ||
align-items: center; | ||
background: #333; | ||
padding: 10px 10px; | ||
border-radius: 5px 5px 0 0; | ||
color: #fff; | ||
z-index: 9999; | ||
} | ||
.version-switch label { | ||
display: inline-block; | ||
padding: 0 10px; | ||
font-size: 13px; | ||
color: #999; | ||
} | ||
.version-switch select { | ||
display: inline-block; | ||
height: 30px; | ||
border: 1px solid #5a5a5a; | ||
background: #333; | ||
color: #fff; | ||
font-size: 13px; | ||
} | ||
</style> | ||
|
||
<div class="version-switch"> | ||
<label for="version-switch">Sylius version:</label> | ||
{# Remove "disabled" when the second demo is published #} | ||
<select id="version-switch" disabled> | ||
<option value="//demo.sylius.com"{% if is_stable %} selected{% endif %}>stable{{ is_stable ? version_descriptor : '' }}</option> | ||
<option value="//master.demo.sylius.com"{% if not is_stable %} selected{% endif %}>master{{ is_stable ? '' : version_descriptor }}</option> | ||
</select> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
const versionSelect = document.getElementById('version-switch'); | ||
versionSelect.addEventListener('change', (e) => { | ||
window.location.href = e.target.value; | ||
}); | ||
</script> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="{{ app.request.locale|slice(0, 2) }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<title>{% block title %}Sylius{% endblock %}</title> | ||
|
||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> | ||
|
||
{% block metatags %} | ||
{% endblock %} | ||
|
||
{% block stylesheets %} | ||
<!--[if lt IE 9]> | ||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | ||
<![endif]--> | ||
|
||
{% include '@SyliusUi/_stylesheets.html.twig' with {'path': 'assets/shop/css/style.css'} %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.stylesheets') }} | ||
{% endblock %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.head') }} | ||
</head> | ||
|
||
<body class="pushable"> | ||
{{ sonata_block_render_event('sylius.shop.layout.before_body') }} | ||
<div class="pusher"> | ||
{% block top %} | ||
<div id="menu" class="ui large sticky inverted stackable menu"> | ||
{{ sonata_block_render_event('sylius.shop.layout.before_currency_switcher') }} | ||
|
||
{{ render(controller('sylius.controller.shop.currency_switch:renderAction')) }} | ||
{{ render(controller('sylius.controller.shop.locale_switch:renderAction')) }} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.before_security_widget') }} | ||
|
||
{{ render(controller('sylius.controller.shop.security_widget:renderAction')) }} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.after_security_widget') }} | ||
</div> | ||
{% endblock %} | ||
|
||
<div class="ui container"> | ||
{% block header %} | ||
<header> | ||
{% include '@SyliusShop/_header.html.twig' %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.after_header') }} | ||
|
||
{{ render(url('sylius_shop_partial_taxon_index_by_code', {'code': 'category', 'template': '@SyliusShop/Taxon/_horizontalMenu.html.twig'})) }} | ||
</header> | ||
{% endblock %} | ||
|
||
{% include '@SyliusShop/_flashes.html.twig' %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.before_content') }} | ||
|
||
{% block content %} | ||
{% endblock %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.after_content') }} | ||
</div> | ||
|
||
{% block footer %} | ||
{% include '@SyliusShop/_footer.html.twig' %} | ||
|
||
{% include '/_version_switcher.html.twig' %} | ||
{% endblock %} | ||
</div> | ||
|
||
{% block javascripts %} | ||
{% include '@SyliusUi/_javascripts.html.twig' with {'path': 'assets/shop/js/app.js'} %} | ||
|
||
{{ sonata_block_render_event('sylius.shop.layout.javascripts') }} | ||
{% endblock %} | ||
|
||
{% include '@SyliusUi/Modal/_confirmation.html.twig' %} | ||
{{ sonata_block_render_event('sylius.shop.layout.after_body') }} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<title>{% block title %}Sylius{% endblock %}</title> | ||
|
||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> | ||
|
||
{% block metatags %} | ||
{% endblock %} | ||
|
||
{% block stylesheets %} | ||
<!--[if lt IE 9]> | ||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | ||
<![endif]--> | ||
{% endblock %} | ||
</head> | ||
|
||
<body class="pushable"> | ||
<div class="ui sidebar vertical inverted menu visible left" id="sidebar"> | ||
{% block sidebar %} | ||
{% endblock %} | ||
</div> | ||
<div class="ui fixed inverted menu"> | ||
{% block topbar %} | ||
{% endblock %} | ||
</div> | ||
<div class="pusher"> | ||
<div class="full height" id="wrapper"> | ||
<div id="content"> | ||
{% block flash_messages %} | ||
{% include '@SyliusUi/_flashes.html.twig' %} | ||
{% endblock %} | ||
|
||
{% block pre_content %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% endblock %} | ||
|
||
{% block post_content %} | ||
{% endblock %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% include '/_version_switcher.html.twig' %} | ||
|
||
{% include '@SyliusUi/Modal/_confirmation.html.twig' %} | ||
|
||
{% block javascripts %} | ||
{% endblock %} | ||
</body> | ||
</html> |
File renamed without changes.
Oops, something went wrong.