@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.
@@ -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 — Claude Code 开源版远程控制</title>
7
- <meta name="description" content="Claude Code 开源版远程控制。在手机、平板或任何浏览器上远程操控你开发机器上的 Claude,端到端加密,无需注册。">
8
- <meta name="keywords" content="Claude Code, Claude Code开源版远程控制, 远程控制, 浏览器 IDE, AI 编程助手, AgentLink, 端到端加密, 自建部署, 移动编程">
7
+ <meta name="description" content="Claude Code 开源版远程控制。对话、多 Agent 协作、定时任务三大模式,手机或任何浏览器即可操控,端到端加密,无需注册。">
8
+ <meta name="keywords" content="Claude Code, Claude Code开源版远程控制, 远程控制, 浏览器 IDE, AI 编程助手, AgentLink, 端到端加密, 自建部署, 移动编程, 多Agent协作, 定时任务">
9
9
  <link rel="canonical" href="https://msclaude.ai/zh">
10
10
  <link rel="alternate" hreflang="en" href="https://msclaude.ai/">
11
11
  <link rel="alternate" hreflang="zh" href="https://msclaude.ai/zh">
@@ -13,7 +13,7 @@
13
13
  <!-- Open Graph -->
14
14
  <meta property="og:type" content="website">
15
15
  <meta property="og:title" content="AgentLink — Claude Code 开源版远程控制">
16
- <meta property="og:description" content="Claude Code 开源版远程控制。在手机、平板或任何浏览器上远程操控你开发机器上的 Claude,端到端加密,无需注册。">
16
+ <meta property="og:description" content="Claude Code 开源版远程控制。对话、多 Agent 协作、定时任务三大模式,手机或任何浏览器即可操控,端到端加密,无需注册。">
17
17
  <meta property="og:url" content="https://msclaude.ai/zh">
18
18
  <meta property="og:image" content="https://msclaude.ai/iPad.png">
19
19
  <meta property="og:site_name" content="AgentLink">
@@ -22,7 +22,7 @@
22
22
  <!-- Twitter Card -->
23
23
  <meta name="twitter:card" content="summary_large_image">
24
24
  <meta name="twitter:title" content="AgentLink — Claude Code 开源版远程控制">
25
- <meta name="twitter:description" content="Claude Code 开源版远程控制。在手机、平板或任何浏览器上远程操控你开发机器上的 Claude,端到端加密,无需注册。">
25
+ <meta name="twitter:description" content="Claude Code 开源版远程控制。对话、多 Agent 协作、定时任务三大模式,手机或任何浏览器即可操控,端到端加密,无需注册。">
26
26
  <meta name="twitter:image" content="https://msclaude.ai/iPad.png">
27
27
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
28
28
  <script type="application/ld+json">
@@ -30,7 +30,7 @@
30
30
  "@context": "https://schema.org",
31
31
  "@type": "SoftwareApplication",
32
32
  "name": "AgentLink",
33
- "description": "Claude Code 开源版远程控制。在手机、平板或任何浏览器上远程操控你开发机器上的 Claude,端到端加密,无需注册。",
33
+ "description": "Claude Code 开源版远程控制。对话、多 Agent 协作、定时任务三大模式,手机或任何浏览器即可操控,端到端加密,无需注册。",
34
34
  "url": "https://msclaude.ai/zh",
35
35
  "applicationCategory": "DeveloperApplication",
36
36
  "operatingSystem": "Windows, macOS, Linux",
@@ -537,11 +537,8 @@
537
537
  }
538
538
 
539
539
  .device-ipad img {
540
- border-radius: 4.2%;
541
- box-shadow:
542
- 0 40px 100px rgba(0,0,0,0.5),
543
- 0 15px 50px rgba(0,0,0,0.3),
544
- 0 0 80px rgba(59,130,246,0.08);
540
+ border-radius: 0;
541
+ box-shadow: none;
545
542
  }
546
543
 
547
544
  .device-iphone {
@@ -564,6 +561,106 @@
564
561
  0 0 80px rgba(245,158,11,0.08);
565
562
  }
566
563
 
564
+ /* ── iPad Carousel ── */
565
+ .ipad-carousel {
566
+ position: relative;
567
+ width: 100%;
568
+ overflow: hidden;
569
+ border-radius: 4.2%;
570
+ box-shadow:
571
+ 0 40px 100px rgba(0,0,0,0.5),
572
+ 0 15px 50px rgba(0,0,0,0.3),
573
+ 0 0 80px rgba(59,130,246,0.08);
574
+ }
575
+
576
+ .carousel-track {
577
+ position: relative;
578
+ width: 100%;
579
+ }
580
+
581
+ .carousel-slide {
582
+ position: absolute;
583
+ top: 0;
584
+ left: 0;
585
+ width: 100%;
586
+ opacity: 0;
587
+ transition: opacity 0.6s ease;
588
+ pointer-events: none;
589
+ }
590
+
591
+ .carousel-slide.active {
592
+ position: relative;
593
+ opacity: 1;
594
+ pointer-events: auto;
595
+ }
596
+
597
+ .carousel-slide img {
598
+ display: block;
599
+ width: 100%;
600
+ height: auto;
601
+ border-radius: 0;
602
+ box-shadow: none;
603
+ }
604
+
605
+ .carousel-dots {
606
+ position: absolute;
607
+ bottom: 12px;
608
+ left: 50%;
609
+ transform: translateX(-50%);
610
+ display: flex;
611
+ gap: 8px;
612
+ z-index: 5;
613
+ }
614
+
615
+ .carousel-dot {
616
+ width: 8px;
617
+ height: 8px;
618
+ border-radius: 50%;
619
+ border: none;
620
+ background: rgba(255,255,255,0.4);
621
+ cursor: pointer;
622
+ padding: 0;
623
+ transition: background 0.3s ease, transform 0.3s ease;
624
+ }
625
+
626
+ .carousel-dot.active {
627
+ background: rgba(255,255,255,0.9);
628
+ transform: scale(1.2);
629
+ }
630
+
631
+ .carousel-dot:hover {
632
+ background: rgba(255,255,255,0.7);
633
+ }
634
+
635
+ .carousel-label {
636
+ position: absolute;
637
+ top: 16px;
638
+ left: 16px;
639
+ display: flex;
640
+ flex-direction: column;
641
+ gap: 2px;
642
+ background: rgba(0,0,0,0.55);
643
+ backdrop-filter: blur(12px);
644
+ -webkit-backdrop-filter: blur(12px);
645
+ padding: 8px 14px;
646
+ border-radius: 10px;
647
+ z-index: 4;
648
+ pointer-events: none;
649
+ }
650
+
651
+ .carousel-label-title {
652
+ font-size: 0.95rem;
653
+ font-weight: 700;
654
+ color: #fff;
655
+ letter-spacing: 0.02em;
656
+ }
657
+
658
+ .carousel-label-desc {
659
+ font-size: 0.72rem;
660
+ color: rgba(255,255,255,0.75);
661
+ font-weight: 400;
662
+ }
663
+
567
664
  /* ── Divider ── */
568
665
  .section-divider {
569
666
  max-width: 200px;
@@ -981,6 +1078,11 @@
981
1078
  align-self: auto;
982
1079
  }
983
1080
  .device-iphone:hover { transform: translateY(-3%); }
1081
+ .carousel-dots { bottom: 8px; gap: 6px; }
1082
+ .carousel-dot { width: 6px; height: 6px; }
1083
+ .carousel-label { top: 8px; left: 8px; padding: 5px 10px; border-radius: 8px; }
1084
+ .carousel-label-title { font-size: 0.8rem; }
1085
+ .carousel-label-desc { font-size: 0.62rem; }
984
1086
  .terminal { margin: 0 1rem; max-width: calc(100vw - 2rem); }
985
1087
  .terminal-body { padding: 1rem; font-size: 0.75rem; overflow-x: auto; }
986
1088
  .terminal-line { gap: 0.4rem; white-space: nowrap; }
@@ -997,18 +1099,6 @@
997
1099
  .workflow-steps::before { left: 19px; }
998
1100
  }
999
1101
 
1000
- /* ── Scroll animations ── */
1001
- .reveal {
1002
- opacity: 0;
1003
- transform: translateY(30px);
1004
- transition: opacity 0.8s ease, transform 0.8s ease;
1005
- }
1006
-
1007
- .reveal.visible {
1008
- opacity: 1;
1009
- transform: translateY(0);
1010
- }
1011
-
1012
1102
  .sr-only {
1013
1103
  position: absolute;
1014
1104
  width: 1px; height: 1px;
@@ -1064,7 +1154,7 @@
1064
1154
  <span class="line"><em>开源版远程控制。</em></span>
1065
1155
  </h1>
1066
1156
  <p class="hero-sub">
1067
- 在开发机器上启动 Agent,出门遛弯期间用<strong>手机或 iPad 继续写代码</strong> &mdash;
1157
+ 在开发机器上启动 Agent,出门遛弯期间用<strong>手机对话、组建 Agent 团队、或跑定时任务</strong> &mdash;
1068
1158
  不用装 App,不用注册账号,打开浏览器就能用。
1069
1159
  </p>
1070
1160
  <div class="cta-group">
@@ -1103,99 +1193,63 @@
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 网页端在 iPad 上运行 Claude Code" 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 聊天模式 iPad 界面" loading="eager">
1202
+ <div class="carousel-label">
1203
+ <span class="carousel-label-title">Chat</span>
1204
+ <span class="carousel-label-desc">远程与 Claude Code 结对编程</span>
1205
+ </div>
1206
+ </div>
1207
+ <div class="carousel-slide">
1208
+ <img src="/images/team-iPad.webp" alt="AgentLink 团队模式 iPad 界面" loading="eager">
1209
+ <div class="carousel-label">
1210
+ <span class="carousel-label-title">Teams</span>
1211
+ <span class="carousel-label-desc">并行编排多个 Agent 协同工作</span>
1212
+ </div>
1213
+ </div>
1214
+ <div class="carousel-slide">
1215
+ <img src="/images/loop-iPad.webp" alt="AgentLink 循环模式 iPad 界面" loading="eager">
1216
+ <div class="carousel-label">
1217
+ <span class="carousel-label-title">Loop</span>
1218
+ <span class="carousel-label-desc">通过 Cron 定时调度自动化任务</span>
1219
+ </div>
1220
+ </div>
1221
+ </div>
1222
+ <div class="carousel-dots">
1223
+ <button class="carousel-dot active" data-index="0" aria-label="聊天模式"></button>
1224
+ <button class="carousel-dot" data-index="1" aria-label="团队模式"></button>
1225
+ <button class="carousel-dot" data-index="2" aria-label="循环模式"></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 手机端界面" loading="eager">
1117
- </picture>
1230
+ <img src="/images/chat-iPhone.webp" alt="AgentLink 手机端界面" 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">为什么做这个</div>
1126
1239
  <h2>写代码不应该<em>被绑在电脑前。</em></h2>
1127
1240
  <p>
1128
1241
  Claude Code 很强,但只能在终端里用。AgentLink 把它变成一个可以随身携带的体验 &mdash;
1129
- 一行命令,一个链接,在手机或 iPad 上继续你的工作。不需要账号,不需要配置,端到端加密。
1242
+ 一行命令,一个链接,在手机上对话、启动 Agent 团队、或调度定时任务。不需要账号,不需要配置,端到端加密。
1130
1243
  </p>
1131
1244
  </section>
1132
1245
 
1133
1246
  <div class="section-divider"></div>
1134
1247
 
1135
1248
  <!-- Bento Features -->
1136
- <section class="bento reveal" id="features">
1249
+ <section class="bento" id="features">
1137
1250
  <h2 class="sr-only">功能</h2>
1138
1251
 
1139
- <!-- E2E Encryption wide -->
1140
- <div class="bento-card wide">
1141
- <div class="bento-visual">
1142
- <div class="encrypt-visual">
1143
- <div class="encrypt-block">你的代码</div>
1144
- <div class="encrypt-arrow">&rarr;</div>
1145
- <div class="encrypt-block locked">x9f#k2$mQ...</div>
1146
- <div class="encrypt-arrow">&rarr;</div>
1147
- <div class="encrypt-block">你的代码</div>
1148
- </div>
1149
- </div>
1150
- <h3>端到端加密</h3>
1151
- <p>XSalsa20-Poly1305 加密。中继服务器只是个盲转发器 &mdash; 看不到你的代码、提示词或任何数据。</p>
1152
- </div>
1153
-
1154
- <!-- Zero Config -->
1155
- <div class="bento-card">
1156
- <div class="bento-visual">
1157
- <div class="bento-icon purple">
1158
- <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>
1159
- </div>
1160
- </div>
1161
- <h3>开箱即用</h3>
1162
- <p>不用注册账号,不用配置环境。安装、启动、打开链接,三步搞定。</p>
1163
- </div>
1164
-
1165
- <!-- 多 Agent 协作 -->
1166
- <div class="bento-card">
1167
- <div class="bento-visual">
1168
- <div class="bento-icon blue">
1169
- <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>
1170
- </div>
1171
- </div>
1172
- <h3>多 Agent 协作</h3>
1173
- <p>启动多个 Claude 子 Agent 并行处理复杂任务,实时看板面板、活动动态、团队历史记录。</p>
1174
- </div>
1175
-
1176
- <!-- Multi Session -->
1177
- <div class="bento-card">
1178
- <div class="bento-visual">
1179
- <div class="bento-icon blue">
1180
- <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>
1181
- </div>
1182
- </div>
1183
- <h3>多会话并行</h3>
1184
- <p>同时跑多个对话,自由切换,互不干扰。</p>
1185
- </div>
1186
-
1187
- <!-- Any Device -->
1188
- <div class="bento-card">
1189
- <div class="bento-visual">
1190
- <div class="bento-icon cyan">
1191
- <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>
1192
- </div>
1193
- </div>
1194
- <h3>任何设备</h3>
1195
- <p>手机、平板、笔记本 &mdash; 有浏览器就行,随时切到你的 Claude。</p>
1196
- </div>
1197
-
1198
- <!-- Chat | Team | Loop — wide -->
1252
+ <!-- Row 1: Chat | Team | Loop (wide) + Any Device -->
1199
1253
  <div class="bento-card wide">
1200
1254
  <div class="bento-visual">
1201
1255
  <div class="mode-toggle">
@@ -1226,7 +1280,31 @@
1226
1280
  <p>和 Claude 交互对话、启动 Agent 团队处理复杂任务、或用 Cron 调度定时 Loop 任务 &mdash; 全在同一个浏览器标签页里。</p>
1227
1281
  </div>
1228
1282
 
1229
- <!-- Self-hostable -->
1283
+ <div class="bento-card">
1284
+ <div class="bento-visual">
1285
+ <div class="bento-icon cyan">
1286
+ <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>
1287
+ </div>
1288
+ </div>
1289
+ <h3>任何设备</h3>
1290
+ <p>手机、平板、笔记本 &mdash; 有浏览器就行,随时切到你的 Claude。</p>
1291
+ </div>
1292
+
1293
+ <!-- Row 2: E2E Encryption (wide) + Self-Hostable -->
1294
+ <div class="bento-card wide">
1295
+ <div class="bento-visual">
1296
+ <div class="encrypt-visual">
1297
+ <div class="encrypt-block">你的代码</div>
1298
+ <div class="encrypt-arrow">&rarr;</div>
1299
+ <div class="encrypt-block locked">x9f#k2$mQ...</div>
1300
+ <div class="encrypt-arrow">&rarr;</div>
1301
+ <div class="encrypt-block">你的代码</div>
1302
+ </div>
1303
+ </div>
1304
+ <h3>端到端加密</h3>
1305
+ <p>XSalsa20-Poly1305 加密。中继服务器只是个盲转发器 &mdash; 看不到你的代码、提示词或任何数据。</p>
1306
+ </div>
1307
+
1230
1308
  <div class="bento-card">
1231
1309
  <div class="bento-visual">
1232
1310
  <div class="bento-icon green">
@@ -1237,33 +1315,42 @@
1237
1315
  <p>一条命令启动你自己的中继服务器。你的基础设施,你的规则。</p>
1238
1316
  </div>
1239
1317
 
1240
- <!-- Password Protection -->
1318
+ <!-- Row 3: Multi-Agent Teams + Multi Session + Zero Config -->
1241
1319
  <div class="bento-card">
1242
1320
  <div class="bento-visual">
1243
- <div class="bento-icon amber">
1244
- <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>
1321
+ <div class="bento-icon blue">
1322
+ <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>
1245
1323
  </div>
1246
1324
  </div>
1247
- <h3>密码保护</h3>
1248
- <p>加个 <code style="color:var(--green);font-family:'JetBrains Mono',monospace;font-size:0.8rem">--password</code> 参数锁住会话,自带暴力破解防护。</p>
1325
+ <h3>多 Agent 协作</h3>
1326
+ <p>启动多个 Claude Agent 并行处理复杂任务,实时看板面板、活动动态、团队历史记录。</p>
1249
1327
  </div>
1250
1328
 
1251
- <!-- File Preview -->
1252
- <div class="bento-card wide">
1329
+ <div class="bento-card">
1330
+ <div class="bento-visual">
1331
+ <div class="bento-icon blue">
1332
+ <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>
1333
+ </div>
1334
+ </div>
1335
+ <h3>多会话并行</h3>
1336
+ <p>同时跑多个对话,自由切换,互不干扰。</p>
1337
+ </div>
1338
+
1339
+ <div class="bento-card">
1253
1340
  <div class="bento-visual">
1254
- <div class="bento-icon rose">
1255
- <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>
1341
+ <div class="bento-icon purple">
1342
+ <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>
1256
1343
  </div>
1257
1344
  </div>
1258
- <h3>文件浏览器</h3>
1259
- <p>浏览项目目录树,代码语法高亮预览,直接在浏览器里导航你的代码库。</p>
1345
+ <h3>开箱即用</h3>
1346
+ <p>不用注册账号,不用配置环境。安装、启动、打开链接,三步搞定。</p>
1260
1347
  </div>
1261
1348
  </section>
1262
1349
 
1263
1350
  <div class="section-divider"></div>
1264
1351
 
1265
1352
  <!-- How It Works -->
1266
- <section class="workflow reveal" id="how-it-works">
1353
+ <section class="workflow" id="how-it-works">
1267
1354
  <div class="workflow-label">使用方式</div>
1268
1355
  <h2>三步,就这么简单。</h2>
1269
1356
  <div class="workflow-steps">
@@ -1284,8 +1371,8 @@
1284
1371
  <div class="workflow-step">
1285
1372
  <div class="step-marker">03</div>
1286
1373
  <div class="step-content">
1287
- <h3>开始干活</h3>
1288
- <p>多个对话并行运行,随时切换项目。完整的会话历史随时可以恢复,工作不会丢。</p>
1374
+ <h3>对话、协作、自动化</h3>
1375
+ <p>交互式编程、启动 Agent 团队处理复杂任务、或设置定时 Loop 任务 &mdash; 同一个链接,完整历史随时恢复。</p>
1289
1376
  </div>
1290
1377
  </div>
1291
1378
  </div>
@@ -1323,16 +1410,79 @@ function showToast() {
1323
1410
  setTimeout(() => toast.classList.remove('show'), 1800);
1324
1411
  }
1325
1412
 
1326
- // Scroll reveal
1327
- const observer = new IntersectionObserver((entries) => {
1328
- entries.forEach(entry => {
1329
- if (entry.isIntersecting) {
1330
- entry.target.classList.add('visible');
1413
+ // iPad carousel
1414
+ (function() {
1415
+ const slides = document.querySelectorAll('.carousel-slide');
1416
+ const dots = document.querySelectorAll('.carousel-dot');
1417
+ if (!slides.length) return;
1418
+ let current = 0;
1419
+ let interval;
1420
+
1421
+ function goTo(i) {
1422
+ slides[current].classList.remove('active');
1423
+ dots[current].classList.remove('active');
1424
+ current = (i + slides.length) % slides.length;
1425
+ slides[current].classList.add('active');
1426
+ dots[current].classList.add('active');
1427
+ }
1428
+
1429
+ function startAuto() {
1430
+ interval = setInterval(() => goTo(current + 1), 4000);
1431
+ }
1432
+
1433
+ function resetAuto() {
1434
+ clearInterval(interval);
1435
+ startAuto();
1436
+ }
1437
+
1438
+ dots.forEach(dot => {
1439
+ dot.addEventListener('click', () => {
1440
+ goTo(Number(dot.dataset.index));
1441
+ resetAuto();
1442
+ });
1443
+ });
1444
+
1445
+ // Touch/swipe support
1446
+ const track = document.querySelector('.ipad-carousel');
1447
+ let startX = 0, startY = 0, dragging = false;
1448
+
1449
+ track.addEventListener('touchstart', e => {
1450
+ startX = e.touches[0].clientX;
1451
+ startY = e.touches[0].clientY;
1452
+ dragging = true;
1453
+ }, { passive: true });
1454
+
1455
+ track.addEventListener('touchend', e => {
1456
+ if (!dragging) return;
1457
+ dragging = false;
1458
+ const dx = e.changedTouches[0].clientX - startX;
1459
+ const dy = e.changedTouches[0].clientY - startY;
1460
+ if (Math.abs(dx) > 50 && Math.abs(dx) > Math.abs(dy)) {
1461
+ goTo(dx < 0 ? current + 1 : current - 1);
1462
+ resetAuto();
1463
+ }
1464
+ }, { passive: true });
1465
+
1466
+ // Mouse drag support for desktop
1467
+ track.addEventListener('mousedown', e => {
1468
+ startX = e.clientX;
1469
+ dragging = true;
1470
+ track.style.cursor = 'grabbing';
1471
+ });
1472
+
1473
+ document.addEventListener('mouseup', e => {
1474
+ if (!dragging) return;
1475
+ dragging = false;
1476
+ track.style.cursor = '';
1477
+ const dx = e.clientX - startX;
1478
+ if (Math.abs(dx) > 50) {
1479
+ goTo(dx < 0 ? current + 1 : current - 1);
1480
+ resetAuto();
1331
1481
  }
1332
1482
  });
1333
- }, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' });
1334
1483
 
1335
- document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
1484
+ startAuto();
1485
+ })();
1336
1486
  </script>
1337
1487
 
1338
1488
  </body>