You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
2.8 KiB

5 years ago
  1. <template>
  2. <div class="pan-item" :style="{zIndex:zIndex,height:height,width:width}">
  3. <div class="pan-info">
  4. <div class="pan-info-roles-container">
  5. <slot></slot>
  6. </div>
  7. </div>
  8. <img v-if="image!=null" class="pan-thumb" :src="image">
  9. <img v-else="image==null" class="pan-thumb" src="../../assets/image/user_img.gif">
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: 'PanThumb',
  15. props: {
  16. image: {
  17. type: String,
  18. required: false
  19. },
  20. zIndex: {
  21. type: Number,
  22. default: 1
  23. },
  24. width: {
  25. type: String,
  26. default: '150px'
  27. },
  28. height: {
  29. type: String,
  30. default: '150px'
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped>
  36. .pan-item {
  37. width: 200px;
  38. height: 200px;
  39. border-radius: 50%;
  40. display: inline-block;
  41. position: relative;
  42. cursor: default;
  43. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  44. }
  45. .pan-info-roles-container {
  46. padding: 20px;
  47. text-align: center;
  48. }
  49. .pan-thumb {
  50. width: 100%;
  51. height: 100%;
  52. background-size: 100%;
  53. border-radius: 50%;
  54. overflow: hidden;
  55. position: absolute;
  56. transform-origin: 95% 40%;
  57. transition: all 0.3s ease-in-out;
  58. }
  59. .pan-thumb:after {
  60. content: '';
  61. width: 8px;
  62. height: 8px;
  63. position: absolute;
  64. border-radius: 50%;
  65. top: 40%;
  66. left: 95%;
  67. margin: -4px 0 0 -4px;
  68. background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
  69. box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
  70. }
  71. .pan-info {
  72. position: absolute;
  73. width: inherit;
  74. height: inherit;
  75. border-radius: 50%;
  76. overflow: hidden;
  77. box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
  78. }
  79. .pan-info h3 {
  80. color: #fff;
  81. text-transform: uppercase;
  82. position: relative;
  83. letter-spacing: 2px;
  84. font-size: 18px;
  85. margin: 0 60px;
  86. padding: 22px 0 0 0;
  87. height: 85px;
  88. font-family: 'Open Sans', Arial, sans-serif;
  89. text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
  90. }
  91. .pan-info p {
  92. color: #fff;
  93. padding: 10px 5px;
  94. font-style: italic;
  95. margin: 0 30px;
  96. font-size: 12px;
  97. border-top: 1px solid rgba(255, 255, 255, 0.5);
  98. }
  99. .pan-info p a {
  100. display: block;
  101. color: #333;
  102. width: 80px;
  103. height: 80px;
  104. background: rgba(255, 255, 255, 0.3);
  105. border-radius: 50%;
  106. color: #fff;
  107. font-style: normal;
  108. font-weight: 700;
  109. text-transform: uppercase;
  110. font-size: 9px;
  111. letter-spacing: 1px;
  112. padding-top: 24px;
  113. margin: 7px auto 0;
  114. font-family: 'Open Sans', Arial, sans-serif;
  115. opacity: 0;
  116. transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
  117. transform: translateX(60px) rotate(90deg);
  118. }
  119. .pan-info p a:hover {
  120. background: rgba(255, 255, 255, 0.5);
  121. }
  122. .pan-item:hover .pan-thumb {
  123. transform: rotate(-110deg);
  124. }
  125. .pan-item:hover .pan-info p a {
  126. opacity: 1;
  127. transform: translateX(0px) rotate(0deg);
  128. }
  129. </style>