diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index cb414b74..5f2906c2 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -62,6 +62,17 @@ Router.map(function() { fastRender: true, }); + this.route("library", { + path: "/library", + waitOn: function(){ + return subsManager.subscribe("standardLibraries"); + }, + onAfterAction: function() { + document.title = appName + " - Library"; + }, + fastRender: true, + }); + this.route("loading", { path: "/loading" }); diff --git a/rpg-docs/client/views/layout/layout.html b/rpg-docs/client/views/layout/layout.html index 0fe5f17f..f964b334 100644 --- a/rpg-docs/client/views/layout/layout.html +++ b/rpg-docs/client/views/layout/layout.html @@ -41,6 +41,12 @@ Characters + + + + Library + + diff --git a/rpg-docs/client/views/library/itemLibrary/itemLibrary.html b/rpg-docs/client/views/library/itemLibrary/itemLibrary.html new file mode 100644 index 00000000..5fbf353b --- /dev/null +++ b/rpg-docs/client/views/library/itemLibrary/itemLibrary.html @@ -0,0 +1,5 @@ + diff --git a/rpg-docs/client/views/library/itemLibrary/itemLibrary.js b/rpg-docs/client/views/library/itemLibrary/itemLibrary.js new file mode 100644 index 00000000..480effcc --- /dev/null +++ b/rpg-docs/client/views/library/itemLibrary/itemLibrary.js @@ -0,0 +1,7 @@ +Template.itemLibrary.helpers({ + items(){ + return Items.find({charId: {$in: [ + "SRDLibrary", + ]}}); + }, +}); diff --git a/rpg-docs/client/views/library/library.html b/rpg-docs/client/views/library/library.html new file mode 100644 index 00000000..1b2fd76e --- /dev/null +++ b/rpg-docs/client/views/library/library.html @@ -0,0 +1,26 @@ + diff --git a/rpg-docs/package.json b/rpg-docs/package.json index 49a2f8ff..99dd7541 100644 --- a/rpg-docs/package.json +++ b/rpg-docs/package.json @@ -12,7 +12,7 @@ "author": "Stefan Zermatten", "dependencies": { "@polymer/polymer": "^1.2.5-npm-test.2", - "babel-runtime": "^6.18.0", + "babel-runtime": "^6.23.0", "bcrypt": "^1.0.1", "bower": "^1.7.9" } diff --git a/rpg-docs/server/publications/library.js b/rpg-docs/server/publications/library.js new file mode 100644 index 00000000..54d9fedd --- /dev/null +++ b/rpg-docs/server/publications/library.js @@ -0,0 +1,5 @@ +Meteor.publish("standardLibraries", function(){ + return Items.find({charId: {$in: [ + "SRDLibrary", + ]}}); +});