Added library page
This commit is contained in:
@@ -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"
|
||||
});
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
Characters
|
||||
</paper-icon-item>
|
||||
</a>
|
||||
<a href="/library" tabindex="-1">
|
||||
<paper-icon-item id="library">
|
||||
<iron-icon icon="av:library-books" item-icon></iron-icon>
|
||||
Library
|
||||
</paper-icon-item>
|
||||
</a>
|
||||
<a href="/guide" tabindex="-1">
|
||||
<paper-icon-item id="guide">
|
||||
<iron-icon icon="social:school" item-icon></iron-icon>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<template name="itemLibrary">
|
||||
{{#each items}}
|
||||
{{> libraryItem}}
|
||||
{{/each}}
|
||||
</template>
|
||||
7
rpg-docs/client/views/library/itemLibrary/itemLibrary.js
Normal file
7
rpg-docs/client/views/library/itemLibrary/itemLibrary.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Template.itemLibrary.helpers({
|
||||
items(){
|
||||
return Items.find({charId: {$in: [
|
||||
"SRDLibrary",
|
||||
]}});
|
||||
},
|
||||
});
|
||||
26
rpg-docs/client/views/library/library.html
Normal file
26
rpg-docs/client/views/library/library.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<template name="library">
|
||||
<div class="fit layout vertical character-sheet">
|
||||
<app-header fixed effects="waterfall">
|
||||
<app-toolbar class="medium-tall app-grey white-text">
|
||||
<div top-item class="layout horizontal center">
|
||||
<paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
|
||||
<div class="flex">
|
||||
Library
|
||||
</div>
|
||||
</div>
|
||||
<div bottom-item>
|
||||
<paper-tabs id="characterSheetTabs" selected={{selectedTab}} class="app-grey white-text">
|
||||
<paper-tab name="items">Items</paper-tab>
|
||||
<paper-tab name="spells">Spells</paper-tab>
|
||||
</paper-tabs>
|
||||
</div>
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
<div class="flex" style="position: relative;">
|
||||
<iron-pages id="tabPages" class="fit" selected={{selectedTab}}>
|
||||
<div name="items" class="tab-page fit">{{> itemLibrary}}</div>
|
||||
<div name="spells" class="tab-page fit">{{> spellLibrary}}</div>
|
||||
</iron-pages>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
5
rpg-docs/server/publications/library.js
Normal file
5
rpg-docs/server/publications/library.js
Normal file
@@ -0,0 +1,5 @@
|
||||
Meteor.publish("standardLibraries", function(){
|
||||
return Items.find({charId: {$in: [
|
||||
"SRDLibrary",
|
||||
]}});
|
||||
});
|
||||
Reference in New Issue
Block a user