x-cards.html 4.6 KB

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