x-cards.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layout.html">
  2. <link rel="import" href="../../bower_components/neon-animation/neon-shared-element-animatable-behavior.html">
  3. <link rel="import" href="../../bower_components/neon-animation/neon-animations.html">
  4. <link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
  5. <link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html">
  6. <link rel="import" href="../../styles/icons.html">
  7. <dom-module id="x-cards">
  8. <template>
  9. <style>
  10. :host {
  11. display: block;
  12. overflow: hidden;
  13. }
  14. #placeholder {
  15. opacity: 0;
  16. background-color: grey;
  17. @apply(--layout-fit);
  18. }
  19. paper-icon-button {
  20. color: #52524F;
  21. }
  22. paper-icon-button:hover {
  23. color: #4285f4;
  24. }
  25. .share {
  26. position: absolute;
  27. top: 16px;
  28. right: 16px;
  29. z-index: 10;
  30. }
  31. .share a {
  32. color: #52524F;
  33. text-decoration: none;
  34. padding-left: 8px;
  35. padding-right: 8px;
  36. }
  37. .share a:hover,
  38. #btn:hover {
  39. color: #4285f4;
  40. }
  41. @media all and (max-height: 640px) {
  42. .github {
  43. display: none;
  44. }
  45. }
  46. </style>
  47. <div id="placeholder"></div>
  48. <div id="container">
  49. <div class="share">
  50. <a href="https://twitter.com/capira42" target="_blank">
  51. <iron-icon icon="chat:twitter"></iron-icon>
  52. <paper-tooltip for="" position="bottom" offset="14">
  53. Contact us on Twitter!
  54. </paper-tooltip>
  55. </a>
  56. <a href="https://www.facebook.com/snapdrop.net/" target="_blank">
  57. <iron-icon icon="chat:facebook"></iron-icon>
  58. <paper-tooltip for="" position="bottom" offset="14">
  59. Like us on Facebook!
  60. </paper-tooltip>
  61. </a>
  62. <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FDAHZJH3228D6" target="_blank">
  63. <iron-icon icon="chat:local-cafe"></iron-icon>
  64. <paper-tooltip for="" position="bottom" offset="14">
  65. You like Snapdrop?
  66. <br> Buy me a cup of coffee!
  67. </paper-tooltip>
  68. </a>
  69. <a href="https://github.com/capira12/snapdrop" target="_blank" class="github">
  70. <iron-icon icon="chat:github" ></iron-icon>
  71. <paper-tooltip for="" position="bottom" offset="14">
  72. Get involved!
  73. </paper-tooltip>
  74. </a>
  75. <paper-icon-button id="btn" icon="chat:info-outline" on-tap="_switch"></paper-icon-button>
  76. </div>
  77. <content select="div"></content>
  78. </div>
  79. </template>
  80. </dom-module>
  81. <script>
  82. (function() {
  83. Polymer({
  84. is: 'x-cards',
  85. behaviors: [
  86. Polymer.NeonSharedElementAnimatableBehavior
  87. ],
  88. properties: {
  89. animationConfig: {
  90. value: function() {
  91. return {
  92. 'entry': [{
  93. name: 'reverse-ripple-animation',
  94. id: 'reverse-ripple',
  95. toPage: this
  96. }],
  97. 'exit': [{
  98. name: 'fade-out-animation',
  99. node: this.$.container,
  100. timing: {
  101. delay: 150,
  102. duration: 0
  103. }
  104. }, {
  105. name: 'ripple-animation',
  106. id: 'ripple',
  107. fromPage: this
  108. }]
  109. };
  110. }
  111. },
  112. sharedElements: {
  113. value: function() {
  114. return {
  115. 'ripple': this.$.btn,
  116. 'reverse-ripple': this.$.btn
  117. };
  118. }
  119. }
  120. },
  121. _switch: function() {
  122. document.querySelector('#pages').select(1);
  123. }
  124. });
  125. })();
  126. </script>