more convenient build process
18
README.md
@ -8,26 +8,30 @@ Gwent-Online is an open-source project of the card-game Gwent.
|
||||
##- Requirements
|
||||
- [node.js](https://nodejs.org/) installed
|
||||
- [GraphicsMagick](http://www.graphicsmagick.org) installed (for generating sprites)
|
||||
- Any Webserver like xampp, wamp, lamp etc
|
||||
|
||||
##- Build
|
||||
Make sure to clone the project in your webserver root folder, otherwise you won't be able to access your client later.
|
||||
The root folder is often called 'www' or 'htdocs', but depends on your installed webserver.
|
||||
```git
|
||||
cd ~/myProjectDirectory
|
||||
git clone https://github.com/exane/gwent.git
|
||||
cd gwent
|
||||
cd ~/myWebserverRoot
|
||||
git clone https://github.com/exane/not-gwent-online
|
||||
cd not-gwent-online
|
||||
npm install
|
||||
npm run gulp
|
||||
npm run build
|
||||
```
|
||||
|
||||
|
||||
##- Config
|
||||
- go to /public and open Config.js
|
||||
- change hostname to your address. (e.g., "192.168.123.1") <br>Make sure you don't have a trailing slash after your IP or address. (e.g., "192.168.123.1/")
|
||||
- If you have to change port then make sure you change the port on your server as well. <br>You find the server port in /server/server.js on line #18 "app.listen(#port)";
|
||||
- If you have to change the port then make sure you change the port on your server as well. <br>You find the server port in /server/server.js on line #18 "app.listen(#port)";
|
||||
|
||||
##- Start Server
|
||||
```
|
||||
cd ~/myProjectDirectory/gwent
|
||||
cd ~/myProjectDirectory/not-gwent-online
|
||||
node server/server.js
|
||||
```
|
||||
|
||||
##- Start Client
|
||||
- Open your browser and go to "192.168.123.1/gwent/public" or wherever you saved your project.
|
||||
- Open your browser and go to "192.168.123.1/not-gwent-online/public" or wherever you saved your project.
|
||||
|
69
gulpfile.js
@ -10,60 +10,63 @@ var imagemin = require('gulp-imagemin');
|
||||
var gm = require("gulp-gm");
|
||||
var sprity = require("sprity");
|
||||
var gulpif = require("gulp-if");
|
||||
livereload({start: true});
|
||||
var argv = require("minimist")(process.argv.slice(2));
|
||||
var rename = require("gulp-rename");
|
||||
//livereload({start: true});
|
||||
|
||||
//fast install
|
||||
//npm i --save-dev browserify vinyl-source-stream babelify gulp-livereload gulp gulp-sass
|
||||
|
||||
|
||||
gulp.task('browserify', function(){
|
||||
gulp.task('browserify', function() {
|
||||
browserify('./client/js/main.js', {standalone: "app", debug: true})
|
||||
.transform(handlebars).on("error", function(err){
|
||||
.transform(handlebars).on("error", function(err) {
|
||||
console.log(err);
|
||||
})
|
||||
.transform(babelify)
|
||||
.bundle().on("error", function(err){
|
||||
.bundle().on("error", function(err) {
|
||||
console.log(err);
|
||||
})
|
||||
.pipe(source('app.js').on("error", function(err){
|
||||
.pipe(source('app.js').on("error", function(err) {
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err){
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err) {
|
||||
console.log(err);
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
gulp.task('sass', function(){
|
||||
gulp.task('sass', function() {
|
||||
gulp.src('./client/scss/main.scss')
|
||||
.pipe(sass({
|
||||
outputStyle: 'compressed'
|
||||
}).on("error", function(err){
|
||||
}).on("error", function(err) {
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err){
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err) {
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(livereload().on("error", function(err){
|
||||
.pipe(livereload().on("error", function(err) {
|
||||
console.log(err);
|
||||
}));
|
||||
});
|
||||
|
||||
gulp.task("unit tests", function(){
|
||||
gulp.task("unit tests", function() {
|
||||
browserify('./test/src/mainSpec.js', {standalone: "app", debug: true})
|
||||
.transform(babelify)
|
||||
.bundle().on("error", function(err){
|
||||
.bundle().on("error", function(err) {
|
||||
console.log(err);
|
||||
})
|
||||
.pipe(source('spec.js').on("error", function(err){
|
||||
.pipe(source('spec.js').on("error", function(err) {
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(gulp.dest('./test/spec/').on("error", function(err){
|
||||
.pipe(gulp.dest('./test/spec/').on("error", function(err) {
|
||||
console.log(err);
|
||||
}));
|
||||
})
|
||||
|
||||
gulp.task("watch", function(){
|
||||
gulp.task("watch", function() {
|
||||
if(argv.production) return;
|
||||
gulp.watch("./client/js/*", ["browserify"]);
|
||||
gulp.watch("./client/templates/*", ["browserify"]);
|
||||
gulp.watch("./client/scss/*", ["sass"]);
|
||||
@ -72,7 +75,7 @@ gulp.task("watch", function(){
|
||||
})
|
||||
|
||||
|
||||
gulp.task("index", function(){
|
||||
gulp.task("index", function() {
|
||||
gulp.src("./client/index.html")
|
||||
.pipe(gulp.dest("./public/"));
|
||||
|
||||
@ -80,54 +83,53 @@ gulp.task("index", function(){
|
||||
.pipe(gulp.dest("./public/build"));
|
||||
})
|
||||
|
||||
gulp.task('resize sm', function(done){
|
||||
if(fs.existsSync(__dirname + "/assets/cards/sm/monster/arachas1.png")){
|
||||
gulp.task('resize sm', function(done) {
|
||||
if(fs.existsSync(__dirname + "/assets/cards/sm/monster/arachas1.png")) {
|
||||
console.log("skip generating sm images");
|
||||
return done();
|
||||
}
|
||||
return gulp.src('./assets/original_cards/**/*.png')
|
||||
.pipe(gm(function(gmfile){
|
||||
.pipe(gm(function(gmfile) {
|
||||
return gmfile.resize(null, 120);
|
||||
}))
|
||||
.pipe(imagemin())
|
||||
.pipe(gulp.dest('./assets/cards/sm/'));
|
||||
});
|
||||
|
||||
gulp.task('resize md', function(done){
|
||||
if(fs.existsSync(__dirname + "/assets/cards/md/monster/arachas1.png")){
|
||||
gulp.task('resize md', function(done) {
|
||||
if(fs.existsSync(__dirname + "/assets/cards/md/monster/arachas1.png")) {
|
||||
console.log("skip generating md images");
|
||||
return done();
|
||||
}
|
||||
return gulp.src('./assets/original_cards/**/*.png')
|
||||
.pipe(gm(function(gmfile){
|
||||
.pipe(gm(function(gmfile) {
|
||||
return gmfile.resize(null, 284);
|
||||
}))
|
||||
.pipe(imagemin())
|
||||
.pipe(gulp.dest('./assets/cards/md/'));
|
||||
});
|
||||
|
||||
gulp.task('resize lg', ["resize sm", "resize md"], function(done){
|
||||
if(fs.existsSync(__dirname + "/assets/cards/lg/monster/arachas1.png")){
|
||||
gulp.task('resize lg', ["resize sm", "resize md"], function(done) {
|
||||
if(fs.existsSync(__dirname + "/assets/cards/lg/monster/arachas1.png")) {
|
||||
console.log("skip generating lg images");
|
||||
return done();
|
||||
}
|
||||
return gulp.src('./assets/original_cards/**/*.png')
|
||||
.pipe(gm(function(gmfile){
|
||||
.pipe(gm(function(gmfile) {
|
||||
return gmfile.resize(null, 450);
|
||||
}))
|
||||
.pipe(imagemin())
|
||||
.pipe(gulp.dest('./assets/cards/lg/'));
|
||||
});
|
||||
|
||||
gulp.task("sprite", ["resize lg"], function(){
|
||||
if(fs.existsSync(__dirname + "/public/build/cards-lg-monster.png")){
|
||||
console.log("skip sprite generating");
|
||||
gulp.task("generate sprites", ["resize lg"], function() {
|
||||
if(fs.existsSync(__dirname + "/public/build/cards-lg-monster.png")) {
|
||||
console.log("skip sprite generation");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
console.log("start sprite generating ...");
|
||||
sprity.src({
|
||||
return sprity.src({
|
||||
src: "./assets/cards/**/*.png",
|
||||
style: "cards.css",
|
||||
//"style-type": "scss",
|
||||
@ -141,9 +143,12 @@ gulp.task("sprite", ["resize lg"], function(){
|
||||
margin: 0
|
||||
//template: "./client/scss/_cards.hbs"
|
||||
})
|
||||
//.pipe(gulpif("*.png", gulp.dest("./public/build/"), gulp.dest("./client/scss/")));
|
||||
.pipe(imagemin())
|
||||
.pipe(gulpif("*.png", rename({
|
||||
extname: ".PNG"
|
||||
})))
|
||||
.pipe(gulp.dest("./public/build/"));
|
||||
})
|
||||
|
||||
gulp.task("default", ["watch", "browserify", "sass", "unit tests", "index", "resize lg", "resize sm", "resize md", "sprite"]);
|
||||
|
||||
gulp.task("default", ["watch", "browserify", "sass", "unit tests", "index", "resize lg", "resize sm", "resize md", "generate sprites"]);
|
||||
|
17
package.json
@ -6,6 +6,7 @@
|
||||
"dependencies": {
|
||||
"connect": "3.0.1",
|
||||
"express": "4.12.3",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"jquery-deferred": "^0.3.0",
|
||||
"minimist": "1.1.0",
|
||||
"serve-static": "1.8.0",
|
||||
@ -33,20 +34,22 @@
|
||||
"vinyl-source-stream": "^1.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gulp": "gulp"
|
||||
"gulp": "gulp",
|
||||
"build": "gulp --production"
|
||||
},
|
||||
"repository" : {
|
||||
"type" : "git"
|
||||
, "url" : "https://github.com/exane/gwent"
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/exane/not-gwent-online"
|
||||
},
|
||||
"author": {
|
||||
"name": "Tim Meier",
|
||||
"email": "raco0n@gmx.de"
|
||||
},
|
||||
"contributors": [{
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Viktor Geringer",
|
||||
"email": "devfakeplus@googlemail.com"
|
||||
}],
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ var Card = require("./Card");
|
||||
var Deck = require("./Deck");
|
||||
var shortid = require("shortid");
|
||||
var Promise = require("jquery-deferred");
|
||||
var CardManager = require("./CardManager")
|
||||
var CardManager = require("./CardManager");
|
||||
|
||||
|
||||
var Battle = (function(){
|
||||
|
@ -8,9 +8,9 @@ var Promise = require("jquery-deferred");
|
||||
|
||||
|
||||
var Battleside;
|
||||
Battleside = (function(){
|
||||
var Battleside = function(user, n, battle){
|
||||
if(!(this instanceof Battleside)){
|
||||
Battleside = (function() {
|
||||
var Battleside = function(user, n, battle) {
|
||||
if(!(this instanceof Battleside)) {
|
||||
return (new Battleside(user, n, battle));
|
||||
}
|
||||
/**
|
||||
@ -42,9 +42,7 @@ Battleside = (function(){
|
||||
this.off = this.battle.off.bind(this.battle);
|
||||
|
||||
|
||||
|
||||
|
||||
this.receive("activate:leader", function(){
|
||||
this.receive("activate:leader", function() {
|
||||
if(self._isWaiting) return;
|
||||
if(self.isPassing()) return;
|
||||
|
||||
@ -60,13 +58,13 @@ Battleside = (function(){
|
||||
leaderCard.setDisabled(true);
|
||||
self.battle.sendNotification(self.getName() + " activated " + leaderCard.getName() + "! (leadercard)");
|
||||
self.update();
|
||||
if(ability.waitResponse){
|
||||
if(ability.waitResponse) {
|
||||
return;
|
||||
}
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
self.endTurn();
|
||||
})
|
||||
this.receive("play:cardFromHand", function(data){
|
||||
this.receive("play:cardFromHand", function(data) {
|
||||
if(self._isWaiting) return;
|
||||
if(self.isPassing()) return;
|
||||
var cardID = data.id;
|
||||
@ -74,7 +72,7 @@ Battleside = (function(){
|
||||
|
||||
self.playCard(card);
|
||||
})
|
||||
this.receive("decoy:replaceWith", function(data){
|
||||
this.receive("decoy:replaceWith", function(data) {
|
||||
if(self._isWaiting) return;
|
||||
var card = self.findCardOnFieldByID(data.cardID);
|
||||
/*if(card === -1) throw new Error("decoy:replace | unknown card");*/
|
||||
@ -86,10 +84,10 @@ Battleside = (function(){
|
||||
}
|
||||
self.runEvent("Decoy:replaceWith", self, [card]);
|
||||
})
|
||||
this.receive("cancel:decoy", function(){
|
||||
this.receive("cancel:decoy", function() {
|
||||
self.off("Decoy:replaceWith");
|
||||
})
|
||||
this.receive("set:passing", function(){
|
||||
this.receive("set:passing", function() {
|
||||
self.setPassing(true);
|
||||
self.update();
|
||||
|
||||
@ -97,8 +95,8 @@ Battleside = (function(){
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
self.endTurn();
|
||||
})
|
||||
this.receive("medic:chooseCardFromDiscard", function(data){
|
||||
if(!data){
|
||||
this.receive("medic:chooseCardFromDiscard", function(data) {
|
||||
if(!data) {
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
|
||||
self.endTurn();
|
||||
@ -117,8 +115,8 @@ Battleside = (function(){
|
||||
|
||||
self.playCard(card);
|
||||
})
|
||||
this.receive("emreis_leader4:chooseCardFromDiscard", function(data){
|
||||
if(!data){
|
||||
this.receive("emreis_leader4:chooseCardFromDiscard", function(data) {
|
||||
if(!data) {
|
||||
self.endTurn();
|
||||
self.sendNotificationTo(self.foe, self.getName() + " takes no card from your discard pile (or there wasn't any card to choose)");
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
@ -142,7 +140,7 @@ Battleside = (function(){
|
||||
self.endTurn();
|
||||
// self.runEvent("NextTurn", null, [self.foe]);
|
||||
})
|
||||
this.receive("agile:field", function(data){
|
||||
this.receive("agile:field", function(data) {
|
||||
var fieldType = data.field;
|
||||
if(!(fieldType in [0, 1])) throw new Error("set field agile: false fieldtype " + fieldType);
|
||||
self.runEvent("agile:setField", null, [fieldType]);
|
||||
@ -150,10 +148,10 @@ Battleside = (function(){
|
||||
self.endTurn();
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
})
|
||||
this.receive("cancel:agile", function(){
|
||||
this.receive("cancel:agile", function() {
|
||||
self.off("agile:setField");
|
||||
})
|
||||
this.receive("horn:field", function(data){
|
||||
this.receive("horn:field", function(data) {
|
||||
var fieldType = data.field;
|
||||
if(!(fieldType in [0, 1, 2])) throw new Error("set field horn: false fieldtype " + fieldType);
|
||||
self.runEvent("horn:setField", null, [fieldType]);
|
||||
@ -161,7 +159,7 @@ Battleside = (function(){
|
||||
self.endTurn();
|
||||
//self.runEvent("NextTurn", null, [self.foe]);
|
||||
})
|
||||
this.receive("cancel:horn", function(){
|
||||
this.receive("cancel:horn", function() {
|
||||
self.off("horn:setField");
|
||||
})
|
||||
|
||||
@ -194,23 +192,23 @@ Battleside = (function(){
|
||||
r.battle = null;
|
||||
r.deck = null;
|
||||
|
||||
r.createCard = function(key){
|
||||
r.createCard = function(key) {
|
||||
return this.cm.create(key, this.n);
|
||||
}
|
||||
|
||||
r.isPassing = function(){
|
||||
r.isPassing = function() {
|
||||
return this._passing;
|
||||
}
|
||||
|
||||
r.isWaiting = function(){
|
||||
r.isWaiting = function() {
|
||||
return this._isWaiting;
|
||||
}
|
||||
|
||||
r.setUpWeatherFieldWith = function(p2){
|
||||
r.setUpWeatherFieldWith = function(p2) {
|
||||
this.field[Card.TYPE.WEATHER] = p2.field[Card.TYPE.WEATHER] = Field(this);
|
||||
}
|
||||
|
||||
r.findCardOnFieldByID = function(id){
|
||||
r.findCardOnFieldByID = function(id) {
|
||||
for(var key in this.field) {
|
||||
var field = this.field[key];
|
||||
var card = field.getCard(id);
|
||||
@ -224,7 +222,7 @@ Battleside = (function(){
|
||||
return -1;
|
||||
}
|
||||
|
||||
r.getRandomCardOnField = function(){
|
||||
r.getRandomCardOnField = function() {
|
||||
var allCards = this.getFieldCards();
|
||||
var rnd = (Math.random() * allCards.length) | 0;
|
||||
|
||||
@ -232,7 +230,7 @@ Battleside = (function(){
|
||||
return allCards[rnd];
|
||||
}
|
||||
|
||||
r.getCardFromDiscard = function(id){
|
||||
r.getCardFromDiscard = function(id) {
|
||||
for(var i = 0; i < this._discard.length; i++) {
|
||||
var c = this._discard[i];
|
||||
if(c.getID() === id) return c;
|
||||
@ -240,7 +238,7 @@ Battleside = (function(){
|
||||
return -1;
|
||||
}
|
||||
|
||||
r.getFieldCards = function(){
|
||||
r.getFieldCards = function() {
|
||||
var close, range, siege;
|
||||
|
||||
close = this.field[Card.TYPE.CLOSE_COMBAT].get();
|
||||
@ -250,22 +248,22 @@ Battleside = (function(){
|
||||
return close.concat(range.concat(siege));
|
||||
}
|
||||
|
||||
r.setPassing = function(b){
|
||||
r.setPassing = function(b) {
|
||||
this._passing = b;
|
||||
this.send("set:passing", {passing: this._passing}, true);
|
||||
}
|
||||
|
||||
r.wait = function(){
|
||||
r.wait = function() {
|
||||
this._isWaiting = true;
|
||||
this.send("set:waiting", {waiting: this._isWaiting}, true);
|
||||
}
|
||||
|
||||
r.turn = function(){
|
||||
r.turn = function() {
|
||||
this._isWaiting = false;
|
||||
this.send("set:waiting", {waiting: this._isWaiting}, true);
|
||||
}
|
||||
|
||||
r.setLeadercard = function(){
|
||||
r.setLeadercard = function() {
|
||||
var leaderCard = this.deck.find("type", Card.TYPE.LEADER);
|
||||
this.deck.removeFromDeck(leaderCard[0]);
|
||||
/*
|
||||
@ -273,22 +271,22 @@ Battleside = (function(){
|
||||
this.field[Card.TYPE.LEADER].add(leaderCard[0]);
|
||||
}
|
||||
|
||||
r.getLeader = function(){
|
||||
r.getLeader = function() {
|
||||
return this.field[Card.TYPE.LEADER].get()[0];
|
||||
}
|
||||
|
||||
r.getID = function(){
|
||||
r.getID = function() {
|
||||
return this.n;
|
||||
}
|
||||
|
||||
r.draw = function(times){
|
||||
r.draw = function(times) {
|
||||
while(times--) {
|
||||
var card = this.deck.draw();
|
||||
this.hand.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
r.calcScore = function(){
|
||||
r.calcScore = function() {
|
||||
var score = 0;
|
||||
for(var key in this.field) {
|
||||
score += +this.field[key].getScore();
|
||||
@ -296,7 +294,7 @@ Battleside = (function(){
|
||||
return this._score = score;
|
||||
}
|
||||
|
||||
r.getInfo = function(){
|
||||
r.getInfo = function() {
|
||||
return {
|
||||
name: this.getName(),
|
||||
lives: this._rubies,
|
||||
@ -308,43 +306,43 @@ Battleside = (function(){
|
||||
}
|
||||
}
|
||||
|
||||
r.getRubies = function(){
|
||||
r.getRubies = function() {
|
||||
return this._rubies;
|
||||
}
|
||||
|
||||
r.getScore = function(){
|
||||
r.getScore = function() {
|
||||
return +this.calcScore();
|
||||
}
|
||||
|
||||
r.removeRuby = function(){
|
||||
r.removeRuby = function() {
|
||||
this._rubies--;
|
||||
}
|
||||
|
||||
r.getName = function(){
|
||||
r.getName = function() {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
r.send = function(event, msg, isPrivate){
|
||||
r.send = function(event, msg, isPrivate) {
|
||||
msg = msg || {};
|
||||
isPrivate = typeof isPrivate === "undefined" ? false : isPrivate;
|
||||
msg._roomSide = this.n;
|
||||
|
||||
if(isPrivate){
|
||||
if(isPrivate) {
|
||||
return this.socket.emit(event, msg);
|
||||
}
|
||||
this.battle.send(event, msg);
|
||||
}
|
||||
|
||||
r.receive = function(event, cb){
|
||||
r.receive = function(event, cb) {
|
||||
this.socket.on(event, cb);
|
||||
}
|
||||
|
||||
r.update = function(self){
|
||||
r.update = function(self) {
|
||||
self = self || false;
|
||||
this.runEvent("Update", null, [self]);
|
||||
}
|
||||
|
||||
r.onTurnStart = function(){
|
||||
r.onTurnStart = function() {
|
||||
this.foe.wait();
|
||||
this.turn();
|
||||
|
||||
@ -353,7 +351,7 @@ Battleside = (function(){
|
||||
|
||||
};
|
||||
|
||||
r.playCard = function(card){
|
||||
r.playCard = function(card) {
|
||||
if(card === null || card === -1) return;
|
||||
if(this.isWaiting()) return;
|
||||
if(this.isPassing()) return;
|
||||
@ -369,27 +367,27 @@ Battleside = (function(){
|
||||
this.endTurn();
|
||||
}
|
||||
|
||||
r.endTurn = function(){
|
||||
r.endTurn = function() {
|
||||
this.update();
|
||||
|
||||
this.runEvent("NextTurn", null, [this.foe]);
|
||||
}
|
||||
|
||||
r.placeCard = function(card, obj){
|
||||
r.placeCard = function(card, obj) {
|
||||
obj = _.extend({}, obj);
|
||||
|
||||
if(typeof card === "string"){
|
||||
if(typeof card === "string") {
|
||||
//card = Card(card);
|
||||
card = this.createCard(card);
|
||||
}
|
||||
|
||||
this.checkAbilities(card, obj);
|
||||
if(obj._cancelPlacement && !obj.forceField){
|
||||
if(obj._cancelPlacement && !obj.forceField) {
|
||||
|
||||
//this.battle.sendNotification(this.getName() + " played " + card.getName() + "!");
|
||||
return 0;
|
||||
}
|
||||
if(obj._nextTurn && !obj.forceField){
|
||||
if(obj._nextTurn && !obj.forceField) {
|
||||
this.update();
|
||||
//this.runEvent("NextTurn", null, [this.foe]);
|
||||
this.endTurn();
|
||||
@ -398,14 +396,14 @@ Battleside = (function(){
|
||||
|
||||
|
||||
var field = obj.forceField || null;
|
||||
if(typeof obj.isHorn !== "undefined"){
|
||||
if(!field){
|
||||
if(typeof obj.isHorn !== "undefined") {
|
||||
if(!field) {
|
||||
field = obj.targetSide.field[obj.isHorn];
|
||||
}
|
||||
field.add(card, true);
|
||||
}
|
||||
else {
|
||||
if(!field){
|
||||
if(!field) {
|
||||
field = obj.targetSide.field[card.getType()];
|
||||
}
|
||||
|
||||
@ -418,7 +416,7 @@ Battleside = (function(){
|
||||
this.checkAbilityOnAfterPlace(card, obj);
|
||||
|
||||
|
||||
if(obj._waitResponse){
|
||||
if(obj._waitResponse) {
|
||||
this.hand.remove(card);
|
||||
this.update();
|
||||
return 0;
|
||||
@ -429,17 +427,17 @@ Battleside = (function(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
r.setHorn = function(card, field){
|
||||
r.setHorn = function(card, field) {
|
||||
var self = this;
|
||||
field = typeof field === "undefined" ? null : field;
|
||||
|
||||
if(typeof card === "string"){
|
||||
if(typeof card === "string") {
|
||||
//card = Card(card);
|
||||
//card = this.cm.create(card);
|
||||
card = this.createCard(card);
|
||||
}
|
||||
|
||||
if(typeof field === "number"){
|
||||
if(typeof field === "number") {
|
||||
card.changeType(field);
|
||||
this.placeCard(card, {
|
||||
isHorn: field,
|
||||
@ -450,7 +448,7 @@ Battleside = (function(){
|
||||
}
|
||||
|
||||
this.send("played:horn", {cardID: card.getID()}, true)
|
||||
this.on("horn:setField", function(type){
|
||||
this.on("horn:setField", function(type) {
|
||||
self.off("horn:setField");
|
||||
card.changeType(type);
|
||||
self.placeCard(card, {
|
||||
@ -463,17 +461,17 @@ Battleside = (function(){
|
||||
})
|
||||
}
|
||||
|
||||
r.commanderHornAbility = function(card){
|
||||
r.commanderHornAbility = function(card) {
|
||||
var field = this.field[card.getType()];
|
||||
var id = "commanders_horn";
|
||||
|
||||
if(typeof field === "undefined"){
|
||||
if(typeof field === "undefined") {
|
||||
//console.log("field unknown | %s", card.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
if(!field.isOnField(card)){
|
||||
field.get().forEach(function(_card){
|
||||
if(!field.isOnField(card)) {
|
||||
field.get().forEach(function(_card) {
|
||||
if(_card.getID() === id) return;
|
||||
if(_card.getID() === card.getID()) return;
|
||||
if(_card.getType() !== card.getType()) return;
|
||||
@ -484,7 +482,7 @@ Battleside = (function(){
|
||||
return;
|
||||
}
|
||||
|
||||
field.get().forEach(function(_card){
|
||||
field.get().forEach(function(_card) {
|
||||
if(_card.getID() === id) return;
|
||||
if(_card.getID() === card.getID()) return;
|
||||
if(_card.getType() != card.getType()) return;
|
||||
@ -494,8 +492,9 @@ Battleside = (function(){
|
||||
})
|
||||
}
|
||||
|
||||
r.setTightBond = function(card){
|
||||
var field = this.field[card.getType()];/*
|
||||
r.setTightBond = function(card) {
|
||||
var field = this.field[card.getType()];
|
||||
/*
|
||||
var pos = field.getPosition(card);*/
|
||||
var cards = field.get();
|
||||
|
||||
@ -504,7 +503,7 @@ Battleside = (function(){
|
||||
cards.forEach(function(c) {
|
||||
if(c.getID() === card.getID()) return;
|
||||
if(c.getName() !== card.getName()) return;
|
||||
card.setBoost(card.getID() + "|tight_bond|"+c.getID(), "tight_bond");
|
||||
card.setBoost(card.getID() + "|tight_bond|" + c.getID(), "tight_bond");
|
||||
});
|
||||
|
||||
/*if(pos < 0) return;
|
||||
@ -523,13 +522,13 @@ Battleside = (function(){
|
||||
}*/
|
||||
}
|
||||
|
||||
r.checkAbilities = function(card, obj, __flag){
|
||||
r.checkAbilities = function(card, obj, __flag) {
|
||||
var self = this;
|
||||
obj.targetSide = this;
|
||||
if(obj.disabled) return;
|
||||
var ability = Array.isArray(__flag) ? __flag : card.getAbility();
|
||||
|
||||
if(Array.isArray(ability) && ability.length){
|
||||
if(Array.isArray(ability) && ability.length) {
|
||||
var ret = ability.slice();
|
||||
ret.splice(0, 1);
|
||||
this.checkAbilities(card, obj, ret);
|
||||
@ -540,56 +539,56 @@ Battleside = (function(){
|
||||
//this.update();
|
||||
}*/
|
||||
|
||||
if(ability && !Array.isArray(ability)){
|
||||
if(ability && !Array.isArray(ability)) {
|
||||
|
||||
if(ability.onBeforePlace){
|
||||
if(ability.onBeforePlace) {
|
||||
ability.onBeforePlace.apply(this, [card]);
|
||||
}
|
||||
if(ability.isCommandersHornCard && typeof obj.isHorn === "undefined"){
|
||||
if(ability.isCommandersHornCard && typeof obj.isHorn === "undefined") {
|
||||
this.setHorn(card);
|
||||
}
|
||||
if(ability.commandersHorn){
|
||||
if(ability.commandersHorn) {
|
||||
ability.onEachCardPlace = this.commanderHornAbility;
|
||||
ability.onWeatherChange = this.commanderHornAbility;
|
||||
}
|
||||
if(ability.cancelPlacement && !obj.forcePlace){
|
||||
if(ability.cancelPlacement && !obj.forcePlace) {
|
||||
obj._cancelPlacement = true;
|
||||
}
|
||||
if(ability.nextTurn){
|
||||
if(ability.nextTurn) {
|
||||
obj._nextTurn = ability.nextTurn;
|
||||
}
|
||||
if(ability.tightBond){
|
||||
if(ability.tightBond) {
|
||||
//this.setTightBond(card);
|
||||
ability.onAfterPlace = this.setTightBond;
|
||||
ability.onEachCardPlace = this.setTightBond;
|
||||
//ability.onWeatherChange = this.setTightBond;
|
||||
}
|
||||
if(ability.scorch){
|
||||
if(ability.scorch) {
|
||||
this.scorch(card);
|
||||
}
|
||||
if(ability.scorchMelee){
|
||||
if(ability.scorchMelee) {
|
||||
this.scorchMelee(card);
|
||||
}
|
||||
if(ability.removeImmediately){
|
||||
if(ability.removeImmediately) {
|
||||
this.hand.remove(card);
|
||||
this.addToDiscard(card);
|
||||
}
|
||||
if(ability.waitResponse && !obj.forcePlace){
|
||||
if(ability.waitResponse && !obj.forcePlace) {
|
||||
obj._waitResponse = true;
|
||||
}
|
||||
if(ability.changeSide){
|
||||
if(ability.changeSide) {
|
||||
obj.targetSide = this.foe;
|
||||
}
|
||||
if(typeof ability.weather !== "undefined"){
|
||||
if(typeof ability.weather !== "undefined") {
|
||||
ability.onEachTurn = this.setWeather.bind(this, ability.weather);
|
||||
ability.onEachCardPlace = this.setWeather.bind(this, ability.weather);
|
||||
}
|
||||
if(ability.replaceWith && !obj.forcePlace){
|
||||
if(ability.replaceWith && !obj.forcePlace) {
|
||||
obj._cancelPlacement = true;
|
||||
this.on("Decoy:replaceWith", function(replaceCard){
|
||||
this.on("Decoy:replaceWith", function(replaceCard) {
|
||||
if(replaceCard.getType() == Card.TYPE.LEADER ||
|
||||
replaceCard.getType() == Card.TYPE.WEATHER ||
|
||||
replaceCard.getType() == Card.TYPE.SPECIAL){
|
||||
replaceCard.getType() == Card.TYPE.SPECIAL) {
|
||||
return;
|
||||
}
|
||||
if(replaceCard.getName() === card.getName()) return;
|
||||
@ -610,15 +609,15 @@ Battleside = (function(){
|
||||
self.battle.sendNotification(self.getName() + " played Decoy!");
|
||||
})
|
||||
}
|
||||
if(ability.onEachTurn){
|
||||
if(ability.onEachTurn) {
|
||||
var uid = this.on("EachTurn", ability.onEachTurn, this, [card])
|
||||
card._uidEvents["EachTurn"] = uid;
|
||||
}
|
||||
if(ability.onEachCardPlace){
|
||||
if(ability.onEachCardPlace) {
|
||||
var uid = this.on("EachCardPlace", ability.onEachCardPlace, this, [card]);
|
||||
card._uidEvents["EachCardPlace"] = uid;
|
||||
}
|
||||
if(ability.onWeatherChange){
|
||||
if(ability.onWeatherChange) {
|
||||
var uid = this.on("WeatherChange", ability.onWeatherChange, this, [card]);
|
||||
card._uidEvents["WeatherChange"] = uid;
|
||||
}
|
||||
@ -628,29 +627,29 @@ Battleside = (function(){
|
||||
}
|
||||
}
|
||||
|
||||
r.checkAbilityOnAfterPlace = function(card, obj, __flag){
|
||||
r.checkAbilityOnAfterPlace = function(card, obj, __flag) {
|
||||
//var ability = card.getAbility();
|
||||
var ability = Array.isArray(__flag) ? __flag : card.getAbility();
|
||||
|
||||
if(Array.isArray(ability) && ability.length){
|
||||
if(Array.isArray(ability) && ability.length) {
|
||||
var ret = ability.slice();
|
||||
ret.splice(0, 1);
|
||||
this.checkAbilityOnAfterPlace(card, obj, ret);
|
||||
ability = ability[0];
|
||||
}
|
||||
|
||||
if(ability && !Array.isArray(ability)){
|
||||
if(ability.name && ability.name === obj.suppress){
|
||||
if(ability && !Array.isArray(ability)) {
|
||||
if(ability.name && ability.name === obj.suppress) {
|
||||
//this.update();
|
||||
return;
|
||||
}
|
||||
if(ability.onAfterPlace){
|
||||
if(ability.onAfterPlace) {
|
||||
ability.onAfterPlace.call(this, card)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
r.setWeather = function(weather, opt){
|
||||
r.setWeather = function(weather, opt) {
|
||||
var targetRow = weather;
|
||||
var field;
|
||||
if(typeof targetRow === "undefined") {
|
||||
@ -662,8 +661,8 @@ Battleside = (function(){
|
||||
var onRoundEnd = opt.onTurnEnd || false;
|
||||
|
||||
|
||||
if(targetRow === Card.TYPE.WEATHER){
|
||||
if(!onRoundEnd){
|
||||
if(targetRow === Card.TYPE.WEATHER) {
|
||||
if(!onRoundEnd) {
|
||||
this.battle.sendNotification(this.getName() + " played Clear Weather!");
|
||||
}
|
||||
field = this.field[targetRow];
|
||||
@ -675,7 +674,7 @@ Battleside = (function(){
|
||||
_field2 = this.foe.field[i].get();
|
||||
_field = _field1.concat(_field2);
|
||||
|
||||
_field.forEach(function(_card){
|
||||
_field.forEach(function(_card) {
|
||||
if(_card.hasAbility("hero")) return;
|
||||
_card.setForcedPower(-1);
|
||||
});
|
||||
@ -685,7 +684,7 @@ Battleside = (function(){
|
||||
}
|
||||
var forcedPower = 1;
|
||||
|
||||
if(typeof targetRow === "undefined"){
|
||||
if(typeof targetRow === "undefined") {
|
||||
console.trace(this);
|
||||
}
|
||||
var field1 = this.field[targetRow].get();
|
||||
@ -693,20 +692,20 @@ Battleside = (function(){
|
||||
|
||||
field = field1.concat(field2);
|
||||
|
||||
field.forEach(function(_card){
|
||||
field.forEach(function(_card) {
|
||||
if(_card.hasAbility("hero")) return;
|
||||
_card.setForcedPower(forcedPower);
|
||||
});
|
||||
this.runEvent("WeatherChange");
|
||||
}
|
||||
|
||||
r.scorchMelee = function(card){
|
||||
r.scorchMelee = function(card) {
|
||||
var side = this.foe;
|
||||
var field = side.field[Card.TYPE.CLOSE_COMBAT];
|
||||
|
||||
this.battle.sendNotification(this.getName() + " played " + card.getName());
|
||||
|
||||
if(field.getScore() < 10){
|
||||
if(field.getScore() < 10) {
|
||||
this.battle.sendNotification("Scorch: Score is under 10! Nothing happens.");
|
||||
return;
|
||||
}
|
||||
@ -726,7 +725,7 @@ Battleside = (function(){
|
||||
side.addToDiscard(removeCards);
|
||||
}
|
||||
|
||||
r.scorch = function(card){/*
|
||||
r.scorch = function(card) {/*
|
||||
var side = this.foe;
|
||||
var field = side.field[Card.TYPE.CLOSE_COMBAT];
|
||||
var cards = field.getHighestCards(true);
|
||||
@ -740,19 +739,19 @@ Battleside = (function(){
|
||||
|
||||
this.battle.sendNotification(this.getName() + " played " + card.getName());
|
||||
|
||||
cards.forEach(function(card){
|
||||
cards.forEach(function(card) {
|
||||
if(noHeroes && card.hasAbility("hero")) return;
|
||||
highest = card.getPower() > highest ? card.getPower() : highest;
|
||||
})
|
||||
|
||||
cards.forEach(function(card){
|
||||
cards.forEach(function(card) {
|
||||
if(noHeroes && card.hasAbility("hero")) return;
|
||||
if(card.getPower() === highest) res.push(card);
|
||||
});
|
||||
|
||||
res.forEach(function(card){
|
||||
res.forEach(function(card) {
|
||||
var side = self;
|
||||
if(self.foe.field[card.getType()].isOnField(card)){
|
||||
if(self.foe.field[card.getType()].isOnField(card)) {
|
||||
side = self.foe;
|
||||
}
|
||||
var removed = side.field[card.getType()].removeCard(card);
|
||||
@ -768,11 +767,11 @@ Battleside = (function(){
|
||||
this.battle.sendNotification(txt);
|
||||
}
|
||||
|
||||
r.clearMainFields = function(){
|
||||
r.clearMainFields = function() {
|
||||
var rndCard = null;
|
||||
if(this.deck.getFaction() === Deck.FACTION.MONSTERS){
|
||||
if(this.deck.getFaction() === Deck.FACTION.MONSTERS) {
|
||||
rndCard = this.getRandomCardOnField();
|
||||
if(rndCard){
|
||||
if(rndCard) {
|
||||
rndCard.__lock = true;
|
||||
this.sendNotification(this.getName() + ": Monsters faction ability triggered! " + rndCard.getName());
|
||||
}
|
||||
@ -789,13 +788,13 @@ Battleside = (function(){
|
||||
this.addToDiscard(cards);
|
||||
}
|
||||
|
||||
r.addToDiscard = function(cards){
|
||||
r.addToDiscard = function(cards) {
|
||||
var self = this;
|
||||
if(!Array.isArray(cards)){
|
||||
if(!Array.isArray(cards)) {
|
||||
cards = [cards];
|
||||
}
|
||||
cards.forEach(function(_card){
|
||||
if(_card.__lock){
|
||||
cards.forEach(function(_card) {
|
||||
if(_card.__lock) {
|
||||
delete _card.__lock;
|
||||
return;
|
||||
}
|
||||
@ -803,10 +802,10 @@ Battleside = (function(){
|
||||
});
|
||||
}
|
||||
|
||||
r.removeFromDiscard = function(card){
|
||||
r.removeFromDiscard = function(card) {
|
||||
for(var i = 0; i < this._discard.length; i++) {
|
||||
var c = this._discard[i];
|
||||
if(c.getID() === card.getID()){
|
||||
if(c.getID() === card.getID()) {
|
||||
|
||||
this._discard.splice(i, 1);
|
||||
return
|
||||
@ -814,14 +813,14 @@ Battleside = (function(){
|
||||
}
|
||||
}
|
||||
|
||||
r.getDiscard = function(json){
|
||||
if(json){
|
||||
r.getDiscard = function(json) {
|
||||
if(json) {
|
||||
return JSON.stringify(this._discard);
|
||||
}
|
||||
return this._discard;
|
||||
}
|
||||
|
||||
r.resetNewRound = function(){
|
||||
r.resetNewRound = function() {
|
||||
this.clearMainFields();
|
||||
this.setWeather(5, {
|
||||
onTurnEnd: true
|
||||
@ -829,7 +828,7 @@ Battleside = (function(){
|
||||
this.setPassing(false);
|
||||
}
|
||||
|
||||
r.filter = function(arrCards, opt){
|
||||
r.filter = function(arrCards, opt) {
|
||||
var arr = arrCards.slice();
|
||||
|
||||
for(var key in opt) {
|
||||
@ -837,33 +836,33 @@ Battleside = (function(){
|
||||
var prop = key, val = opt[key];
|
||||
|
||||
|
||||
arrCards.forEach(function(card){
|
||||
arrCards.forEach(function(card) {
|
||||
var property = card.getProperty(prop);
|
||||
if(_.isArray(property)){
|
||||
if(_.isArray(property)) {
|
||||
var _f = false;
|
||||
for(var i = 0; i < property.length; i++) {
|
||||
if(property[i] === val){
|
||||
if(property[i] === val) {
|
||||
_f = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!_f){
|
||||
if(!_f) {
|
||||
res.push(card);
|
||||
}
|
||||
}
|
||||
else if(_.isArray(val)){
|
||||
else if(_.isArray(val)) {
|
||||
var _f = false;
|
||||
for(var i = 0; i < val.length; i++) {
|
||||
if(property === val[i]){
|
||||
if(property === val[i]) {
|
||||
_f = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!_f){
|
||||
if(!_f) {
|
||||
res.push(card);
|
||||
}
|
||||
}
|
||||
else if(card.getProperty(prop) !== val){
|
||||
else if(card.getProperty(prop) !== val) {
|
||||
res.push(card);
|
||||
}
|
||||
})
|
||||
@ -873,7 +872,7 @@ Battleside = (function(){
|
||||
return arr;
|
||||
}
|
||||
|
||||
r.reDraw = function(n){
|
||||
r.reDraw = function(n) {
|
||||
//var hand = this.hand.getCards();
|
||||
var self = this;
|
||||
var left = n;
|
||||
@ -881,7 +880,7 @@ Battleside = (function(){
|
||||
|
||||
this.send("redraw:cards", null, true);
|
||||
|
||||
this.receive("redraw:reDrawCard", function(data){
|
||||
this.receive("redraw:reDrawCard", function(data) {
|
||||
var id = data.cardID;
|
||||
if(!left) return;
|
||||
left--;
|
||||
@ -891,7 +890,7 @@ Battleside = (function(){
|
||||
self.deck.shuffle();
|
||||
self.draw(1);
|
||||
|
||||
if(!left){
|
||||
if(!left) {
|
||||
self.send("redraw:close", null, true);
|
||||
|
||||
self.wait();
|
||||
@ -903,7 +902,7 @@ Battleside = (function(){
|
||||
self.battle.updateSelf(self);
|
||||
})
|
||||
|
||||
this.receive("redraw:close_client", function(){
|
||||
this.receive("redraw:close_client", function() {
|
||||
|
||||
self.wait();
|
||||
deferred.resolve("done");
|
||||
@ -914,10 +913,10 @@ Battleside = (function(){
|
||||
|
||||
}
|
||||
|
||||
r.sendNotificationTo = function(side, msg){
|
||||
r.sendNotificationTo = function(side, msg) {
|
||||
this.battle.sendNotificationTo(side, msg);
|
||||
}
|
||||
r.sendNotification = function(msg){
|
||||
r.sendNotification = function(msg) {
|
||||
this.battle.sendNotification(msg);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
var _ = require("underscore");
|
||||
|
||||
var Field = (function(){
|
||||
var Field = function(side, hasHornField){
|
||||
if(!(this instanceof Field)){
|
||||
var Field = (function() {
|
||||
var Field = function(side, hasHornField) {
|
||||
if(!(this instanceof Field)) {
|
||||
return (new Field(side, hasHornField));
|
||||
}
|
||||
/**
|
||||
@ -26,12 +26,12 @@ var Field = (function(){
|
||||
r._hornCard = null;
|
||||
r.side = null;
|
||||
|
||||
r.add = function(card, isHorn){
|
||||
r.add = function(card, isHorn) {
|
||||
/*if(card.hasAbility("commanders_horn")) {
|
||||
this.setHorn(card);
|
||||
return;
|
||||
}*/
|
||||
if(isHorn && this._hasHornField){
|
||||
if(isHorn && this._hasHornField) {
|
||||
this.setHorn(card);
|
||||
return;
|
||||
}
|
||||
@ -39,16 +39,16 @@ var Field = (function(){
|
||||
this.updateScore();
|
||||
}
|
||||
|
||||
r.get = function(){
|
||||
r.get = function() {
|
||||
return this._cards;
|
||||
}
|
||||
|
||||
r.getScore = function(){
|
||||
r.getScore = function() {
|
||||
this.updateScore();
|
||||
return this._score;
|
||||
}
|
||||
|
||||
r.updateScore = function(){
|
||||
r.updateScore = function() {
|
||||
this._score = 0;
|
||||
for(var i = 0; i < this._cards.length; i++) {
|
||||
var card = this._cards[i];
|
||||
@ -56,33 +56,33 @@ var Field = (function(){
|
||||
}
|
||||
}
|
||||
|
||||
r.getPosition = function(card){
|
||||
r.getPosition = function(card) {
|
||||
for(var i = 0; i < this._cards.length; i++) {
|
||||
if(this._cards[i].getID() === card.getID()) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
r.isOnField = function(card){
|
||||
if(this._hasHornField && this.getHorn() && card.getID() === this.getHorn().getID()){
|
||||
r.isOnField = function(card) {
|
||||
if(this._hasHornField && this.getHorn() && card.getID() === this.getHorn().getID()) {
|
||||
return true;
|
||||
}
|
||||
return this.getPosition(card) >= 0;
|
||||
}
|
||||
|
||||
r.replaceWith = function(oldCard, newCard){
|
||||
r.replaceWith = function(oldCard, newCard) {
|
||||
var index = this.getPosition(oldCard);
|
||||
this._cards[index] = newCard;
|
||||
oldCard.reset();
|
||||
for(var event in oldCard._uidEvents) {
|
||||
if(this.side && this.side.off){
|
||||
if(this.side && this.side.off) {
|
||||
this.side.off(event, oldCard.getUidEvents(event));
|
||||
}
|
||||
}
|
||||
return oldCard;
|
||||
}
|
||||
|
||||
r.getCard = function(id){
|
||||
r.getCard = function(id) {
|
||||
for(var i = 0; i < this._cards.length; i++) {
|
||||
var card = this._cards[i];
|
||||
if(card.getID() == id) return card;
|
||||
@ -90,7 +90,7 @@ var Field = (function(){
|
||||
return -1;
|
||||
}
|
||||
|
||||
r.removeAll = function(){
|
||||
r.removeAll = function() {
|
||||
var tmp = this._cards.slice();
|
||||
var self = this;
|
||||
/*for(var i = 0; i < tmp.length; i++) {
|
||||
@ -104,13 +104,13 @@ var Field = (function(){
|
||||
}
|
||||
this._cards[i] = null;
|
||||
}*/
|
||||
tmp.forEach(function(card, i){
|
||||
tmp.forEach(function(card, i) {
|
||||
card.reset();
|
||||
if(card.__lock){
|
||||
if(card.__lock) {
|
||||
return;
|
||||
}
|
||||
for(var event in card._uidEvents) {
|
||||
if(this.side && this.side.off){
|
||||
if(this.side && this.side.off) {
|
||||
this.side.off(event, card.getUidEvents(event));
|
||||
}
|
||||
}
|
||||
@ -119,7 +119,7 @@ var Field = (function(){
|
||||
|
||||
this._cards = _.without(this._cards, null);
|
||||
|
||||
if(this.getHorn()){
|
||||
if(this.getHorn()) {
|
||||
var card = this.getHorn();
|
||||
card.reset();
|
||||
this.setHorn(null);
|
||||
@ -131,17 +131,17 @@ var Field = (function(){
|
||||
return tmp;
|
||||
}
|
||||
|
||||
r.removeCard = function(cards){
|
||||
r.removeCard = function(cards) {
|
||||
var res = [];
|
||||
var _cards = this.get();
|
||||
if(!Array.isArray(cards)){
|
||||
if(!Array.isArray(cards)) {
|
||||
cards = [cards];
|
||||
}
|
||||
var self = this;
|
||||
cards.forEach(function(card){
|
||||
cards.forEach(function(card) {
|
||||
card.reset();
|
||||
for(var event in card._uidEvents) {
|
||||
if(this.side && this.side.off){
|
||||
if(this.side && this.side.off) {
|
||||
this.side.off(event, card.getUidEvents(event));
|
||||
}
|
||||
}
|
||||
@ -151,7 +151,7 @@ var Field = (function(){
|
||||
return res;
|
||||
}
|
||||
|
||||
r.getInfo = function(){
|
||||
r.getInfo = function() {
|
||||
var self = this;
|
||||
return {
|
||||
cards: self._cards,
|
||||
@ -160,27 +160,27 @@ var Field = (function(){
|
||||
}
|
||||
}
|
||||
|
||||
r.getHorn = function(){
|
||||
r.getHorn = function() {
|
||||
if(!this._hasHornField) return null;
|
||||
return this._hornCard;
|
||||
}
|
||||
|
||||
r.setHorn = function(card){
|
||||
r.setHorn = function(card) {
|
||||
if(!this._hasHornField) return null;
|
||||
this._hornCard = card;
|
||||
}
|
||||
|
||||
r.getHighestCards = function(noHeroes){
|
||||
r.getHighestCards = function(noHeroes) {
|
||||
noHeroes = noHeroes || false;
|
||||
var res = [];
|
||||
var highest = 0;
|
||||
|
||||
this.get().forEach(function(card){
|
||||
this.get().forEach(function(card) {
|
||||
if(noHeroes && card.hasAbility("hero")) return;
|
||||
highest = card.getPower() > highest ? card.getPower() : highest;
|
||||
})
|
||||
|
||||
this.get().forEach(function(card){
|
||||
this.get().forEach(function(card) {
|
||||
if(noHeroes && card.hasAbility("hero")) return;
|
||||
if(card.getPower() === highest) res.push(card);
|
||||
});
|
||||
|
@ -1,23 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="csrf-token" class="token" content="{{ csrf_token() }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Gwent Online</title>
|
||||
|
||||
<link href="{{ url('favicon.ico') }}" rel="icon" type="image/x-icon">
|
||||
<link href="{{ url('assets/css/app.css') }}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body class="{{ $section }}">
|
||||
|
||||
<component is="{{ $section }}"></component>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="{{ url('assets/js/bundle.js') }}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
var Vue = require('vue');
|
||||
var VueRouter = require('vue-router');
|
||||
|
||||
Vue.use(VueRouter)
|
||||
Vue.use(require('vue-resource'));
|
||||
Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content');
|
||||
|
||||
var app = Vue.extend({
|
||||
components: {
|
||||
inner: require('./modules/inner/components/inner'),
|
||||
landing: require('./modules/landing/components/landing')
|
||||
}
|
||||
});
|
||||
|
||||
var routes = require('./routes');
|
||||
var router = new VueRouter(routes.options);
|
||||
|
||||
router.map(routes.maps);
|
||||
router.start(app, 'body');
|
||||
|
||||
new Vue({
|
||||
el: 'body'
|
||||
});
|
@ -1,105 +0,0 @@
|
||||
var cards = require("../../../../../../assets/data/cards");
|
||||
var deck = require("../../../../../../assets/data/deck");
|
||||
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/deck-builder.html'),
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
cards: [],
|
||||
deck: [],
|
||||
|
||||
allLeaders: [],
|
||||
myLeaders: [],
|
||||
|
||||
factionFilter: 'northern_realm',
|
||||
|
||||
modalLeader: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
showleaders: require('./show-leaders')
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this.initCards();
|
||||
this.initDeck();
|
||||
},
|
||||
|
||||
filters: {
|
||||
|
||||
// Iterate for correct card type and merge multiple cards.
|
||||
getType: function(c, type) {
|
||||
var a = [];
|
||||
var itemCount = {};
|
||||
|
||||
var tmp = $.map(c, (item) => {
|
||||
if($.inArray(item.card.type, type) > -1) {
|
||||
if($.inArray(item.card.name, a) > -1) {
|
||||
itemCount[item.card.name] = (itemCount[item.card.name] || 1) + 1;
|
||||
} else {
|
||||
a.push(item.card.name);
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// todo: extract to method
|
||||
var tmp2 = $.map(tmp, (item) => {
|
||||
if(itemCount[item.card.name]) {
|
||||
item.count = itemCount[item.card.name];
|
||||
}
|
||||
|
||||
return item;
|
||||
});
|
||||
|
||||
return tmp2;
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeDeck: function(deck) {
|
||||
// todo: load animation
|
||||
$('.all-cards, .all-deck').addClass('remove');
|
||||
this.factionFilter = deck;
|
||||
this.initDeck();
|
||||
$('.all-cards, .all-deck').scrollTop(0);
|
||||
|
||||
setTimeout(function() {
|
||||
$('.all-cards, .all-deck').removeClass('remove');
|
||||
}, 500);
|
||||
},
|
||||
|
||||
// Filter for leaders and store them separately.
|
||||
initCards: function() {
|
||||
this.cards = $.map(cards, (n) => {
|
||||
if(n.type != 3) return n;
|
||||
|
||||
this.allLeaders.push(n);
|
||||
});
|
||||
},
|
||||
|
||||
initDeck: function() {
|
||||
this.deck = [];
|
||||
var _deck = deck[this.factionFilter];
|
||||
|
||||
for(var item in _deck) {
|
||||
this.deck.push({
|
||||
card: cards[_deck[item]],
|
||||
count: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
showLeaders: function(currentLeader) {
|
||||
this.myLeaders = $.map(this.allLeaders, (item) => {
|
||||
if(item.faction == this.factionFilter) return item;
|
||||
});
|
||||
|
||||
this.modalLeader = true;
|
||||
}
|
||||
}
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/show-leaders.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
methods: {
|
||||
closeLeaders(e) {
|
||||
if(e == 'close' || e.target.className == 'modal active' ) {
|
||||
this.modalLeader = false;
|
||||
}
|
||||
},
|
||||
|
||||
chooseLeader(card) {
|
||||
// todo: make own leader variable
|
||||
for(var item in this.deck) {
|
||||
if(this.deck[item].card.type == 3) {
|
||||
this.deck.$set(item, {card});
|
||||
}
|
||||
}
|
||||
|
||||
this.closeLeaders('close');
|
||||
}
|
||||
}
|
||||
};
|
@ -1,218 +0,0 @@
|
||||
<showleaders></showleaders>
|
||||
|
||||
<div class="heading">
|
||||
<div class="heading-decks">
|
||||
<a v-class="active: factionFilter == 'northern_realm'" v-on="click: changeDeck('northern_realm')">Northern Realm</a>
|
||||
<a v-class="active: factionFilter == 'scoiatael'" v-on="click: changeDeck('scoiatael')">Scoia'tael</a>
|
||||
<a v-class="active: factionFilter == 'monster'" v-on="click: changeDeck('monster')">Monster</a>
|
||||
</div>
|
||||
|
||||
<div class="heading-my-deck">
|
||||
<span>My Deck</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="all-cards-wrap">
|
||||
<div class="all-cards">
|
||||
<div class="clear-space"></div>
|
||||
|
||||
<div class="card-wrap" v-repeat="card: cards | filterBy factionFilter in faction" track-by="$index">
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img card" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
|
||||
<div class="clear-space"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="all-deck-wrap">
|
||||
<div class="all-deck">
|
||||
|
||||
<div class="clear-space"></div>
|
||||
|
||||
<!-- todo: own component -->
|
||||
<div class="my-card-container">
|
||||
<span>LEADER</span>
|
||||
|
||||
<div class="card-wrap-small" v-repeat="item: deck | getType [3]" track-by="$index" v-on="click: showLeaders(item.name)">
|
||||
<div class="count-card no-select">{{ item.count > 1 ? item.count + 'x' : '' }}</div>
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img-small card-small-small" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + item.card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="my-card-container">
|
||||
<span>CLOSE COMBAT</span>
|
||||
|
||||
<div class="card-wrap-small" v-repeat="item: deck | getType [0]" track-by="$index">
|
||||
<div class="count-card no-select">{{ item.count > 1 ? item.count + 'x' : '' }}</div>
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img-small card-small-small" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + item.card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-card-container">
|
||||
<span>RANGE</span>
|
||||
|
||||
<div class="card-wrap-small" v-repeat="item: deck | getType [1]" track-by="$index">
|
||||
<div class="count-card no-select">{{ item.count > 1 ? item.count + 'x' : '' }}</div>
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img-small card-small-small" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + item.card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-card-container">
|
||||
<span>SPECIAL</span>
|
||||
|
||||
<div class="card-wrap-small" v-repeat="item: deck | getType [4,5]" track-by="$index">
|
||||
<div class="count-card no-select">{{ item.count > 1 ? item.count + 'x' : '' }}</div>
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img-small card-small-small" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + item.card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear-space"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.count-card {
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 60%;
|
||||
top: 60%;
|
||||
z-index: 100;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 0 2px #000;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.my-card-container {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 0 0 50px 0;
|
||||
}
|
||||
|
||||
.my-card-container span {
|
||||
color: #435365;
|
||||
font-size: 16px !important;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
float: left;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.delete {
|
||||
float: left;
|
||||
clear: both;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.images {
|
||||
position: relative;
|
||||
width: 70px;
|
||||
height: 132px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.img-small {
|
||||
float: left;
|
||||
background-size: 70px 132px;
|
||||
width: 70px;
|
||||
height: 132px;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.img-small:nth-child(2) {
|
||||
top: 3px;
|
||||
z-index: 99;
|
||||
right: -3px;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.img-small:nth-child(3) {
|
||||
top: 6px;
|
||||
z-index: 98;
|
||||
right: -6px;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.my-card {
|
||||
color: #c3cdd8;
|
||||
float: left;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.all-deck i {
|
||||
color: #435365;
|
||||
font-style: normal;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
margin: 8px 0 0 0;
|
||||
}
|
||||
|
||||
.sep {
|
||||
float: left;
|
||||
margin: 0 0 0 20px;
|
||||
width: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.all-deck span {
|
||||
color: #435365;
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.all-deck-wrap {
|
||||
width: 47%;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
height: calc(100% + 40px);
|
||||
margin: -80px 0 0 0;
|
||||
}
|
||||
|
||||
.all-deck {
|
||||
float: left;
|
||||
width: calc(100% + 40px);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 0 50px 0 30px;
|
||||
}
|
||||
|
||||
.shadow-all-cards {
|
||||
height: 60px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.test {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 100%;;
|
||||
}
|
||||
|
||||
.remove {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
@ -1,12 +0,0 @@
|
||||
<div class="modal" v-class="active: modalLeader" v-on="click: closeLeaders">
|
||||
<div class="wrap-modal-leaders">
|
||||
|
||||
<div class="card-wrap card-wrap-big" v-repeat="card: myLeaders" v-on="click: chooseLeader(card)">
|
||||
<div class="bla ani"></div>
|
||||
<div class="card-img card" v-style="background-image: 'url(http://80.240.132.120/gwent/assets/cards/' + card.img + '.png)'"></div>
|
||||
<div class="shadow"></div>
|
||||
<div class="overlay-card"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,19 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/chat.html'),
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
message: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
submitChat: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
console.log(this.message);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/inner.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
modal: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
searchmatch: require('./search-match'),
|
||||
navigation: require('./navigation'),
|
||||
chat: require('./chat'),
|
||||
|
||||
lobby: require('./../../lobby/components/lobby'),
|
||||
deckBuilder: require('./../../deck-builder/components/deck-builder'),
|
||||
}
|
||||
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/navigation.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
// todo: work with slug filter
|
||||
navigation: [
|
||||
{ name: 'Lobby', route: '/lobby' },
|
||||
{ name: 'Deck Builder', route: '/deck-builder' },
|
||||
{ name: 'Highscore', route: '/highscore' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
searchMatch: function() {
|
||||
this.modal = true;
|
||||
// trigger match functions
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/search-match.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
methods: {
|
||||
cancelMatch: function() {
|
||||
this.modal = false;
|
||||
// trigger match functions
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
<section class="container-chat">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a class="active">Lobby Chat</a></li>
|
||||
<!--li><a>Current Match</a></li-->
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="chat">
|
||||
<div class="chats">
|
||||
blaa blaa
|
||||
</div>
|
||||
|
||||
<textarea class="chatbox" placeholder="Type an message..." v-model="message" autofocus v-on="keydown: submitChat(this) | key 'enter'"></textarea>
|
||||
</div>
|
||||
|
||||
</section>
|
@ -1,26 +0,0 @@
|
||||
<searchmatch></searchmatch>
|
||||
|
||||
<a href="./lobby"><img src="assets/img/logo-medium.png" width="120" height="38" alt="Gwent" class="logo-medium"></a>
|
||||
|
||||
<main>
|
||||
|
||||
<style>
|
||||
.test {
|
||||
transition: all .5s ease;
|
||||
}
|
||||
.test-enter, .test-leave {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<navigation></navigation>
|
||||
|
||||
<section class="container-content">
|
||||
|
||||
<router-view class="test" v-transition="test" transition-mode="out-in"></router-view>
|
||||
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<component is="chat"></component>
|
@ -1,11 +0,0 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li v-repeat="nav: navigation">
|
||||
<a v-link="{{ nav.route }}" class="{{ route.path == nav.route ? 'active' : '' }}">
|
||||
{{ nav.name }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="sub-nav" v-on="click: searchMatch"><a>Quick Match</a></li>
|
||||
</ul>
|
||||
</nav>
|
@ -1,12 +0,0 @@
|
||||
<div class="modal" v-class="active: modal">
|
||||
<div class="modal-banner">
|
||||
<div class="wrap-modal-search">
|
||||
|
||||
<i class="icon-content-load"></i>
|
||||
<p class="modal-para">Search for Player</p>
|
||||
|
||||
<span class="btn-sub" v-on="click: cancelMatch">Cancel</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,49 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/landing.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
modal: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
login: require('./../../session/components/login'),
|
||||
register: require('./../../session/components/register')
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
setTimeout(function() {
|
||||
$('.container-form-landing').addClass('active')
|
||||
}, 300);
|
||||
},
|
||||
|
||||
methods: {
|
||||
asGuest: function() {
|
||||
// set localstorage for guest
|
||||
$('.icon-guest-load').show();
|
||||
|
||||
setTimeout(function() {
|
||||
window.location.href = './lobby';
|
||||
}, 500);
|
||||
},
|
||||
|
||||
openLogin: function() {
|
||||
this.modal = true;
|
||||
|
||||
setTimeout(function() {
|
||||
$('.login-username').focus();
|
||||
}, 300);
|
||||
},
|
||||
|
||||
closeLogin: function(e) {
|
||||
if(e.target.className == 'modal active') {
|
||||
this.modal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
<login></login>
|
||||
|
||||
<section class="container-landing">
|
||||
<div class="wrap-landing">
|
||||
<img src="assets/img/logo-big.png" width="243" height="85" alt="Gwent" class="logo-big">
|
||||
|
||||
<p class="teaser-landing">
|
||||
Play The Witcher Gwent Card-Game online!<br>
|
||||
Play with randomly generated teams, or build your own!
|
||||
</p>
|
||||
|
||||
<div class="container-form-landing">
|
||||
|
||||
<register></register>
|
||||
|
||||
<span class="choose">or</span>
|
||||
|
||||
<a class="btn-second btn-guest" v-on="click: asGuest">Play as guest <i class="icon-guest-load"></i></a>
|
||||
<a class="btn-none btn-login" v-on="click: openLogin">Login</a>
|
||||
|
||||
<span class="form-error">Nope Nope</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/lobby.html')
|
||||
|
||||
};
|
@ -1 +0,0 @@
|
||||
|
@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/login.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
@ -1,41 +0,0 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/register.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
username: '',
|
||||
password: '',
|
||||
email: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
register: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if( ! this.username || ! this.password || ! this.email) {
|
||||
$('.form-error').hide().fadeIn('fast');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$('.form-error').hide();
|
||||
$('.icon-action-load').show();
|
||||
|
||||
this.$http.post('./api/register', this.$data, function(data) {
|
||||
|
||||
location.reload();
|
||||
|
||||
}).error(function (data) {
|
||||
|
||||
$('.icon-action-load').hide();
|
||||
|
||||
})
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
@ -1,19 +0,0 @@
|
||||
<div class="modal" v-class="active: modal" v-on="click: closeLogin">
|
||||
<div class="modal-banner">
|
||||
<div class="wrap-modal-login">
|
||||
|
||||
<form class="form-session">
|
||||
<input type="text" placeholder="Username" class="field-session login-username">
|
||||
<input type="password" placeholder="Password" class="field-session login-password">
|
||||
|
||||
<div class="wrap-btn-action btn-register-action">
|
||||
<input type="submit" value="Login" class="btn-action">
|
||||
<i class="icon-action-load"></i>
|
||||
</div>
|
||||
|
||||
<span class="btn-sub">Forgot Password?</span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +0,0 @@
|
||||
<form class="form-session">
|
||||
<input type="text" placeholder="Username" class="field-session field-username" autofocus v-model="username">
|
||||
<input type="text" placeholder="E-Mail" class="field-session field-email" v-model="email">
|
||||
<input type="password" placeholder="Password" class="field-session field-password" v-model="password">
|
||||
|
||||
<div class="wrap-btn-action btn-register-action" v-on="click: register">
|
||||
<input type="submit" value="Register" class="btn-action" v-on="submit: register">
|
||||
<i class="icon-action-load"></i>
|
||||
</div>
|
||||
</form>
|
@ -1,19 +0,0 @@
|
||||
require('../../../public/Config.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
maps: {
|
||||
'/lobby': {
|
||||
component: 'lobby'
|
||||
},
|
||||
|
||||
'/deck-builder': {
|
||||
component: 'deckBuilder'
|
||||
}
|
||||
},
|
||||
|
||||
options: {
|
||||
history: true,
|
||||
root: window.Config.Site.base
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
* {
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
min-width: 1200px;
|
||||
overflow: hidden;
|
||||
font-family: 'Titillium Web', sans-serif;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: rgba($main, .99);
|
||||
color: #fff;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: rgba($main, .99);
|
||||
color: #fff;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
font-family: 'Titillium Web', sans-serif;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
a { text-decoration: none; }
|
||||
ul { list-style: none; }
|
||||
|
||||
.no-select {
|
||||
user-select: none;
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
.container-chat {
|
||||
float: right;
|
||||
width: 29%;
|
||||
|
||||
a {
|
||||
font-size: 14px;
|
||||
padding: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.chat {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
height: calc(100vh - 200px);
|
||||
min-height: 400px;
|
||||
clear: both;
|
||||
position: relative;
|
||||
|
||||
color: #fff;
|
||||
|
||||
@include contentGradient();
|
||||
}
|
||||
|
||||
.chats {
|
||||
float: left;
|
||||
overflow-y: auto;
|
||||
height: calc(100% - 80px);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chatbox {
|
||||
height: 80px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
resize: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 20px;
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
color: #8798ac;
|
||||
|
||||
@include contentGradient();
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'Titillium Web';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Titillium WebLight'), local('TitilliumWeb-Light'), url(http://fonts.gstatic.com/s/titilliumweb/v4/anMUvcNT0H1YN4FII8wpr6YfJ4wTnNoNUCmOpdh16Tg.woff2) format('woff2'), url(http://fonts.gstatic.com/s/titilliumweb/v4/anMUvcNT0H1YN4FII8wpr1uKlGE8-OjkUKWan_M3D6s.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Titillium Web';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Titillium Web'), local('TitilliumWeb-Regular'), url(http://fonts.gstatic.com/s/titilliumweb/v4/7XUFZ5tgS-tD6QamInJTceHuglUR2dhBxWD-q_ehMME.woff2) format('woff2'), url(http://fonts.gstatic.com/s/titilliumweb/v4/7XUFZ5tgS-tD6QamInJTcZ_o9VAbKgK36i-4snuAuCM.woff) format('woff');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Titillium Web';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: local('Titillium WebSemiBold'), local('TitilliumWeb-SemiBold'), url(http://fonts.gstatic.com/s/titilliumweb/v4/anMUvcNT0H1YN4FII8wpr6d1JQt-lS5nD-1TJX2NNl0.woff2) format('woff2'), url(http://fonts.gstatic.com/s/titilliumweb/v4/anMUvcNT0H1YN4FII8wprx3QmhlKDgQgT1VN2Ed1WFo.woff) format('woff');
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
.icon-action-load {
|
||||
background: url(../img/action-load.gif) no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
float: right;
|
||||
margin: 5px -7px 0 7px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-session {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.field-session {
|
||||
float: left;
|
||||
padding: 10px 20px;
|
||||
border: 0;
|
||||
color: #8798ac;
|
||||
font-size: 16px;
|
||||
margin: 0 10px 0 0;
|
||||
height: 48px;
|
||||
width: 220px;
|
||||
|
||||
@include secondGradient();
|
||||
|
||||
.container-form-landing & {
|
||||
width: 170px;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap-btn-action {
|
||||
float: left;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
height: 48px;
|
||||
|
||||
@include mainGradient();
|
||||
@include transition(box-shadow);
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 0 10px 0 rgba($main, .8);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-action {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
|
||||
float: left;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.btn-second,
|
||||
.btn-none {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
border: 0;
|
||||
padding: 10px 20px;
|
||||
float: left;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
height: 48px;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
|
||||
@include secondGradient();
|
||||
@include transition();
|
||||
}
|
||||
|
||||
.btn-second {
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 0 10px 0 rgba(#fff, .1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-none {
|
||||
background: transparent;
|
||||
color: #8798ac;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: darken(#8798ac, 10%);
|
||||
}
|
||||
:-moz-placeholder {
|
||||
color: darken(#8798ac, 10%);
|
||||
opacity: 1;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
color: darken(#8798ac, 10%);
|
||||
opacity: 1;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
color: darken(#8798ac, 10%);
|
||||
}
|
||||
|
||||
.form-error {
|
||||
float: left;
|
||||
clear: both;
|
||||
color: #c64b4b;
|
||||
font-size: 15px;
|
||||
margin: 20px 0;
|
||||
display: none;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
body.inner {
|
||||
background: url(../img/inner-bg.jpg) #162232 center top no-repeat;
|
||||
background-size: cover;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.logo-medium {
|
||||
float: left;
|
||||
}
|
||||
|
||||
main {
|
||||
float: left;
|
||||
clear: both;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.container-content {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
height: calc(100vh - 150px);
|
||||
min-height: 400px;
|
||||
clear: both;
|
||||
position: relative;
|
||||
|
||||
color: #fff;
|
||||
|
||||
@include contentGradient();
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
body.landing {
|
||||
background: url(../img/landing-bg.jpg) #162232 center top no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.icon-guest-load {
|
||||
background: url(../img/guest-load.gif) no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
float: right;
|
||||
margin: 5px -7px 0 7px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wrap-landing {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-big {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.container-landing {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 12% 0 0 0;
|
||||
|
||||
@include mq(medium) {
|
||||
margin: 9% 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.teaser-landing {
|
||||
text-align: center;
|
||||
font-size: 21px;
|
||||
font-weight: 300;
|
||||
text-shadow: 0 0 10px rgba(#fff, .6);
|
||||
color: #8798ac;
|
||||
line-height: 29pt;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.choose {
|
||||
float: left;
|
||||
color: #8798ac;
|
||||
margin: 10px 30px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.container-form-landing {
|
||||
margin: 40px 0;
|
||||
opacity: 0;
|
||||
|
||||
&.active {
|
||||
transition: all .4s ease-in-out 0s;
|
||||
|
||||
margin: 60px 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
$main: #d96f1f;
|
||||
|
||||
@mixin mainGradient() {
|
||||
background: #da7020;
|
||||
background: -moz-linear-gradient(left, #da7020 0%, #ca5907 100%);
|
||||
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#da7020), color-stop(100%,#ca5907));
|
||||
background: -webkit-linear-gradient(left, #da7020 0%,#ca5907 100%);
|
||||
background: -o-linear-gradient(left, #da7020 0%,#ca5907 100%);
|
||||
background: -ms-linear-gradient(left, #da7020 0%,#ca5907 100%);
|
||||
background: linear-gradient(to right, #da7020 0%,#ca5907 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#da7020', endColorstr='#ca5907',GradientType=1 );
|
||||
}
|
||||
|
||||
@mixin secondGradient() {
|
||||
background: #243141;
|
||||
background: -moz-linear-gradient(left, #243141 0%, #334152 100%);
|
||||
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#243141), color-stop(100%,#334152));
|
||||
background: -webkit-linear-gradient(left, #243141 0%,#334152 100%);
|
||||
background: -o-linear-gradient(left, #243141 0%,#334152 100%);
|
||||
background: -ms-linear-gradient(left, #243141 0%,#334152 100%);
|
||||
background: linear-gradient(to right, #243141 0%,#334152 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#243141', endColorstr='#334152',GradientType=1 );
|
||||
}
|
||||
|
||||
@mixin contentGradient() {
|
||||
background: #080d14;
|
||||
background: -moz-linear-gradient(top, rgba(8,13,20,1) 4%, rgba(8,13,20,0.56) 46%, rgba(239,239,239,0) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(4%,rgba(8,13,20,1)), color-stop(46%,rgba(8,13,20,0.56)), color-stop(100%,rgba(239,239,239,0)));
|
||||
background: -webkit-linear-gradient(top, rgba(8,13,20,1) 4%,rgba(8,13,20,0.56) 46%,rgba(239,239,239,0) 100%);
|
||||
background: -o-linear-gradient(top, rgba(8,13,20,1) 4%,rgba(8,13,20,0.56) 46%,rgba(239,239,239,0) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(8,13,20,1) 4%,rgba(8,13,20,0.56) 46%,rgba(239,239,239,0) 100%);
|
||||
background: linear-gradient(to bottom, rgba(8,13,20,1) 4%,rgba(8,13,20,0.56) 46%,rgba(239,239,239,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#080d14', endColorstr='#00efefef',GradientType=0 );
|
||||
}
|
||||
|
||||
@mixin transition($type: all) {
|
||||
transition: $type .3s ease-in-out 0s;
|
||||
}
|
||||
|
||||
@mixin mq($point) {
|
||||
@if $point == big {
|
||||
@media (max-width: 1600px) { @content; }
|
||||
}
|
||||
@else if $point == medium {
|
||||
@media (max-width: 1450px) { @content; }
|
||||
}
|
||||
@else if $point == small {
|
||||
@media (max-width: 600px) { @content; }
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
.wrap-modal-login {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.wrap-modal-search {
|
||||
max-width: 250px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wrap-modal-leaders {
|
||||
margin: 14vh auto;
|
||||
max-width: 750px;
|
||||
|
||||
@include transition();
|
||||
|
||||
.active & {
|
||||
margin: 15vh auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(14, 27, 43, .5);
|
||||
z-index: 9999;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
|
||||
@include transition();
|
||||
|
||||
&.active {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-banner {
|
||||
z-index: 20;
|
||||
background: rgba(6, 13, 22, .95);
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
padding: 50px 0;
|
||||
margin: 24vh 0 0 0;
|
||||
float: left;
|
||||
|
||||
@include transition();
|
||||
|
||||
.active & {
|
||||
margin: 25vh 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-content-load {
|
||||
background: url(../img/content-load.gif) no-repeat;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
opacity: .9;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.modal-para {
|
||||
font-size: 17px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 300;
|
||||
text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
|
||||
color: #8798ac;
|
||||
margin: 20px 0 50px 0;
|
||||
}
|
||||
|
||||
.btn-sub {
|
||||
color: darken(#8798ac, 30%);
|
||||
cursor: pointer;
|
||||
text-transform: uppercase;
|
||||
|
||||
@include transition();
|
||||
|
||||
&:hover {
|
||||
color: #8798ac;
|
||||
}
|
||||
|
||||
.wrap-modal-login & {
|
||||
margin: 30px 0 0 0;
|
||||
float: left;
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
nav {
|
||||
float: left;
|
||||
margin: 30px 0 0 0;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
|
||||
ul {
|
||||
float: left;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #8798ac;
|
||||
text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
|
||||
font-size: 19px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 300;
|
||||
padding: 12px 30px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
height: 55px;
|
||||
|
||||
@include transition();
|
||||
|
||||
&:hover {
|
||||
color: #c5cfda;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: $main;
|
||||
text-shadow: none;
|
||||
background: #080d14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sub-nav {
|
||||
float: right;
|
||||
|
||||
a {
|
||||
padding: 12px;
|
||||
color: $main;
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
@ -1,427 +0,0 @@
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||
* and Firefox.
|
||||
* Correct `block` display not defined for `main` in IE 11.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9/10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow not hidden in IE 9/10/11.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contain overflow in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address odd `em`-unit font size rendering in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
* styling of `select`, unless a `border` property is set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Correct color not being inherited.
|
||||
* Known issue: affects color of disabled elements.
|
||||
* 2. Correct font properties not being inherited.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||
* Correct `select` style inheritance in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
* It's recommended that you don't attempt to style these elements.
|
||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
*
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
* `font-size` values of the `input`, it causes the cursor style of the
|
||||
* decrement button to change from `default` to `text`.
|
||||
*/
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; /* 2 */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||
* padding (and `textfield` appearance).
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't inherit the `font-weight` (applied by a rule above).
|
||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
*/
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Tables
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
@ -1,293 +0,0 @@
|
||||
.card-img {
|
||||
background-size: 120px 227px;
|
||||
width: 120px;
|
||||
height: 227px;
|
||||
}
|
||||
|
||||
.card-img-small {
|
||||
background-size: 70px 132px;
|
||||
width: 70px;
|
||||
height: 132px;
|
||||
}
|
||||
|
||||
.card-wrap-big .card-img {
|
||||
background-size: 150px 284px !important;
|
||||
width: 150px !important;
|
||||
height: 284px !important;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
.card,
|
||||
.card-small-small {
|
||||
float: left;
|
||||
border-radius: 12px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
.card-small-small {
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.bla {
|
||||
border-radius: 14px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.card-wrap-small .bla {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.card-wrap:hover .bla,
|
||||
.card-wrap-small:hover .bla {
|
||||
box-shadow: 0 0 2px 0 orange;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
border-radius: 35%;
|
||||
box-shadow: 0 0 15px 14px #ffa500;
|
||||
content: "";
|
||||
height: calc(100% - 50px);
|
||||
left: 15px;
|
||||
position: absolute;
|
||||
width: calc(100% - 22px);
|
||||
z-index: 1;
|
||||
top: 30px;
|
||||
transition: all 0.3s ease-in-out 0s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.card-wrap:hover .shadow,
|
||||
.card-wrap-small:hover .shadow {
|
||||
-webkit-animation: Shadow 4s ease-in-out infinite;
|
||||
-moz-animation: Shadow 4s ease-in-out infinite;
|
||||
animation: Shadow 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.ani {
|
||||
background: linear-gradient(2deg, #000, #000, #000, #000);;
|
||||
transition: all .05s ease-in-out 0s;
|
||||
}
|
||||
|
||||
.card-wrap:hover .ani,
|
||||
.card-wrap-small:hover .ani {
|
||||
background: linear-gradient(2deg, #ffa500, #ffd68b, #ffa500, #ffa500);
|
||||
background-size: 800% 800%;
|
||||
|
||||
-webkit-animation: AnimationName 3s ease infinite;
|
||||
-moz-animation: AnimationName 3s ease infinite;
|
||||
animation: AnimationName 3s ease infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes Shadow {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
25% {
|
||||
opacity: .5;
|
||||
}
|
||||
50%{
|
||||
opacity: 1;
|
||||
}
|
||||
75% {
|
||||
opacity: .5;
|
||||
}
|
||||
100%{ opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes Shadow {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
25% {
|
||||
opacity: .5;
|
||||
}
|
||||
50%{
|
||||
opacity: 1;
|
||||
}
|
||||
75% {
|
||||
opacity: .5;
|
||||
}
|
||||
100%{ opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes Shadow {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
25% {
|
||||
opacity: .5;
|
||||
}
|
||||
50%{
|
||||
opacity: 1;
|
||||
}
|
||||
75% {
|
||||
opacity: .5;
|
||||
}
|
||||
100%{ opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.overlay-card {
|
||||
background: linear-gradient(2deg, rgba(255,255,255,.03), rgba(255,255,255,.2), rgba(255,255,255,.05));
|
||||
background-size: 800% 800%;
|
||||
position: absolute;
|
||||
z-index: 20;
|
||||
top: 6px;
|
||||
left: 6px;
|
||||
width: calc(100% - 4px);
|
||||
height: calc(100% - 4px);
|
||||
border-radius: 12px;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card-wrap:hover .overlay-card,
|
||||
.card-wrap-small:hover .overlay-card {
|
||||
opacity: 1;
|
||||
-webkit-animation: AnimationName 10s ease infinite;
|
||||
-moz-animation: AnimationName 10s ease infinite;
|
||||
animation: AnimationName 10s ease infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes AnimationName {
|
||||
0%{background-position:51% 0%}
|
||||
50%{background-position:50% 100%}
|
||||
100%{background-position:51% 0%}
|
||||
}
|
||||
@-moz-keyframes AnimationName {
|
||||
0%{background-position:51% 0%}
|
||||
50%{background-position:50% 100%}
|
||||
100%{background-position:51% 0%}
|
||||
}
|
||||
@keyframes AnimationName {
|
||||
0%{background-position:51% 0%}
|
||||
50%{background-position:50% 100%}
|
||||
100%{background-position:51% 0%}
|
||||
}
|
||||
|
||||
.card-wrap {
|
||||
float: left;
|
||||
width: 126px;
|
||||
height: 233px;
|
||||
position: relative;
|
||||
padding: 4px;
|
||||
|
||||
//transition: transform .1s ease-in-out 0s;
|
||||
|
||||
}
|
||||
|
||||
.card-wrap-big {
|
||||
width: 158px;
|
||||
height: 292px;
|
||||
transition: all 0.2s ease-in-out 0s;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
.card-wrap-big:hover {
|
||||
//transform: scale(1.1,1.1) !important;
|
||||
}
|
||||
|
||||
.card-wrap-small {
|
||||
float: left;
|
||||
width: 74px;
|
||||
height: 136px;
|
||||
position: relative;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.card-wrap:hover,
|
||||
.card-wrap-small:hover {
|
||||
z-index: 100;
|
||||
//transform: scale(1.01,1.01) !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* DECK BUILDER
|
||||
*/
|
||||
|
||||
.all-cards {
|
||||
float: left;
|
||||
width: calc(100% + 50px);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
//padding: 40px;
|
||||
}
|
||||
|
||||
.all-cards-wrap {
|
||||
overflow: hidden;
|
||||
width: 53%;
|
||||
float: left;
|
||||
height: calc(100% + 40px);
|
||||
padding: 0 20px;
|
||||
margin: -100px 0 0 0;
|
||||
}
|
||||
|
||||
.test {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.heading {
|
||||
float: left;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
padding: 25px 0;
|
||||
|
||||
background: -moz-linear-gradient(top, rgba(8,13,20,1) 0%, rgba(8,13,20,1) 36%, rgba(8,13,20,0.85) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(8,13,20,1)), color-stop(36%,rgba(8,13,20,1)), color-stop(100%,rgba(8,13,20,0.85)));
|
||||
background: -webkit-linear-gradient(top, rgba(8,13,20,1) 0%,rgba(8,13,20,1) 36%,rgba(8,13,20,0.85) 100%);
|
||||
background: -o-linear-gradient(top, rgba(8,13,20,1) 0%,rgba(8,13,20,1) 36%,rgba(8,13,20,0.85) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(8,13,20,1) 0%,rgba(8,13,20,1) 36%,rgba(8,13,20,0.85) 100%);
|
||||
background: linear-gradient(to bottom, rgba(8,13,20,1) 0%,rgba(8,13,20,1) 36%,rgba(8,13,20,0.85) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#080d14', endColorstr='#d9080d14',GradientType=0 );
|
||||
|
||||
.heading-decks {
|
||||
float: left;
|
||||
width: 53%;
|
||||
}
|
||||
|
||||
.heading-my-deck {
|
||||
float: left;
|
||||
width: 47%;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
span {
|
||||
float: left;
|
||||
font-size: 17px;
|
||||
color: #435365;
|
||||
font-weight: 600;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 17px;
|
||||
color: #435365;
|
||||
margin: 0 0 0 30px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
|
||||
&.active {
|
||||
color: #c3cdd8;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.clear-space {
|
||||
float: left;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
@import
|
||||
|
||||
'normalize',
|
||||
'mixins',
|
||||
'fonts',
|
||||
'base',
|
||||
'sprite',
|
||||
|
||||
'modal',
|
||||
'form',
|
||||
'landing',
|
||||
'inner',
|
||||
'nav',
|
||||
'chat',
|
||||
|
||||
'shame_cards';
|
@ -1,15 +0,0 @@
|
||||
var elixir = require('laravel-elixir');
|
||||
|
||||
elixir.config.sourcemaps = false;
|
||||
|
||||
elixir.config.cssOutput = './../public/assets/css';
|
||||
elixir.config.jsOutput = './../public/assets/js';
|
||||
elixir.config.assetsDir = 'assets/';
|
||||
elixir.config.publicDir = '../public/';
|
||||
|
||||
elixir(function(mix) {
|
||||
mix.sass('app.scss');
|
||||
mix.browserify('../../app/app.js');
|
||||
|
||||
mix.task('browserify', '../../app/**/*.js');
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.8",
|
||||
"laravel-elixir": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"director": "^1.2.8",
|
||||
"vue": "^0.12.1",
|
||||
"vue-resource": "^0.1.3"
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect Trailing Slashes...
|
||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 2.3 KiB |
@ -1,58 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader for
|
||||
| our application. We just need to utilize it! We'll simply require it
|
||||
| into the script here so that we don't have to worry about manual
|
||||
| loading any of our classes later on. It feels nice to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../server/bootstrap/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Turn On The Lights
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| We need to illuminate PHP development, so let us turn on the lights.
|
||||
| This bootstraps the framework and gets it ready for use, then it
|
||||
| will load up this application so that we can run it and send
|
||||
| the responses back to the browser and delight our users.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../server/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request
|
||||
| through the kernel, and send the associated response back to
|
||||
| the client's browser allowing them to enjoy the creative
|
||||
| and wonderful application we have prepared for them.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
$response = $kernel->handle(
|
||||
$request = Illuminate\Http\Request::capture()
|
||||
);
|
||||
|
||||
$response->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
@ -1,19 +0,0 @@
|
||||
APP_ENV=local
|
||||
APP_DEBUG=true
|
||||
APP_KEY=SomeRandomString
|
||||
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
class Inspire extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'inspire';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Display an inspiring quote';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
\Gwent\Console\Commands\Inspire::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$schedule->command('inspire')
|
||||
->hourly();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $message
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function withMessage($message)
|
||||
{
|
||||
$this->message = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function returnAccess($id)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Events;
|
||||
|
||||
abstract class Event
|
||||
{
|
||||
//
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class Handler extends ExceptionHandler {
|
||||
|
||||
/**
|
||||
* A list of the exception types that should not be reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
HttpException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $e
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
{
|
||||
return parent::report($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $e
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $e)
|
||||
{
|
||||
if($e instanceof NotFoundHttpException) {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
use DispatchesJobs, ValidatesRequests;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Gwent\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\Gwent\Http\Middleware\VerifyCsrfToken::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \Gwent\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'guest' => \Gwent\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
];
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
|
||||
class Authenticate
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
*
|
||||
* @var Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($this->auth->guest()) {
|
||||
if ($request->ajax()) {
|
||||
return response('Unauthorized.', 401);
|
||||
} else {
|
||||
return redirect()->guest('auth/login');
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
|
||||
|
||||
class EncryptCookies extends BaseEncrypter
|
||||
{
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
*
|
||||
* @var Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($this->auth->check()) {
|
||||
return redirect('/home');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||
|
||||
class VerifyCsrfToken extends BaseVerifier
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
abstract class Request extends FormRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
private $userID;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
private $accessPoint;
|
||||
|
||||
public function __construct($userID, $accessPoint)
|
||||
{
|
||||
|
||||
$this->userID = $userID;
|
||||
$this->accessPoint = $accessPoint;
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
// todo: move to controllers
|
||||
use Gwent\User;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
|
||||
Route::group(['prefix' => 'api'], function() {
|
||||
|
||||
post('/register', function() {
|
||||
$user = new User();
|
||||
$user->username = Request::input('username');
|
||||
$user->email = Request::input('email');
|
||||
$user->password = bcrypt(Request::input('password'));
|
||||
$user->save();
|
||||
|
||||
Auth::login($user);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
get('/lobby', function() {
|
||||
return innerView();
|
||||
});
|
||||
|
||||
get('/deck-builder', function() {
|
||||
return innerView();
|
||||
});
|
||||
|
||||
get('/highscore', function() {
|
||||
return innerView();
|
||||
});
|
||||
|
||||
get('/', function() {
|
||||
if(Auth::check()) {
|
||||
return redirect('/lobby');
|
||||
}
|
||||
|
||||
return view('app')->withSection('landing');
|
||||
});
|
||||
|
||||
function innerView()
|
||||
{
|
||||
return view('app')->withSection('inner');
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
||||
abstract class Job
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queueable Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This job base class provides a central location to place any logic that
|
||||
| is shared across all of your jobs. The trait included with the class
|
||||
| provides access to the "queueOn" and "delay" queue helper methods.
|
||||
|
|
||||
*/
|
||||
|
||||
use Queueable;
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Providers;
|
||||
|
||||
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
'Gwent\Events\SomeEvent' => [
|
||||
'Gwent\Listeners\EventListener',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any other events for your application.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Events\Dispatcher $events
|
||||
* @return void
|
||||
*/
|
||||
public function boot(DispatcherContract $events)
|
||||
{
|
||||
parent::boot($events);
|
||||
|
||||
//
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent\Providers;
|
||||
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* This namespace is applied to the controller routes in your routes file.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'Gwent\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Router $router)
|
||||
{
|
||||
//
|
||||
|
||||
parent::boot($router);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function map(Router $router)
|
||||
{
|
||||
$router->group(['namespace' => $this->namespace], function ($router) {
|
||||
require app_path('Http/routes.php');
|
||||
});
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Gwent;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
|
||||
class User extends Model implements AuthenticatableContract, CanResetPasswordContract
|
||||
{
|
||||
use Authenticatable, CanResetPassword;
|
||||
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'users';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['name', 'email', 'password'];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = ['password', 'remember_token'];
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any our classes "manually". Feels great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/bootstrap/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
new Symfony\Component\Console\Output\ConsoleOutput
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shutdown The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once Artisan has finished running. We will fire off the shutdown events
|
||||
| so that any final work may be done by the application before we shut
|
||||
| down the process. This is the last thing to happen to the request.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel->terminate($input, $status);
|
||||
|
||||
exit($status);
|
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The first thing we will do is create a new Laravel application instance
|
||||
| which serves as the "glue" for all the components of Laravel, and is
|
||||
| the IoC container for the system binding all of the various parts.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
realpath(__DIR__.'/../')
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we need to bind some important interfaces into the container so
|
||||
| we will be able to resolve them when needed. The kernels serve the
|
||||
| incoming requests to this application from both the web and CLI.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
Gwent\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
Gwent\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
Gwent\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This script returns the application instance. The instance is given to
|
||||
| the calling script so we can separate the building of the instances
|
||||
| from the actual running of the application and sending responses.
|
||||
|
|
||||
*/
|
||||
|
||||
return $app;
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Composer Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any our classes "manually". Feels great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include The Compiled Class File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| To dramatically increase your application's performance, you may use a
|
||||
| compiled class file which contains all of the classes commonly used
|
||||
| by a request. The Artisan "optimize" is used to create this file.
|
||||
|
|
||||
*/
|
||||
|
||||
$compiledPath = __DIR__.'/cache/compiled.php';
|
||||
|
||||
if (file_exists($compiledPath)) {
|
||||
require $compiledPath;
|
||||
}
|
2
site/server/bootstrap/cache/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": ["framework", "laravel"],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"laravel/framework": "5.1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"phpspec/phpspec": "~2.1"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database"
|
||||
],
|
||||
"psr-4": {
|
||||
"Gwent\\": "app/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/TestCase.php"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"post-install-cmd": [
|
||||
"php artisan clear-compiled",
|
||||
"php artisan optimize"
|
||||
],
|
||||
"pre-update-cmd": [
|
||||
"php artisan clear-compiled"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"php artisan optimize"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"php -r \"copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"php artisan key:generate"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
}
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY', 'SomeRandomString'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logging Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log settings for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Settings: "single", "daily", "syslog", "errorlog"
|
||||
|
|
||||
*/
|
||||
|
||||
'log' => 'single',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
* Laravel Framework Service Providers...
|
||||
*/
|
||||
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Routing\ControllerServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
Gwent\Providers\AppServiceProvider::class,
|
||||
Gwent\Providers\EventServiceProvider::class,
|
||||
Gwent\Providers\RouteServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Input' => Illuminate\Support\Facades\Input::class,
|
||||
'Inspiring' => Illuminate\Foundation\Inspiring::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Authentication Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the authentication driver that will be utilized.
|
||||
| This driver manages the retrieval and authentication of the users
|
||||
| attempting to get access to protected areas of your application.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'eloquent',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "Eloquent" authentication driver, we need to know which
|
||||
| Eloquent model should be used to retrieve your users. Of course, it
|
||||
| is often just the "User" model but you may use whatever you like.
|
||||
|
|
||||
*/
|
||||
|
||||
'model' => Gwent\User::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "Database" authentication driver, we need to know which
|
||||
| table should be used to retrieve your users. We have chosen a basic
|
||||
| default value but you may easily change it to any table you like.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'users',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the options for resetting passwords including the view
|
||||
| that is your password reset e-mail. You can also set the name of the
|
||||
| table that maintains all of the reset tokens for your application.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => [
|
||||
'email' => 'emails.password',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
|
||||
];
|
@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_KEY'),
|
||||
'secret' => env('PUSHER_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'servers' => [
|
||||
[
|
||||
'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => 'laravel',
|
||||
|
||||
];
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Additional Compiled Classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify additional classes to include in the compiled file
|
||||
| generated by the `artisan optimize` command. These should be classes
|
||||
| that are included on basically every request into the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => [
|
||||
//
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled File Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may list service providers which define a "compiles" function
|
||||
| that returns additional files that should be compiled, providing an
|
||||
| easy way to get common files from any packages you are utilizing.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
//
|
||||
],
|
||||
|
||||
];
|
@ -1,127 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDO Fetch Style
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, database results will be returned as instances of the PHP
|
||||
| stdClass object; however, you may desire to retrieve records in an
|
||||
| array format for simplicity. Here you can tweak the fetch style.
|
||||
|
|
||||
*/
|
||||
|
||||
'fetch' => PDO::FETCH_CLASS,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('database.sqlite'),
|
||||
'prefix' => '',
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => false,
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'schema' => 'public',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
||||
'cluster' => false,
|
||||
|
||||
'default' => [
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'database' => 0,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. A "local" driver, as well as a variety of cloud
|
||||
| based drivers are available for your choosing. Just store away!
|
||||
|
|
||||
| Supported: "local", "ftp", "s3", "rackspace"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'local',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cloud Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Many applications store files both locally and in the cloud. For this
|
||||
| reason, you may specify a default "cloud" driver here. This driver
|
||||
| will be bound as the Cloud disk implementation in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
'cloud' => 's3',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
'ftp' => [
|
||||
'driver' => 'ftp',
|
||||
'host' => 'ftp.example.com',
|
||||
'username' => 'your-username',
|
||||
'password' => 'your-password',
|
||||
|
||||
// Optional FTP Settings...
|
||||
// 'port' => 21,
|
||||
// 'root' => '',
|
||||
// 'passive' => true,
|
||||
// 'ssl' => true,
|
||||
// 'timeout' => 30,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => 'your-key',
|
||||
'secret' => 'your-secret',
|
||||
'region' => 'your-region',
|
||||
'bucket' => 'your-bucket',
|
||||
],
|
||||
|
||||
'rackspace' => [
|
||||
'driver' => 'rackspace',
|
||||
'username' => 'your-username',
|
||||
'key' => 'your-key',
|
||||
'container' => 'your-container',
|
||||
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
|
||||
'region' => 'IAD',
|
||||
'url_type' => 'publicURL',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
@ -1,124 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Mailgun mail service which will provide reliable deliveries.
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to deliver e-mails to
|
||||
| users of the application. Like the host we have set this value to
|
||||
| stay compatible with the Mailgun e-mail application by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => ['address' => null, 'name' => null],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Password
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the password required by your SMTP server to send out
|
||||
| messages from your application. This will be given to the server on
|
||||
| connection so that the application will be able to send messages.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail "Pretend"
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this option is enabled, e-mail will not actually be sent over the
|
||||
| web and will instead be written to your application's logs files so
|
||||
| you may inspect the message. This is great for local development.
|
||||
|
|
||||
*/
|
||||
|
||||
'pretend' => false,
|
||||
|
||||
];
|
@ -1,93 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Laravel queue API supports a variety of back-ends via an unified
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for each one. Here you may set the default queue driver.
|
||||
|
|
||||
| Supported: "null", "sync", "database", "beanstalkd",
|
||||
| "sqs", "iron", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_DRIVER', 'sync'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'expire' => 60,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'ttr' => 60,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => 'your-public-key',
|
||||
'secret' => 'your-secret-key',
|
||||
'queue' => 'your-queue-url',
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'iron' => [
|
||||
'driver' => 'iron',
|
||||
'host' => 'mq-aws-us-east-1.iron.io',
|
||||
'token' => 'your-token',
|
||||
'project' => 'your-project-id',
|
||||
'queue' => 'your-queue-name',
|
||||
'encrypt' => true,
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'expire' => 60,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'database' => 'mysql', 'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||
| default location for this type of information, allowing packages
|
||||
| to have a conventional place to find your various credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => '',
|
||||
'secret' => '',
|
||||
],
|
||||
|
||||
'mandrill' => [
|
||||
'secret' => '',
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => Gwent\User::class,
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
],
|
||||
|
||||
];
|
@ -1,153 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => 120,
|
||||
|
||||
'expire_on_close' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => 'laravel_session',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you if it can not be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => false,
|
||||
|
||||
];
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
realpath(base_path('../client')),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => realpath(storage_path('framework/views')),
|
||||
|
||||
];
|
1
site/server/database/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.sqlite
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of your model factories. Model factories give
|
||||
| you a convenient way to create models for testing and seeding your
|
||||
| database. Just tell the factory how a default model should look.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(Gwent\User::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
'password' => str_random(10),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('username')->unique();
|
||||
$table->string('email')->unique();
|
||||
$table->string('password', 60);
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
// $this->call('UserTableSeeder');
|
||||
|
||||
Model::reguard();
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
suites:
|
||||
main:
|
||||
namespace: Gwent
|
||||
psr4_prefix: Gwent
|
||||
src_path: app
|
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="bootstrap/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory>./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">app/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
</php>
|
||||
</phpunit>
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||
*/
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
);
|
||||
|
||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||
// application without having installed a "real" web server software here.
|
||||
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/public/index.php';
|