This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import Router from 'koa-router' | |
| import crypto from 'crypto' | |
| import path from 'path' | |
| import uuid from 'node-uuid' | |
| const router = new Router() | |
| router.get('/s3options', function *(next) { | |
| let { contentType, filename } = this.query | |
| this.type = 'json' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-app"> | |
| <template> | |
| <my-layout on-board-changed={{onBoardChanged}}> | |
| <template if="{{board == 'News'}}"> | |
| <my-news-board></my-news-board> | |
| </template> | |
| <template if="{{board == 'Discussions'}}"> | |
| <my-discussions-board></my-discussions-board> | |
| </template> | |
| </my-layout> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-layout"> | |
| <template> | |
| <core-localstorage name="selected-menu-index" value="{{selected}}" on-core-localstorage-load="{{onStorageLoad}}"></core-localstorage> | |
| <core-scaffold> | |
| <core-header-panel navigation flex> | |
| <core-toolbar id="navheader"> | |
| <span>Polymer Board</span> | |
| </core-toolbar> | |
| <core-menu selected="{{selected}}"> | |
| <template repeat="{{menuItem in menu}}"> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-news-board" extends="my-firebase-board"> | |
| <template> | |
| <shadow></shadow> | |
| <template repeat="{{key in keys | sort(true)}}"> | |
| <my-board-card item="{{data[key]}}"></my-board-card> | |
| </template> | |
| </template> | |
| <script> | |
| (function () { | |
| 'use strict'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-discussions-board" extends="my-firebase-board"> | |
| <template> | |
| <shadow></shadow> | |
| <template if={{dataReady}}> | |
| <my-discussion-input ref="{{ref}}"></my-discussion-input> | |
| <template repeat="{{key in keys | sort(true)}}"> | |
| <my-discussion-item item="{{data[key]}}"></my-discussion-item> | |
| </template> | |
| </template> | |
| </template> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="polymer-cool"> | |
| <template> | |
| You are {{praise}} <content></content>! | |
| </template> | |
| <script> | |
| Polymer({ | |
| praise: 'cool', | |
| // 하위 element에 change watcher가 없으면 | |
| // polymer-cool의 changed watcher가 불려진다. | |
| // praiseChanged: function() { }, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="polymer-cool"> | |
| <template> | |
| You are {{praise}} <content></content>! | |
| </template> | |
| <script> | |
| Polymer({ | |
| praise: 'cool' | |
| }); | |
| </script> | |
| </polymer-element> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-firebase-board"> | |
| <template> | |
| <my-globals id="globals"></my-globals> | |
| <firebase-element id="base" location="{{location}}" childEvents="true" ref="{{ref}}" data="{{data}}" keys="{{keys}}" dataReady="{{dataReady}}"></firebase-element> | |
| <template if={{!dataReady}}> | |
| <div class="center"> | |
| <my-font-awesome attr="fa-circle-o-notch fa-spin fa-5x"></my-font-awesome> | |
| </div> | |
| </template> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-board-card" attributes="item"> | |
| <template> | |
| <paper-shadow> | |
| <div class="card-header"> | |
| {{item.title}} | |
| </div> | |
| <div class="card-author"> | |
| <my-font-awesome attr="fa-user"></my-font-awesome> | |
| <span class="author-name">  {{item.author}}</span> | |
| </div> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <polymer-element name="my-discussion-item" attributes="item"> | |
| <template> | |
| <core-signals on-core-signal-user-changed="{{signalUserChanged}}"></core-signals> | |
| <my-globals id="globals"></my-globals> | |
| <div id="container"> | |
| <div class="profile"> | |
| <img src="{{profileUrl}}" on-click="{{openProviderPage}}"> | |
| </div> | |
| <div class="pull-right created">{{item.created | ticksToDateString}}</div> | 
NewerOlder