mirror of
https://github.com/exane/not-gwent-online
synced 2024-12-23 21:03:14 +00:00
rearrange folders
This commit is contained in:
parent
fef997614d
commit
0da37aa4b8
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
.idea
|
||||
build
|
||||
public/build
|
||||
public/index.html
|
@ -271,7 +271,7 @@ module.exports = {
|
||||
"havekar_healer": {
|
||||
name: "Havekar Healer",
|
||||
power: 0,
|
||||
ability: "morale_boost",
|
||||
ability: "medic",
|
||||
img: "healer",
|
||||
faction: "Scoia'tael",
|
||||
type: 1
|
||||
|
242
client/index.html
Normal file
242
client/index.html
Normal file
@ -0,0 +1,242 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Gwent</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="build/bootstrap.css">
|
||||
<link rel="stylesheet" href="build/main.css">
|
||||
<script src="Config.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script id="info-template" type="text/x-handlebars-template">
|
||||
<div class="col-xs-12 game-info game-info-foe foe">
|
||||
<div class="col-xs-12 info-name">{{name}}</div>
|
||||
<div class="col-xs-6 field-single field-leader"></div>
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Points:</div>
|
||||
<div class="col-xs-6 score">{{score}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Hand:</div>
|
||||
<div class="col-xs-6 hand-card">{{hand}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 gwent-lives">
|
||||
{{#health}}
|
||||
{{/health}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 passing">Passed</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="battle-template" type="text/x-handlebars-template">
|
||||
<div class="col-xs-3 left-side">
|
||||
<div class="col-xs-12 game-info game-info-foe foe">
|
||||
<div class="col-xs-12 info-name"></div>
|
||||
<div class="col-xs-6 field-single field-leader"></div>
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Points:</div>
|
||||
<div class="col-xs-6 score">0</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Hand:</div>
|
||||
<div class="col-xs-6 hand-card">0</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 gwent-lives">
|
||||
<i class="ruby"></i>
|
||||
<i class="ruby"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 passing">Passed</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 field field-weather">
|
||||
field
|
||||
</div>
|
||||
<div class="col-xs-12 game-info game-info-player player">
|
||||
<div class="col-xs-12 info-name">{{name}}</div>
|
||||
<div class="col-xs-6 field-single field-leader"></div>
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Points:</div>
|
||||
<div class="col-xs-6 score">{{score}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Hand:</div>
|
||||
<div class="col-xs-6 hand-card">{{hand}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 gwent-lives">
|
||||
<!--<i class="ruby"></i>-->
|
||||
{{#health lives}}{{/health}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 passing">Passed</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<button class="button-pass">Pass</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 battleside battleside-foe foe">
|
||||
<div class="col-xs-12 field">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-siege"></div>
|
||||
</div>
|
||||
<div class="col-xs-12 field">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-range"></div>
|
||||
</div>
|
||||
<div class="col-xs-12 field">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-close"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 mid-line"></div>
|
||||
<div class="col-xs-12 battleside battleside-player player">
|
||||
<div class="col-xs-12 field{{#if agile}} active{{/if}}">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-close"></div>
|
||||
</div>
|
||||
<div class="col-xs-12 field{{#if agile}} active{{/if}}">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-range"></div>
|
||||
</div>
|
||||
<div class="col-xs-12 field">
|
||||
<div class="col-xs-1 large-field-counter">0</div>
|
||||
<div class="col-xs-11 field-siege"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 field field-hand">
|
||||
{{#each cards}}
|
||||
<div class="card" data-key="{{_key}}" data-id="{{_id}}">
|
||||
<img src='../assets/cards/{{_data.img}}.png'>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<div class="col-xs-12 card-preview">
|
||||
<!--<img src="{{preview}}">-->
|
||||
</div>
|
||||
<div class="col-xs-12 right-side right-side-foe foe">
|
||||
<div class="col-xs-5 field-discard field-single">
|
||||
discard deck
|
||||
</div>
|
||||
<div class="col-xs-5 field-single field-deck pull-right">
|
||||
main deck
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 right-side right-side-player player">
|
||||
<div class="col-xs-5 field-discard field-single">
|
||||
discard deck
|
||||
</div>
|
||||
<div class="col-xs-5 field-single field-deck pull-right">
|
||||
main deck
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="matchmaker-template" type="text/x-handlebars-template">
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Gwent</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<input type="text" class="name-input" value="{{name}}">
|
||||
<select id="deckChoice">
|
||||
<option value="northern_realm">Deck: Northern Realms</option>
|
||||
<option value="scoiatael">Deck: Scoia'tael</option>
|
||||
<option value="monster">Deck: Monster</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-primary create-room">Create Room</button>
|
||||
<button type="button" class="btn btn-primary join-room">Join Room</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="game-info-template" type="text/x-handlebars-template">
|
||||
<div class="col-xs-12 info-name">{{name}}</div>
|
||||
<div class="col-xs-6 field-single field-leader"></div>
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Points:</div>
|
||||
<div class="col-xs-6 score">{{score}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">Hand:</div>
|
||||
<div class="col-xs-6 hand-card">{{hand}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 gwent-lives">
|
||||
<!--<i class="ruby"></i>-->
|
||||
{{#health lives}}{{/health}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 passing">Passed</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<button class="button-pass">Pass</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="modal-template">
|
||||
<div class="bbm-modal__topbar">
|
||||
<h3 class="bbm-modal__title">Discard of {{openDiscard.name}}</h3>
|
||||
</div>
|
||||
<div class="bbm-modal__section">
|
||||
{{#each openDiscard.discard}}
|
||||
<div class="card" data-key="{{_key}}" data-id="{{_id}}">
|
||||
<img src="../assets/cards/{{_data.img}}.png">
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="bbm-modal__bottombar">
|
||||
<div class="bbm-button bbm-close">close</div>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="modal-medic-template">
|
||||
<div class="bbm-modal__topbar">
|
||||
<h3 class="bbm-modal__title">Choose one card from your discard</h3>
|
||||
</div>
|
||||
<div class="bbm-modal__section">
|
||||
{{#each medicDiscard.cards}}
|
||||
<div class="card" data-key="{{_key}}" data-id="{{_id}}">
|
||||
<img src="../assets/cards/{{_data.img}}.png">
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="bbm-modal__bottombar">
|
||||
<div class="bbm-button bbm-close">close</div>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="preview-template">
|
||||
<img src="{{src}}">
|
||||
</script>
|
||||
<script src="build/app.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -21,6 +21,7 @@ Handlebars.registerHelper("health", function(lives, options){
|
||||
return out;
|
||||
});
|
||||
|
||||
/*
|
||||
var Config = {};
|
||||
|
||||
Config.Server = {
|
||||
@ -28,6 +29,7 @@ Config.Server = {
|
||||
"port": 16918,
|
||||
secure: false
|
||||
}
|
||||
*/
|
||||
|
||||
var App = Backbone.Router.extend({
|
||||
routes: {
|
@ -123,9 +123,9 @@ i {
|
||||
float: left;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
background: url("../assets/ruby-grey.png");
|
||||
background: url("../../assets/ruby-grey.png");
|
||||
&.ruby {
|
||||
background: url("../assets/ruby.png");
|
||||
background: url("../../assets/ruby.png");
|
||||
}
|
||||
}
|
||||
|
27
gulpfile.js
27
gulpfile.js
@ -12,7 +12,7 @@ livereload({start: true});
|
||||
|
||||
|
||||
gulp.task('browserify', function(){
|
||||
browserify('./public/js/main.js', {standalone: "app", debug: true})
|
||||
browserify('./client/js/main.js', {standalone: "app", debug: true})
|
||||
.transform(babelify)
|
||||
.bundle().on("error", function(err){
|
||||
console.log(err);
|
||||
@ -20,19 +20,20 @@ gulp.task('browserify', function(){
|
||||
.pipe(source('app.js').on("error", function(err){
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(gulp.dest('./build/').on("error", function(err){
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err){
|
||||
console.log(err);
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
gulp.task('sass', function(){
|
||||
gulp.src('./public/scss/main.scss')
|
||||
gulp.src('./client/scss/main.scss')
|
||||
.pipe(sass({
|
||||
outputStyle: 'compressed'
|
||||
}).on("error", function(err){
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(gulp.dest('./build/').on("error", function(err){
|
||||
.pipe(gulp.dest('./public/build/').on("error", function(err){
|
||||
console.log(err);
|
||||
}))
|
||||
.pipe(livereload().on("error", function(err){
|
||||
@ -41,7 +42,7 @@ gulp.task('sass', function(){
|
||||
});
|
||||
|
||||
gulp.task("unit tests", function(){
|
||||
browserify('./test/spec/mainSpec.js', {standalone: "app", debug: true})
|
||||
browserify('./test/src/mainSpec.js', {standalone: "app", debug: true})
|
||||
.transform(babelify)
|
||||
.bundle().on("error", function(err){
|
||||
console.log(err);
|
||||
@ -55,9 +56,17 @@ gulp.task("unit tests", function(){
|
||||
})
|
||||
|
||||
gulp.task("watch", function(){
|
||||
gulp.watch("./public/js/*", ["browserify"]);
|
||||
gulp.watch("./public/scss/*", ["sass"]);
|
||||
gulp.watch("./test/spec/*", ["unit tests"]);
|
||||
gulp.watch("./client/js/*", ["browserify"]);
|
||||
gulp.watch("./client/scss/*", ["sass"]);
|
||||
gulp.watch("./test/src/*", ["unit tests"]);
|
||||
})
|
||||
|
||||
gulp.task("default", ["watch", "browserify", "sass", "unit tests"]);
|
||||
gulp.task("index", function() {
|
||||
gulp.src("./client/index.html")
|
||||
.pipe(gulp.dest("./public/"));
|
||||
|
||||
gulp.src("./client/css/bootstrap.css")
|
||||
.pipe(gulp.dest("./public/build"));
|
||||
})
|
||||
|
||||
gulp.task("default", ["watch", "browserify", "sass", "unit tests", "index"]);
|
||||
|
8
public/Config.js
Normal file
8
public/Config.js
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
window.Config = {};
|
||||
|
||||
Config.Server = {
|
||||
"hostname": "localhost",
|
||||
"port": 16918,
|
||||
secure: false
|
||||
}
|
@ -4,8 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Gwent</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="../build/main.css">
|
||||
<link rel="stylesheet" href="build/bootstrap.css">
|
||||
<link rel="stylesheet" href="build/main.css">
|
||||
<script src="Config.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script id="info-template" type="text/x-handlebars-template">
|
||||
@ -236,6 +237,6 @@
|
||||
<script type="text/template" id="preview-template">
|
||||
<img src="{{src}}">
|
||||
</script>
|
||||
<script src="../build/app.js"></script>
|
||||
<script src="build/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user