Просмотр исходного кода

Mobile services: compact horizontal cards instead of stacked blocks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AusPrinzip 2 недель назад
Родитель
Сommit
0a62ef3581
1 измененных файлов с 73 добавлено и 13 удалено
  1. 73 13
      src/routes/+page.svelte

+ 73 - 13
src/routes/+page.svelte

@@ -257,7 +257,24 @@
     </div>
   </div>
 
-  <!-- Alternating service blocks -->
+  <!-- Mobile: compact cards -->
+  <div class="services-mobile">
+    {#each services as svc, i}
+      <div class="svc-card fade-up">
+        <div class="svc-card-img">
+          <img src={svc.img} alt={svc.name} loading="lazy">
+          <span class="svc-card-num" style="color: {svc.color};">{svc.num}</span>
+        </div>
+        <div class="svc-card-body">
+          <h3 class="font-cinzel text-base text-white tracking-wide mb-2">{svc.name}</h3>
+          <div class="w-8 h-0.5 mb-2" style="background: {svc.color};"></div>
+          <p class="font-mont text-white/50 text-xs leading-relaxed">{svc.description}</p>
+        </div>
+      </div>
+    {/each}
+  </div>
+
+  <!-- Desktop: alternating editorial blocks -->
   {#each services as svc, i}
     <div class="service-block {i % 2 === 0 ? '' : 'reverse'}">
       <div class="service-img fade-up">
@@ -266,9 +283,9 @@
       </div>
       <div class="service-text fade-up">
         <span class="service-num" style="color: {svc.color};">{svc.num}</span>
-        <h3 class="font-cinzel text-xl sm:text-3xl lg:text-4xl text-white tracking-wide mb-4 sm:mb-6">{svc.name}</h3>
-        <div class="w-12 h-0.5 mb-4 sm:mb-6" style="background: {svc.color};"></div>
-        <p class="font-mont text-white/50 text-sm sm:text-base lg:text-lg leading-relaxed max-w-lg">{svc.description}</p>
+        <h3 class="font-cinzel text-3xl lg:text-4xl text-white tracking-wide mb-6">{svc.name}</h3>
+        <div class="w-12 h-0.5 mb-6" style="background: {svc.color};"></div>
+        <p class="font-mont text-white/50 text-base lg:text-lg leading-relaxed max-w-lg">{svc.description}</p>
       </div>
     </div>
   {/each}
@@ -702,16 +719,62 @@
   .ink-drip-up svg path { fill: #0f0f0f; }
 
   /* ── SERVICE BLOCKS ── */
-  .service-block {
+  /* ── MOBILE SERVICE CARDS ── */
+  .services-mobile {
+    display: flex;
+    flex-direction: column;
+    gap: 1rem;
+    padding: 0 1.25rem 2rem;
+  }
+  @media (min-width: 768px) { .services-mobile { display: none; } }
+
+  .svc-card {
     display: grid;
-    grid-template-columns: 1fr;
-    min-height: 50vh;
+    grid-template-columns: 110px 1fr;
+    gap: 0;
+    background: rgba(255,255,255,0.02);
+    border: 1px solid rgba(255,255,255,0.06);
+    overflow: hidden;
+  }
+  .svc-card-img {
+    position: relative;
+    overflow: hidden;
+  }
+  .svc-card-img img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+    display: block;
+  }
+  .svc-card-num {
+    position: absolute;
+    bottom: 4px;
+    left: 6px;
+    font-family: 'Cinzel', serif;
+    font-weight: 900;
+    font-size: 1.5rem;
+    line-height: 1;
+    opacity: 0.3;
+  }
+  .svc-card-body {
+    padding: 0.875rem 1rem;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+  }
+
+  /* ── DESKTOP SERVICE BLOCKS ── */
+  .service-block {
+    display: none;
   }
   @media (min-width: 768px) {
-    .service-block { grid-template-columns: 1fr 1fr; min-height: 70vh; }
+    .service-block {
+      display: grid;
+      grid-template-columns: 1fr 1fr;
+      min-height: 70vh;
+    }
   }
 
-  .service-block.reverse .service-img { order: 1; }
   @media (min-width: 768px) {
     .service-block.reverse .service-img { order: 2; }
     .service-block.reverse .service-text { order: 1; }
@@ -720,9 +783,7 @@
   .service-img {
     position: relative;
     overflow: hidden;
-    min-height: 300px;
   }
-  @media (min-width: 768px) { .service-img { min-height: unset; } }
   .service-img img {
     transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
   }
@@ -737,10 +798,9 @@
     display: flex;
     flex-direction: column;
     justify-content: center;
-    padding: 2rem 1.5rem;
+    padding: 3rem 2.5rem;
     background: #0f0f0f;
   }
-  @media (min-width: 640px) { .service-text { padding: 3rem 2.5rem; } }
   @media (min-width: 1024px) { .service-text { padding: 4rem 4.5rem; } }
 
   .service-num {