6ed1b67686c13ff2ea31f07153dc302d6ef1e6ee.svn-base 2.8 KB

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