Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0effd8ab8d | |||
| e387e21b34 | |||
| 039c29674a | |||
| ef89f7df09 | |||
| 4d5a9b978b | |||
| ccfb621c2b | |||
| 1e2a231c6c | |||
| bcc9671895 | |||
| 6d125f2dab | |||
| 664ef5b424 | |||
| 68c6a277ba | |||
| 875d2d71db | |||
| c0d75e43f3 | |||
| 6dc59549ef | |||
| aed5eaf3ab | |||
| f44bc58df2 | |||
| 50b3663889 |
2
.gitignore
vendored
@@ -36,3 +36,5 @@ phpunit-report/*
|
||||
|
||||
nohup.out
|
||||
src/Mine/SeekerBundle/Resources/public/js/index.js
|
||||
src/Mine/SeekerBundle/Resources/public/js/index.min.js
|
||||
npm-debug.log
|
||||
|
||||
10
README.md
@@ -19,7 +19,17 @@ This is a Symfony 3 project w/ React JS in standalone mode and w/ WebSocket.
|
||||
|
||||
2.) React JS WebPack watch generator w/ babel presets: es2015, react
|
||||
|
||||
$ webpack -p --config=webpack-prod.config.js
|
||||
|
||||
PROD
|
||||
|
||||
$ webpack --progress --colors --watch -d
|
||||
|
||||
DEV
|
||||
|
||||
-d --> Debugger; If you write this line somewhere: debugger;
|
||||
The browser will stop the code here!!!
|
||||
|
||||
3.) Connect to Prod
|
||||
|
||||
ssh xxsvci@laszlolang.com -i ~/.ssh/id_rsa_laszlolang
|
||||
|
||||
@@ -24,6 +24,7 @@ class AppKernel extends Kernel
|
||||
new Gos\Bundle\PubSubRouterBundle\GosPubSubRouterBundle(),
|
||||
new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
|
||||
new Snc\RedisBundle\SncRedisBundle(),
|
||||
new CL\Bundle\SlackBundle\CLSlackBundle(),
|
||||
|
||||
new Jotunheimr\AdminBundle\JotunheimrAdminBundle(),
|
||||
new Jotunheimr\UserBundle\JotunheimrUserBundle(),
|
||||
|
||||
@@ -2,12 +2,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Cache-control" content="max-age=1209600;public">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="keywords" content="game,mineseeker,mine,seeker,laszlolang.com">
|
||||
<meta name="robots" content="index,follow">
|
||||
<meta name="revisit-after" content="2 days">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="country" content="Hungary">
|
||||
<meta name="description" content="This is a new minesweeper, multiplayer game.">
|
||||
<meta name="content-language" content="hu,hun,hungarian">
|
||||
{% include '@MineSeeker/Recent/favicon.html.twig' %}
|
||||
<meta property="fb:app_id" content="{{ facebook_api }}">
|
||||
{% block metas %}{% endblock %}
|
||||
<title>MineSeeker{% block title %}{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
|
||||
{% include '@MineSeeker/Recent/google-analytics.html.twig' %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="fb-root"></div>
|
||||
|
||||
{% block bodyTop %}{% endblock %}
|
||||
|
||||
<header>
|
||||
{% block header %}{% endblock %}
|
||||
</header>
|
||||
@@ -18,6 +37,15 @@
|
||||
{% block footer %}{% endblock %}
|
||||
</footer>
|
||||
|
||||
{% block javascripts %}{% endblock %}
|
||||
{% block javascripts %}
|
||||
{% javascripts filter='?uglifyjs2'
|
||||
'@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' %}
|
||||
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
|
||||
{% include '@MineSeeker/Recent/facebook.html.twig' %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -28,10 +28,10 @@ framework:
|
||||
trusted_hosts: ~
|
||||
trusted_proxies: ~
|
||||
session:
|
||||
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
|
||||
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
|
||||
# handler_id: session.handler.native_file
|
||||
# save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
|
||||
handler_id: session.handler.pdo
|
||||
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
|
||||
fragments: ~
|
||||
http_method_override: true
|
||||
assets: ~
|
||||
@@ -40,6 +40,11 @@ framework:
|
||||
twig:
|
||||
debug: "%kernel.debug%"
|
||||
strict_variables: "%kernel.debug%"
|
||||
globals:
|
||||
version: "0.37.18 (beta7)"
|
||||
facebook_api: "%facebook.api%"
|
||||
facebook_scope: "%facebook.scope%"
|
||||
facebook_api_version: "%facebook.version%"
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
@@ -68,6 +73,7 @@ assetic:
|
||||
debug: "%kernel.debug%"
|
||||
use_controller: "%kernel.debug%"
|
||||
bundles: ~
|
||||
node: /usr/bin/nodejs
|
||||
filters:
|
||||
cssrewrite: ~
|
||||
uglifyjs2:
|
||||
@@ -79,5 +85,23 @@ assetic:
|
||||
# FOS User Configuration
|
||||
fos_user:
|
||||
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
|
||||
firewall_name: main
|
||||
firewall_name: secured_area
|
||||
user_class: Jotunheimr\UserBundle\Entity\User
|
||||
|
||||
# Facebook OAuth
|
||||
hwi_oauth:
|
||||
firewall_names: [secured_area]
|
||||
resource_owners:
|
||||
facebook:
|
||||
type: facebook
|
||||
client_id: "%facebook.api%"
|
||||
client_secret: "%facebook.api-secret%"
|
||||
scope: "%facebook.scope%"
|
||||
options:
|
||||
display: popup
|
||||
auth_type: rerequest
|
||||
csrf: true
|
||||
|
||||
# Slack integration
|
||||
cl_slack:
|
||||
api_token: xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001
|
||||
|
||||
@@ -32,16 +32,9 @@ monolog:
|
||||
type: console
|
||||
channels: [!event, !doctrine]
|
||||
|
||||
# Facebook OAuth
|
||||
hwi_oauth:
|
||||
firewall_names: [secured_area]
|
||||
resource_owners:
|
||||
facebook:
|
||||
type: facebook
|
||||
client_id: 320599508311862
|
||||
client_secret: 18d4f48cdd274bccee2678e5eff3f557
|
||||
scope: "public_profile,email"
|
||||
options:
|
||||
display: popup
|
||||
auth_type: rerequest
|
||||
csrf: true
|
||||
parameters:
|
||||
facebook.api: 320599508311862
|
||||
facebook.api-secret: 18d4f48cdd274bccee2678e5eff3f557
|
||||
facebook.version: 'v2.8'
|
||||
facebook.scope: 'public_profile,email,user_friends'
|
||||
mineseeker.websocket: 6450
|
||||
|
||||
@@ -23,16 +23,9 @@ monolog:
|
||||
console:
|
||||
type: console
|
||||
|
||||
# Facebook OAuth
|
||||
hwi_oauth:
|
||||
firewall_names: [secured_area]
|
||||
resource_owners:
|
||||
facebook:
|
||||
type: facebook
|
||||
client_id: 320597498312063
|
||||
client_secret: c751bec8a3c5313ff2e5a83769bf1109
|
||||
scope: "public_profile,email"
|
||||
options:
|
||||
display: popup
|
||||
auth_type: rerequest
|
||||
csrf: true
|
||||
parameters:
|
||||
facebook.api: 320597498312063
|
||||
facebook.api-secret: c751bec8a3c5313ff2e5a83769bf1109
|
||||
facebook.version: 'v2.8'
|
||||
facebook.scope: 'public_profile,email,user_friends'
|
||||
mineseeker.websocket: 8080
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
parameters:
|
||||
database_host: 127.0.0.1
|
||||
database_port: null
|
||||
database_name: xxsvci_mineseeker
|
||||
database_user: xxsvci_mine
|
||||
database_password: "XTw#8qC$faa*"
|
||||
# database_name: xxsvci_mineseeker
|
||||
# database_user: xxsvci_mine
|
||||
# database_password: "XTw#8qC$faa*"
|
||||
database_name: mine
|
||||
database_user: root
|
||||
database_password: "bazmeg"
|
||||
mailer_transport: smtp
|
||||
mailer_host: 127.0.0.1
|
||||
mailer_user: null
|
||||
|
||||
@@ -12,3 +12,4 @@ _errors:
|
||||
|
||||
_main:
|
||||
resource: routing.yml
|
||||
schemes: [http]
|
||||
|
||||
@@ -21,13 +21,19 @@ security:
|
||||
login_path: /login
|
||||
failure_path: /login
|
||||
use_forward: false
|
||||
|
||||
oauth_user_provider:
|
||||
service: my.custom.user_provider
|
||||
service: jotun.user_provider
|
||||
remember_me:
|
||||
secret: "%secret%"
|
||||
lifetime: 604800
|
||||
path: /
|
||||
domain: ~
|
||||
user_provider: fos_userbundle
|
||||
form_login:
|
||||
provider: fos_userbundle
|
||||
csrf_token_generator: security.csrf.token_manager
|
||||
default_target_path: /
|
||||
remember_me: true
|
||||
logout:
|
||||
path: /logout
|
||||
target: /
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
"symfony/assetic-bundle": "^2.8",
|
||||
"predis/predis": "^1.0",
|
||||
"snc/redis-bundle": "^2.0",
|
||||
"hwi/oauth-bundle": "^0.5.1"
|
||||
"hwi/oauth-bundle": "^0.5.1",
|
||||
"cleentfaar/slack-bundle": "^0.20.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"sensio/generator-bundle": "^3.0",
|
||||
|
||||
597
composer.lock
generated
@@ -4,9 +4,122 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "9ab894ab9dec6a53088c8bea70e8ee9a",
|
||||
"content-hash": "06afd75cc129d2765a6803d384805417",
|
||||
"hash": "8325ddf53babcbda387208723c05a0f0",
|
||||
"content-hash": "d9f2a2a5e6279269f9f7c2cc1fe0573a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "cleentfaar/slack",
|
||||
"version": "0.20.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cleentfaar/slack.git",
|
||||
"reference": "ba7073cb79ccea423cd68f6a69096384a730a013"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cleentfaar/slack/zipball/ba7073cb79ccea423cd68f6a69096384a730a013",
|
||||
"reference": "ba7073cb79ccea423cd68f6a69096384a730a013",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/collections": "^1.2",
|
||||
"ext-curl": "*",
|
||||
"guzzlehttp/guzzle": "^6.0",
|
||||
"jms/serializer": "^1.0",
|
||||
"php": ">=5.5",
|
||||
"symfony/event-dispatcher": "^2.3|^3.0",
|
||||
"symfony/yaml": "^2.3|^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9",
|
||||
"phpunit/phpunit": "^4.7",
|
||||
"symfony/var-dumper": "^2.3|^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"cleentfaar/slack-bundle": "For easy integration with your Symfony projects",
|
||||
"cleentfaar/slack-cli": "Command-line application for interacting with the Slack API"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"CL\\Slack\\": "src/CL/Slack/",
|
||||
"CL\\Slack\\Test\\": "tests/src/CL/Slack/Test/",
|
||||
"CL\\Slack\\Tests\\": "tests/src/CL/Slack/Tests/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Cas Leentfaar",
|
||||
"email": "info@casleentfaar.com",
|
||||
"homepage": "https://github.com/cleentfaar"
|
||||
}
|
||||
],
|
||||
"description": "Access your Slack Team's API through PHP objects",
|
||||
"homepage": "http://cleentfaar.github.io/slack/",
|
||||
"keywords": [
|
||||
"chat",
|
||||
"slack",
|
||||
"slack api"
|
||||
],
|
||||
"time": "2016-05-30 21:02:28"
|
||||
},
|
||||
{
|
||||
"name": "cleentfaar/slack-bundle",
|
||||
"version": "0.20.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cleentfaar/CLSlackBundle.git",
|
||||
"reference": "f9fec94912a845f44d8de686ed06925168c1fc5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cleentfaar/CLSlackBundle/zipball/f9fec94912a845f44d8de686ed06925168c1fc5b",
|
||||
"reference": "f9fec94912a845f44d8de686ed06925168c1fc5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"cleentfaar/slack": "~0.20",
|
||||
"php": ">=5.5",
|
||||
"symfony/framework-bundle": "^2.3|^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"matthiasnoback/symfony-config-test": "^0.2",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^0.7",
|
||||
"phpunit/phpunit": "^4.0|^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"cleentfaar/slack-cli": "Command-line application for interacting with the Slack API"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"CL\\Bundle\\SlackBundle\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Cas Leentfaar",
|
||||
"email": "info@casleentfaar.com",
|
||||
"homepage": "https://github.com/cleentfaar"
|
||||
}
|
||||
],
|
||||
"description": "This bundle provides integration with the Slack API library, allowing you to interact with the Slack API from within your Symfony projects",
|
||||
"keywords": [
|
||||
"api",
|
||||
"bundle",
|
||||
"slack",
|
||||
"symfony"
|
||||
],
|
||||
"time": "2016-05-30 22:12:25"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
"version": "v1.2.7",
|
||||
@@ -1560,6 +1673,177 @@
|
||||
"abandoned": "guzzle/guzzle",
|
||||
"time": "2014-05-01 21:36:02"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
|
||||
"reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.3.1",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.0",
|
||||
"psr/log": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"keywords": [
|
||||
"client",
|
||||
"curl",
|
||||
"framework",
|
||||
"http",
|
||||
"http client",
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2016-10-08 15:01:37"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "2693c101803ca78b27972d84081d027fca790a1e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/2693c101803ca78b27972d84081d027fca790a1e",
|
||||
"reference": "2693c101803ca78b27972d84081d027fca790a1e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Promise\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"time": "2016-11-18 17:47:58"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Psr7\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation",
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"stream",
|
||||
"uri"
|
||||
],
|
||||
"time": "2016-06-24 23:00:38"
|
||||
},
|
||||
{
|
||||
"name": "hwi/oauth-bundle",
|
||||
"version": "0.5.1",
|
||||
@@ -1810,6 +2094,167 @@
|
||||
],
|
||||
"time": "2014-01-12 16:20:24"
|
||||
},
|
||||
{
|
||||
"name": "jms/metadata",
|
||||
"version": "1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/metadata.git",
|
||||
"reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab",
|
||||
"reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/cache": "~1.0",
|
||||
"symfony/cache": "~3.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.5.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Metadata\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Class/method/property metadata management in PHP",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"metadata",
|
||||
"xml",
|
||||
"yaml"
|
||||
],
|
||||
"time": "2016-12-05 10:18:33"
|
||||
},
|
||||
{
|
||||
"name": "jms/parser-lib",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/parser-lib.git",
|
||||
"reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d",
|
||||
"reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"phpoption/phpoption": ">=0.9,<2.0-dev"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"JMS\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache2"
|
||||
],
|
||||
"description": "A library for easily creating recursive-descent parsers.",
|
||||
"time": "2012-11-18 18:08:43"
|
||||
},
|
||||
{
|
||||
"name": "jms/serializer",
|
||||
"version": "1.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/serializer.git",
|
||||
"reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
|
||||
"reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/annotations": "^1.0",
|
||||
"doctrine/instantiator": "^1.0.3",
|
||||
"jms/metadata": "~1.1",
|
||||
"jms/parser-lib": "1.*",
|
||||
"php": ">=5.5.0",
|
||||
"phpcollection/phpcollection": "~0.1",
|
||||
"phpoption/phpoption": "^1.1"
|
||||
},
|
||||
"conflict": {
|
||||
"twig/twig": "<1.12"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/orm": "~2.1",
|
||||
"doctrine/phpcr-odm": "^1.3|^2.0",
|
||||
"ext-pdo_sqlite": "*",
|
||||
"jackalope/jackalope-doctrine-dbal": "^1.1.5",
|
||||
"phpunit/phpunit": "^4.8|^5.0",
|
||||
"propel/propel1": "~1.7",
|
||||
"symfony/filesystem": "^2.1",
|
||||
"symfony/form": "~2.1",
|
||||
"symfony/translation": "^2.1",
|
||||
"symfony/validator": "^2.2",
|
||||
"symfony/yaml": "^2.1",
|
||||
"twig/twig": "~1.12|~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "Required if you'd like to serialize data to YAML format."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"JMS\\Serializer": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache2"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
|
||||
"homepage": "http://jmsyst.com/libs/serializer",
|
||||
"keywords": [
|
||||
"deserialization",
|
||||
"jaxb",
|
||||
"json",
|
||||
"serialization",
|
||||
"xml"
|
||||
],
|
||||
"time": "2016-11-13 10:20:11"
|
||||
},
|
||||
{
|
||||
"name": "kriswallsmith/assetic",
|
||||
"version": "v1.3.2",
|
||||
@@ -2172,6 +2617,104 @@
|
||||
],
|
||||
"time": "2016-10-17 15:23:22"
|
||||
},
|
||||
{
|
||||
"name": "phpcollection/phpcollection",
|
||||
"version": "0.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/php-collection.git",
|
||||
"reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
|
||||
"reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"phpoption/phpoption": "1.*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"PhpCollection": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache2"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "General-Purpose Collection Library for PHP",
|
||||
"keywords": [
|
||||
"collection",
|
||||
"list",
|
||||
"map",
|
||||
"sequence",
|
||||
"set"
|
||||
],
|
||||
"time": "2015-05-17 12:39:23"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/php-option.git",
|
||||
"reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed",
|
||||
"reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.7.*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"PhpOption\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache2"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Option Type for PHP",
|
||||
"keywords": [
|
||||
"language",
|
||||
"option",
|
||||
"php",
|
||||
"type"
|
||||
],
|
||||
"time": "2015-07-25 16:39:46"
|
||||
},
|
||||
{
|
||||
"name": "predis/predis",
|
||||
"version": "v1.1.1",
|
||||
@@ -2268,6 +2811,56 @@
|
||||
],
|
||||
"time": "2016-08-06 20:24:11"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
"homepage": "https://github.com/php-fig/http-message",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-message",
|
||||
"psr",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"time": "2016-08-06 14:39:51"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
|
||||
@@ -9,9 +9,12 @@ hwi_oauth_login:
|
||||
|
||||
facebook_login:
|
||||
path: /login/check-facebook
|
||||
defaults: { _remember_me: on }
|
||||
|
||||
google_login:
|
||||
path: /login/check-google
|
||||
defaults: { _remember_me: on }
|
||||
|
||||
github_login:
|
||||
path: /login/check-github
|
||||
defaults: { _remember_me: on }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
services:
|
||||
my.custom.user_provider:
|
||||
jotun.user_provider:
|
||||
class: Jotunheimr\UserBundle\Security\Core\User\MyFOSUBUserProvider
|
||||
arguments: ['@fos_user.user_manager', { facebook: facebookId }, '@doctrine.orm.entity_manager']
|
||||
|
||||
@@ -28,109 +28,367 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
main {
|
||||
background: url('/bundles/mineseeker/images/homepage/header.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
position: fixed;
|
||||
.ac-custom {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
main .wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
main .wrapper .form-container {
|
||||
background: #ffffff;
|
||||
header section .form-check {
|
||||
display: table;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
main .wrapper .form-container h1 {
|
||||
font: normal 32px Arial, Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
|
||||
main .wrapper .form-container h1.sub-title {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
main .wrapper .form-container h2 {
|
||||
font: normal 18px Arial, Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
main .wrapper .form-container .form-input {
|
||||
background: #cbcbc8;
|
||||
min-width: 300px;
|
||||
border: 0;
|
||||
padding: 15px;
|
||||
header section h1 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
header section .input-submit button,
|
||||
header section .input-submit button:hover,
|
||||
header section .form-input,
|
||||
header section .form-input:focus,
|
||||
header section .form-input:hover {
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
main .wrapper .form-container .form-input:focus {
|
||||
background: #e2e2de;
|
||||
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
main .wrapper .form-container .form-input.form-username {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
main .wrapper .form-container .form-check {
|
||||
header section .input-submit button {
|
||||
background: #83aed9;
|
||||
display: table;
|
||||
position: relative;
|
||||
margin: 20px auto 0 auto;
|
||||
}
|
||||
|
||||
main .wrapper .form-container .input-submit {
|
||||
font: bold 32px 'Rajdhani', sans-serif;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
width: 500px;
|
||||
border: 1px solid #658fb8;
|
||||
color: #FFFFFF;
|
||||
padding: 25px 150px;
|
||||
margin-top: 20px;
|
||||
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
main .wrapper .form-container button,
|
||||
main .wrapper .form-container .fb-login {
|
||||
header section .input-submit button:hover {
|
||||
background: #86b5e1;
|
||||
|
||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
header section .form-input {
|
||||
display: block;
|
||||
background: #7dadcf;
|
||||
width: 500px;
|
||||
font: bold 22px 'Rajdhani', sans-serif;
|
||||
border: 1px solid #dddddd;
|
||||
color: #000000;
|
||||
padding: 15px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
header section .form-input:focus,
|
||||
header section .form-input:hover {
|
||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
header section .failure {
|
||||
background: #f00;
|
||||
position: relative;
|
||||
border: 3px solid #fff;
|
||||
font: bold 16px 'Rajdhani', sans-serif;
|
||||
color: #FFFFFF;
|
||||
padding: 10px;
|
||||
margin: 30px 0 10px 0;
|
||||
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
header section .failure:after,
|
||||
header section .failure:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50px;
|
||||
height: 0;
|
||||
width: 0;
|
||||
border: solid transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
header section .failure:after {
|
||||
border-color: rgba(0, 0, 0, 0);
|
||||
border-bottom-color: #f00;
|
||||
border-width: 20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
||||
header section .failure:before {
|
||||
border-color: rgba(255, 255, 255, 0);
|
||||
border-bottom-color: #ffffff;
|
||||
border-width: 26px;
|
||||
margin-left: -26px;
|
||||
}
|
||||
|
||||
header section .failure ul {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
header section h3.or {
|
||||
font: bold 16px 'Rajdhani', sans-serif;
|
||||
text-transform: uppercase;
|
||||
color: #a1a1a1;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
header section #id_welcome {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 115px;
|
||||
}
|
||||
|
||||
header section #id_welcome > div {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
header section #id_welcome img {
|
||||
width: 100px;
|
||||
border: 5px solid #414040;
|
||||
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
header section .buttons,
|
||||
header section form {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login,
|
||||
header section div.buttons > a.slack-login {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 500px;
|
||||
height: 93px;
|
||||
padding: 25px 0 25px 150px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login:hover,
|
||||
header section div.buttons > a.slack-login:hover {
|
||||
text-decoration: none;
|
||||
|
||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login i,
|
||||
header section div.buttons > a.slack-login i {
|
||||
position: absolute;
|
||||
font-size: 130px;
|
||||
top: 0;
|
||||
left: 15px;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login {
|
||||
background: #5975b1;
|
||||
border: 1px solid #50649f;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login:hover {
|
||||
background: #42598c;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
header section div.buttons > a.slack-login {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #5c3a58;
|
||||
color: #5c3a58;
|
||||
}
|
||||
|
||||
header section div.buttons > a.slack-login:hover {
|
||||
background: #e6e6e6;
|
||||
color: #5c3a58;
|
||||
}
|
||||
|
||||
header section .failure-main {
|
||||
background: #f00;
|
||||
max-width: 500px;
|
||||
border: 3px solid #fff;
|
||||
font: bold 16px 'Rajdhani', sans-serif;
|
||||
color: #FFFFFF;
|
||||
padding: 10px;
|
||||
margin: 0 0 20px 0;
|
||||
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
main div.txt {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
max-width: 1000px;
|
||||
font-family: 'Rajdhani', sans-serif;
|
||||
color: #414040;
|
||||
margin: 50px auto 0 auto;
|
||||
}
|
||||
|
||||
main div.txt h2 {
|
||||
margin: 0 0 50px 0;
|
||||
}
|
||||
|
||||
main div.txt p {
|
||||
font: normal 16px 'Rajdhani', sans-serif;
|
||||
}
|
||||
|
||||
main div.txt li {
|
||||
font: normal 16px 'Rajdhani', sans-serif;
|
||||
padding-left: 10px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
main .technologies {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
main .technologies img {
|
||||
display: inline-block;
|
||||
width: 90%;
|
||||
max-width: 100px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
main .technologies h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
footer {
|
||||
background: #414040;
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
footer nav {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer nav ul {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
footer nav ul li {
|
||||
display: inline-block;
|
||||
font: bold 16px 'Rajdhani', sans-serif;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
footer nav ul li:nth-child(even) {
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer nav ul li a {
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
footer nav ul li a:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1100px) {
|
||||
header section #id_welcome {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
header section .form-input,
|
||||
header section .form-check {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
header section .input-submit button {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header section > div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login,
|
||||
header section div.buttons > a.slack-login {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
main div.txt {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 550px) {
|
||||
header section #id_welcome {
|
||||
display: block;
|
||||
}
|
||||
|
||||
header section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
header section .form-input {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
header section .form-check {
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
header section .input-submit button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login,
|
||||
header section div.buttons > a.slack-login {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header section div.buttons > a.fb-login span,
|
||||
header section div.buttons > a.slack-login span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
footer nav ul li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
footer nav ul li:nth-child(even) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
main .wrapper .form-container .fb-login {
|
||||
background: #3b5998;
|
||||
}
|
||||
|
||||
main .wrapper .form-container button:focus,
|
||||
main .wrapper .form-container button:hover,
|
||||
main .wrapper .form-container .fb-login:focus,
|
||||
main .wrapper .form-container .fb-login:hover {
|
||||
background: #6fa0c3;
|
||||
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
main .wrapper .form-container button i,
|
||||
main .wrapper .form-container .fb-login i {
|
||||
font-size: 32px;
|
||||
font-weight: bolder;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,31 +2,62 @@
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block title %} - Sign up{% endblock %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
<div class="wrapper">
|
||||
<div class="form-container">
|
||||
<section class="header-content">
|
||||
<div class="logo">
|
||||
<a href="{{ path('MineSeekerBundle_homepage') }}" target="_self">
|
||||
<img src="{{ asset('bundles/mineseeker/images/mine-logo-txt.png') }}" alt="MineSeeker Logo w/ Txt"
|
||||
border="0"/>
|
||||
</a>
|
||||
</div>
|
||||
<h1> Sign up </h1>
|
||||
<div class="db">
|
||||
<form action="{{ path('fos_user_registration_register') }}"
|
||||
method="post">
|
||||
{{ form_widget(form._token) }}
|
||||
|
||||
{% if form_errors(form) is not empty %}
|
||||
<div class="failure-main">
|
||||
<i class="fa fa-exclamation-circle"></i> {{ form_errors(form) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
{{ form_widget(form.email, {'attr': {'placeholder': 'Email', 'class': 'form-input form-username'}}) }}
|
||||
{{ form_errors(form.email) }}
|
||||
{% if form_errors(form.email) is not empty %}
|
||||
<div class="failure">
|
||||
<i class="fa fa-exclamation-circle"></i> {{ form_errors(form.email) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ form_widget(form.username, {'attr': {'placeholder': 'Username ', 'class': 'form-input form-username'}}) }}
|
||||
{{ form_errors(form.username) }}
|
||||
{% if form_errors(form.username) is not empty %}
|
||||
<div class="failure">
|
||||
<i class="fa fa-exclamation-circle"></i> {{ form_errors(form.username) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ form_widget(form.plainPassword.first, {'attr': {'placeholder': 'Password', 'class': 'form-input form-username'}}) }}
|
||||
{{ form_errors(form.plainPassword.first) }}
|
||||
{% if form_errors(form.plainPassword.first) is not empty %}
|
||||
<div class="failure">
|
||||
<i class="fa fa-exclamation-circle"></i> {{ form_errors(form.plainPassword.first) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ form_widget(form.plainPassword.second, {'attr': {'placeholder': 'Repeat password', 'class': 'form-input'}}) }}
|
||||
{{ form_errors(form.plainPassword.second) }}
|
||||
{% if form_errors(form.plainPassword.second) is not empty %}
|
||||
<div class="failure">
|
||||
<i class="fa fa-exclamation-circle"></i> {{ form_errors(form.plainPassword.second) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="input-submit">
|
||||
@@ -36,18 +67,49 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h2><u><b>or</b></u> enter w/ your Facebook's e-mail</h2>
|
||||
<div class="fb">
|
||||
<h3 class="or">or login <u>w/ one click</u></h3>
|
||||
<div class="buttons">
|
||||
{% include('@JotunheimrUser/Social/facebook.html.twig') %}
|
||||
{#<a class="slack-login"#}
|
||||
{#href="https://slack.com/oauth/authorize?scope=identity.basic,identity.email,identity.team,identity.avatar&client_id=107639806167.106953365090&redirect_uri=http://mine.dev">#}
|
||||
{#<i class="fa fa-slack"></i><span>w/ Slack</span>#}
|
||||
{#</a>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{ asset('bundles/mineseeker/images/mine-logo-logo.png') }}" alt="MineSeeker Logo" border="0"/>
|
||||
</section>
|
||||
{% endblock fos_user_content %}
|
||||
|
||||
{% block body %}
|
||||
<div class="txt">
|
||||
<div class="technologies">
|
||||
<h1>Used technologies</h1>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/react.png') }}" alt="Used React.js" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/symfony.png') }}" alt="Used Symfony" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/jquery.png') }}" alt="Used jQuery" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt" border="0"/>
|
||||
</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 javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
{% javascripts
|
||||
{% javascripts filter='?uglifyjs2'
|
||||
'@JotunheimrUserBundle/Resources/public/js/register.js' %}
|
||||
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
@@ -56,7 +118,7 @@
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
||||
{% stylesheets filter='cssrewrite'
|
||||
{% stylesheets filter='?uglifycss'
|
||||
'@JotunheimrUserBundle/Resources/public/css/font-awesome/css/font-awesome.min.css'
|
||||
'@JotunheimrUserBundle/Resources/public/css/layout.css' %}
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_url }}"/>
|
||||
|
||||
@@ -2,30 +2,41 @@
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block title %} - Sign in{% endblock %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
{% if error %}
|
||||
{{ error.messageKey|trans(error.messageData, 'security') }}
|
||||
{% endif %}
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="form-container">
|
||||
<section class="header-content">
|
||||
<div class="logo">
|
||||
<a href="{{ path('MineSeekerBundle_homepage') }}" target="_self">
|
||||
<img src="{{ asset('bundles/mineseeker/images/mine-logo-txt.png') }}" alt="MineSeeker Logo w/ Txt"
|
||||
border="0"/>
|
||||
</a>
|
||||
</div>
|
||||
<h1>Sign in</h1>
|
||||
<div class="db">
|
||||
<form action="{{ path("fos_user_security_check") }}" method="post"
|
||||
class="ac-custom ac-checkbox ac-boxfill">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
|
||||
|
||||
<div>
|
||||
{% if csrf_token %}
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
|
||||
{% endif %}
|
||||
|
||||
{% if error %}
|
||||
<div class="failure-main">
|
||||
<i class="fa fa-exclamation-circle"></i> <strong>Login error!</strong> {{ error.messageKey|trans({}, 'messages') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}"
|
||||
class="form-input form-username"
|
||||
placeholder="Username or Email"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="password" id="password" name="_password"
|
||||
class="form-input"
|
||||
placeholder="Password"/>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="remember-me" name="_remember_me" value="on"/>
|
||||
@@ -38,19 +49,49 @@
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h2><u><b>or</b></u> enter w/ your Facebook's e-mail</h2>
|
||||
<div class="fb">
|
||||
<h3 class="or">or login <u>w/ one click</u></h3>
|
||||
<div class="buttons">
|
||||
{% include('@JotunheimrUser/Social/facebook.html.twig') %}
|
||||
{#<a class="slack-login"#}
|
||||
{#href="https://slack.com/oauth/authorize?scope=identity.basic,identity.email,identity.team,identity.avatar&client_id=107639806167.106953365090&redirect_uri=http://mine.dev">#}
|
||||
{#<i class="fa fa-slack"></i><span>w/ Slack</span>#}
|
||||
{#</a>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{ asset('bundles/mineseeker/images/mine-logo-logo.png') }}" alt="MineSeeker Logo" border="0"/>
|
||||
</section>
|
||||
{% endblock fos_user_content %}
|
||||
|
||||
{% block body %}
|
||||
<div class="txt">
|
||||
<div class="technologies">
|
||||
<h1>Used technologies</h1>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/react.png') }}" alt="Used React.js" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/symfony.png') }}" alt="Used Symfony" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/jquery.png') }}" alt="Used jQuery" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt" border="0"/>
|
||||
</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 javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
{% javascripts
|
||||
{% javascripts filter='?uglifyjs2'
|
||||
'@JotunheimrUserBundle/Resources/public/js/register.js'
|
||||
'@JotunheimrUserBundle/Resources/public/js/svgcheckbox.js' %}
|
||||
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||
@@ -60,7 +101,7 @@
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
||||
{% stylesheets filter='cssrewrite'
|
||||
{% stylesheets filter='?uglifycss'
|
||||
'@JotunheimrUserBundle/Resources/public/css/font-awesome/css/font-awesome.min.css'
|
||||
'@JotunheimrUserBundle/Resources/public/css/svgcheckbox.css' %}
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_url }}"/>
|
||||
|
||||
@@ -1,36 +1,3 @@
|
||||
<script>
|
||||
window.fbAsyncInit = function () {
|
||||
FB.init({
|
||||
appId: '320599508311862',
|
||||
xfbml: true,
|
||||
version: 'v2.8'
|
||||
});
|
||||
};
|
||||
|
||||
(function (d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {
|
||||
return;
|
||||
}
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
|
||||
function fbLogin() {
|
||||
FB.getLoginStatus(function (response) {
|
||||
if (response.status === 'connected') {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
} else {
|
||||
FB.login(function (response) {
|
||||
if (response.authResponse) {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
}
|
||||
}, {scope: 'email'});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<a class="fb-login" href="#" onclick="fbLogin();"><i class="fa fa-facebook"></i></a>
|
||||
<a id="fbLogin" class="fb-login">
|
||||
<i class="fa fa-facebook"></i><span>w/ Facebook</span>
|
||||
</a>
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{% block title %}{{ project_name }} Admin - Login{% endblock %}</title>
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
{% block stylesheets %}
|
||||
{% stylesheets filter='cssrewrite'
|
||||
'@JotunheimrUserBundle/Resources/public/css/layout.css'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/css/bootstrap.min.css' %}
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
||||
{% stylesheets filter='?uglifycss'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/css/bootstrap.min.css'
|
||||
'@MineSeekerBundle/Resources/public/css/style.homepage.css'
|
||||
'@JotunheimrUserBundle/Resources/public/css/layout.css' %}
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_url }}"/>
|
||||
{% endstylesheets %}
|
||||
{% endblock %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Gloria+Hallelujah" rel="stylesheet">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[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]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<link href="https://fonts.googleapis.com/css?family=Rajdhani:300,400,500,600,700&subset=latin-ext"
|
||||
rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% if app.request.hasPreviousSession %}
|
||||
{% block bodyTop %}
|
||||
{% if app.request.hasPreviousSession %}
|
||||
{% for type, messages in app.session.flashbag.all() %}
|
||||
{% for message in messages %}
|
||||
<div class="flash-{{ type }}">
|
||||
@@ -32,22 +23,35 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<main>
|
||||
{% block fos_user_content %}{% endblock fos_user_content %}
|
||||
<canvas id="demo-canvas"></canvas>
|
||||
</main>
|
||||
|
||||
{% 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'
|
||||
'@JotunheimrUserBundle/Resources/public/js/circle.js' %}
|
||||
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% block header %}
|
||||
{% block fos_user_content %}{% endblock fos_user_content %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"
|
||||
type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8});
|
||||
|
||||
$('#fbLogin').length && $('#fbLogin').on('click', function () {
|
||||
FB.getLoginStatus(function (response) {
|
||||
if (response.status === 'connected') {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
} else {
|
||||
FB.login(function (response) {
|
||||
if (response.authResponse) {
|
||||
document.location = "{{ url("hwi_oauth_service_redirect", {service: "facebook"}) }}";
|
||||
}
|
||||
}, {scope: '{{ facebook_scope }}'});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -74,8 +74,8 @@ class MyFOSUBUserProvider extends BaseFOSUBProvider
|
||||
$user->setFacebookId($response->getUsername());
|
||||
$user->setEmail($response->getEmail());
|
||||
$user->setEmailCanonical($response->getEmail());
|
||||
$user->setUsername($this->slugify($response->getRealName()));
|
||||
$user->setUsernameCanonical($this->slugify($response->getRealName()));
|
||||
$user->setUsername($this->slug($response->getRealName()));
|
||||
$user->setUsernameCanonical($this->slug($response->getRealName()));
|
||||
$user->setRealName($response->getRealName());
|
||||
$user->setNickName($response->getNickname());
|
||||
if ($empty) {
|
||||
@@ -88,25 +88,11 @@ class MyFOSUBUserProvider extends BaseFOSUBProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $text
|
||||
* @return mixed|string
|
||||
* @param $string
|
||||
* @return string
|
||||
*/
|
||||
private function slugify($text)
|
||||
private function slug($string)
|
||||
{
|
||||
$text = preg_replace('#[^\\pL\d]+#u', '-', $text);
|
||||
$text = trim($text, '-');
|
||||
|
||||
if (function_exists('iconv')) {
|
||||
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
|
||||
}
|
||||
|
||||
$text = strtolower($text);
|
||||
$text = preg_replace('#[^-\w]+#', '', $text);
|
||||
|
||||
if (empty($text)) {
|
||||
return 'n-a';
|
||||
}
|
||||
|
||||
return $text;
|
||||
return strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')), '-'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,24 +2,70 @@
|
||||
|
||||
namespace Mine\SeekerBundle\Controller;
|
||||
|
||||
//use CL\Slack\Payload\ChatPostMessagePayload;
|
||||
//use CL\Slack\Payload\UsersListPayload;
|
||||
//use CL\Slack\Transport\ApiClient;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class GameController extends Controller
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
// $apiClient = new ApiClient('xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001');
|
||||
//
|
||||
// $usersListPayload = new UsersListPayload();
|
||||
// $usersList = $apiClient->send($usersListPayload);
|
||||
//
|
||||
// dump($usersList);
|
||||
//
|
||||
// $payload = new ChatPostMessagePayload();
|
||||
// $payload->setChannel('#general');
|
||||
// $payload->setAsUser(true);
|
||||
// $payload->setText('Hello world!');
|
||||
|
||||
// $response = $apiClient->send($payload);
|
||||
|
||||
// if ($response->isOk()) {
|
||||
// dump('bazmeg');
|
||||
// } else {
|
||||
// dump($response->getError());
|
||||
// dump($response->getErrorExplanation());
|
||||
// }
|
||||
|
||||
return $this->render('MineSeekerBundle:Game:index.html.twig');
|
||||
}
|
||||
|
||||
public function playAction()
|
||||
public function playAction(Request $request)
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Game:play.html.twig', array(
|
||||
'env' => $this->container->getParameter('kernel.environment')
|
||||
'env' => $this->container->getParameter('kernel.environment'),
|
||||
'ssl' => $request->isSecure() ? 'true' : 'false'
|
||||
));
|
||||
}
|
||||
|
||||
public function listAction()
|
||||
public function slackAction(Request $request)
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Game:list.html.twig');
|
||||
|
||||
}
|
||||
|
||||
public function privacyAction()
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Official:privacy.html.twig');
|
||||
}
|
||||
|
||||
public function termsAction()
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Official:terms.html.twig');
|
||||
}
|
||||
|
||||
public function contactAction()
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Official:contact.html.twig');
|
||||
}
|
||||
|
||||
public function landingAction()
|
||||
{
|
||||
return $this->render('MineSeekerBundle:Official:landing.html.twig');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,13 @@ class Gamer
|
||||
*/
|
||||
private $userAgent;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="conn_timestamp", type="datetime", nullable=false)
|
||||
*/
|
||||
private $connTimestamp;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -180,4 +187,28 @@ class Gamer
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set connTimestamp
|
||||
*
|
||||
* @param \DateTime $connTimestamp
|
||||
*
|
||||
* @return Gamer
|
||||
*/
|
||||
public function setConnTimestamp($connTimestamp)
|
||||
{
|
||||
$this->connTimestamp = $connTimestamp;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get connTimestamp
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getConnTimestamp()
|
||||
{
|
||||
return $this->connTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,13 @@ class Gamer
|
||||
*/
|
||||
private $userAgent;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="conn_timestamp", type="datetime", nullable=false)
|
||||
*/
|
||||
private $connTimestamp;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -180,4 +187,28 @@ class Gamer
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set connTimestamp
|
||||
*
|
||||
* @param \DateTime $connTimestamp
|
||||
*
|
||||
* @return Gamer
|
||||
*/
|
||||
public function setConnTimestamp($connTimestamp)
|
||||
{
|
||||
$this->connTimestamp = $connTimestamp;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get connTimestamp
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getConnTimestamp()
|
||||
{
|
||||
return $this->connTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,20 @@ class PlayedGame
|
||||
*/
|
||||
private $resign;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Step
|
||||
*
|
||||
@@ -429,4 +443,52 @@ class PlayedGame
|
||||
{
|
||||
return $this->resign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set updated
|
||||
*
|
||||
* @param \DateTime $updated
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setUpdated($updated)
|
||||
{
|
||||
$this->updated = $updated;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdated()
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,20 @@ class PlayedGame
|
||||
*/
|
||||
private $resign;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Step
|
||||
*
|
||||
@@ -405,4 +419,28 @@ class PlayedGame
|
||||
{
|
||||
return $this->step;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set resign
|
||||
*
|
||||
* @param string $resign
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setResign($resign)
|
||||
{
|
||||
$this->resign = $resign;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get resign
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResign()
|
||||
{
|
||||
return $this->resign;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,13 @@ class Step
|
||||
*/
|
||||
private $playedGame;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
@@ -155,4 +162,28 @@ class Step
|
||||
{
|
||||
return $this->wBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set created
|
||||
*
|
||||
* @param \DateTime $created
|
||||
*
|
||||
* @return Step
|
||||
*/
|
||||
public function setCreated($created)
|
||||
{
|
||||
$this->created = $created;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreated()
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,13 @@ class Step
|
||||
*/
|
||||
private $playedGame;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
|
||||
36
src/Mine/SeekerBundle/Periodic/MinePeriodic.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Mine\SeekerBundle\Periodic;
|
||||
|
||||
use Gos\Bundle\WebSocketBundle\Periodic\PdoPeriodicPing;
|
||||
use Gos\Bundle\WebSocketBundle\Periodic\PeriodicInterface;
|
||||
use PDO;
|
||||
|
||||
class MinePeriodic implements PeriodicInterface
|
||||
{
|
||||
/** @var PdoPeriodicPing */
|
||||
private $ping;
|
||||
|
||||
public function __construct(PdoPeriodicPing $ping)
|
||||
{
|
||||
$this->ping = $ping;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is executed every 5 seconds.
|
||||
*
|
||||
* For more advanced functionality, try injecting a Topic Service to perform actions on your connections every x seconds.
|
||||
*/
|
||||
public function tick()
|
||||
{
|
||||
$this->ping->tick();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTimeout()
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,14 @@
|
||||
# PDO Session Handler Configuration !!!!! --> moved to main config.yml
|
||||
#framework:
|
||||
# session:
|
||||
# handler_id: session.handler.pdo
|
||||
|
||||
# Doctrine cache --> instead of PREDIS (gos_web_socket > client > storage > driver)
|
||||
#doctrine_cache:
|
||||
# providers:
|
||||
# redis_cache:
|
||||
# redis:
|
||||
# host: localhost
|
||||
# port: 6379
|
||||
# database: 3
|
||||
# websocket_cache_client:
|
||||
# type: redis
|
||||
# alias: gos_web_socket.client_storage.driver.redis
|
||||
doctrine_cache:
|
||||
providers:
|
||||
redis_cache:
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
database: 3
|
||||
websocket_cache_client:
|
||||
type: redis
|
||||
alias: gos_web_socket.client_storage.driver.redis
|
||||
|
||||
# SNC
|
||||
snc_redis:
|
||||
@@ -32,7 +27,7 @@ snc_redis:
|
||||
gos_web_socket:
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
port: 6450
|
||||
port: "%mineseeker.websocket%"
|
||||
router:
|
||||
resources:
|
||||
- "@MineSeekerBundle/Resources/config/pubsub/routing.yml"
|
||||
@@ -41,4 +36,7 @@ gos_web_socket:
|
||||
session_handler: "@session.handler.pdo"
|
||||
storage:
|
||||
driver: "@gos_web_socket.client_storage.driver.predis"
|
||||
decorator: "@gos_web_socket.client_storage.doctrine.decorator"
|
||||
ttl: 28800 #(optionally) time to live if you use redis driver
|
||||
prefix: client #(optionally) prefix if you use redis driver, create key "client:1" instead key "1"
|
||||
periodic:
|
||||
- "@mineseeker.periodic"
|
||||
|
||||
@@ -1,16 +1,39 @@
|
||||
MineSeekerBundle_homepage:
|
||||
path: /
|
||||
defaults: { _controller: MineSeekerBundle:Game:index }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_gamePlay:
|
||||
path: /play
|
||||
defaults: { _controller: MineSeekerBundle:Game:play }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_gamePlayWId:
|
||||
path: /play/{gameAssoc}
|
||||
defaults: { _controller: MineSeekerBundle:Game:play }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_gameList:
|
||||
path: /list
|
||||
defaults: { _controller: MineSeekerBundle:Game:list }
|
||||
MineSeekerBundle_slack:
|
||||
path: /slack
|
||||
defaults: { _controller: MineSeekerBundle:Game:slack }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_terms:
|
||||
path: /terms-of-service
|
||||
defaults: { _controller: MineSeekerBundle:Game:terms }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_privacy:
|
||||
path: /privacy-policy
|
||||
defaults: { _controller: MineSeekerBundle:Game:privacy }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_contact:
|
||||
path: /contact
|
||||
defaults: { _controller: MineSeekerBundle:Game:contact }
|
||||
schemes: [https]
|
||||
|
||||
MineSeekerBundle_landing:
|
||||
path: /landing-page
|
||||
defaults: { _controller: MineSeekerBundle:Game:landing }
|
||||
schemes: [https]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
services:
|
||||
|
||||
pdo:
|
||||
class: PDO
|
||||
arguments:
|
||||
@@ -20,11 +19,12 @@ services:
|
||||
arguments:
|
||||
- "@snc_redis.cache"
|
||||
|
||||
# config.yml --> gos_web_socket > storage > client > decorator
|
||||
gos_web_socket.client_storage.doctrine.decorator:
|
||||
class: Gos\Bundle\WebSocketBundle\Client\Driver\DoctrineCacheDriverDecorator
|
||||
mineseeker.periodic:
|
||||
class: Mine\SeekerBundle\Periodic\MinePeriodic
|
||||
tags:
|
||||
- { name: gos_web_socket.periodic }
|
||||
arguments:
|
||||
- "@doctrine_cache.providers.doctrine.orm.default_result_cache"
|
||||
ping: '@gos_web_socket.pdo.periodic_ping'
|
||||
|
||||
mineseeker.topic_sample_service:
|
||||
class: Mine\SeekerBundle\Topic\MineseekerTopic
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700|Ravi+Prakash&subset=latin-ext');
|
||||
/*
|
||||
font-family: 'Ravi Prakash', cursive;
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
*/
|
||||
|
||||
* {
|
||||
outline: none;
|
||||
padding: 0;
|
||||
@@ -11,59 +5,93 @@ font-family: 'Open Sans Condensed', sans-serif;
|
||||
}
|
||||
|
||||
html, body {
|
||||
background: #2C3E50;
|
||||
background: #ffffff;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
background: rgba(255, 255, 255, 0.7) url('/bundles/mineseeker/images/homepage/header.jpg') no-repeat;
|
||||
background-size: cover;
|
||||
background: #d1e8ff;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 950px;
|
||||
color: #ffffff;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
display: block;
|
||||
font: normal 72px 'Ravi Prakash', cursive;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
color: #ffa800;
|
||||
header section {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
max-width: 1300px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header section div.logo img {
|
||||
width: 350px;
|
||||
margin: 50px 0;
|
||||
}
|
||||
|
||||
header section div.logo a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
header section > img {
|
||||
position: absolute;
|
||||
width: 1300px;
|
||||
height: 1300px;
|
||||
right: -20%;
|
||||
top: -10%;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
header section > div {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
header h3 {
|
||||
display: block;
|
||||
font: normal 32px 'Open Sans Condensed', sans-serif;
|
||||
text-align: center;
|
||||
color: #ffcd02;
|
||||
|
||||
z-index: 2;
|
||||
header section h1 {
|
||||
font: bold 40px 'Rajdhani', sans-serif;
|
||||
color: #434242;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
header > a {
|
||||
background: #e8e8e8;
|
||||
header section h2 {
|
||||
font: normal 32px 'Rajdhani', sans-serif;
|
||||
color: #434242;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
header section h3 {
|
||||
display: block;
|
||||
font: bold 22px 'Open Sans Condensed', sans-serif;
|
||||
font: bold 16px 'Rajdhani', sans-serif;
|
||||
color: #434242;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
header section h3 img {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
header section div.buttons > a {
|
||||
background: #69788e;
|
||||
display: table;
|
||||
font: bold 32px 'Rajdhani', sans-serif;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
color: #2C3E50;
|
||||
padding: 10px 70px;
|
||||
margin-top: 20px;
|
||||
border: 5px solid #57667b;
|
||||
color: #FFFFFF;
|
||||
padding: 25px 150px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
z-index: 2;
|
||||
|
||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75);
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
@@ -72,36 +100,87 @@ header > a {
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
header > a:hover {
|
||||
background: #ffffff;
|
||||
header section div.buttons > a:hover {
|
||||
background: #57667b;
|
||||
|
||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.75);
|
||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
header > img {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
max-width: 1000px;
|
||||
bottom: -25%;
|
||||
header section div.buttons > a.small {
|
||||
background: #83aed9;
|
||||
display: inline-block;
|
||||
font: bold 22px 'Rajdhani', sans-serif;
|
||||
border: 1px solid #6890ba;
|
||||
color: #FFFFFF;
|
||||
padding: 10px;
|
||||
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1500px) {
|
||||
header > img {
|
||||
width: 60%;
|
||||
bottom: -40%;
|
||||
header section div.buttons > a.small:hover {
|
||||
background: #86b5e1;
|
||||
border: 1px solid #658fb8;
|
||||
color: #FFFFFF;
|
||||
|
||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
||||
-webkit-transition: all 250ms ease-in-out;
|
||||
-moz-transition: all 250ms ease-in-out;
|
||||
-o-transition: all 250ms ease-in-out;
|
||||
transition: all 250ms ease-in-out;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1100px) {
|
||||
header section {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header section div.buttons > a {
|
||||
margin: 0 auto 20px auto;
|
||||
}
|
||||
|
||||
header section h1 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
header section div.logo img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
header section > img {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1500px) {
|
||||
header > img {
|
||||
width: 70%;
|
||||
bottom: -20%;
|
||||
@media screen and (max-width: 500px) {
|
||||
/*header {*/
|
||||
/*min-height: 100%;*/
|
||||
/*height: auto;*/
|
||||
/*}*/
|
||||
|
||||
header section {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header section div.logo img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header section div.buttons > a {
|
||||
display: block;
|
||||
padding: 25px 5px;
|
||||
}
|
||||
}
|
||||
@@ -96,51 +96,37 @@ main {
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h1 {
|
||||
font-weight: bold;
|
||||
font-size: 32px;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h2 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h3 {
|
||||
font-size: 16px;
|
||||
color: #386e8c;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .clippy {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .clippy input {
|
||||
border: 0;
|
||||
height: 40px;
|
||||
width: 90%;
|
||||
width: 100%;
|
||||
padding: 0 20px;
|
||||
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .clippy button {
|
||||
border: 0;
|
||||
width: 10%;
|
||||
height: 40px;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .clippy button img {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper .game-overlay .game-overlay-window a {
|
||||
background: #d8e3ea;
|
||||
display: inline-table;
|
||||
@@ -326,7 +312,6 @@ main {
|
||||
color: #fdf612;
|
||||
}
|
||||
|
||||
|
||||
#mine-wrapper .game-wrapper .users .user-container .user-control {
|
||||
background: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.5) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
background: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.5) 0%, rgba(125, 185, 232, 0) 100%);
|
||||
@@ -734,7 +719,7 @@ main {
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 642px;
|
||||
width: 643px;
|
||||
border: 1px solid #cac3e5;
|
||||
|
||||
cursor: none;
|
||||
@@ -973,3 +958,70 @@ main {
|
||||
#mine-wrapper .grid .field-wrapper .field img {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.back-from-game {
|
||||
display: inline-block;
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
|
||||
-ms-transform: scale(1); /* IE 9 */
|
||||
-webkit-transform: scale(1); /* Safari */
|
||||
transform: scale(1);
|
||||
-webkit-transition: all 250ms cubic-bezier(.17, .67, .83, .67);
|
||||
transition: all 250ms cubic-bezier(.17, .67, .83, .67);
|
||||
}
|
||||
|
||||
.back-from-game img {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.back-from-game:hover {
|
||||
-ms-transform: scale(1.2); /* IE 9 */
|
||||
-webkit-transform: scale(1.2); /* Safari */
|
||||
transform: scale(1.2);
|
||||
-webkit-transition: all 250ms cubic-bezier(.17, .67, .83, .67);
|
||||
transition: all 250ms cubic-bezier(.17, .67, .83, .67);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
#mine-wrapper .game-wrapper .users {
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mine-wrapper {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mine-wrapper .game-wrapper {
|
||||
width: 100%;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
#mine-wrapper .grid-container {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#mine-wrapper .grid {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mine-wrapper .grid .field-wrapper {
|
||||
width: 6.25%;
|
||||
}
|
||||
|
||||
#mine-wrapper .grid .field-wrapper > img.field-target {
|
||||
width: 105%;
|
||||
top: -2.5%;
|
||||
left: -2.5%;
|
||||
}
|
||||
|
||||
#mine-wrapper .grid .field-wrapper .field {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 282 KiB |
|
Before Width: | Height: | Size: 456 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#2d89ef</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png"
|
||||
},
|
||||
{
|
||||
"src": "\/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image\/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M3149 4510 c-26 -4 -56 -13 -67 -19 -33 -18 -103 -102 -185 -222 -68
|
||||
-101 -77 -119 -77 -159 1 -142 80 -271 198 -322 116 -50 347 -94 452 -86 74 5
|
||||
110 35 141 117 32 85 61 236 62 331 2 76 -1 91 -26 138 -53 101 -159 181 -277
|
||||
210 -66 16 -169 22 -221 12z m276 -59 c105 -47 168 -125 145 -181 -37 -89
|
||||
-235 -64 -347 44 -44 44 -53 58 -53 88 0 22 7 41 20 53 41 37 146 35 235 -4z"/>
|
||||
<path d="M1178 4417 c-157 -54 -300 -205 -353 -373 -17 -56 -18 -62 -2 -123
|
||||
10 -35 54 -138 100 -229 91 -183 96 -188 210 -223 52 -16 87 -20 155 -17 119
|
||||
5 161 27 288 153 112 111 186 207 239 306 44 84 46 128 7 190 -63 99 -318 303
|
||||
-409 328 -64 18 -162 13 -235 -12z m127 -62 c96 -95 -122 -346 -299 -345 -86
|
||||
1 -116 43 -90 130 20 68 114 168 196 210 81 40 157 42 193 5z"/>
|
||||
<path d="M2420 4340 c-129 -12 -283 -44 -412 -87 -144 -47 -145 -48 -108 -101
|
||||
16 -24 30 -48 32 -53 2 -6 34 2 73 17 215 81 317 99 551 98 l191 0 36 55 37
|
||||
56 -31 6 c-56 12 -274 17 -369 9z"/>
|
||||
<path d="M2555 4120 c-88 -4 -185 -12 -215 -19 -61 -13 -117 -43 -127 -67 -9
|
||||
-23 34 -62 112 -101 89 -45 136 -82 160 -127 35 -64 4 -80 -316 -159 -276 -69
|
||||
-430 -121 -572 -194 -240 -123 -414 -296 -503 -502 l-27 -62 24 -102 c19 -79
|
||||
24 -130 24 -227 0 -140 -13 -182 -75 -253 l-32 -37 17 -103 c9 -56 23 -128 31
|
||||
-161 8 -32 13 -60 10 -63 -6 -6 -74 209 -83 260 -3 21 -9 36 -12 35 -76 -35
|
||||
-110 -56 -110 -68 -1 -44 121 -361 165 -427 l14 -23 48 34 c150 107 343 155
|
||||
485 122 91 -21 167 -61 287 -152 170 -128 330 -299 395 -419 30 -57 33 -130 9
|
||||
-201 -13 -39 -13 -48 -2 -55 18 -12 216 -11 318 1 47 6 131 20 187 31 l103 22
|
||||
-6 66 c-5 56 -3 76 15 115 73 166 393 468 593 561 28 13 82 29 120 36 68 12
|
||||
94 10 248 -18 23 -4 30 3 72 84 77 147 142 343 166 505 9 56 8 58 -24 89 -71
|
||||
69 -157 283 -190 471 -13 75 -14 102 -4 154 20 105 86 199 199 285 l34 25 -53
|
||||
80 c-29 43 -73 104 -98 134 -53 64 -194 210 -203 210 -3 0 -14 -29 -23 -64
|
||||
-23 -82 -76 -168 -124 -198 -34 -21 -48 -23 -172 -23 -114 1 -153 5 -248 29
|
||||
-63 15 -140 39 -173 51 -154 61 -237 173 -269 363 -6 39 -13 71 -13 70 -1 -1
|
||||
-74 -4 -162 -8z m-585 -1285 c190 -109 351 -204 359 -211 13 -12 9 -20 -26
|
||||
-61 -219 -261 -623 -198 -754 117 -19 45 -23 74 -23 160 -1 94 2 111 26 164
|
||||
27 56 29 58 50 44 13 -8 178 -104 368 -213z m1648 67 c38 -279 -183 -517 -465
|
||||
-499 -129 8 -251 73 -322 172 l-31 44 42 25 c24 13 196 113 383 220 l340 196
|
||||
22 -48 c13 -27 27 -76 31 -110z"/>
|
||||
<path d="M972 3323 c-39 -86 -102 -262 -102 -287 0 -9 110 -42 115 -33 1 1 14
|
||||
40 29 87 15 47 47 127 72 179 24 52 42 96 39 99 -4 4 -104 42 -111 42 0 0 -19
|
||||
-39 -42 -87z"/>
|
||||
<path d="M4094 3357 c-62 -46 -102 -96 -130 -162 -41 -99 26 -390 126 -548 38
|
||||
-60 79 -73 177 -56 79 14 214 59 294 99 91 47 159 172 159 295 -1 97 -52 235
|
||||
-120 317 -37 45 -100 63 -286 83 -77 8 -144 15 -150 15 -7 0 -38 -19 -70 -43z
|
||||
m535 -162 c74 -85 82 -272 14 -347 -9 -10 -30 -18 -49 -18 -113 0 -169 280
|
||||
-77 382 27 31 76 23 112 -17z"/>
|
||||
<path d="M695 2915 c-122 -26 -146 -36 -183 -73 -79 -79 -109 -201 -78 -322
|
||||
36 -141 68 -166 269 -220 106 -28 118 -30 149 -17 58 25 116 75 145 124 26 45
|
||||
28 55 27 153 0 180 -48 339 -106 359 -41 14 -149 13 -223 -4z m-128 -140 c97
|
||||
-68 42 -354 -61 -316 -76 28 -86 226 -16 301 32 34 46 37 77 15z"/>
|
||||
<path d="M4290 2500 c-14 -4 -41 -8 -61 -9 -41 -1 -49 -12 -49 -69 0 -128 -88
|
||||
-443 -165 -592 -8 -16 -15 -31 -15 -34 0 -7 102 -78 106 -74 16 16 118 251
|
||||
142 328 49 153 100 462 76 459 -5 -1 -20 -5 -34 -9z"/>
|
||||
<path d="M1355 1779 c-42 -10 -188 -79 -218 -103 -37 -29 -166 -427 -174 -537
|
||||
-5 -73 -4 -79 31 -145 90 -170 264 -315 432 -359 116 -30 277 -12 354 39 61
|
||||
41 191 168 270 263 88 106 131 185 137 251 4 42 0 54 -37 112 -50 77 -256 285
|
||||
-355 358 -38 29 -101 69 -140 89 -65 34 -77 37 -165 40 -52 1 -113 -2 -135 -8z
|
||||
m-35 -711 c188 -57 343 -239 290 -339 -34 -63 -168 -66 -290 -8 -136 66 -230
|
||||
171 -230 259 0 36 5 52 24 69 43 40 115 47 206 19z"/>
|
||||
<path d="M3530 1767 c-76 -32 -149 -81 -256 -169 -162 -135 -324 -331 -324
|
||||
-392 0 -101 135 -290 328 -461 119 -105 160 -120 317 -119 125 0 195 21 302
|
||||
90 113 72 247 235 278 339 21 67 0 171 -83 410 l-68 198 -64 38 c-105 64 -163
|
||||
82 -275 86 -87 3 -107 1 -155 -20z m481 -703 c52 -26 62 -81 27 -152 -32 -67
|
||||
-116 -144 -204 -187 -62 -31 -91 -39 -152 -43 -88 -6 -133 12 -153 60 -35 84
|
||||
79 232 233 303 101 46 185 53 249 19z"/>
|
||||
<path d="M2855 984 c-121 -27 -308 -37 -438 -25 -67 7 -140 16 -162 21 -45 10
|
||||
-49 8 -93 -54 l-32 -44 67 -15 c199 -45 524 -48 712 -8 51 11 95 22 97 24 5 5
|
||||
-74 112 -84 113 -4 1 -34 -5 -67 -12z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 388 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 321 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/homepage/mineseeker-1.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 302 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/homepage/mineseeker-2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 450 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 9.5 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/mine-1600x627.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/mine-logo-logo.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/mine-logo-txt.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
src/Mine/SeekerBundle/Resources/public/images/msn-logo.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
@@ -4,6 +4,7 @@ import MineSeeker from './mine-seeker/app';
|
||||
|
||||
ReactDOM.render(
|
||||
<MineSeeker env={document.getElementById('mine-wrapper').dataset.env}
|
||||
gameId={document.getElementById('mine-wrapper').dataset.gameId}/>,
|
||||
gameId={document.getElementById('mine-wrapper').dataset.gameId}
|
||||
ssl={document.getElementById('mine-wrapper').dataset.ssl}/>,
|
||||
document.getElementById('mine-wrapper')
|
||||
);
|
||||
|
||||
@@ -11,13 +11,15 @@ class MineSeeker extends React.Component {
|
||||
|
||||
this.state = {
|
||||
env: props.env,
|
||||
ssl: props.ssl,
|
||||
gameInherited: props.gameId !== '',
|
||||
gameAssoc: gameAssoc,
|
||||
channel: channel,
|
||||
session: null,
|
||||
createGrid: false,
|
||||
stepCache: [],
|
||||
disconnect: false
|
||||
connectionLost: false,
|
||||
end: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +32,24 @@ class MineSeeker extends React.Component {
|
||||
return text;
|
||||
}
|
||||
|
||||
/** STEP */
|
||||
currectGridSize() {
|
||||
let $field = $('#mine-wrapper .grid');
|
||||
$field.height($field.width());
|
||||
|
||||
$field = $('#mine-wrapper .grid .field-wrapper');
|
||||
$field.height($field.width());
|
||||
|
||||
$('#mine-wrapper .grid .field-wrapper .field')
|
||||
.height($field.width())
|
||||
.css('line-height', ($field.width() - 2) + 'px');
|
||||
}
|
||||
|
||||
/**
|
||||
* STEP
|
||||
*
|
||||
* @param coords
|
||||
* @returns {{red: *, blue: *}}
|
||||
*/
|
||||
makePointsCalcAndStep(coords) {
|
||||
let users = this.refs.gridControl.refs.userControl,
|
||||
activePlayer = users.state.activePlayer ? 'blue' : 'red',
|
||||
@@ -51,7 +70,38 @@ class MineSeeker extends React.Component {
|
||||
return {red: redPoints, blue: bluePoints};
|
||||
}
|
||||
|
||||
/** THE END */
|
||||
/**
|
||||
* START
|
||||
*
|
||||
* @param payload
|
||||
*/
|
||||
makeGameStart(payload) {
|
||||
/** every time the blue starts */
|
||||
this.refs.gridControl.refs.userControl.setState({activePlayer: 1});
|
||||
|
||||
/** Set up player names w/ server data */
|
||||
this.refs.gridControl.refs.userControl.refs.red.setState({
|
||||
name: payload.users.red !== '' ? payload.users.red : payload.users.redAnon,
|
||||
});
|
||||
|
||||
this.refs.gridControl.refs.userControl.refs.blue.setState({
|
||||
name: payload.users.blue !== '' ? payload.users.blue : payload.users.blueAnon,
|
||||
desc: this.refs.gridControl.state.webPlayer === 'blue'
|
||||
? this.refs.gridControl.state.desc.you
|
||||
: this.refs.gridControl.state.desc.buddy,
|
||||
active: true,
|
||||
});
|
||||
|
||||
this.refs.gridControl.setState({overlay: false});
|
||||
}
|
||||
|
||||
/**
|
||||
* THE END
|
||||
*
|
||||
* @param bluePoints
|
||||
* @param redPoints
|
||||
* @param resign
|
||||
*/
|
||||
makeGameEndIfItEnds(bluePoints, redPoints, resign = false) {
|
||||
let redWins = redPoints > 25,
|
||||
blueWins = bluePoints > 25;
|
||||
@@ -86,10 +136,13 @@ class MineSeeker extends React.Component {
|
||||
: "You WIN!"
|
||||
});
|
||||
|
||||
this.setState({end: true});
|
||||
|
||||
this.makeGameEndIfItEnds(0, 0, true);
|
||||
}
|
||||
|
||||
clickResign() {
|
||||
/** PUBLISH */
|
||||
this.state.session.publish(this.state.channel, {
|
||||
'resign': this.refs.gridControl.refs.userControl.state.activePlayer ? 'blue' : 'red'
|
||||
});
|
||||
@@ -119,13 +172,34 @@ class MineSeeker extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
|
||||
* @see https://developers.facebook.com/docs/sharing/reference/send-dialog
|
||||
* @see https://developers.facebook.com/docs/plugins/share-button/
|
||||
*/
|
||||
clickFBShare() {
|
||||
let display = 'popup';
|
||||
|
||||
FB.getLoginStatus(function (response) {
|
||||
display = response.status === 'connected'
|
||||
? 'dialog'
|
||||
: 'popup';
|
||||
});
|
||||
|
||||
FB.ui({
|
||||
method: 'send',
|
||||
display: display,
|
||||
link: window.location.href + '/' + this.state.gameAssoc,
|
||||
});
|
||||
}
|
||||
|
||||
wInit(session, gridServer, gridClient) {
|
||||
this.setState({session: session});
|
||||
|
||||
/** save session to GridControl */
|
||||
/** render grid fields - #12 */
|
||||
/** render grid fields - @see #12 */
|
||||
this.refs.gridControl.setState({
|
||||
grid: this.state.gameInherited ? JSON.parse(Base64.decode(gridServer)) : gridClient,
|
||||
grid: this.state.gameInherited ? gridServer : gridClient,
|
||||
channel: this.state.channel,
|
||||
desc: {
|
||||
buddy: <div>
|
||||
@@ -143,53 +217,51 @@ class MineSeeker extends React.Component {
|
||||
overlaySubTitle: this.state.gameAssoc
|
||||
?
|
||||
<div>
|
||||
<h3>Share this unique link w/ your opponent</h3>
|
||||
<div className="clippy">
|
||||
<input id="foo"
|
||||
defaultValue={window.location.href + '/' + this.state.gameAssoc}/>
|
||||
<button className="btn">
|
||||
<img src="/bundles/mineseeker/images/clippy.svg" alt="Copy to clipboard"/>
|
||||
</button>
|
||||
</div>
|
||||
{this.state.env !== 'dev' &&
|
||||
<a onClick={this.clickFBShare.bind(this)}>Share in Facebook message</a>
|
||||
}
|
||||
{this.state.env === 'dev' &&
|
||||
<a href={"/play/" + this.state.gameAssoc} target="_blank">Play w/ me!</a>
|
||||
}
|
||||
</div>
|
||||
: '',
|
||||
renderGridFields: this.state.gameAssoc
|
||||
});
|
||||
}
|
||||
|
||||
wSubscribe(payload) {
|
||||
wSubscribe(payload, rpcUsers = null) {
|
||||
this.state.env === 'dev' && console.info(
|
||||
(typeof payload.user !== 'undefined' ? payload.user : 'user') + " has been subscribed to the channel!"
|
||||
);
|
||||
|
||||
if (!this.state.disconnect) {
|
||||
/** setup the web player */
|
||||
null === this.refs.gridControl.state.webPlayer && this.refs.gridControl.setState({
|
||||
webPlayer: payload.user === payload.users.blue || payload.user === payload.users.blueAnon
|
||||
? 'blue'
|
||||
: 'red'
|
||||
let firstUser = !rpcUsers;
|
||||
|
||||
this.refs.gridControl.state.webPlayer === null && this.refs.gridControl.setState({
|
||||
webPlayer: payload.user === payload.users.blue ||
|
||||
(
|
||||
firstUser && payload.users.blueAnon !== '' ||
|
||||
!firstUser && (rpcUsers.blueAnon === '' && rpcUsers.blue === '')
|
||||
)
|
||||
? 'blue' : 'red'
|
||||
});
|
||||
|
||||
/** rwd */
|
||||
(900 > $(document).width()) && this.currectGridSize();
|
||||
|
||||
/** every user has been came */
|
||||
if (payload.userCnt === 2) {
|
||||
/** every time the blue starts */
|
||||
this.refs.gridControl.refs.userControl.setState({activePlayer: 1});
|
||||
|
||||
/** Set up player names w/ server data */
|
||||
this.refs.gridControl.refs.userControl.refs.red.setState({
|
||||
name: payload.users.red !== '' ? payload.users.red : payload.users.redAnon,
|
||||
});
|
||||
|
||||
this.refs.gridControl.refs.userControl.refs.blue.setState({
|
||||
name: payload.users.blue !== '' ? payload.users.blue : payload.users.blueAnon,
|
||||
desc: this.refs.gridControl.state.webPlayer === 'blue'
|
||||
? this.refs.gridControl.state.desc.you
|
||||
: this.refs.gridControl.state.desc.buddy,
|
||||
active: true,
|
||||
});
|
||||
|
||||
this.refs.gridControl.setState({overlay: false});
|
||||
}
|
||||
if (
|
||||
payload.userCnt === 2 &&
|
||||
(
|
||||
!this.state.connectionLost ||
|
||||
this.state.connectionLost && false === this.refs.gridControl.refs.userControl.state.activePlayer && !this.state.end
|
||||
)
|
||||
) {
|
||||
this.makeGameStart(payload);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +298,7 @@ class MineSeeker extends React.Component {
|
||||
}
|
||||
|
||||
/** Connect - Subscribe */
|
||||
subscribe() {
|
||||
subscribe(rpcUsers = null) {
|
||||
this.state.session.subscribe(
|
||||
this.state.channel,
|
||||
(uri, payload, log) => {
|
||||
@@ -238,30 +310,31 @@ class MineSeeker extends React.Component {
|
||||
this.wTopic(payload);
|
||||
} else {
|
||||
if (isNotUnsubscribe) {
|
||||
this.wSubscribe(payload);
|
||||
this.wSubscribe(payload, rpcUsers);
|
||||
} else {
|
||||
this.wUnsubscribe(payload);
|
||||
}
|
||||
}
|
||||
|
||||
/** RECONNECTION */
|
||||
if (payload.userCnt === 2 && this.state.disconnect) {
|
||||
if (payload.userCnt === 2 && this.state.connectionLost) {
|
||||
this.state.env === 'dev' && console.info('Reconnection process');
|
||||
|
||||
/** PUBLISH */
|
||||
let cache = this.state.stepCache;
|
||||
cache.forEach((item) => this.state.session.publish(this.state.channel, item));
|
||||
this.setState({disconnect: false, stepCache: []});
|
||||
this.setState({connectionLost: false, stepCache: []});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** after rendering */
|
||||
componentDidMount() {
|
||||
connectWithWebsocket() {
|
||||
/** Create Websocket w/ Bahnhof.js */
|
||||
let websocket = WS.connect(
|
||||
this.state.env === 'dev'
|
||||
? "ws://mine.dev:6450"
|
||||
: "ws://www.mineseeker.ninja:6450"
|
||||
// : (this.state.ssl === 'true' ? "wss" : "ws") + "://" + window.location.hostname + ":6450/"
|
||||
: (this.state.ssl === 'true' ? "wss" : "ws") + "://www.mineseeker.ninja:6450/"
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -271,7 +344,7 @@ class MineSeeker extends React.Component {
|
||||
websocket.on("socket/connect", (session) => {
|
||||
this.state.env === 'dev' && console.info("Successfully connected to the Server!");
|
||||
|
||||
if (!this.state.disconnect) {
|
||||
if (!this.state.connectionLost) {
|
||||
let gridClient = this.state.gameInherited || new Grid().state.grid;
|
||||
|
||||
/**
|
||||
@@ -284,11 +357,26 @@ class MineSeeker extends React.Component {
|
||||
this.state.gameInherited ? this.state.gameAssoc : [Base64.encode(JSON.stringify(gridClient)), this.state.gameAssoc]
|
||||
)
|
||||
.then(
|
||||
(gridServer) => {
|
||||
this.state.env === 'dev' && console.info("Grid has been created! Return w/ gameAssoc.");
|
||||
(data) => {
|
||||
this.state.env === 'dev' && console.info('RPC has been called');
|
||||
|
||||
this.wInit(session, gridServer, gridClient);
|
||||
this.subscribe();
|
||||
let serverData = data[0] !== true
|
||||
? JSON.parse(Base64.decode(data))
|
||||
: data;
|
||||
|
||||
/** Check the grid if the user is inherited @see #30 */
|
||||
if ((this.state.gameInherited && null !== serverData.grid) || !this.state.gameInherited) {
|
||||
this.wInit(session, serverData.grid, gridClient);
|
||||
this.subscribe(this.state.gameInherited && serverData.users);
|
||||
} else {
|
||||
this.refs.gridControl.setState({
|
||||
overlay: true,
|
||||
overlayTitle: "This channel does not exists!",
|
||||
overlaySubTitle: <a href={"/play"} target="_self">Restart game!</a>
|
||||
});
|
||||
|
||||
console.error("This channel does not exists!");
|
||||
}
|
||||
},
|
||||
(error, desc) => this.state.env === 'dev' && console.error(["RPC Error", error, desc])
|
||||
);
|
||||
@@ -304,10 +392,19 @@ class MineSeeker extends React.Component {
|
||||
*/
|
||||
websocket.on("socket/disconnect", (error) => {
|
||||
this.state.env === 'dev' && console.error("Disconnected for " + error.reason + " with code " + error.code);
|
||||
this.setState({disconnect: true});
|
||||
|
||||
error.code === 6 && this.setState({connectionLost: true});
|
||||
error.code === 3 && setTimeout(function () {
|
||||
this.componentDidMount();
|
||||
}.bind(this), 500);
|
||||
});
|
||||
}
|
||||
|
||||
/** After rendering */
|
||||
componentDidMount() {
|
||||
this.connectWithWebsocket();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache the steps unless reconnection
|
||||
*
|
||||
@@ -344,7 +441,7 @@ class MineSeeker extends React.Component {
|
||||
};
|
||||
|
||||
/** PUBLISH */
|
||||
!this.state.disconnect
|
||||
!this.state.connectionLost
|
||||
? this.state.session.publish(this.state.channel, dataPack)
|
||||
: this.cachePublish(dataPack);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,117 @@
|
||||
{% extends "::base.html.twig" %}
|
||||
{% extends "@MineSeeker/layout.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('bundles/mineseeker/images/mine-1600x627.png') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<h1>MineSeeker</h1>
|
||||
<h3>version 1.0a</h3>
|
||||
<a href="{{ path('MineSeekerBundle_gamePlay') }}">Play now</a>
|
||||
<img src="{{ asset('bundles/mineseeker/images/homepage/mineseeker-2.png') }}" alt="" border="0">
|
||||
<section class="header-content">
|
||||
<div class="logo">
|
||||
<a href="{{ path('MineSeekerBundle_homepage') }}" target="_self">
|
||||
<img src="{{ asset('bundles/mineseeker/images/mine-logo-txt.png') }}" alt="MineSeeker Logo w/ Txt"
|
||||
border="0"/>
|
||||
</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" border="0"/>
|
||||
</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('bundles/mineseeker/images/mine-logo-logo.png') }}" alt="MineSeeker Logo" border="0"/>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="txt">
|
||||
<div class="technologies">
|
||||
<h1>Used technologies</h1>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket"
|
||||
border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/react.png') }}" alt="Used React.js" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/symfony.png') }}" alt="Used Symfony" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/jquery.png') }}" alt="Used jQuery" border="0"/>
|
||||
<img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt"
|
||||
border="0"/>
|
||||
</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 %}
|
||||
{% stylesheets filter='cssrewrite'
|
||||
'@MineSeekerBundle/Resources/public/css/style.homepage.css' %}
|
||||
{{ parent() }}
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Rajdhani:300,400,500,600,700&subset=latin-ext"
|
||||
rel="stylesheet">
|
||||
|
||||
{% stylesheets filter='?uglifycss'
|
||||
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/css/bootstrap.min.css'
|
||||
'@MineSeekerBundle/Resources/public/css/style.homepage.css'
|
||||
'@JotunheimrUserBundle/Resources/public/css/layout.css' %}
|
||||
<link rel="stylesheet" media="screen" href="{{ asset_url }}" type="text/css"/>
|
||||
{% endstylesheets %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"
|
||||
type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(document).snowfall({deviceorientation: true, round: true, minSize: 5, maxSize: 8});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||