diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js index 78103125..bec552df 100644 --- a/rpg-docs/Model/Character/Characters.js +++ b/rpg-docs/Model/Character/Characters.js @@ -187,7 +187,8 @@ Schemas.Character = new SimpleSchema({ //permissions owner: { type: String, regEx: SimpleSchema.RegEx.Id }, readers: { type: [String], regEx: SimpleSchema.RegEx.Id }, - writers: { type: [String], regEx: SimpleSchema.RegEx.Id } + writers: { type: [String], regEx: SimpleSchema.RegEx.Id }, + color: {type: String, allowedValues: _.keys(colorOptions), defaultValue: "grey"} //TODO add per-character settings }); diff --git a/rpg-docs/Model/Character/Features.js b/rpg-docs/Model/Character/Features.js index 33b791a6..9903f0d5 100644 --- a/rpg-docs/Model/Character/Features.js +++ b/rpg-docs/Model/Character/Features.js @@ -7,6 +7,7 @@ Schemas.Feature = new SimpleSchema({ uses: {type: String, optional: true, trim: false}, used: {type: Number, defaultValue: 0}, reset: {type: String, allowedValues: ["manual", "longRest", "shortRest"], defaultValue: "manual"}, + color: {type: String, allowedValues: _.keys(colorOptions), defaultValue: "green"} }); Features.attachSchema(Schemas.Feature); diff --git a/rpg-docs/Model/Character/Spells.js b/rpg-docs/Model/Character/Spells.js index d0bb3266..f406c6bc 100644 --- a/rpg-docs/Model/Character/Spells.js +++ b/rpg-docs/Model/Character/Spells.js @@ -3,8 +3,7 @@ Spells = new Meteor.Collection("spells"); Schemas.Spell = new SimpleSchema({ charId: {type: String, regEx: SimpleSchema.RegEx.Id}, listId: {type: String, regEx: SimpleSchema.RegEx.Id}, - prepared: {type: Boolean, defaultValue: false}, - prepareCost: {type: Number, defaultValue: 1}, //0 for spells that "dont count against your max number of spells prepared", 1 otherwise + prepared: {type: String, defaultValue: "unprepared", allowedValues: ["prepared","unprepared","always"]}, name: {type: String}, description: {type: String, optional: true}, castingTime: {type: String, optional: true}, diff --git a/rpg-docs/Model/Inventory/Containers.js b/rpg-docs/Model/Inventory/Containers.js index 8ca640fa..f3e9019e 100644 --- a/rpg-docs/Model/Inventory/Containers.js +++ b/rpg-docs/Model/Inventory/Containers.js @@ -8,7 +8,8 @@ Schemas.Container = new SimpleSchema({ isCarried: { type: Boolean }, weight: {type: Number, min: 0, defaultValue: 0, decimal: true}, value: {type: Number, min: 0, defaultValue: 0, decimal: true}, - description:{type: String, optional: true} + description:{type: String, optional: true}, + color: {type: String, allowedValues: _.keys(colorOptions), defaultValue: "brown"} }); Containers.attachSchema(Schemas.Container); diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index 6a2a4053..bb27691d 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -25,7 +25,7 @@ Router.map( function () { ]; }, data: function() { - var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1, name: 1}}); + var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1, name: 1, color: 1}}); return data; } }); diff --git a/rpg-docs/client/globalHelpers/colorClass.js b/rpg-docs/client/globalHelpers/colorClass.js new file mode 100644 index 00000000..3ea0df97 --- /dev/null +++ b/rpg-docs/client/globalHelpers/colorClass.js @@ -0,0 +1,3 @@ +Template.registerHelper("colorClass", function(color){ + return color? getColorClass(color) : getColorClass(this.color); +}); diff --git a/rpg-docs/client/views/GeneralCSS/color.css b/rpg-docs/client/views/GeneralCSS/color.css index f0ae0e0b..4d5c88f6 100644 --- a/rpg-docs/client/views/GeneralCSS/color.css +++ b/rpg-docs/client/views/GeneralCSS/color.css @@ -1,79 +1,83 @@ -.red { +html /deep/ .red { background-color: #F44336; } -.pink { +html /deep/ .pink { background-color: #E91E63; } -.purple { +html /deep/ .purple { background-color: #9C27B0; } -.deep-purple { +html /deep/ .deep-purple { background-color: #673AB7; } -.indigo { +html /deep/ .indigo { background-color: #3F51B5; } -.blue { +html /deep/ .blue { background-color: #2196F3; } -.light-blue { +html /deep/ .light-blue { background-color: #03A9F4; } -.cyan { +html /deep/ .cyan { background-color: #00BCD4; } -.teal { +html /deep/ .teal { background-color: #009688; } -.green { +html /deep/ .green { background-color: #4CAF50; } -.light-green { +html /deep/ .light-green { background-color: #8BC34A; } -.lime { +html /deep/ .lime { background-color: #CDDC39; } -.yellow { +html /deep/ .yellow { background-color: #FFEB3B; } -.amber { +html /deep/ .amber { background-color: #FFC107; } -.orange { +html /deep/ .orange { background-color: #FF9800; } -.deep-orange { +html /deep/ .deep-orange { background-color: #FF5722; } -.brown { +html /deep/ .brown { background-color: #795548; } -.grey { +html /deep/ .grey { background-color: #9E9E9E; } -.blue-grey { +html /deep/ .blue-grey { background-color: #607D8B; } -.white { +html /deep/ .white { background-color: #ffffff; +} + +html /deep/ .black { + background-color: #000000; } \ No newline at end of file diff --git a/rpg-docs/client/views/GeneralCSS/general.css b/rpg-docs/client/views/GeneralCSS/general.css index 74b972ae..b48a33d5 100644 --- a/rpg-docs/client/views/GeneralCSS/general.css +++ b/rpg-docs/client/views/GeneralCSS/general.css @@ -97,6 +97,7 @@ paper-button { .fab-buffer { height: 88px; width: 100%; + order: 999; } *[hidden] { @@ -123,3 +124,11 @@ paper-button { paper-fab-menu /deep/ .container { padding: 24px !important; } + +.list-subhead { + color: rgba(0,0,0,0.54); + font-size: 14px; + height: 40px; + padding-left: 16px; + font-weight: 500; +} diff --git a/rpg-docs/client/views/GeneralCSS/typography.css b/rpg-docs/client/views/GeneralCSS/typography.css index 5dbcc1f4..49bfa0f7 100644 --- a/rpg-docs/client/views/GeneralCSS/typography.css +++ b/rpg-docs/client/views/GeneralCSS/typography.css @@ -96,4 +96,8 @@ p, .body1, body { .white-text .caption{ color: rgba(255,255,255,0.54); -} \ No newline at end of file +} + +html /deep/ .white-text{ + color: #fff; +} diff --git a/rpg-docs/client/views/character/characterSheet.css b/rpg-docs/client/views/character/characterSheet.css index 4161fe4b..2a1480b9 100644 --- a/rpg-docs/client/views/character/characterSheet.css +++ b/rpg-docs/client/views/character/characterSheet.css @@ -1,6 +1,5 @@ paper-tabs, core-toolbar { background-color: #795548; - color: #fff; box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); } diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index 845d8470..8b978af8 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -1,13 +1,13 @@