FarmDialog.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. .farm-container {
  2. padding: 20rpx;
  3. display: flex;
  4. flex-direction: column;
  5. gap: 20rpx;
  6. }
  7. .farm-grid {
  8. display: grid;
  9. grid-template-columns: repeat(4, 1fr);
  10. grid-template-rows: repeat(3, 1fr);
  11. gap: 10rpx;
  12. aspect-ratio: 4/3;
  13. background-color: #8B4513;
  14. padding: 20rpx;
  15. border-radius: 10rpx;
  16. }
  17. .farm-plot {
  18. aspect-ratio: 1;
  19. background-color: #654321;
  20. border-radius: 8rpx;
  21. position: relative;
  22. cursor: pointer;
  23. transition: transform 0.2s;
  24. &:hover {
  25. transform: scale(1.05);
  26. }
  27. .plot-content {
  28. width: 100%;
  29. height: 100%;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. position: relative;
  34. &.needs-water::after {
  35. content: '';
  36. position: absolute;
  37. top: 0;
  38. left: 0;
  39. right: 0;
  40. bottom: 0;
  41. background: rgba(0, 0, 255, 0.2);
  42. border-radius: 8rpx;
  43. }
  44. &.has-weeds::before {
  45. content: '';
  46. position: absolute;
  47. top: 0;
  48. left: 0;
  49. right: 0;
  50. bottom: 0;
  51. background: url('/static/weeds.png') center/cover;
  52. opacity: 0.5;
  53. border-radius: 8rpx;
  54. }
  55. }
  56. .crop-stage {
  57. width: 80%;
  58. height: 80%;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. .crop-image {
  63. width: 100%;
  64. height: 100%;
  65. object-fit: contain;
  66. }
  67. }
  68. }
  69. .action-panel {
  70. display: flex;
  71. flex-direction: column;
  72. gap: 20rpx;
  73. padding: 20rpx;
  74. background-color: rgba(255, 255, 255, 0.9);
  75. border-radius: 10rpx;
  76. .action-buttons {
  77. display: flex;
  78. gap: 10rpx;
  79. flex-wrap: wrap;
  80. button {
  81. flex: 1;
  82. min-width: 120rpx;
  83. padding: 10rpx 20rpx;
  84. border: none;
  85. border-radius: 5rpx;
  86. background-color: #4CAF50;
  87. color: white;
  88. font-size: 28rpx;
  89. &:disabled {
  90. background-color: #cccccc;
  91. cursor: not-allowed;
  92. }
  93. &:active {
  94. transform: scale(0.95);
  95. }
  96. }
  97. }
  98. .selected-plot-info {
  99. display: flex;
  100. flex-direction: column;
  101. gap: 10rpx;
  102. padding: 10rpx;
  103. background-color: rgba(0, 0, 0, 0.05);
  104. border-radius: 5rpx;
  105. text {
  106. font-size: 24rpx;
  107. color: #333;
  108. }
  109. }
  110. }