personal-avatar.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. iron-icon {
  23. width: 80px;
  24. height: 80px;
  25. color: #4285f4;
  26. margin-bottom: 6px;
  27. }
  28. .paper-font-body1 {
  29. font-size: 13px;
  30. }
  31. .discover {
  32. color: #4285f4;
  33. line-height: 18px;
  34. }
  35. @media all and (max-width: 370px) {
  36. .discover {
  37. font-size: 12px;
  38. }
  39. }
  40. @media all and (max-height: 370px) {
  41. :host {
  42. bottom: 8px;
  43. }
  44. iron-icon {
  45. width: 32px;
  46. height: 32px;
  47. margin-bottom: 2px;
  48. }
  49. .slogan {
  50. display: none;
  51. }
  52. }
  53. </style>
  54. <device-name id="deviceName"></device-name>
  55. <iron-icon icon="chat:wifi-tethering"></iron-icon>
  56. <div class="paper-font-body1 slogan">
  57. The easiest way to transfer data across devices.
  58. </div>
  59. <div class="paper-font-body1 discover">
  60. Allow me to be discovered by: Everyone in this network.
  61. </div>
  62. </template>
  63. <script>
  64. 'use strict';
  65. Polymer({
  66. is: 'personal-avatar',
  67. listeners: {
  68. 'tap': '_openDeviceNameDialog'
  69. },
  70. _openDeviceNameDialog: function() {
  71. this.$.deviceName.open();
  72. }
  73. });
  74. </script>
  75. </dom-module>