SharePage.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /**
  2. * SharePage 样式
  3. * 移动端适配,参考 RegisterPage 的设计风格
  4. */
  5. .share-page {
  6. position: relative;
  7. width: 100%;
  8. min-height: 100dvh;
  9. min-height: calc(var(--vh, 1vh) * 100);
  10. background: linear-gradient(180deg, #E8E8E8 0%, #F5F3F0 100%);
  11. padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  12. display: flex;
  13. flex-direction: column;
  14. overflow-y: auto;
  15. }
  16. /* 图片容器 */
  17. .share-image-container {
  18. flex: 1;
  19. display: flex;
  20. align-items: center;
  21. justify-content: center;
  22. padding: 24px;
  23. min-height: 0;
  24. overflow: hidden;
  25. }
  26. .share-image {
  27. width: 100%;
  28. max-width: 100%;
  29. height: auto;
  30. max-height: 100%;
  31. object-fit: contain;
  32. border-radius: 12px;
  33. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  34. background: #fff;
  35. }
  36. /* 按钮容器 */
  37. .share-buttons-container {
  38. padding: 24px;
  39. display: grid;
  40. grid-template-columns: 1fr 1fr;
  41. gap: 16px;
  42. background: rgba(255, 255, 255, 0.6);
  43. border-top: 1px solid rgba(0, 0, 0, 0.05);
  44. }
  45. .share-button {
  46. height: 6.9vh; /* 56 / 812 × 100 = 6.9vh */
  47. border-radius: 12px; /* 横向保持 px,自动转 vw */
  48. font-size: clamp(14px, 3.5vw, 16px);
  49. font-weight: 500;
  50. border: none;
  51. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  52. transition: all 0.3s;
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. gap: 8px; /* 横向保持 px,自动转 vw */
  57. }
  58. .share-button:hover {
  59. transform: translateY(-2px);
  60. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  61. }
  62. .share-button:active {
  63. transform: translateY(0);
  64. }
  65. /* 微信按钮 */
  66. .share-button-wechat {
  67. background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
  68. color: #fff;
  69. }
  70. .share-button-wechat:hover {
  71. background: linear-gradient(135deg, #06AD56 0%, #05994C 100%);
  72. box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
  73. }
  74. /* 微信朋友圈按钮 */
  75. .share-button-wechat-moments {
  76. background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
  77. color: #fff;
  78. }
  79. .share-button-wechat-moments:hover {
  80. background: linear-gradient(135deg, #06AD56 0%, #05994C 100%);
  81. box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
  82. }
  83. /* QQ按钮 */
  84. .share-button-qq {
  85. background: linear-gradient(135deg, #12B7F5 0%, #0FA3D9 100%);
  86. color: #fff;
  87. }
  88. .share-button-qq:hover {
  89. background: linear-gradient(135deg, #0FA3D9 0%, #0D8FC3 100%);
  90. box-shadow: 0 4px 12px rgba(18, 183, 245, 0.3);
  91. }
  92. /* Web Share按钮(Chrome等现代浏览器) */
  93. .share-button-web-share {
  94. background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
  95. color: #fff;
  96. }
  97. .share-button-web-share:hover {
  98. background: linear-gradient(135deg, #357ae8 0%, #2b6cd4 100%);
  99. box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  100. }
  101. /* 复制链接按钮 */
  102. .share-button-copy {
  103. background: #fff;
  104. color: #333;
  105. border: 1px solid #d9d9d9;
  106. }
  107. .share-button-copy:hover {
  108. background: #f5f5f5;
  109. border-color: #40a9ff;
  110. color: #40a9ff;
  111. }
  112. /* 下载按钮 */
  113. .share-button-download {
  114. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  115. color: #fff;
  116. }
  117. .share-button-download:hover {
  118. background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  119. box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  120. }
  121. /* 二维码弹窗样式 */
  122. .qr-code-modal .ant-modal-content {
  123. border-radius: 16px;
  124. }
  125. .qr-code-container {
  126. display: flex;
  127. flex-direction: column;
  128. align-items: center;
  129. padding: 20px 0;
  130. }
  131. .qr-code-tip {
  132. margin: 0 0 20px 0;
  133. font-size: 14px;
  134. color: #666;
  135. text-align: center;
  136. line-height: 1.5;
  137. }
  138. .qr-code-image-wrapper {
  139. display: flex;
  140. align-items: center;
  141. justify-content: center;
  142. padding: 20px;
  143. background: #fff;
  144. border-radius: 12px;
  145. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  146. }
  147. .qr-code-image {
  148. width: 300px;
  149. height: 300px;
  150. display: block;
  151. }
  152. /* 暗色模式支持(可选) */
  153. /* 暗色模式支持已移除 - 使用固定主题 */