Compare commits

..

1 Commits

Author SHA1 Message Date
Stefan Zermatten
8b3f11603a Update Meteor to 1.2
This requires local copies of packages that are broken or not Polymer 0.5
2015-10-03 22:38:25 +02:00
115 changed files with 824 additions and 1418 deletions

View File

@@ -1,13 +1,4 @@
RPG Docs
========
This is the repo for [DiceCloud](dicecloud.com). The currently deployed version should always be the latest release of the master branch.
Getting started
---------------
`git clone https://github.com/ThaumRystra/RPG-Docs RPG-Docs`
`cd RPG-Docs`
`cd rpg-docs`
`bower install`
`meteor`
This is the repo for [DiceCloud](dicecloud.com). The currently deployed version should always be the head of the master branch.

4
rpg-docs/.gitignore vendored
View File

@@ -1,8 +1,6 @@
.meteor/local
.meteor/meteorite
.demeteorized
settings.json
public/components
nohup.out
node_modules
dump
dump

View File

@@ -10,4 +10,3 @@ notices-for-facebook-graph-api-2
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package

View File

@@ -3,7 +3,6 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
thaum:vulcanize@0.0.5
iron:router
accounts-password
accounts-ui
@@ -12,6 +11,7 @@ dburles:collection-helpers
reactive-var
underscore
aldeed:collection2
differential:vulcanize
matb33:collection-hooks
zimme:collection-softremovable
momentjs:moment
@@ -22,10 +22,13 @@ useraccounts:polymer
accounts-google
splendido:accounts-meld
email
fourseven:scss@2.1.1
wolves:bourbon
meteorhacks:subs-manager
meteorhacks:kadira
chuangbo:marked
reywood:iron-router-ga
standard-minifiers
meteor-base
mobile-experience
mongo
@@ -39,9 +42,3 @@ ejson
spacebars
check
useraccounts:iron-routing
wizonesolutions:canonical
meteorhacks:fast-render
fourseven:scss
wolves:bourbon
standard-minifier-css
standard-minifier-js

View File

@@ -1 +1 @@
METEOR@1.3.2.4
METEOR@1.2.0.2

View File

@@ -1,131 +1,116 @@
accounts-base@1.2.7
accounts-google@1.0.9
accounts-oauth@1.1.12
accounts-password@1.1.8
accounts-ui@1.1.9
accounts-ui-unstyled@1.1.12
aldeed:collection2@2.9.1
aldeed:collection2-core@1.1.1
aldeed:schema-deny@1.0.1
aldeed:schema-index@1.0.1
aldeed:simple-schema@1.5.3
allow-deny@1.0.4
autoupdate@1.2.9
babel-compiler@6.6.4
babel-runtime@0.1.8
base64@1.0.8
binary-heap@1.0.8
blaze@2.1.7
blaze-html-templates@1.0.4
blaze-tools@1.0.8
boilerplate-generator@1.0.8
caching-compiler@1.0.4
caching-html-compiler@1.0.6
callback-hook@1.0.8
check@1.2.1
chuangbo:cookie@1.1.0
accounts-base@1.2.1
accounts-google@1.0.6
accounts-oauth@1.1.7
accounts-password@1.1.3
accounts-ui@1.1.6
accounts-ui-unstyled@1.1.8
aldeed:collection2@2.5.0
aldeed:simple-schema@1.3.3
autoupdate@1.2.3
babel-compiler@5.8.24_1
babel-runtime@0.1.4
base64@1.0.4
binary-heap@1.0.4
blaze@2.1.3
blaze-html-templates@1.0.1
blaze-tools@1.0.4
boilerplate-generator@1.0.4
caching-compiler@1.0.0
caching-html-compiler@1.0.2
callback-hook@1.0.4
check@1.0.6
chuangbo:marked@0.3.5_1
coffeescript@1.0.17
dburles:collection-helpers@1.0.4
dburles:mongo-collection-instances@0.3.5
ddp@1.2.5
ddp-client@1.2.7
ddp-common@1.2.5
ddp-rate-limiter@1.0.4
ddp-server@1.2.6
deps@1.0.12
diff-sequence@1.0.5
ecmascript@0.4.3
ecmascript-runtime@0.2.10
coffeescript@1.0.10
dburles:collection-helpers@1.0.3
dburles:mongo-collection-instances@0.3.4
ddp@1.2.2
ddp-client@1.2.1
ddp-common@1.2.1
ddp-rate-limiter@1.0.0
ddp-server@1.2.1
deps@1.0.9
diff-sequence@1.0.1
differential:vulcanize@2.0.1
ecmascript@0.1.5
ecmascript-collections@0.1.6
ecwyne:mathjs@0.25.0
ejson@1.0.11
email@1.0.12
fastclick@1.0.11
fourseven:scss@3.4.3
geojson-utils@1.0.8
google@1.1.11
hot-code-push@1.0.4
html-tools@1.0.9
htmljs@1.0.9
http@1.1.5
id-map@1.0.7
iron:controller@1.0.12
iron:core@1.0.11
iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.0.12
iron:url@1.0.11
jquery@1.11.8
lai:collection-extensions@0.2.1_1
launch-screen@1.0.11
less@2.6.0
livedata@1.0.18
localstorage@1.0.9
logging@1.0.12
ejson@1.0.7
email@1.0.7
fastclick@1.0.7
fourseven:scss@2.1.1
geojson-utils@1.0.4
google@1.1.6
hot-code-push@1.0.0
html-tools@1.0.5
htmljs@1.0.5
http@1.1.1
id-map@1.0.4
iron:controller@1.0.8
iron:core@1.0.8
iron:dynamic-template@1.0.8
iron:layout@1.0.8
iron:location@1.0.9
iron:middleware-stack@1.0.9
iron:router@1.0.9
iron:url@1.0.9
jquery@1.11.4
lai:collection-extensions@0.1.4
launch-screen@1.0.4
less@2.5.0_3
livedata@1.0.15
localstorage@1.0.5
logging@1.0.8
matb33:collection-hooks@0.8.1
mdg:validation-error@0.2.0
meteor@1.1.14
meteor-base@1.0.4
meteorhacks:fast-render@2.14.0
meteorhacks:inject-data@2.0.0
meteorhacks:kadira@2.28.7
meteorhacks:meteorx@1.4.1
meteorhacks:picker@1.0.3
meteorhacks:subs-manager@1.6.4
minifier-css@1.1.11
minifier-js@1.1.11
minimongo@1.0.16
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.1
modules-runtime@0.6.3
momentjs:moment@2.13.1
mongo@1.1.7
mongo-id@1.0.4
mongo-livedata@1.0.12
npm-bcrypt@0.8.5
npm-mongo@1.4.43
oauth@1.1.10
oauth2@1.1.9
observe-sequence@1.0.11
ordered-dict@1.0.7
percolate:migrations@0.9.8
promise@0.6.7
raix:eventemitter@0.1.3
random@1.0.9
rate-limit@1.0.4
reactive-dict@1.1.7
reactive-var@1.0.9
reload@1.1.8
retry@1.0.7
meteor@1.1.9
meteor-base@1.0.1
meteorhacks:kadira@2.23.4
meteorhacks:meteorx@1.3.1
meteorhacks:subs-manager@1.6.2
minifiers@1.1.7
minimongo@1.0.10
mobile-experience@1.0.1
mobile-status-bar@1.0.6
momentjs:moment@2.10.6
mongo@1.1.2
mongo-id@1.0.1
mongo-livedata@1.0.9
npm-bcrypt@0.7.8_2
npm-mongo@1.4.39_1
oauth@1.1.6
oauth2@1.1.5
observe-sequence@1.0.7
ordered-dict@1.0.4
percolate:migrations@0.9.6
promise@0.5.0
random@1.0.4
rate-limit@1.0.0
reactive-dict@1.1.2
reactive-var@1.0.6
reload@1.1.4
retry@1.0.4
reywood:iron-router-ga@0.7.1
routepolicy@1.0.10
service-configuration@1.0.9
session@1.1.5
sha@1.0.7
softwarerero:accounts-t9n@1.3.4
spacebars@1.0.11
spacebars-compiler@1.0.11
routepolicy@1.0.6
service-configuration@1.0.5
session@1.1.1
sha@1.0.4
softwarerero:accounts-t9n@1.0.9
spacebars@1.0.7
spacebars-compiler@1.0.7
splendido:accounts-emails-field@1.2.0
splendido:accounts-meld@1.3.1
srp@1.0.8
standard-minifier-css@1.0.6
standard-minifier-js@1.0.6
templating@1.1.9
templating-tools@1.0.4
thaum:vulcanize@0.0.5
tracker@1.0.13
ui@1.0.11
underscore@1.0.8
url@1.0.9
useraccounts:core@1.14.2
useraccounts:iron-routing@1.14.2
srp@1.0.4
standard-minifiers@1.0.1
templating@1.1.4
templating-tools@1.0.0
tracker@1.0.9
ui@1.0.8
underscore@1.0.4
url@1.0.5
useraccounts:core@1.12.3
useraccounts:iron-routing@1.12.3
useraccounts:polymer@1.12.3
webapp@1.2.8
webapp-hashing@1.0.9
wizonesolutions:canonical@0.0.5
wolves:bourbon@3.1.0
webapp@1.2.2
webapp-hashing@1.0.5
wolves:bourbon@1.2.0
zimme:collection-behaviours@1.1.3
zimme:collection-softremovable@1.0.5
zimme:collection-softremovable@1.0.4

View File

@@ -7,7 +7,6 @@ Schemas.Action = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -7,7 +7,6 @@ Schemas.Attack = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -4,7 +4,6 @@ Schemas.Buff = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -1,7 +1,7 @@
Classes = new Mongo.Collection("classes");
Schemas.Class = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
level: {type: Number},
createdAt: {

View File

@@ -8,7 +8,6 @@ Schemas.Effect = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
@@ -59,74 +58,71 @@ Schemas.Effect = new SimpleSchema({
Effects.attachSchema(Schemas.Effect);
if (Meteor.isServer) Characters.after.insert(function(userId, char) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Carrying Capacity",
stat: "carryMultiplier",
operation: "base",
value: "1",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
});
Effects.attachBehaviour("softRemovable");
makeChild(Effects, ["enabled"]); //children of lots of things
Effects.allow(CHARACTER_SUBSCHEMA_ALLOW);
Effects.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default character effects
Characters.after.insert(function(userId, char) {
if (Meteor.isServer) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Carrying Capacity",
stat: "carryMultiplier",
operation: "base",
value: "1",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
}
});

View File

@@ -1,7 +1,7 @@
Experiences = new Mongo.Collection("experience");
Schemas.Experience = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, defaultValue: "New Experience", trim: false},
description: {type: String, optional: true, trim: false},
value: {type: Number, defaultValue: 0},

View File

@@ -1,7 +1,7 @@
Features = new Mongo.Collection("features");
Schemas.Feature = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
uses: {type: String, optional: true, trim: false},
@@ -35,81 +35,3 @@ makeParent(Features, ["name", "enabled"]); //parents of effects and attacks
Features.allow(CHARACTER_SUBSCHEMA_ALLOW);
Features.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default feature of base ability scores of 10
Characters.after.insert(function(userId, char) {
if (Meteor.isServer){
var featureId = Features.insert({
name: "Base Ability Scores",
charId: char._id,
enabled: true,
alwaysEnabled: true,
});
Effects.insert({
stat: "strength",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "dexterity",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "constitution",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "intelligence",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "wisdom",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "charisma",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
}
});

View File

@@ -1,7 +1,7 @@
Notes = new Mongo.Collection("notes");
Schemas.Note = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
color: {

View File

@@ -4,7 +4,6 @@ Schemas.Proficiency = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,

View File

@@ -1,7 +1,7 @@
SpellLists = new Mongo.Collection("spellLists");
Schemas.SpellLists = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
saveDC: {type: String, optional: true, trim: false},

View File

@@ -1,7 +1,7 @@
Spells = new Mongo.Collection("spells");
Schemas.Spell = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
prepared: {
type: String,
defaultValue: "prepared",

View File

@@ -1,7 +1,7 @@
TemporaryHitPoints = new Mongo.Collection("temporaryHitPoints");
Schemas.TemporaryHitPoints = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, optional: true},
maximum: {type: Number, defaultValue: 0, min: 0, max: 500},
used: {type: Number, defaultValue: 0, min: 0, max: 500},

View File

@@ -3,7 +3,7 @@ Containers = new Mongo.Collection("containers");
Schemas.Container = new SimpleSchema({
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
isCarried: {type: Boolean},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},

View File

@@ -4,7 +4,7 @@ Schemas.Item = new SimpleSchema({
name: {type: String, defaultValue: "New Item", trim: false},
plural: {type: String, optional: true, trim: false},
description:{type: String, optional: true, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1}, //id of owner
charId: {type: String, regEx: SimpleSchema.RegEx.Id}, //id of owner
quantity: {type: Number, min: 0, defaultValue: 1},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},
@@ -228,9 +228,6 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Silver piece",
@@ -244,9 +241,6 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Copper piece",
@@ -260,9 +254,6 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
}
});

View File

@@ -34,7 +34,6 @@ Router.map(function() {
onAfterAction: function() {
document.title = appName;
},
fastRender: true,
});
this.route("characterSheet", {
@@ -64,7 +63,6 @@ Router.map(function() {
window.ga && window.ga("send", "pageview", "/character");
this.next();
},
fastRender: true,
});
this.route("loading", {
@@ -93,7 +91,6 @@ Router.map(function() {
onAfterAction: function() {
document.title = appName;
},
fastRender: true,
});
this.route("/guide", {

View File

@@ -2,9 +2,7 @@
"name": "RPG Docs",
"version": "0.0.0",
"homepage": "",
"authors": [
"Stefan Zermatten"
],
"authors": ["Stefan Zermatten"],
"license": "none",
"private": true,
"ignore": [
@@ -17,10 +15,11 @@
"dependencies": {
"polymer": "Polymer/polymer#~0.5.5",
"core-elements": "Polymer/core-elements#~0.5.5",
"paper-elements": "Polymer/paper-elements#~0.5.5",
"paper-fab-menu": "cwdoh/paper-fab-menu#~0.4.0"
"paper-elements": "Polymer/paper-elements#~0.5.5"
},
"resolutions": {
"webcomponentsjs": "0.6.3"
"core-component-page": "^0.5.0",
"polymer": "^0.5.0",
"webcomponentsjs": "^0.5.0"
}
}
}

View File

@@ -1,4 +1,4 @@
@import "{wolves:bourbon}/bourbon";
@import "bourbon/bourbon";
$thickColumnWidth: 304px;
$thinColumnWidth: 240px;

View File

@@ -1,4 +1,4 @@
@import "{wolves:bourbon}/bourbon";
@import "bourbon/bourbon";
@import "colors";
//apply a natural box layout model to all elements
@@ -48,7 +48,7 @@ hr {
//FABs
.floatyButton {
position: fixed;
position: absolute;
bottom: 24px;
right: 24px;
}

View File

@@ -18,7 +18,3 @@
body /deep/ core-menu {
overflow-x: hidden !important;
}
html /deep/ paper-dropdown {
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
}

View File

@@ -99,7 +99,7 @@ var operations = {
base: {name: "Base Value: "},
proficiency: {name: "Proficiency"},
add: {name: "+"},
mul: {name: "×"},
mul: {name: "x"},
min: {name: "Min: "},
max: {name: "Max: "},
advantage: {name: "Advantage"},

View File

@@ -24,7 +24,7 @@ Template.carryCapacityBar.onCreated(function() {
var self = this;
self.carriedFraction = new ReactiveVar(0);
self.autorun(function() {
self.carriedFraction.set(getFractionCarried(Template.currentData()));
self.carriedFraction.set(getFractionCarried(self.data));
});
});

View File

@@ -10,7 +10,7 @@
<template name="spellDetails">
<div class="body2">
Level {{level}} {{school}} {{#if ritual}}ritual{{/if}}, {{preparedString}}
Level {{level}} {{school}}, {{preparedString}}
</div>
<div style="margin: 16px 0 16px 0;">
{{#if castingTime}}
@@ -136,4 +136,4 @@
</paper-autogrow-textarea>
</paper-input-decorator>
{{> attackEditList parentId=_id parentCollection="Spells" charId=charId enabled=true name=name}}
</template>
</template>

View File

@@ -6,7 +6,6 @@
padding: 8px 0 8px 16px;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.singleLineItem core-icon {
@@ -20,4 +19,4 @@
/* Required for text-overflow to do anything */
white-space: nowrap;
overflow: hidden;
}
}

View File

@@ -3,12 +3,11 @@
{{#if characters.count}}
<div>
{{#each characters}}
<a href={{pathFor route="characterSheet" data=this}}
class="singleLineItem characterRepresentative"
<div class="singleLineItem characterRepresentative"
layout horizontal center>
<core-icon icon="image:brightness-1"></core-icon>
<div>{{name}}</div>
</a>
</div>
{{/each}}
</div>
{{/if}}

View File

@@ -23,7 +23,7 @@ Template.characterSideList.helpers({
Template.characterSideList.events({
"tap .singleLineItem": function(event, instance) {
//Router.go("characterSheet", {_id: this._id});
Router.go("characterSheet", {_id: this._id});
$("core-drawer-panel").get(0).closeDrawer();
},
"tap core-item": function() {

View File

@@ -15,11 +15,3 @@
#navPanel {
padding: 16px;
}
.layout > core-header-panel {
height: 100%;
}
.layout > core-animated-pages {
height: 100%;
}

View File

@@ -1,5 +1,5 @@
<template name="layout">
<core-drawer-panel class="layout" responsiveWidth="905px">
<core-drawer-panel responsiveWidth="905px">
<core-header-panel drawer navigation flex mode="seamed" class="white">
<div id="accountSummary">
{{#if currentUser}}
@@ -19,9 +19,9 @@
<core-item id="changeLog" icon="list" label="Change Log"></core-item>
</div>
</core-header-panel>
<core-animated-pages main
navigation
detail-pages
<core-animated-pages main
navigation
detail-pages
transitions="hero-transition cross-fade"
selected={{globalDetailSelected}}>
<section id="mainContentSection" class={{notSelected}}>
@@ -66,4 +66,4 @@
</div>
{{/if}}
</paper-toast>
</template>
</template>

View File

@@ -1,43 +0,0 @@
<!--core components-->
<link rel="import" href="/components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="/components/core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="/components/core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="/components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="/components/core-icons/av-icons.html">
<link rel="import" href="/components/core-icons/core-icons.html">
<link rel="import" href="/components/core-icons/editor-icons.html">
<link rel="import" href="/components/core-icons/image-icons.html">
<link rel="import" href="/components/core-icons/social-icons.html">
<link rel="import" href="/components/core-image/core-image.html">
<link rel="import" href="/components/core-item/core-item.html">
<link rel="import" href="/components/core-menu/core-menu.html">
<link rel="import" href="/components/core-scaffold/core-scaffold.html">
<link rel="import" href="/components/core-transition/core-transition.html">
<!--paper components-->
<link rel="import" href="/components/paper-button/paper-button.html">
<link rel="import" href="/components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="/components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="/components/paper-fab/paper-fab.html">
<link rel="import" href="/components/paper-fab-menu/paper-fab-menu.html">
<link rel="import" href="/components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="/components/paper-input/paper-autogrow-textarea.html">
<link rel="import" href="/components/paper-input/paper-input.html">
<link rel="import" href="/components/paper-input/paper-input-decorator.html">
<link rel="import" href="/components/paper-item/paper-item.html">
<link rel="import" href="/components/paper-menu-button/paper-menu-button.html">
<link rel="import" href="/components/paper-radio-button/paper-radio-button.html">
<link rel="import" href="/components/paper-radio-group/paper-radio-group.html">
<link rel="import" href="/components/paper-shadow/paper-shadow.html">
<link rel="import" href="/components/paper-spinner/paper-spinner.html">
<link rel="import" href="/components/paper-slider/paper-slider.html">
<link rel="import" href="/components/paper-tabs/paper-tabs.html">
<link rel="import" href="/components/paper-toast/paper-toast.html">
<link rel="import" href="/components/paper-toggle-button/paper-toggle-button.html">
<!--custom components-->
<link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="/custom_components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/custom_components/paper-diff-slider/paper-diff-slider.html">

View File

@@ -1,4 +1,4 @@
@import "{wolves:bourbon}/bourbon";
@import "bourbon/bourbon";
.mini-holder {
position: absolute;
@@ -43,3 +43,4 @@
@include transform(rotate(405deg));
}
}

View File

@@ -1,10 +1,5 @@
{
"imports": [
"/custom_components/paper-dropdown/paper-dropdown.html",
"/custom_components/paper-dropdown-menu/paper-dropdown-menu.html",
"/custom_components/paper-diff-slider/paper-diff-slider.html",
"/custom_components/swipe-detect/swipe-detect.html",
"/components/core-animated-pages/core-animated-pages.html",
"/components/core-animated-pages/transitions/cross-fade.html",
"/components/core-animated-pages/transitions/hero-transition.html",
@@ -25,6 +20,7 @@
"/components/paper-dialog/paper-action-dialog.html",
"/components/paper-dialog/paper-dialog.html",
"/components/paper-dialog/paper-dialog-transition.html",
"/components/paper-dropdown/paper-dropdown.html",
"/components/paper-fab/paper-fab.html",
"/components/paper-fab-menu/paper-fab-menu.html",
"/components/paper-icon-button/paper-icon-button.html",
@@ -40,6 +36,10 @@
"/components/paper-slider/paper-slider.html",
"/components/paper-tabs/paper-tabs.html",
"/components/paper-toast/paper-toast.html",
"/components/paper-toggle-button/paper-toggle-button.html"
"/components/paper-toggle-button/paper-toggle-button.html",
"/custom_components/paper-dropdown-menu/paper-dropdown-menu.html",
"/custom_components/paper-diff-slider/paper-diff-slider.html",
"/custom_components/swipe-detect/swipe-detect.html"
]
}

View File

@@ -1,12 +1,3 @@
// if we want to add more functions, consider pulling out into its own file
(function() {
math.import({
"if": function(pred, a, b) {
return (!!(pred)) ? a : b;
}
});
})();
//evaluates a calculation string
evaluate = function(charId, string){
if (!string) return string;

View File

@@ -1,16 +0,0 @@
{
"name": "rpg-docs",
"version": "0.10.0",
"description": "Unofficial Online Realtime D&D 5e App",
"scripts": {
"postinstall": "bower install"
},
"repository": {
"type": "git",
"url": "https://github.com/ThaumRystra/RPG-Docs"
},
"author": "Stefan Zermatten",
"dependencies": {
"bower": "^1.7.9"
}
}

View File

@@ -0,0 +1 @@
.build*

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@@ -0,0 +1,272 @@
{
"dependencies": {
"vulcanize": {
"version": "1.9.1",
"dependencies": {
"dom5": {
"version": "1.1.0",
"dependencies": {
"parse5": {
"version": "1.4.2"
}
}
},
"es6-promise": {
"version": "2.2.0"
},
"hydrolysis": {
"version": "1.13.1",
"dependencies": {
"espree": {
"version": "2.0.3"
},
"estraverse": {
"version": "3.1.0"
},
"setimmediate": {
"version": "1.0.2"
}
}
},
"nopt": {
"version": "3.0.2",
"dependencies": {
"abbrev": {
"version": "1.0.7"
}
}
},
"path-posix": {
"version": "1.0.0"
},
"update-notifier": {
"version": "0.5.0",
"dependencies": {
"chalk": {
"version": "1.0.0",
"dependencies": {
"ansi-styles": {
"version": "2.0.1"
},
"escape-string-regexp": {
"version": "1.0.3"
},
"has-ansi": {
"version": "1.0.3",
"dependencies": {
"ansi-regex": {
"version": "1.1.1"
},
"get-stdin": {
"version": "4.0.1"
}
}
},
"strip-ansi": {
"version": "2.0.1",
"dependencies": {
"ansi-regex": {
"version": "1.1.1"
}
}
},
"supports-color": {
"version": "1.3.1"
}
}
},
"configstore": {
"version": "1.1.0",
"dependencies": {
"graceful-fs": {
"version": "3.0.8"
},
"mkdirp": {
"version": "0.5.1",
"dependencies": {
"minimist": {
"version": "0.0.8"
}
}
},
"object-assign": {
"version": "2.1.1"
},
"os-tmpdir": {
"version": "1.0.1"
},
"osenv": {
"version": "0.1.1"
},
"user-home": {
"version": "1.1.1"
},
"uuid": {
"version": "2.0.1"
},
"xdg-basedir": {
"version": "1.0.1"
}
}
},
"is-npm": {
"version": "1.0.0"
},
"latest-version": {
"version": "1.0.0",
"dependencies": {
"package-json": {
"version": "1.2.0",
"dependencies": {
"got": {
"version": "3.2.0",
"dependencies": {
"duplexify": {
"version": "3.4.1",
"dependencies": {
"end-of-stream": {
"version": "1.0.0",
"dependencies": {
"once": {
"version": "1.3.2",
"dependencies": {
"wrappy": {
"version": "1.0.1"
}
}
}
}
},
"readable-stream": {
"version": "1.1.13",
"dependencies": {
"core-util-is": {
"version": "1.0.1"
},
"isarray": {
"version": "0.0.1"
},
"string_decoder": {
"version": "0.10.31"
},
"inherits": {
"version": "2.0.1"
}
}
}
}
},
"infinity-agent": {
"version": "2.0.3"
},
"is-stream": {
"version": "1.0.1"
},
"lowercase-keys": {
"version": "1.0.0"
},
"nested-error-stacks": {
"version": "1.0.0"
},
"object-assign": {
"version": "2.1.1"
},
"prepend-http": {
"version": "1.0.1"
},
"read-all-stream": {
"version": "2.1.2",
"dependencies": {
"readable-stream": {
"version": "1.1.13",
"dependencies": {
"core-util-is": {
"version": "1.0.1"
},
"isarray": {
"version": "0.0.1"
},
"string_decoder": {
"version": "0.10.31"
},
"inherits": {
"version": "2.0.1"
}
}
}
}
},
"statuses": {
"version": "1.2.1"
},
"timed-out": {
"version": "2.0.0"
}
}
},
"registry-url": {
"version": "3.0.3",
"dependencies": {
"rc": {
"version": "1.0.3",
"dependencies": {
"minimist": {
"version": "0.0.10"
},
"deep-extend": {
"version": "0.2.11"
},
"strip-json-comments": {
"version": "0.1.3"
},
"ini": {
"version": "1.3.4"
}
}
}
}
}
}
}
}
},
"repeating": {
"version": "1.1.3",
"dependencies": {
"is-finite": {
"version": "1.0.1",
"dependencies": {
"number-is-nan": {
"version": "1.0.0"
}
}
}
}
},
"semver-diff": {
"version": "2.0.0",
"dependencies": {
"semver": {
"version": "4.3.6"
}
}
},
"string-length": {
"version": "1.0.0",
"dependencies": {
"strip-ansi": {
"version": "2.0.1",
"dependencies": {
"ansi-regex": {
"version": "1.1.1"
}
}
}
}
}
}
}
}
}
}
}

View File

@@ -1,3 +1,3 @@
differential:vulcanize@0.0.5
differential:vulcanize@2.0.0
meteor@1.1.6
underscore@1.0.3

View File

@@ -0,0 +1,29 @@
Vulcanize
==============================================================================
Warning: API Change for version 1.0.0.
This package a meteor build plugin that wraps the [vulcanize](https://www.npmjs.com/package/vulcanize) npm package, which is used to process web components into a single output file.
### Usage
1. Ensure all your components are located somewhere under your public directory. (via bower, zip, etc)
2. Include a `config.vulcanize` file in the root of your project. This file will optionally define a path to the polyfill and paths to html imports for your components. For Example:
````
{
"polyfill": "/bower_components/webcomponentsjs/webcomponents.min.js",
"useShadowDom": true, // optional, defaults to shady dom (polymer default)
"imports": [
"/bower_components/paper-button/paper-button.html",
"/bower_components/paper-checkbox/paper-checkbox.html"
]
}
````
- By specifying a path to the polyfill we can ensure that it is injected into the bundle before any imports.
- By setting `useShadowDom` to true, we configure polymer to opt out of shady dom and use full shadow dom. This is pretty much required at the moment unless you only use polymer elements as leaf nodes. Any light dom (child elements) that gets rendered by blaze, react, etc will not be accounted for otherwise.
- Running your app in development as usual will result in individual imports being added to your `<head>` tag, resulting in multiple subsequent HTTP requests (good in development - debugging).
- Running `meteor`, `meteor build`, `modulus deploy`, etc with the `VULCANIZE=true` environment variable set will result in all your html imports being vulcanized or concatenated into a single html import (good in production). The resulting file will be called `vulcanized-{md5}.html`, which will be automatically added to your `<head>` tag. For example, `VULCANIZE=true meteor`, `VULCANIZE=true modulus deploy`.
- Setting the `CDN_PREFIX` environment variable will prepend the string to the beginning of the file path that is inserted into your HTML's `<head>` tag.

View File

@@ -1,15 +1,17 @@
Package.describe({
name: 'thaum:vulcanize',
name: 'differential:vulcanize',
summary: 'Vulcanize',
version: '0.0.5',
version: '2.0.1',
git: 'https://github.com/Differential/meteor-vulcanize'
});
Package.registerBuildPlugin({
name: 'vulcanize',
use: [],
use: [
"underscore@1.0.3"
],
sources: [
'vulcanize.js'
],
npmDependencies: {'vulcanize': '0.7.11'}
npmDependencies: {'vulcanize': '1.9.1'}
});

View File

@@ -0,0 +1,141 @@
var vulcan = Npm.require('vulcanize');
var crypto = Npm.require('crypto');
var url = Npm.require('url');
var fs = Npm.require('fs');
/**
* Vulcanize now requires a target input file.
* We need to create a temp file located within the same
* 'abspath' as the actual imports. Otherwise, vulcanize
* gets confused during the process.
*/
var tmpFile = '_imports.html';
var tmpDir = 'public';
var tmpPath = tmpDir + '/' + tmpFile;
/**
* Log
*/
function log() {
args = _.values(arguments);
args.unshift("=> Vulcanize:");
console.log.apply(this, args);
}
/**
* Get script tag with specified path.
*/
function scriptTag(path) {
return '<script src="' + path + '"></script>';
}
/**
* Get link tag with specified path.
*/
function linkTag(path) {
return '<link rel="import" href="' + path + '">';
}
/**
* Add config for dom mode to head.
*/
function addShadowDomConfig(compileStep) {
compileStep.addHtml({
section: 'head',
data: '<script> window.Polymer = {dom: "shadow"}; </script>'
});
}
/**
* Add webcomponentsjs script to head.
* @todo read first line and check for script tag
*/
function addPolyfillTag(compileStep, path) {
compileStep.addHtml({
section: 'head',
data: scriptTag(path)
});
}
/**
* Add imports to head.
*/
function addImportTag(compileStep, path) {
compileStep.addHtml({
section: 'head',
data: linkTag(path)
});
}
/**
* Vulcanize all files and add output file to head.
*/
function vulcanizeImports(compileStep, imports) {
var tags = _.map(imports, function(path) {
return linkTag(path);
});
fs.writeFileSync(tmpPath, tags.join("\n"));
vulcan.setOptions({ abspath: tmpDir });
vulcan.process(tmpFile, function(err, html) {
fs.unlinkSync(tmpPath);
var filenameHash = crypto.createHash('md5').update(html).digest('hex');
var filePath = '/vulcanized-' + filenameHash + '.html';
compileStep.addAsset({
path: filePath,
data: html
});
if (_.isString(process.env.CDN_PREFIX)) {
filePath = url.resolve(process.env.CDN_PREFIX, filePath);
}
addImportTag(compileStep, filePath);
});
}
/**
* Add individual import tags
*/
function individualImports(compileStep, imports) {
_.each(imports, function(path) {
addImportTag(compileStep, path);
});
}
/**
* Register appropriate plugin.
*/
Plugin.registerSourceHandler("vulcanize", function(compileStep) {
if (compileStep.inputPath === "config.vulcanize"
&& compileStep.arch === "web.browser") {
// Get JSON file.
var json = JSON.parse(compileStep.read().toString('utf8'));
// Add polyfill to html if defined.
if (_.isString(json.polyfill)) {
addPolyfillTag(compileStep, json.polyfill);
}
// Optionally opt into shadow dom, rather than shady dom.
if (json.useShadowDom) {
addShadowDomConfig(compileStep);
}
// Add imports if defined.
if (process.env.VULCANIZE && _.isArray(json.imports)) {
log("Importing vulcanized file...");
vulcanizeImports(compileStep, json.imports);
} else {
log("Importing individual files...");
individualImports(compileStep, json.imports);
}
} else if (compileStep.arch === "web.browser") {
log("File "+compileStep.inputPath+" ignored");
}
});

View File

@@ -1 +0,0 @@
.npm

View File

@@ -1,29 +0,0 @@
Vulcanize
==============================================================================
This package a meteor build plugin that wraps the [vulcanize](https://www.npmjs.com/package/vulcanize) npm package, which is used to process web components into a single output file.
### Usage
1. Ensure all your components are located somewhere under your public directory.
2. Include an `imports.html` file anywhere available to the client, that contains the html imports that would normally go inside your `<head>` tag.
````
<!-- Core Components -->
<link rel="import" href="/components/core-animation/core-animation.html">
<link rel="import" href="/components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="/components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="/components/core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="/components/core-pages/core-pages.html">
...
<!-- Paper Components -->
<link rel="import" href="/components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="/components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="/components/paper-input/paper-input.html">
...
````
- Running your app in development as usual will result in the contents of `imports.html` being added to your `<head>` tag, resulting in multiple subsequent HTTP requests (good in development - debugging).
- Running `meteor`, `meteor build`, `modulus deploy`, etc with the `VULCANIZE=true` environment variable set will result in all your html imports being vulcanized or concatenated into a single html import (good in production). The resulting file will be called `vulcanized.html`, which will be automatically added to your `<head>` tag. For example, `VULCANIZE=true meteor`, `VULCANIZE=true modulus deploy`.
- Setting the `CDN_PREFIX` environment variable will prepend the string to the beginning of the file path that is inserted into your HTML's `<head>` tag.

View File

@@ -1,70 +0,0 @@
var vulcan = Npm.require('vulcanize');
var crypto = Npm.require('crypto');
var url = Npm.require('url');
var _ = Npm.require('underscore');
var handler = function(compileStep) {
var importsHtml = compileStep.read().toString('utf8');
if (process.env.VULCANIZE) {
log('Vulcanizing imports...');
vulcanize(compileStep, importsHtml);
} else {
log('Adding all imports...');
addImports(compileStep, importsHtml);
}
};
var vulcanize = function(compileStep, importsHtml) {
var vulcanOutputHandler = function(filename, data) {
var filenameHash = crypto.createHash('md5').update(data).digest('hex');
var filePath = '/vulcanized-' + filenameHash + '.html';
compileStep.addAsset({
path: filePath,
data: data
});
if (_.isString(process.env.CDN_PREFIX)) {
filePath = url.resolve(process.env.CDN_PREFIX, filePath);
}
compileStep.addHtml({
section: 'head',
data: '<link rel="import" href="' + filePath + '">'
});
};
vulcan.setOptions({
inputSrc: importsHtml,
outputHandler: vulcanOutputHandler,
abspath: 'public',
strip: true
}, function(error) {
if (error) {
log(error);
} else {
vulcan.processDocument();
}
});
};
var addImports = function(compileStep, importsHtml) {
compileStep.addHtml({
section: 'head',
data: importsHtml
});
};
var log = function() {
args = _.values(arguments);
args.unshift("Vulcanize:");
console.log.apply(this, args);
};
Plugin.registerSourceHandler("imports.html", handler);

View File

@@ -0,0 +1,3 @@
.build*
versions.json
.versions

View File

@@ -115,7 +115,7 @@ ChangeLogs.insert({
"Added encumbrance effects that automatically apply when carrying too much load",
"Added a bunch of UI elements to make your character's current load clear",
"Floating button menus now close as expected when you click a sub-button",
"Base values in attribute summaries no longer look like added values",
"Base values in attribute summaries no longer look like added values"
],
});
@@ -275,47 +275,3 @@ ChangeLogs.insert({
"Fixed spell attacks appearing on features page when the spell is not prepared",
],
});
ChangeLogs.insert({
version: "0.8.0",
changes: [
"Migrate to a new hosting provider. Server should now respond to interaction in milliseconds, rather than minutes",
"Redirected www.dicecloud.com to dicecloud.com",
"Fixed errors loggin in with Google",
],
});
ChangeLogs.insert({
version: "0.9.0",
changes: [
"Added fast render support, direct links to characters should load instantly",
"Added extra indexes to the database to improve performance",
],
});
ChangeLogs.insert({
version: "0.9.1",
changes: [
"Fixed rendering issues in Chrome 49+",
"Made character names in the side-bar into regular links",
],
});
ChangeLogs.insert({
version: "0.9.2",
changes: [
"New characters now have starting ability scores of 10",
"Coins are incrementable by default",
"Fixed multiplication sign",
"Added \"if\" function to equations",
"Added ritual tag to spells in the spell list",
"Updated dependencies to keep up with Chrome's breaking changes",
],
});
ChangeLogs.insert({
version: "0.9.3",
changes: [
"Fixed invisible dropdown boxes in Chrome 52",
],
});

View File

@@ -1,29 +0,0 @@
{
"name": "paper-dropdown",
"private": false,
"dependencies": {
"polymer": "Polymer/polymer#^0.5",
"core-animation": "Polymer/core-animation#^0.5",
"core-collapse": "Polymer/core-collapse#^0.5",
"core-dropdown": "Polymer/core-dropdown#^0.5",
"core-transition": "Polymer/core-transition#^0.5",
"core-icons": "Polymer/core-icons#^0.5",
"paper-icon-button": "Polymer/paper-icon-button#^0.5",
"paper-item": "Polymer/paper-item#^0.5",
"paper-shadow": "Polymer/paper-shadow#^0.5"
},
"devDependencies": {
"web-component-tester": "web-component-tester#master"
},
"version": "0.5.6",
"homepage": "https://github.com/Polymer/paper-dropdown",
"_release": "0.5.6",
"_resolution": {
"type": "version",
"tag": "0.5.6",
"commit": "30db0c00276fd8740bc7488f58703ad9f2449e9d"
},
"_source": "git://github.com/Polymer/paper-dropdown.git",
"_target": "^0.5",
"_originalSource": "Polymer/paper-dropdown"
}

View File

@@ -1,6 +0,0 @@
paper-dropdown
==============
owner: @morethanreal
See the [component page](https://www.polymer-project.org/0.5/docs/elements/paper-dropdown.html) for more information.

View File

@@ -1,19 +0,0 @@
{
"name": "paper-dropdown",
"private": false,
"dependencies": {
"polymer": "Polymer/polymer#^0.5",
"core-animation": "Polymer/core-animation#^0.5",
"core-collapse": "Polymer/core-collapse#^0.5",
"core-dropdown": "Polymer/core-dropdown#^0.5",
"core-transition": "Polymer/core-transition#^0.5",
"core-icons": "Polymer/core-icons#^0.5",
"paper-icon-button": "Polymer/paper-icon-button#^0.5",
"paper-item": "Polymer/paper-item#^0.5",
"paper-shadow": "Polymer/paper-shadow#^0.5"
},
"devDependencies": {
"web-component-tester": "web-component-tester#master"
},
"version": "0.5.6"
}

View File

@@ -1,456 +0,0 @@
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>paper-dropdown</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link href="../core-collapse/core-collapse.html" rel="import">
<link href="../core-icons/core-icons.html" rel="import">
<link href="../paper-icon-button/paper-icon-button.html" rel="import">
<link href="../paper-item/paper-item.html" rel="import">
<link href="paper-dropdown.html" rel="import">
<style shim-shadowdom>
body {
font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
font-size: 14px;
margin: 0;
padding: 24px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
}
section {
padding: 20px 0;
}
section > div {
padding: 14px;
font-size: 16px;
}
x-trigger {
z-index: auto;
}
html /deep/ paper-dropdown:not(.no-padding)::shadow #scroller {
box-sizing: border-box;
padding: 8px;
}
.with-margin {
margin: 12px;
}
.open-below {
top: 38px;
}
</style>
</head>
<body>
<polymer-element name="x-trigger" extends="paper-icon-button" relative on-tap="{{toggle}}" noink>
<template>
<shadow></shadow>
<content></content>
</template>
<script>
Polymer({
toggle: function() {
if (!this.dropdown) {
this.dropdown = this.querySelector('paper-dropdown');
}
this.dropdown && this.dropdown.toggle();
}
});
</script>
</polymer-element>
<template is="auto-binding">
<section>
<div>Absolutely positioned dropdowns</div>
<x-trigger icon="menu">
<paper-dropdown>
halign = left
<br>
valign = top
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown valign="bottom">
halign = left
<br>
valign = bottom
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown halign="right">
halign = right
<br>
valign = top
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown class="no-padding">
<div class="menu">
<paper-item>Item 1</paper-item>
<paper-item>Item 2</paper-item>
<paper-item>Item 3</paper-item>
</div>
</paper-dropdown>
</x-trigger>
</section>
<section>
<div>Layered dropdowns</div>
<button onclick="document.getElementById('collapse').toggle()">toggle core-collapse</button>
<br>
<core-collapse id="collapse">
<x-trigger icon="menu">
<paper-dropdown layered>
halign = left
<br>
valign = top
</paper-dropdown>
</x-trigger>
</core-collapse>
</section>
<section>
<div>Scrolling and margin</div>
<x-trigger icon="menu">
<paper-dropdown>
no margin<br>
<br>
<template repeat="{{countries}}">
{{name}}<br>
</template>
</paper-dropdown>
</x-trigger>
<x-trigger icon="menu">
<paper-dropdown class="with-margin">
with margin<br>
<br>
<template repeat="{{countries}}">
{{name}}<br>
</template>
</paper-dropdown>
</x-trigger>
</section>
<section>
<div>Custom position</div>
<x-trigger icon="menu">
<paper-dropdown class="open-below">
top: 38px
</paper-dropdown>
</x-trigger>
</section>
</template>
<script>
scope = document.querySelector('template[is=auto-binding]');
scope.countries = [
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'Andorra', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
{name: 'Antigua and Barbuda', code: 'AG'},
{name: 'Argentina', code: 'AR'},
{name: 'Armenia', code: 'AM'},
{name: 'Aruba', code: 'AW'},
{name: 'Australia', code: 'AU'},
{name: 'Austria', code: 'AT'},
{name: 'Azerbaijan', code: 'AZ'},
{name: 'Bahamas', code: 'BS'},
{name: 'Bahrain', code: 'BH'},
{name: 'Bangladesh', code: 'BD'},
{name: 'Barbados', code: 'BB'},
{name: 'Belarus', code: 'BY'},
{name: 'Belgium', code: 'BE'},
{name: 'Belize', code: 'BZ'},
{name: 'Benin', code: 'BJ'},
{name: 'Bermuda', code: 'BM'},
{name: 'Bhutan', code: 'BT'},
{name: 'Bolivia', code: 'BO'},
{name: 'Bosnia and Herzegovina', code: 'BA'},
{name: 'Botswana', code: 'BW'},
{name: 'Bouvet Island', code: 'BV'},
{name: 'Brazil', code: 'BR'},
{name: 'British Indian Ocean Territory', code: 'IO'},
{name: 'Brunei Darussalam', code: 'BN'},
{name: 'Bulgaria', code: 'BG'},
{name: 'Burkina Faso', code: 'BF'},
{name: 'Burundi', code: 'BI'},
{name: 'Cambodia', code: 'KH'},
{name: 'Cameroon', code: 'CM'},
{name: 'Canada', code: 'CA'},
{name: 'Cape Verde', code: 'CV'},
{name: 'Cayman Islands', code: 'KY'},
{name: 'Central African Republic', code: 'CF'},
{name: 'Chad', code: 'TD'},
{name: 'Chile', code: 'CL'},
{name: 'China', code: 'CN'},
{name: 'Christmas Island', code: 'CX'},
{name: 'Cocos (Keeling) Islands', code: 'CC'},
{name: 'Colombia', code: 'CO'},
{name: 'Comoros', code: 'KM'},
{name: 'Congo', code: 'CG'},
{name: 'Congo, The Democratic Republic of the', code: 'CD'},
{name: 'Cook Islands', code: 'CK'},
{name: 'Costa Rica', code: 'CR'},
{name: 'Cote D\'Ivoire', code: 'CI'},
{name: 'Croatia', code: 'HR'},
{name: 'Cuba', code: 'CU'},
{name: 'Cyprus', code: 'CY'},
{name: 'Czech Republic', code: 'CZ'},
{name: 'Denmark', code: 'DK'},
{name: 'Djibouti', code: 'DJ'},
{name: 'Dominica', code: 'DM'},
{name: 'Dominican Republic', code: 'DO'},
{name: 'Ecuador', code: 'EC'},
{name: 'Egypt', code: 'EG'},
{name: 'El Salvador', code: 'SV'},
{name: 'Equatorial Guinea', code: 'GQ'},
{name: 'Eritrea', code: 'ER'},
{name: 'Estonia', code: 'EE'},
{name: 'Ethiopia', code: 'ET'},
{name: 'Falkland Islands (Malvinas)', code: 'FK'},
{name: 'Faroe Islands', code: 'FO'},
{name: 'Fiji', code: 'FJ'},
{name: 'Finland', code: 'FI'},
{name: 'France', code: 'FR'},
{name: 'French Guiana', code: 'GF'},
{name: 'French Polynesia', code: 'PF'},
{name: 'French Southern Territories', code: 'TF'},
{name: 'Gabon', code: 'GA'},
{name: 'Gambia', code: 'GM'},
{name: 'Georgia', code: 'GE'},
{name: 'Germany', code: 'DE'},
{name: 'Ghana', code: 'GH'},
{name: 'Gibraltar', code: 'GI'},
{name: 'Greece', code: 'GR'},
{name: 'Greenland', code: 'GL'},
{name: 'Grenada', code: 'GD'},
{name: 'Guadeloupe', code: 'GP'},
{name: 'Guam', code: 'GU'},
{name: 'Guatemala', code: 'GT'},
{name: 'Guernsey', code: 'GG'},
{name: 'Guinea', code: 'GN'},
{name: 'Guinea-Bissau', code: 'GW'},
{name: 'Guyana', code: 'GY'},
{name: 'Haiti', code: 'HT'},
{name: 'Heard Island and Mcdonald Islands', code: 'HM'},
{name: 'Holy See (Vatican City State)', code: 'VA'},
{name: 'Honduras', code: 'HN'},
{name: 'Hong Kong', code: 'HK'},
{name: 'Hungary', code: 'HU'},
{name: 'Iceland', code: 'IS'},
{name: 'India', code: 'IN'},
{name: 'Indonesia', code: 'ID'},
{name: 'Iran, Islamic Republic Of', code: 'IR'},
{name: 'Iraq', code: 'IQ'},
{name: 'Ireland', code: 'IE'},
{name: 'Isle of Man', code: 'IM'},
{name: 'Israel', code: 'IL'},
{name: 'Italy', code: 'IT'},
{name: 'Jamaica', code: 'JM'},
{name: 'Japan', code: 'JP'},
{name: 'Jersey', code: 'JE'},
{name: 'Jordan', code: 'JO'},
{name: 'Kazakhstan', code: 'KZ'},
{name: 'Kenya', code: 'KE'},
{name: 'Kiribati', code: 'KI'},
{name: 'Korea, Democratic People\'S Republic of', code: 'KP'},
{name: 'Korea, Republic of', code: 'KR'},
{name: 'Kuwait', code: 'KW'},
{name: 'Kyrgyzstan', code: 'KG'},
{name: 'Lao People\'S Democratic Republic', code: 'LA'},
{name: 'Latvia', code: 'LV'},
{name: 'Lebanon', code: 'LB'},
{name: 'Lesotho', code: 'LS'},
{name: 'Liberia', code: 'LR'},
{name: 'Libyan Arab Jamahiriya', code: 'LY'},
{name: 'Liechtenstein', code: 'LI'},
{name: 'Lithuania', code: 'LT'},
{name: 'Luxembourg', code: 'LU'},
{name: 'Macao', code: 'MO'},
{name: 'Macedonia, The Former Yugoslav Republic of', code: 'MK'},
{name: 'Madagascar', code: 'MG'},
{name: 'Malawi', code: 'MW'},
{name: 'Malaysia', code: 'MY'},
{name: 'Maldives', code: 'MV'},
{name: 'Mali', code: 'ML'},
{name: 'Malta', code: 'MT'},
{name: 'Marshall Islands', code: 'MH'},
{name: 'Martinique', code: 'MQ'},
{name: 'Mauritania', code: 'MR'},
{name: 'Mauritius', code: 'MU'},
{name: 'Mayotte', code: 'YT'},
{name: 'Mexico', code: 'MX'},
{name: 'Micronesia, Federated States of', code: 'FM'},
{name: 'Moldova, Republic of', code: 'MD'},
{name: 'Monaco', code: 'MC'},
{name: 'Mongolia', code: 'MN'},
{name: 'Montserrat', code: 'MS'},
{name: 'Morocco', code: 'MA'},
{name: 'Mozambique', code: 'MZ'},
{name: 'Myanmar', code: 'MM'},
{name: 'Namibia', code: 'NA'},
{name: 'Nauru', code: 'NR'},
{name: 'Nepal', code: 'NP'},
{name: 'Netherlands', code: 'NL'},
{name: 'Netherlands Antilles', code: 'AN'},
{name: 'New Caledonia', code: 'NC'},
{name: 'New Zealand', code: 'NZ'},
{name: 'Nicaragua', code: 'NI'},
{name: 'Niger', code: 'NE'},
{name: 'Nigeria', code: 'NG'},
{name: 'Niue', code: 'NU'},
{name: 'Norfolk Island', code: 'NF'},
{name: 'Northern Mariana Islands', code: 'MP'},
{name: 'Norway', code: 'NO'},
{name: 'Oman', code: 'OM'},
{name: 'Pakistan', code: 'PK'},
{name: 'Palau', code: 'PW'},
{name: 'Palestinian Territory, Occupied', code: 'PS'},
{name: 'Panama', code: 'PA'},
{name: 'Papua New Guinea', code: 'PG'},
{name: 'Paraguay', code: 'PY'},
{name: 'Peru', code: 'PE'},
{name: 'Philippines', code: 'PH'},
{name: 'Pitcairn', code: 'PN'},
{name: 'Poland', code: 'PL'},
{name: 'Portugal', code: 'PT'},
{name: 'Puerto Rico', code: 'PR'},
{name: 'Qatar', code: 'QA'},
{name: 'Reunion', code: 'RE'},
{name: 'Romania', code: 'RO'},
{name: 'Russian Federation', code: 'RU'},
{name: 'RWANDA', code: 'RW'},
{name: 'Saint Helena', code: 'SH'},
{name: 'Saint Kitts and Nevis', code: 'KN'},
{name: 'Saint Lucia', code: 'LC'},
{name: 'Saint Pierre and Miquelon', code: 'PM'},
{name: 'Saint Vincent and the Grenadines', code: 'VC'},
{name: 'Samoa', code: 'WS'},
{name: 'San Marino', code: 'SM'},
{name: 'Sao Tome and Principe', code: 'ST'},
{name: 'Saudi Arabia', code: 'SA'},
{name: 'Senegal', code: 'SN'},
{name: 'Serbia and Montenegro', code: 'CS'},
{name: 'Seychelles', code: 'SC'},
{name: 'Sierra Leone', code: 'SL'},
{name: 'Singapore', code: 'SG'},
{name: 'Slovakia', code: 'SK'},
{name: 'Slovenia', code: 'SI'},
{name: 'Solomon Islands', code: 'SB'},
{name: 'Somalia', code: 'SO'},
{name: 'South Africa', code: 'ZA'},
{name: 'South Georgia and the South Sandwich Islands', code: 'GS'},
{name: 'Spain', code: 'ES'},
{name: 'Sri Lanka', code: 'LK'},
{name: 'Sudan', code: 'SD'},
{name: 'Suriname', code: 'SR'},
{name: 'Svalbard and Jan Mayen', code: 'SJ'},
{name: 'Swaziland', code: 'SZ'},
{name: 'Sweden', code: 'SE'},
{name: 'Switzerland', code: 'CH'},
{name: 'Syrian Arab Republic', code: 'SY'},
{name: 'Taiwan, Province of China', code: 'TW'},
{name: 'Tajikistan', code: 'TJ'},
{name: 'Tanzania, United Republic of', code: 'TZ'},
{name: 'Thailand', code: 'TH'},
{name: 'Timor-Leste', code: 'TL'},
{name: 'Togo', code: 'TG'},
{name: 'Tokelau', code: 'TK'},
{name: 'Tonga', code: 'TO'},
{name: 'Trinidad and Tobago', code: 'TT'},
{name: 'Tunisia', code: 'TN'},
{name: 'Turkey', code: 'TR'},
{name: 'Turkmenistan', code: 'TM'},
{name: 'Turks and Caicos Islands', code: 'TC'},
{name: 'Tuvalu', code: 'TV'},
{name: 'Uganda', code: 'UG'},
{name: 'Ukraine', code: 'UA'},
{name: 'United Arab Emirates', code: 'AE'},
{name: 'United Kingdom', code: 'GB'},
{name: 'United States', code: 'US'},
{name: 'United States Minor Outlying Islands', code: 'UM'},
{name: 'Uruguay', code: 'UY'},
{name: 'Uzbekistan', code: 'UZ'},
{name: 'Vanuatu', code: 'VU'},
{name: 'Venezuela', code: 'VE'},
{name: 'Viet Nam', code: 'VN'},
{name: 'Virgin Islands, British', code: 'VG'},
{name: 'Virgin Islands, U.S.', code: 'VI'},
{name: 'Wallis and Futuna', code: 'WF'},
{name: 'Western Sahara', code: 'EH'},
{name: 'Yemen', code: 'YE'},
{name: 'Zambia', code: 'ZM'},
{name: 'Zimbabwe', code: 'ZW'}
];
scope.pastries = [
'Apple fritter',
'Croissant',
'Donut',
'Financier',
'Jello',
'Madeleine',
'Pound cake',
'Pretzel',
'Sfogliatelle'
];
</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More