@agent-link/server 0.1.159 → 0.1.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
Binary file
package/web/landing.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>AgentLink — Remote Control for Claude Code</title>
7
- <meta name="description" content="Remote control for Claude Code. Start a task in your terminal, walk away, and continue from your phone or any browser. Multi-session, end-to-end encrypted.">
8
- <meta name="keywords" content="Claude Code, remote control, browser IDE, AI coding assistant, AgentLink, end-to-end encrypted, self-hosted, mobile coding">
7
+ <meta name="description" content="Remote control for Claude Code. Chat, spawn agent teams, or schedule recurring tasks from your phone or any browser. Multi-session, end-to-end encrypted.">
8
+ <meta name="keywords" content="Claude Code, remote control, browser IDE, AI coding assistant, AgentLink, end-to-end encrypted, self-hosted, mobile coding, multi-agent, scheduled tasks, cron">
9
9
  <link rel="canonical" href="https://msclaude.ai/">
10
10
  <link rel="alternate" hreflang="en" href="https://msclaude.ai/">
11
11
  <link rel="alternate" hreflang="zh" href="https://msclaude.ai/zh">
@@ -13,14 +13,14 @@
13
13
  <!-- Open Graph -->
14
14
  <meta property="og:type" content="website">
15
15
  <meta property="og:title" content="AgentLink — Remote Control for Claude Code">
16
- <meta property="og:description" content="Remote control for Claude Code. Start a task in your terminal, walk away, and continue from your phone or any browser. Multi-session, end-to-end encrypted.">
16
+ <meta property="og:description" content="Remote control for Claude Code. Chat, spawn agent teams, or schedule recurring tasks from your phone or any browser. Multi-session, end-to-end encrypted.">
17
17
  <meta property="og:url" content="https://msclaude.ai/">
18
18
  <meta property="og:image" content="https://msclaude.ai/iPad.png">
19
19
  <meta property="og:site_name" content="AgentLink">
20
20
  <!-- Twitter Card -->
21
21
  <meta name="twitter:card" content="summary_large_image">
22
22
  <meta name="twitter:title" content="AgentLink — Remote Control for Claude Code">
23
- <meta name="twitter:description" content="Remote control for Claude Code. Start a task in your terminal, walk away, and continue from your phone or any browser. Multi-session, end-to-end encrypted.">
23
+ <meta name="twitter:description" content="Remote control for Claude Code. Chat, spawn agent teams, or schedule recurring tasks from your phone or any browser. Multi-session, end-to-end encrypted.">
24
24
  <meta name="twitter:image" content="https://msclaude.ai/iPad.png">
25
25
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
26
26
  <script type="application/ld+json">
@@ -28,7 +28,7 @@
28
28
  "@context": "https://schema.org",
29
29
  "@type": "SoftwareApplication",
30
30
  "name": "AgentLink",
31
- "description": "Remote control for Claude Code. Start a task in your terminal, walk away, and continue from your phone or any browser. Multi-session, end-to-end encrypted.",
31
+ "description": "Remote control for Claude Code. Chat, spawn agent teams, or schedule recurring tasks from your phone or any browser. Multi-session, end-to-end encrypted.",
32
32
  "url": "https://msclaude.ai/",
33
33
  "applicationCategory": "DeveloperApplication",
34
34
  "operatingSystem": "Windows, macOS, Linux",
@@ -536,11 +536,8 @@
536
536
  }
537
537
 
538
538
  .device-ipad img {
539
- border-radius: 4.2%;
540
- box-shadow:
541
- 0 40px 100px rgba(0,0,0,0.5),
542
- 0 15px 50px rgba(0,0,0,0.3),
543
- 0 0 80px rgba(59,130,246,0.08);
539
+ border-radius: 0;
540
+ box-shadow: none;
544
541
  }
545
542
 
546
543
  .device-iphone {
@@ -563,6 +560,106 @@
563
560
  0 0 80px rgba(245,158,11,0.08);
564
561
  }
565
562
 
563
+ /* ── iPad Carousel ── */
564
+ .ipad-carousel {
565
+ position: relative;
566
+ width: 100%;
567
+ overflow: hidden;
568
+ border-radius: 4.2%;
569
+ box-shadow:
570
+ 0 40px 100px rgba(0,0,0,0.5),
571
+ 0 15px 50px rgba(0,0,0,0.3),
572
+ 0 0 80px rgba(59,130,246,0.08);
573
+ }
574
+
575
+ .carousel-track {
576
+ position: relative;
577
+ width: 100%;
578
+ }
579
+
580
+ .carousel-slide {
581
+ position: absolute;
582
+ top: 0;
583
+ left: 0;
584
+ width: 100%;
585
+ opacity: 0;
586
+ transition: opacity 0.6s ease;
587
+ pointer-events: none;
588
+ }
589
+
590
+ .carousel-slide.active {
591
+ position: relative;
592
+ opacity: 1;
593
+ pointer-events: auto;
594
+ }
595
+
596
+ .carousel-slide img {
597
+ display: block;
598
+ width: 100%;
599
+ height: auto;
600
+ border-radius: 0;
601
+ box-shadow: none;
602
+ }
603
+
604
+ .carousel-dots {
605
+ position: absolute;
606
+ bottom: 12px;
607
+ left: 50%;
608
+ transform: translateX(-50%);
609
+ display: flex;
610
+ gap: 8px;
611
+ z-index: 5;
612
+ }
613
+
614
+ .carousel-dot {
615
+ width: 8px;
616
+ height: 8px;
617
+ border-radius: 50%;
618
+ border: none;
619
+ background: rgba(255,255,255,0.4);
620
+ cursor: pointer;
621
+ padding: 0;
622
+ transition: background 0.3s ease, transform 0.3s ease;
623
+ }
624
+
625
+ .carousel-dot.active {
626
+ background: rgba(255,255,255,0.9);
627
+ transform: scale(1.2);
628
+ }
629
+
630
+ .carousel-dot:hover {
631
+ background: rgba(255,255,255,0.7);
632
+ }
633
+
634
+ .carousel-label {
635
+ position: absolute;
636
+ top: 16px;
637
+ left: 16px;
638
+ display: flex;
639
+ flex-direction: column;
640
+ gap: 2px;
641
+ background: rgba(0,0,0,0.55);
642
+ backdrop-filter: blur(12px);
643
+ -webkit-backdrop-filter: blur(12px);
644
+ padding: 8px 14px;
645
+ border-radius: 10px;
646
+ z-index: 4;
647
+ pointer-events: none;
648
+ }
649
+
650
+ .carousel-label-title {
651
+ font-size: 0.95rem;
652
+ font-weight: 700;
653
+ color: #fff;
654
+ letter-spacing: 0.02em;
655
+ }
656
+
657
+ .carousel-label-desc {
658
+ font-size: 0.72rem;
659
+ color: rgba(255,255,255,0.75);
660
+ font-weight: 400;
661
+ }
662
+
566
663
  /* ── Divider ── */
567
664
  .section-divider {
568
665
  max-width: 200px;
@@ -980,6 +1077,11 @@
980
1077
  align-self: auto;
981
1078
  }
982
1079
  .device-iphone:hover { transform: translateY(-3%); }
1080
+ .carousel-dots { bottom: 8px; gap: 6px; }
1081
+ .carousel-dot { width: 6px; height: 6px; }
1082
+ .carousel-label { top: 8px; left: 8px; padding: 5px 10px; border-radius: 8px; }
1083
+ .carousel-label-title { font-size: 0.8rem; }
1084
+ .carousel-label-desc { font-size: 0.62rem; }
983
1085
  .terminal { margin: 0 1rem; max-width: calc(100vw - 2rem); }
984
1086
  .terminal-body { padding: 1rem; font-size: 0.75rem; overflow-x: auto; }
985
1087
  .terminal-line { gap: 0.4rem; white-space: nowrap; }
@@ -996,18 +1098,6 @@
996
1098
  .workflow-steps::before { left: 19px; }
997
1099
  }
998
1100
 
999
- /* ── Scroll animations ── */
1000
- .reveal {
1001
- opacity: 0;
1002
- transform: translateY(30px);
1003
- transition: opacity 0.8s ease, transform 0.8s ease;
1004
- }
1005
-
1006
- .reveal.visible {
1007
- opacity: 1;
1008
- transform: translateY(0);
1009
- }
1010
-
1011
1101
  .sr-only {
1012
1102
  position: absolute;
1013
1103
  width: 1px; height: 1px;
@@ -1064,8 +1154,8 @@
1064
1154
  </h1>
1065
1155
  <p class="hero-sub">
1066
1156
  Start Claude Code on your machine. Walk away.
1067
- <strong>Pick it up from your phone, tablet, or any browser</strong> &mdash;
1068
- end-to-end encrypted, zero configuration.
1157
+ <strong>Chat, launch agent teams, or schedule tasks</strong> &mdash;
1158
+ from your phone, tablet, or any browser. End-to-end encrypted, zero config.
1069
1159
  </p>
1070
1160
  <div class="cta-group">
1071
1161
  <button class="cta-primary" onclick="copyInstall()">
@@ -1103,100 +1193,65 @@
1103
1193
  </section>
1104
1194
 
1105
1195
  <!-- Device Showcase -->
1106
- <section class="showcase reveal">
1196
+ <section class="showcase">
1107
1197
  <div class="device device-ipad">
1108
- <picture>
1109
- <source srcset="/iPad.webp" type="image/webp">
1110
- <img src="/iPad.png" alt="AgentLink web interface running Claude Code on an iPad" loading="eager">
1111
- </picture>
1198
+ <div class="ipad-carousel">
1199
+ <div class="carousel-track">
1200
+ <div class="carousel-slide active">
1201
+ <img src="/images/chat-iPad.webp" alt="AgentLink Chat mode on iPad" loading="eager">
1202
+ <div class="carousel-label">
1203
+ <span class="carousel-label-title">Chat</span>
1204
+ <span class="carousel-label-desc">Remote pair-programming with Claude Code</span>
1205
+ </div>
1206
+ </div>
1207
+ <div class="carousel-slide">
1208
+ <img src="/images/team-iPad.webp" alt="AgentLink Team mode on iPad" loading="eager">
1209
+ <div class="carousel-label">
1210
+ <span class="carousel-label-title">Teams</span>
1211
+ <span class="carousel-label-desc">Orchestrate multiple agents in parallel</span>
1212
+ </div>
1213
+ </div>
1214
+ <div class="carousel-slide">
1215
+ <img src="/images/loop-iPad.webp" alt="AgentLink Loop mode on iPad" loading="eager">
1216
+ <div class="carousel-label">
1217
+ <span class="carousel-label-title">Loop</span>
1218
+ <span class="carousel-label-desc">Scheduled tasks with cron automation</span>
1219
+ </div>
1220
+ </div>
1221
+ </div>
1222
+ <div class="carousel-dots">
1223
+ <button class="carousel-dot active" data-index="0" aria-label="Chat mode"></button>
1224
+ <button class="carousel-dot" data-index="1" aria-label="Team mode"></button>
1225
+ <button class="carousel-dot" data-index="2" aria-label="Loop mode"></button>
1226
+ </div>
1227
+ </div>
1112
1228
  </div>
1113
1229
  <div class="device device-iphone">
1114
- <picture>
1115
- <source srcset="/iPhone.webp" type="image/webp">
1116
- <img src="/iPhone.png" alt="AgentLink mobile interface on iPhone" loading="eager">
1117
- </picture>
1230
+ <img src="/images/chat-iPhone.webp" alt="AgentLink mobile interface on iPhone" loading="eager">
1118
1231
  </div>
1119
1232
  </section>
1120
1233
 
1121
1234
  <div class="section-divider"></div>
1122
1235
 
1123
1236
  <!-- Philosophy -->
1124
- <section class="philosophy reveal">
1237
+ <section class="philosophy">
1125
1238
  <div class="philosophy-label">Philosophy</div>
1126
1239
  <h2>Code shouldn't be <em>chained to a desk.</em></h2>
1127
1240
  <p>
1128
1241
  AgentLink turns Claude Code into a truly portable experience.
1129
- One command, one URL &mdash; your AI assistant is accessible from any device,
1130
- with real encryption and zero accounts required.
1242
+ One command, one URL &mdash; chat interactively, spin up agent teams,
1243
+ or schedule recurring tasks, all from any device.
1244
+ Real encryption, zero accounts required.
1131
1245
  </p>
1132
1246
  </section>
1133
1247
 
1134
1248
  <div class="section-divider"></div>
1135
1249
 
1136
1250
  <!-- Bento Features -->
1137
- <section class="bento reveal" id="features">
1251
+ <section class="bento" id="features">
1138
1252
  <h2 class="sr-only">Features</h2>
1139
1253
 
1140
- <!-- E2E Encryption wide -->
1141
- <div class="bento-card wide">
1142
- <div class="bento-visual">
1143
- <div class="encrypt-visual">
1144
- <div class="encrypt-block">hello world</div>
1145
- <div class="encrypt-arrow">&rarr;</div>
1146
- <div class="encrypt-block locked">x9f#k2$mQ...</div>
1147
- <div class="encrypt-arrow">&rarr;</div>
1148
- <div class="encrypt-block">hello world</div>
1149
- </div>
1150
- </div>
1151
- <h3>End-to-End Encrypted</h3>
1152
- <p>XSalsa20-Poly1305 encryption. The relay server is a blind forwarder &mdash; it never sees your code, your prompts, or your data.</p>
1153
- </div>
1154
-
1155
- <!-- Zero Config -->
1156
- <div class="bento-card">
1157
- <div class="bento-visual">
1158
- <div class="bento-icon purple">
1159
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
1160
- </div>
1161
- </div>
1162
- <h3>Zero Config</h3>
1163
- <p>No accounts. No registration. Install, start, open &mdash; done.</p>
1164
- </div>
1165
-
1166
- <!-- Multi-Agent Teams -->
1167
- <div class="bento-card">
1168
- <div class="bento-visual">
1169
- <div class="bento-icon blue">
1170
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
1171
- </div>
1172
- </div>
1173
- <h3>Multi-Agent Teams</h3>
1174
- <p>Spawn parallel Claude subagents to tackle complex tasks. Live kanban board, activity feed, and team history.</p>
1175
- </div>
1176
-
1177
- <!-- Multi Session -->
1178
- <div class="bento-card">
1179
- <div class="bento-visual">
1180
- <div class="bento-icon blue">
1181
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="8" height="8" rx="1.5"></rect><rect x="14" y="3" width="8" height="8" rx="1.5"></rect><rect x="2" y="13" width="8" height="8" rx="1.5"></rect><rect x="14" y="13" width="8" height="8" rx="1.5"></rect></svg>
1182
- </div>
1183
- </div>
1184
- <h3>Multi Session</h3>
1185
- <p>Run multiple conversations in parallel. Switch between tasks without losing context.</p>
1186
- </div>
1187
-
1188
- <!-- Any Device -->
1189
- <div class="bento-card">
1190
- <div class="bento-visual">
1191
- <div class="bento-icon cyan">
1192
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>
1193
- </div>
1194
- </div>
1195
- <h3>Any Device</h3>
1196
- <p>Phone, tablet, laptop &mdash; any browser becomes your Claude Code terminal.</p>
1197
- </div>
1198
-
1199
- <!-- Chat | Team | Loop — wide -->
1254
+ <!-- Row 1: Chat | Team | Loop (wide) + Any Device -->
1200
1255
  <div class="bento-card wide">
1201
1256
  <div class="bento-visual">
1202
1257
  <div class="mode-toggle">
@@ -1227,7 +1282,31 @@
1227
1282
  <p>Chat with Claude interactively, spawn agent teams for complex tasks, or schedule recurring Loop jobs with cron &mdash; all from the same browser tab.</p>
1228
1283
  </div>
1229
1284
 
1230
- <!-- Self-hostable -->
1285
+ <div class="bento-card">
1286
+ <div class="bento-visual">
1287
+ <div class="bento-icon cyan">
1288
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>
1289
+ </div>
1290
+ </div>
1291
+ <h3>Any Device</h3>
1292
+ <p>Phone, tablet, laptop &mdash; any browser becomes your Claude Code terminal.</p>
1293
+ </div>
1294
+
1295
+ <!-- Row 2: E2E Encryption (wide) + Self-Hostable -->
1296
+ <div class="bento-card wide">
1297
+ <div class="bento-visual">
1298
+ <div class="encrypt-visual">
1299
+ <div class="encrypt-block">hello world</div>
1300
+ <div class="encrypt-arrow">&rarr;</div>
1301
+ <div class="encrypt-block locked">x9f#k2$mQ...</div>
1302
+ <div class="encrypt-arrow">&rarr;</div>
1303
+ <div class="encrypt-block">hello world</div>
1304
+ </div>
1305
+ </div>
1306
+ <h3>End-to-End Encrypted</h3>
1307
+ <p>XSalsa20-Poly1305 encryption. The relay server is a blind forwarder &mdash; it never sees your code, your prompts, or your data.</p>
1308
+ </div>
1309
+
1231
1310
  <div class="bento-card">
1232
1311
  <div class="bento-visual">
1233
1312
  <div class="bento-icon green">
@@ -1238,33 +1317,42 @@
1238
1317
  <p>Run your own relay server. Your infrastructure, your rules, your data.</p>
1239
1318
  </div>
1240
1319
 
1241
- <!-- Password Protection -->
1320
+ <!-- Row 3: Multi-Agent Teams + Multi Session + Zero Config -->
1242
1321
  <div class="bento-card">
1243
1322
  <div class="bento-visual">
1244
- <div class="bento-icon amber">
1245
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>
1323
+ <div class="bento-icon blue">
1324
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
1246
1325
  </div>
1247
1326
  </div>
1248
- <h3>Optional Password</h3>
1249
- <p>Add <code style="color:var(--green);font-family:'JetBrains Mono',monospace;font-size:0.8rem">--password</code> to lock your session. Brute-force protection built in.</p>
1327
+ <h3>Multi-Agent Teams</h3>
1328
+ <p>Spawn parallel Claude subagents to tackle complex tasks. Live kanban board, activity feed, and team history.</p>
1250
1329
  </div>
1251
1330
 
1252
- <!-- File Preview -->
1253
- <div class="bento-card wide">
1331
+ <div class="bento-card">
1332
+ <div class="bento-visual">
1333
+ <div class="bento-icon blue">
1334
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="8" height="8" rx="1.5"></rect><rect x="14" y="3" width="8" height="8" rx="1.5"></rect><rect x="2" y="13" width="8" height="8" rx="1.5"></rect><rect x="14" y="13" width="8" height="8" rx="1.5"></rect></svg>
1335
+ </div>
1336
+ </div>
1337
+ <h3>Multi Session</h3>
1338
+ <p>Run multiple conversations in parallel. Switch between tasks without losing context.</p>
1339
+ </div>
1340
+
1341
+ <div class="bento-card">
1254
1342
  <div class="bento-visual">
1255
- <div class="bento-icon rose">
1256
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>
1343
+ <div class="bento-icon purple">
1344
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
1257
1345
  </div>
1258
1346
  </div>
1259
- <h3>File Explorer</h3>
1260
- <p>Browse your project tree, preview files with syntax highlighting, and navigate your codebase right from the browser.</p>
1347
+ <h3>Zero Config</h3>
1348
+ <p>No accounts. No registration. Install, start, open &mdash; done.</p>
1261
1349
  </div>
1262
1350
  </section>
1263
1351
 
1264
1352
  <div class="section-divider"></div>
1265
1353
 
1266
1354
  <!-- How It Works -->
1267
- <section class="workflow reveal" id="how-it-works">
1355
+ <section class="workflow" id="how-it-works">
1268
1356
  <div class="workflow-label">How It Works</div>
1269
1357
  <h2>Three steps. That's it.</h2>
1270
1358
  <div class="workflow-steps">
@@ -1285,8 +1373,8 @@
1285
1373
  <div class="workflow-step">
1286
1374
  <div class="step-marker">03</div>
1287
1375
  <div class="step-content">
1288
- <h3>Run sessions in parallel, switch freely</h3>
1289
- <p>Multiple conversations, multiple projects &mdash; all running at once. Jump between them from any device, with full history preserved.</p>
1376
+ <h3>Chat, collaborate, automate</h3>
1377
+ <p>Run interactive sessions, spawn agent teams for complex tasks, or set up scheduled Loop jobs &mdash; all from the same URL, with full history preserved.</p>
1290
1378
  </div>
1291
1379
  </div>
1292
1380
  </div>
@@ -1324,16 +1412,79 @@ function showToast() {
1324
1412
  setTimeout(() => toast.classList.remove('show'), 1800);
1325
1413
  }
1326
1414
 
1327
- // Scroll reveal
1328
- const observer = new IntersectionObserver((entries) => {
1329
- entries.forEach(entry => {
1330
- if (entry.isIntersecting) {
1331
- entry.target.classList.add('visible');
1415
+ // iPad carousel
1416
+ (function() {
1417
+ const slides = document.querySelectorAll('.carousel-slide');
1418
+ const dots = document.querySelectorAll('.carousel-dot');
1419
+ if (!slides.length) return;
1420
+ let current = 0;
1421
+ let interval;
1422
+
1423
+ function goTo(i) {
1424
+ slides[current].classList.remove('active');
1425
+ dots[current].classList.remove('active');
1426
+ current = (i + slides.length) % slides.length;
1427
+ slides[current].classList.add('active');
1428
+ dots[current].classList.add('active');
1429
+ }
1430
+
1431
+ function startAuto() {
1432
+ interval = setInterval(() => goTo(current + 1), 4000);
1433
+ }
1434
+
1435
+ function resetAuto() {
1436
+ clearInterval(interval);
1437
+ startAuto();
1438
+ }
1439
+
1440
+ dots.forEach(dot => {
1441
+ dot.addEventListener('click', () => {
1442
+ goTo(Number(dot.dataset.index));
1443
+ resetAuto();
1444
+ });
1445
+ });
1446
+
1447
+ // Touch/swipe support
1448
+ const track = document.querySelector('.ipad-carousel');
1449
+ let startX = 0, startY = 0, dragging = false;
1450
+
1451
+ track.addEventListener('touchstart', e => {
1452
+ startX = e.touches[0].clientX;
1453
+ startY = e.touches[0].clientY;
1454
+ dragging = true;
1455
+ }, { passive: true });
1456
+
1457
+ track.addEventListener('touchend', e => {
1458
+ if (!dragging) return;
1459
+ dragging = false;
1460
+ const dx = e.changedTouches[0].clientX - startX;
1461
+ const dy = e.changedTouches[0].clientY - startY;
1462
+ if (Math.abs(dx) > 50 && Math.abs(dx) > Math.abs(dy)) {
1463
+ goTo(dx < 0 ? current + 1 : current - 1);
1464
+ resetAuto();
1465
+ }
1466
+ }, { passive: true });
1467
+
1468
+ // Mouse drag support for desktop
1469
+ track.addEventListener('mousedown', e => {
1470
+ startX = e.clientX;
1471
+ dragging = true;
1472
+ track.style.cursor = 'grabbing';
1473
+ });
1474
+
1475
+ document.addEventListener('mouseup', e => {
1476
+ if (!dragging) return;
1477
+ dragging = false;
1478
+ track.style.cursor = '';
1479
+ const dx = e.clientX - startX;
1480
+ if (Math.abs(dx) > 50) {
1481
+ goTo(dx < 0 ? current + 1 : current - 1);
1482
+ resetAuto();
1332
1483
  }
1333
1484
  });
1334
- }, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' });
1335
1485
 
1336
- document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
1486
+ startAuto();
1487
+ })();
1337
1488
  </script>
1338
1489
 
1339
1490
  </body>