new: usr: add mineseeker game to the symfony 4 project #3
This commit is contained in:
95
templates/Game/index.html.twig
Normal file
95
templates/Game/index.html.twig
Normal file
@@ -0,0 +1,95 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} - The Game{% endblock %}
|
||||
|
||||
{% block metas %}
|
||||
<meta property="og:url" content="{{ url('MineSeekerBundle_homepage') }}"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:title" content="MineSeeker"/>
|
||||
<meta property="og:description" content="A multiplayer minesweeper game"/>
|
||||
<meta property="og:image"
|
||||
content="{{ app.request.getSchemeAndHttpHost() }}{{ asset('images/images/mine-1600x627.png') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<section class="header-content">
|
||||
<div class="logo">
|
||||
<a href="{{ path('MineSeekerBundle_homepage') }}" target="_self">
|
||||
<img src="{{ asset('images/mine-logo-txt.png') }}" alt="MineSeeker Logo w/ Txt"/>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div id="id_welcome"{% if app.user.facebookId is defined and app.user.facebookId is not null %} style="margin-bottom:50px"{% endif %}>
|
||||
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
|
||||
{% if app.user.facebookId is not null %}
|
||||
<div>
|
||||
<img src="http://graph.facebook.com/{{ app.user.facebookId }}/picture?type=square&width=100&height=100"
|
||||
alt="Facebook profile"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<h2{% if app.user.facebookId is defined and app.user.facebookId is not null %} style="margin-top:0"{% endif %}>
|
||||
Hello, {{ app.user.realName is not null ? app.user.realName : app.user.username }}!
|
||||
</h2>
|
||||
<h1>Let's play!! :D</h1>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
<h2>A minesweeper game rethought...</h2>
|
||||
<h1>...and you can play w/o register!!</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a href="{{ path('MineSeekerBundle_gamePlay') }}">Play NOW!</a>
|
||||
{#
|
||||
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
|
||||
<a href="{{ path('fos_user_security_logout') }}" class="small">
|
||||
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ path('fos_user_registration_register') }}" class="small">Sign up</a> ·
|
||||
<a href="{{ path('fos_user_security_login') }}" class="small">Sign in</a>
|
||||
{% endif %}
|
||||
#}
|
||||
</div>
|
||||
<h3>
|
||||
version {{ version }} · MineSeeker©{{ "now"|date("Y") }} · <a
|
||||
href="http://www.laszlolang.com">www.laszlolang.com</a>
|
||||
</h3>
|
||||
</div>
|
||||
<img src="{{ asset('images/mine-logo-logo.png') }}" alt="MineSeeker Logo"/>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="txt">
|
||||
<div class="technologies">
|
||||
<h1>Used technologies</h1>
|
||||
<img src="{{ asset('images/technologies/websocket.png') }}" alt="Used Websocket"/>
|
||||
<img src="{{ asset('images/technologies/react.png') }}" alt="Used React.js"/>
|
||||
<img src="{{ asset('images/technologies/symfony.png') }}" alt="Used Symfony"/>
|
||||
<img src="{{ asset('images/technologies/jquery.png') }}" alt="Used jQuery"/>
|
||||
<img src="{{ asset('images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt"/>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ path('MineSeekerBundle_homepage') }}">Homepage</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_terms') }}">Terms of Use</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_privacy') }}">Privacy Policy</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ path('MineSeekerBundle_contact') }}">Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('homeStyle') }}
|
||||
{% endblock %}
|
||||
44
templates/Game/play.html.twig
Normal file
44
templates/Game/play.html.twig
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} - Play!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<a class="back-from-game" href="{{ path('MineSeekerBundle_homepage') }}">
|
||||
<img src="{{ asset('/images/mine-logo-txt.png') }}" alt="Mineseeker Logo">
|
||||
</a>
|
||||
<div class="mine-container">
|
||||
<div id="mine-wrapper"
|
||||
data-env="{{ env }}"
|
||||
data-ssl="{{ ssl }}"
|
||||
data-game-id="{{ app.request.get('gameAssoc') }}">
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block metas %}
|
||||
<meta property="og:url" content="{{ url('MineSeekerBundle_gamePlay') }}"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:title" content="Your friend challenges YOU!"/>
|
||||
<meta property="og:description" content="Do you accept the challenge?"/>
|
||||
<meta property="og:image"
|
||||
content="{{ app.request.getSchemeAndHttpHost() }}{{ asset('/images/mine-1600x627.png') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('mineseekerStyle') }}
|
||||
|
||||
<style type="text/css">
|
||||
.mine-container {
|
||||
background: url('/images/bg-mineseeker-{{ random(1) }}-outbg.jpg') no-repeat;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
<script type="text/javascript" src="{{ asset('bundles/goswebsocket/js/vendor/autobahn.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('bundles/goswebsocket/js/gos_web_socket_client.js') }}"></script>
|
||||
|
||||
{{ encore_entry_script_tags('mineseeker') }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user