settings-page.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. #container {
  16. @apply(--layout-fit);
  17. @apply(--layout-vertical);
  18. @apply(--layout-center-center);
  19. background-color: #4285f4;
  20. padding: 64px 32px 64px 32px;
  21. box-sizing: border-box;
  22. }
  23. </style>
  24. </template>
  25. <script>
  26. 'use strict';
  27. Polymer({
  28. is: 'settings-page',
  29. behaviors: [
  30. Polymer.NeonSharedElementAnimatableBehavior
  31. ],
  32. properties: {
  33. animationConfig: {
  34. value: function() {
  35. return {
  36. 'entry': [{
  37. name: 'ripple-animation',
  38. id: 'ripple',
  39. toPage: this
  40. }, {
  41. name: 'fade-out-animation',
  42. node: this.$.placeholder,
  43. timing: {
  44. delay: 250
  45. }
  46. }, {
  47. name: 'fade-in-animation',
  48. node: this.$.container,
  49. timing: {
  50. delay: 50
  51. }
  52. }],
  53. 'exit': [{
  54. name: 'opaque-animation',
  55. node: this.$.placeholder
  56. }, {
  57. name: 'fade-out-animation',
  58. node: this.$.container,
  59. timing: {
  60. duration: 0
  61. }
  62. }, {
  63. name: 'reverse-ripple-animation',
  64. id: 'reverse-ripple',
  65. fromPage: this
  66. }]
  67. };
  68. }
  69. },
  70. sharedElements: {
  71. value: function() {
  72. return {
  73. 'ripple': this.$.placeholder,
  74. 'reverse-ripple': this.$.placeholder
  75. };
  76. }
  77. }
  78. },
  79. _switch: function() {
  80. document.querySelector('#pages').select(0);
  81. }
  82. });
  83. </script>
  84. </dom-module>