Skip to content

Instantly share code, notes, and snippets.

@dfreedm
Created June 23, 2014 18:26
Show Gist options
  • Select an option

  • Save dfreedm/9b48636e1a91349a7f6d to your computer and use it in GitHub Desktop.

Select an option

Save dfreedm/9b48636e1a91349a7f6d to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element" on-quiz-done="{{quizDone}}">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
min-height: 450px;
}
#topeka_datasource {
left: 2000px;
top: 990px;
position: absolute;
}
#notification_alert {
left: 2020px;
top: 880px;
position: absolute;
}
#topeka_app {
width: 100%;
height: 100%;
min-height: 450px;
left: 0px;
top: 0px;
position: absolute;
}
</style>
<topeka-datasource url="../topeka-elements/categories.json" id="topeka_datasource" hidden></topeka-datasource>
<notification-alert header="{{ $.topeka_app.user.name }}" message="{{ $.topeka_app.user.score }}" name="quiz" id="notification_alert"></notification-alert>
<topeka-app user="{{ $.topeka_datasource.user }}" categories="{{ $.topeka_datasource.categories }}" id="topeka_app" vertical layout></topeka-app>
</template>
<script>
Polymer('my-element', {
quizDone: function () {
this.$.notification_alert.notify();
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment