add react hello world
This commit is contained in:
@@ -1,13 +1,28 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
{% block stylesheets %}{% endblock %}
|
{% block stylesheets %}
|
||||||
|
{#{% stylesheets filter='cssrewrite'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/css/bootstrap.min.css'
|
||||||
|
'@TollTereloBundle/Resources/public/css/style.css' %}
|
||||||
|
<link rel="stylesheet" media="screen" href="{{ asset_url }}" type="text/css"/>
|
||||||
|
{% endstylesheets %}#}
|
||||||
|
{% endblock %}
|
||||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
|
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
{% block javascripts %}{% endblock %}
|
{% block javascripts %}
|
||||||
|
{#{% javascripts
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-3.0.0.min.js'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-migrate-3.0.0.min.js'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/js/bootstrap.min.js'
|
||||||
|
'@TollTereloBundle/Resources/public/js/script.js' %}
|
||||||
|
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||||
|
{% endjavascripts %}#}
|
||||||
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Mine\SeekerBundle\Controller;
|
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
||||||
|
|
||||||
class DefaultController extends Controller
|
|
||||||
{
|
|
||||||
public function indexAction()
|
|
||||||
{
|
|
||||||
return $this->render('MineSeekerBundle:Default:index.html.twig');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Mine\SeekerBundle\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
|
||||||
|
class GameController extends Controller
|
||||||
|
{
|
||||||
|
public function playAction()
|
||||||
|
{
|
||||||
|
return $this->render('MineSeekerBundle:Game:play.html.twig');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
MineSeekerBundle_homepage:
|
MineSeekerBundle_homepage:
|
||||||
path: /
|
path: /
|
||||||
defaults: { _controller: MineSeekerBundle:Default:index }
|
defaults: { _controller: MineSeekerBundle:Game:play }
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* ReactDOMServer v15.3.2
|
||||||
|
*
|
||||||
|
* Copyright 2013-present, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||||
|
;(function(f) {
|
||||||
|
// CommonJS
|
||||||
|
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||||
|
module.exports = f(require('react'));
|
||||||
|
|
||||||
|
// RequireJS
|
||||||
|
} else if (typeof define === "function" && define.amd) {
|
||||||
|
define(['react'], f);
|
||||||
|
|
||||||
|
// <script>
|
||||||
|
} else {
|
||||||
|
var g;
|
||||||
|
if (typeof window !== "undefined") {
|
||||||
|
g = window;
|
||||||
|
} else if (typeof global !== "undefined") {
|
||||||
|
g = global;
|
||||||
|
} else if (typeof self !== "undefined") {
|
||||||
|
g = self;
|
||||||
|
} else {
|
||||||
|
// works providing we're not in "use strict";
|
||||||
|
// needed for Java 8 Nashorn
|
||||||
|
// see https://github.com/facebook/react/issues/3037
|
||||||
|
g = this;
|
||||||
|
}
|
||||||
|
g.ReactDOMServer = f(g.React);
|
||||||
|
}
|
||||||
|
|
||||||
|
})(function(React) {
|
||||||
|
return React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||||
|
});
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* ReactDOMServer v15.3.2
|
||||||
|
*
|
||||||
|
* Copyright 2013-present, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOMServer=e(f.React)}}(function(e){return e.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* ReactDOM v15.3.2
|
||||||
|
*
|
||||||
|
* Copyright 2013-present, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||||
|
;(function(f) {
|
||||||
|
// CommonJS
|
||||||
|
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||||
|
module.exports = f(require('react'));
|
||||||
|
|
||||||
|
// RequireJS
|
||||||
|
} else if (typeof define === "function" && define.amd) {
|
||||||
|
define(['react'], f);
|
||||||
|
|
||||||
|
// <script>
|
||||||
|
} else {
|
||||||
|
var g;
|
||||||
|
if (typeof window !== "undefined") {
|
||||||
|
g = window;
|
||||||
|
} else if (typeof global !== "undefined") {
|
||||||
|
g = global;
|
||||||
|
} else if (typeof self !== "undefined") {
|
||||||
|
g = self;
|
||||||
|
} else {
|
||||||
|
// works providing we're not in "use strict";
|
||||||
|
// needed for Java 8 Nashorn
|
||||||
|
// see https://github.com/facebook/react/issues/3037
|
||||||
|
g = this;
|
||||||
|
}
|
||||||
|
g.ReactDOM = f(g.React);
|
||||||
|
}
|
||||||
|
|
||||||
|
})(function(React) {
|
||||||
|
return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||||
|
});
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* ReactDOM v15.3.2
|
||||||
|
*
|
||||||
|
* Copyright 2013-present, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
Hello World!
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{% extends '::base.html.twig' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div id="example"></div>
|
||||||
|
<script type="text/babel">
|
||||||
|
ReactDOM.render(
|
||||||
|
<h1>Hello, world!</h1>,
|
||||||
|
document.getElementById('example')
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block javascripts %}
|
||||||
|
{{ parent() }}
|
||||||
|
|
||||||
|
<script src="{{ asset('bundles/mineseeker/js/src/build/react.js') }}"></script>
|
||||||
|
<script src="{{ asset('bundles/mineseeker/js/src/build/react-dom.js') }}"></script>
|
||||||
|
<script src="https://unpkg.com/babel-core@5.8.38/browser.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Mine\SeekerBundle\Tests\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
|
|
||||||
|
class GameControllerTest extends WebTestCase
|
||||||
|
{
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user