personal-avatar.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <link rel="import" href="../../bower_components/iron-icon/iron-icon.html">
  2. <link rel="import" href="../../styles/icons.html">
  3. <link rel="import" href="device-name.html">
  4. <dom-module id="personal-avatar">
  5. <template>
  6. <style>
  7. :host {
  8. @apply(--layout-vertical);
  9. @apply(--layout-center);
  10. width: 360px;
  11. position: absolute;
  12. bottom: 16px;
  13. left: 50%;
  14. margin-left: -180px;
  15. z-index: 12;
  16. cursor: pointer;
  17. }
  18. :host:hover iron-icon,
  19. :host:hover device-name {
  20. color: #3367d6;
  21. }
  22. :host:hover iron-icon {
  23. transform: scale(1.05);
  24. }
  25. iron-icon {
  26. width: 80px;
  27. height: 80px;
  28. color: #4285f4;
  29. margin-bottom: 6px;
  30. }
  31. .paper-font-body1 {
  32. font-size: 13px;
  33. }
  34. .discover {
  35. color: #4285f4;
  36. line-height: 18px;
  37. }
  38. @media all and (max-width: 370px) {
  39. .discover {
  40. font-size: 12px;
  41. }
  42. }
  43. @media all and (max-height: 370px) {
  44. :host {
  45. bottom: 8px;
  46. }
  47. iron-icon {
  48. width: 32px;
  49. height: 32px;
  50. margin-bottom: 2px;
  51. }
  52. .slogan {
  53. display: none;
  54. }
  55. }
  56. </style>
  57. <device-name id="deviceName"></device-name>
  58. <iron-icon icon="chat:wifi-tethering"></iron-icon>
  59. <div class="paper-font-body1 slogan">
  60. The easiest way to transfer data across devices.
  61. </div>
  62. <div class="paper-font-body1 discover">
  63. Allow me to be discovered by: Everyone in this network.
  64. </div>
  65. </template>
  66. <script>
  67. 'use strict';
  68. Polymer({
  69. is: 'personal-avatar',
  70. listeners: {
  71. 'tap': '_openDeviceNameDialog'
  72. },
  73. _openDeviceNameDialog: function() {
  74. this.$.deviceName.open();
  75. }
  76. });
  77. </script>
  78. </dom-module>