page-collections-detail.page.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. .recipe-image-container {
  2. position: relative;
  3. width: 100%;
  4. height: 250px;
  5. overflow: hidden;
  6. .recipe-image {
  7. width: 100%;
  8. height: 100%;
  9. object-fit: cover;
  10. }
  11. .image-overlay {
  12. position: absolute;
  13. top: 10px;
  14. right: 10px;
  15. display: flex;
  16. flex-direction: column;
  17. gap: 5px;
  18. width: 80px;
  19. }
  20. }
  21. .recipe-header {
  22. padding: 16px;
  23. .recipe-title {
  24. font-size: 1.8rem;
  25. font-weight: bold;
  26. margin-bottom: 8px;
  27. color: var(--ion-color-dark);
  28. }
  29. .recipe-meta {
  30. display: flex;
  31. gap: 16px;
  32. margin-top: 8px;
  33. .meta-item {
  34. display: flex;
  35. align-items: center;
  36. font-size: 0.9rem;
  37. color: var(--ion-color-medium);
  38. ion-icon {
  39. margin-right: 4px;
  40. font-size: 1rem;
  41. }
  42. }
  43. }
  44. }
  45. .section-card {
  46. margin: 16px;
  47. border-radius: 12px;
  48. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  49. ion-card-header {
  50. padding-bottom: 0;
  51. ion-card-title {
  52. display: flex;
  53. align-items: center;
  54. font-size: 1.2rem;
  55. color: var(--ion-color-dark);
  56. ion-icon {
  57. margin-right: 8px;
  58. color: var(--ion-color-primary);
  59. }
  60. }
  61. }
  62. }
  63. .step-item {
  64. --padding-start: 0;
  65. --inner-padding-end: 0;
  66. align-items: flex-start;
  67. .step-number {
  68. width: 28px;
  69. height: 28px;
  70. background: var(--ion-color-primary);
  71. color: white;
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. font-size: 0.9rem;
  76. font-weight: bold;
  77. margin-right: 12px;
  78. }
  79. ion-label {
  80. margin-top: 4px;
  81. margin-bottom: 4px;
  82. p {
  83. margin: 0;
  84. color: var(--ion-color-dark);
  85. line-height: 1.5;
  86. }
  87. }
  88. }
  89. @media (min-width: 768px) {
  90. .recipe-image-container {
  91. height: 350px;
  92. }
  93. .section-card {
  94. margin: 20px auto;
  95. max-width: 800px;
  96. }
  97. }
  98. /* 头部样式 */
  99. .recipe-header {
  100. ion-toolbar {
  101. --background: white;
  102. --border-width: 0;
  103. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  104. .header-title {
  105. font-size: 1.2rem;
  106. font-weight: 600;
  107. color: var(--ion-color-dark);
  108. }
  109. }
  110. }
  111. /* 内容区域 */
  112. .recipe-content {
  113. --background: #f8f9fa;
  114. padding-bottom: 80px;
  115. }
  116. /* 菜品图片 */
  117. .recipe-image-container {
  118. position: relative;
  119. width: 100%;
  120. height: 250px;
  121. overflow: hidden;
  122. .recipe-image {
  123. width: 100%;
  124. height: 100%;
  125. object-fit: cover;
  126. }
  127. .image-overlay {
  128. position: absolute;
  129. bottom: 16px;
  130. left: 280px;
  131. right: 16px;
  132. display: flex;
  133. gap: 8px;
  134. width: 100px;
  135. ion-chip {
  136. --background: rgba(255, 255, 255, 0.9);
  137. backdrop-filter: blur(5px);
  138. }
  139. }
  140. }
  141. /* 菜品信息部分 */
  142. .recipe-info-section {
  143. padding: 16px;
  144. background: white;
  145. margin-bottom: 16px;
  146. }
  147. .recipe-header {
  148. display: flex;
  149. justify-content: space-between;
  150. align-items: center;
  151. margin-bottom: 12px;
  152. .recipe-title {
  153. font-size: 1.5rem;
  154. font-weight: 600;
  155. color: var(--ion-color-dark);
  156. margin: 0;
  157. flex: 1;
  158. }
  159. .recipe-rating {
  160. display: flex;
  161. align-items: center;
  162. ion-icon {
  163. font-size: 1.2rem;
  164. margin-right: 2px;
  165. }
  166. .rating-text {
  167. font-size: 0.9rem;
  168. color: var(--ion-color-medium);
  169. margin-left: 4px;
  170. }
  171. }
  172. }
  173. .recipe-meta {
  174. display: flex;
  175. flex-wrap: wrap;
  176. gap: 8px;
  177. margin-bottom: 16px;
  178. .meta-item {
  179. --padding-start: 0;
  180. --inner-padding-end: 0;
  181. --min-height: 32px;
  182. flex: 1 0 calc(33.333% - 8px);
  183. ion-icon {
  184. font-size: 1.2rem;
  185. }
  186. ion-label {
  187. font-size: 0.85rem;
  188. color: var(--ion-color-medium);
  189. }
  190. }
  191. }
  192. .recipe-description {
  193. font-size: 0.95rem;
  194. color: var(--ion-color-medium);
  195. line-height: 1.6;
  196. margin: 0;
  197. }
  198. /* 卡片部分 */
  199. .section-card {
  200. margin: 16px;
  201. border-radius: 12px;
  202. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  203. .section-header {
  204. padding-bottom: 0;
  205. .section-title {
  206. font-size: 1.1rem;
  207. font-weight: 600;
  208. display: flex;
  209. align-items: center;
  210. .section-icon {
  211. margin-right: 8px;
  212. color: var(--ion-color-primary);
  213. }
  214. }
  215. }
  216. }
  217. /* 食材列表 */
  218. .ingredient-list {
  219. .ingredient-item {
  220. --padding-start: 0;
  221. --inner-padding-end: 0;
  222. --min-height: 48px;
  223. border-bottom: 1px dashed var(--ion-color-light-shade);
  224. &:last-child {
  225. border-bottom: none;
  226. }
  227. .bullet-icon {
  228. color: var(--ion-color-primary);
  229. font-size: 0.6rem;
  230. }
  231. .ingredient-name {
  232. font-size: 0.95rem;
  233. }
  234. .ingredient-amount {
  235. font-weight: 500;
  236. }
  237. }
  238. }
  239. /* 步骤列表 */
  240. .step-list {
  241. .step-item {
  242. --padding-start: 0;
  243. --inner-padding-end: 0;
  244. --min-height: auto;
  245. align-items: flex-start;
  246. padding: 12px 0;
  247. .step-number {
  248. width: 28px;
  249. height: 28px;
  250. background: var(--ion-color-primary);
  251. color: white;
  252. font-size: 0.9rem;
  253. font-weight: 600;
  254. display: flex;
  255. align-items: center;
  256. justify-content: center;
  257. margin-right: 12px;
  258. }
  259. .step-text {
  260. font-size: 0.95rem;
  261. color: var(--ion-color-medium);
  262. line-height: 1.6;
  263. white-space: normal;
  264. }
  265. }
  266. }
  267. /* 底部按钮 */
  268. .action-buttons {
  269. position: fixed;
  270. bottom: 0;
  271. left: 0;
  272. right: 0;
  273. padding: 16px;
  274. background: linear-gradient(to top, white 50%, transparent 100%);
  275. .cook-button {
  276. --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  277. --padding-top: 16px;
  278. --padding-bottom: 16px;
  279. font-weight: 600;
  280. }
  281. }
  282. /* 响应式调整 */
  283. @media (min-width: 768px) {
  284. .recipe-image-container {
  285. height: 350px;
  286. }
  287. .recipe-info-section {
  288. padding: 24px;
  289. }
  290. .section-card {
  291. margin: 24px;
  292. }
  293. .action-buttons {
  294. padding: 24px;
  295. max-width: 600px;
  296. margin: 0 auto;
  297. }
  298. }