settings-page.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <dom-module id="settings-page">
  2. <template>
  3. <style>
  4. :host {
  5. display: block;
  6. overflow: hidden;
  7. color: white;
  8. z-index: 3
  9. }
  10. #placeholder {
  11. opacity: 0;
  12. background-color: #4285f4;
  13. @apply(--layout-fit);
  14. }
  15. /* paper-icon-button {
  16. position: absolute;
  17. top: 16px;
  18. right: 16px;
  19. z-index: 2;
  20. }*/
  21. #container {
  22. @apply(--layout-fit);
  23. @apply(--layout-vertical);
  24. @apply(--layout-center-center);
  25. background-color: #4285f4;
  26. padding: 64px 32px 64px 32px;
  27. box-sizing: border-box;
  28. }
  29. </style>
  30. </template>
  31. <script>
  32. 'use strict';
  33. Polymer({
  34. is: 'settings-page',
  35. behaviors: [
  36. Polymer.NeonSharedElementAnimatableBehavior
  37. ],
  38. properties: {
  39. animationConfig: {
  40. value: function() {
  41. return {
  42. 'entry': [{
  43. name: 'ripple-animation',
  44. id: 'ripple',
  45. toPage: this
  46. }, {
  47. name: 'fade-out-animation',
  48. node: this.$.placeholder,
  49. timing: {
  50. delay: 250
  51. }
  52. }, {
  53. name: 'fade-in-animation',
  54. node: this.$.container,
  55. timing: {
  56. delay: 50
  57. }
  58. }],
  59. 'exit': [{
  60. name: 'opaque-animation',
  61. node: this.$.placeholder
  62. }, {
  63. name: 'fade-out-animation',
  64. node: this.$.container,
  65. timing: {
  66. duration: 0
  67. }
  68. }, {
  69. name: 'reverse-ripple-animation',
  70. id: 'reverse-ripple',
  71. fromPage: this
  72. }]
  73. };
  74. }
  75. },
  76. sharedElements: {
  77. value: function() {
  78. return {
  79. 'ripple': this.$.placeholder,
  80. 'reverse-ripple': this.$.placeholder
  81. };
  82. }
  83. }
  84. },
  85. _switch: function() {
  86. document.querySelector('#pages').select(0);
  87. }
  88. });
  89. </script>
  90. </dom-module>