forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PoC of new ShopBundle with SemanticUI
- Loading branch information
1 parent
2c8981c
commit cf68520
Showing
21 changed files
with
771 additions
and
3 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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
|
||
/web/bundles | ||
/web/assets/admin | ||
/web/assets/shop | ||
/web/assets/css | ||
/web/assets/js | ||
/web/assets/fonts | ||
|
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
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 @@ | ||
vendor/ | ||
bin/ | ||
|
||
composer.phar | ||
composer.lock |
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,18 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
php: | ||
- 7.0 | ||
- 5.6 | ||
- 5.5 | ||
|
||
before_install: | ||
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- phpenv config-rm xdebug.ini || true | ||
|
||
install: | ||
- composer install --no-interaction --prefer-source --ignore-platform-reqs | ||
|
||
script: | ||
- bin/phpspec run -fpretty --verbose |
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,6 @@ | ||
CHANGELOG | ||
========= | ||
|
||
### v0.18.0 | ||
|
||
* First development release. |
44 changes: 44 additions & 0 deletions
44
src/Sylius/Bundle/ShopBundle/Controller/HomepageController.php
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,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Sylius\Bundle\ShopBundle\Controller; | ||
|
||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* @author Paweł Jędrzejewski <pawel@sylius.org> | ||
*/ | ||
class HomepageController | ||
{ | ||
/** | ||
* @var EngineInterface | ||
*/ | ||
private $templatingEngine; | ||
|
||
/** | ||
* @param EngineInterface $templatingEngine | ||
*/ | ||
public function __construct(EngineInterface $templatingEngine) | ||
{ | ||
$this->templatingEngine = $templatingEngine; | ||
} | ||
|
||
/** | ||
* @param Request $request | ||
* | ||
* @return Response | ||
*/ | ||
public function indexAction(Request $request) | ||
{ | ||
return $this->templatingEngine->renderResponse('SyliusShopBundle:Homepage:index.html.twig'); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/Sylius/Bundle/ShopBundle/DependencyInjection/SyliusShopExtension.php
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,33 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Sylius\Bundle\ShopBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
|
||
/** | ||
* @author Paweł Jędrzejewski <pawel@sylius.org> | ||
*/ | ||
class SyliusShopExtension extends Extension | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $config, ContainerBuilder $container) | ||
{ | ||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
|
||
$loader->load('controller.xml'); | ||
} | ||
} |
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,19 @@ | ||
Copyright (c) 2011-2016 Paweł Jędrzejewski | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,46 @@ | ||
SyliusShopBundle [](http://travis-ci.org/Sylius/SyliusShopBundle) | ||
================ | ||
|
||
This bundle contains Sylius eCommerce storefront. | ||
|
||
Sylius | ||
------ | ||
|
||
 | ||
|
||
Sylius is an Open Source eCommerce solution built from decoupled components with powerful API and the highest quality code. [Read more on sylius.org](http://sylius.org). | ||
|
||
Installation & Documentation | ||
---------------------------- | ||
|
||
For installation and usage examples please refer to the documentation available on [**docs.sylius.org**](http://docs.sylius.org). | ||
|
||
Contributing | ||
------------ | ||
|
||
Extensive Contributing Guide can be found in [the official documentation](http://docs.sylius.org/en/latest/contributing/index.html). | ||
|
||
Follow Sylius' Development | ||
-------------------------- | ||
|
||
If you want to keep up with the updates and latest features, follow us on the following channels: | ||
|
||
* [Official Blog](https://sylius.org/blog) | ||
* [Sylius on Twitter](https://twitter.com/Sylius) | ||
* [Sylius on Facebook](https://facebook.com/SyliusEcommerce) | ||
|
||
Reporting Bugs | ||
-------------- | ||
|
||
If you have found a bug, please create an issue on [the main repository](https://github.com/Sylius/Sylius/issues). | ||
|
||
MIT License | ||
----------- | ||
|
||
License can be found [here](https://github.com/Sylius/SyliusShopBundle/blob/master/LICENSE). | ||
|
||
Authors | ||
------- | ||
|
||
The bundle was originally created by [Paweł Jędrzejewski](http://pjedrzejewski.com). | ||
See the list of [contributors](https://github.com/Sylius/SyliusShopBundle/contributors). |
29 changes: 29 additions & 0 deletions
29
src/Sylius/Bundle/ShopBundle/Resources/config/controller.xml
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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
This file is part of the Sylius package. | ||
(c) Paweł Jędrzejewski | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
--> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services | ||
http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
|
||
<parameters> | ||
<parameter key="sylius.controller.shop.homepage.class">Sylius\Bundle\ShopBundle\Controller\HomepageController</parameter> | ||
</parameters> | ||
|
||
<services> | ||
<service id="sylius.controller.shop.homepage" class="%sylius.controller.shop.homepage.class%"> | ||
<argument type="service" id="templating" /> | ||
</service> | ||
</services> | ||
|
||
</container> |
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,4 @@ | ||
sylius_shop_homepage: | ||
path: / | ||
defaults: | ||
_controller: sylius.controller.shop.homepage:indexAction |
27 changes: 27 additions & 0 deletions
27
src/Sylius/Bundle/ShopBundle/Resources/views/Homepage/_footer.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,27 @@ | ||
<div class="ui inverted vertical footer segment"> | ||
<div class="ui container"> | ||
<div class="ui stackable inverted divided equal height stackable grid"> | ||
<div class="three wide column"> | ||
<h4 class="ui inverted header">Your Store</h4> | ||
<div class="ui inverted link list"> | ||
<a href="#" class="item">About</a> | ||
<a href="#" class="item">Terms and Conditions</a> | ||
<a href="#" class="item">Privacy Policy</a> | ||
</div> | ||
</div> | ||
<div class="three wide column"> | ||
<h4 class="ui inverted header">Customer Care</h4> | ||
<div class="ui inverted link list"> | ||
<a href="#" class="item">Contact us</a> | ||
<a href="#" class="item">FAQs</a> | ||
<a href="#" class="item">Delivery & Shipping</a> | ||
<a href="#" class="item">Returns Polciy</a> | ||
</div> | ||
</div> | ||
<div class="eight wide column"> | ||
<h4 class="ui inverted header">© Your Store</h4> | ||
<p>Powered by <a href="#">Sylius</a>.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.