123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- .recipe-image-container {
- position: relative;
- width: 100%;
- height: 250px;
- overflow: hidden;
-
- .recipe-image {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-
- .image-overlay {
- position: absolute;
- top: 10px;
- right: 10px;
- display: flex;
- flex-direction: column;
- gap: 5px;
- width: 80px;
- }
- }
- .recipe-header {
- padding: 16px;
-
- .recipe-title {
- font-size: 1.8rem;
- font-weight: bold;
- margin-bottom: 8px;
- color: var(--ion-color-dark);
- }
-
- .recipe-meta {
- display: flex;
- gap: 16px;
- margin-top: 8px;
-
- .meta-item {
- display: flex;
- align-items: center;
- font-size: 0.9rem;
- color: var(--ion-color-medium);
-
- ion-icon {
- margin-right: 4px;
- font-size: 1rem;
- }
- }
- }
- }
- .section-card {
- margin: 16px;
- border-radius: 12px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
-
- ion-card-header {
- padding-bottom: 0;
-
- ion-card-title {
- display: flex;
- align-items: center;
- font-size: 1.2rem;
- color: var(--ion-color-dark);
-
- ion-icon {
- margin-right: 8px;
- color: var(--ion-color-primary);
- }
- }
- }
- }
- .step-item {
- --padding-start: 0;
- --inner-padding-end: 0;
- align-items: flex-start;
-
- .step-number {
- width: 28px;
- height: 28px;
- background: var(--ion-color-primary);
- color: white;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 0.9rem;
- font-weight: bold;
- margin-right: 12px;
- }
-
- ion-label {
- margin-top: 4px;
- margin-bottom: 4px;
-
- p {
- margin: 0;
- color: var(--ion-color-dark);
- line-height: 1.5;
- }
- }
- }
- @media (min-width: 768px) {
- .recipe-image-container {
- height: 350px;
- }
-
- .section-card {
- margin: 20px auto;
- max-width: 800px;
- }
- }
- /* 头部样式 */
- .recipe-header {
- ion-toolbar {
- --background: white;
- --border-width: 0;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
-
- .header-title {
- font-size: 1.2rem;
- font-weight: 600;
- color: var(--ion-color-dark);
- }
- }
- }
- /* 内容区域 */
- .recipe-content {
- --background: #f8f9fa;
- padding-bottom: 80px;
- }
- /* 菜品图片 */
- .recipe-image-container {
- position: relative;
- width: 100%;
- height: 250px;
- overflow: hidden;
- .recipe-image {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .image-overlay {
- position: absolute;
- bottom: 16px;
- left: 280px;
- right: 16px;
- display: flex;
- gap: 8px;
- width: 100px;
- ion-chip {
- --background: rgba(255, 255, 255, 0.9);
- backdrop-filter: blur(5px);
- }
- }
- }
- /* 菜品信息部分 */
- .recipe-info-section {
- padding: 16px;
- background: white;
- margin-bottom: 16px;
- }
- .recipe-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 12px;
- .recipe-title {
- font-size: 1.5rem;
- font-weight: 600;
- color: var(--ion-color-dark);
- margin: 0;
- flex: 1;
- }
- .recipe-rating {
- display: flex;
- align-items: center;
-
- ion-icon {
- font-size: 1.2rem;
- margin-right: 2px;
- }
-
- .rating-text {
- font-size: 0.9rem;
- color: var(--ion-color-medium);
- margin-left: 4px;
- }
- }
- }
- .recipe-meta {
- display: flex;
- flex-wrap: wrap;
- gap: 8px;
- margin-bottom: 16px;
- .meta-item {
- --padding-start: 0;
- --inner-padding-end: 0;
- --min-height: 32px;
- flex: 1 0 calc(33.333% - 8px);
-
- ion-icon {
- font-size: 1.2rem;
- }
-
- ion-label {
- font-size: 0.85rem;
- color: var(--ion-color-medium);
- }
- }
- }
- .recipe-description {
- font-size: 0.95rem;
- color: var(--ion-color-medium);
- line-height: 1.6;
- margin: 0;
- }
- /* 卡片部分 */
- .section-card {
- margin: 16px;
- border-radius: 12px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
- .section-header {
- padding-bottom: 0;
-
- .section-title {
- font-size: 1.1rem;
- font-weight: 600;
- display: flex;
- align-items: center;
-
- .section-icon {
- margin-right: 8px;
- color: var(--ion-color-primary);
- }
- }
- }
- }
- /* 食材列表 */
- .ingredient-list {
- .ingredient-item {
- --padding-start: 0;
- --inner-padding-end: 0;
- --min-height: 48px;
- border-bottom: 1px dashed var(--ion-color-light-shade);
-
- &:last-child {
- border-bottom: none;
- }
-
- .bullet-icon {
- color: var(--ion-color-primary);
- font-size: 0.6rem;
- }
-
- .ingredient-name {
- font-size: 0.95rem;
- }
-
- .ingredient-amount {
- font-weight: 500;
- }
- }
- }
- /* 步骤列表 */
- .step-list {
- .step-item {
- --padding-start: 0;
- --inner-padding-end: 0;
- --min-height: auto;
- align-items: flex-start;
- padding: 12px 0;
-
- .step-number {
- width: 28px;
- height: 28px;
- background: var(--ion-color-primary);
- color: white;
- font-size: 0.9rem;
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 12px;
- }
-
- .step-text {
- font-size: 0.95rem;
- color: var(--ion-color-medium);
- line-height: 1.6;
- white-space: normal;
- }
- }
- }
- /* 底部按钮 */
- .action-buttons {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 16px;
- background: linear-gradient(to top, white 50%, transparent 100%);
- .cook-button {
- --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
- --padding-top: 16px;
- --padding-bottom: 16px;
- font-weight: 600;
- }
- }
- /* 响应式调整 */
- @media (min-width: 768px) {
- .recipe-image-container {
- height: 350px;
- }
- .recipe-info-section {
- padding: 24px;
- }
- .section-card {
- margin: 24px;
- }
- .action-buttons {
- padding: 24px;
- max-width: 600px;
- margin: 0 auto;
- }
- }
|