@@ -3,6 +3,7 @@ import { onMounted, onUnmounted, ref } from 'vue';
33import AgentLoop from ' ./components/AgentLoop.vue' ;
44import InstallCommand from ' ./components/InstallCommand.vue' ;
55import LegacyDownloadsPopup from ' ./components/LegacyDownloadsPopup.vue' ;
6+ import ParticleField from ' ./components/ParticleField.vue' ;
67import PythinkerMascot from ' ./components/PythinkerMascot.vue' ;
78
89const version = __PYTHINKER_VERSION__ ;
@@ -20,6 +21,18 @@ const desktopDownloads = {
2021 windows: ` ${ DESKTOP_RELEASE_BASE } /Pythinker-${ DESKTOP_VERSION } -x64-Setup.exe` ,
2122};
2223
24+ const isWindows = / Win/ i .test (navigator .platform || navigator .userAgent );
25+ const heroDownloads = (isWindows
26+ ? [
27+ { id: ' windows' , label: ' Download for Windows' , note: ' Windows x64' , icon: ' /brand/windows11.svg' , href: desktopDownloads .windows },
28+ { id: ' mac' , label: ' Download for macOS' , note: ' Apple Silicon' , icon: ' /brand/apple.svg' , href: desktopDownloads .mac },
29+ ]
30+ : [
31+ { id: ' mac' , label: ' Download for macOS' , note: ' Apple Silicon' , icon: ' /brand/apple.svg' , href: desktopDownloads .mac },
32+ { id: ' windows' , label: ' Download for Windows' , note: ' Windows x64' , icon: ' /brand/windows11.svg' , href: desktopDownloads .windows },
33+ ]);
34+ const heroDownloadsPage = ` https://github.com/PyModel/pythinker-code/releases/tag/v${ DESKTOP_VERSION } ` ;
35+
2336const installRows = [
2437 [' macOS / Linux' , ' curl -fsSL https://code.pythinker.com/pythinker-code/install.sh | bash' , ' /brand/apple.svg' ],
2538 [' Windows (PowerShell)' , ' irm https://code.pythinker.com/pythinker-code/install.ps1 | iex' , ' /brand/windows11.svg' ],
@@ -211,6 +224,7 @@ onUnmounted(() => {
211224< / script>
212225
213226< template>
227+ < ParticleField / >
214228 < nav class = " site-nav" aria- label= " Primary navigation" >
215229 < div class = " container nav-inner" >
216230 < a href= " /" class = " nav-brand" >< PythinkerMascot : width= " 26" : height= " 32" / >< span> Pythinker Code< / span>< / a>
@@ -245,27 +259,29 @@ onUnmounted(() => {
245259 < PythinkerMascot class = " hero-mascot" : width= " 164" : height= " 205" / >
246260 < h1> Pythinker Code< / h1>
247261 < p class = " hero-accent" > Think first, then code.< / p>
248- < p class = " hero-lead" > An open- source AI engineering agent for your terminal . It reads your repo, edits files, runs commands, and iterates until the job is done.< / p>
249- < a
250- class = " hero-npm-badge"
251- href= " https://www.npmjs.com/package/@pymodel/pythinker-code"
252- target= " _blank"
253- rel= " noopener"
254- >
255- < img
256- src= " https://img.shields.io/npm/dm/%40pymodel%2Fpythinker-code?style=flat&logo=npm&logoColor=white&color=2b89ff&label=downloads"
257- alt= " npm downloads per month for @pymodel/pythinker-code"
258- width= " 161"
259- height= " 20"
260- loading= " lazy"
261- / >
262- < / a>
262+ < p class = " hero-lead" > Pythinker Code is an open- source AI engineering agent . It reads your repo, edits files, runs commands, and iterates until the job is done & mdash; in a native desktop app, your terminal, or VS Code.< / p>
263+ < div class = " hero-download" >
264+ < div class = " hero-download-actions" >
265+ < a
266+ v- for = " (download, index) in heroDownloads"
267+ : key= " download.id"
268+ : class = " index === 0 ? 'button button-primary' : 'button button-secondary'"
269+ : href= " download.href"
270+ rel= " noopener"
271+ >
272+ < img : src= " download.icon" alt= " " aria- hidden= " true" class = " button-platform-icon" / >
273+ {{ download .label }}
274+ < / a>
275+ < / div>
276+ < p class = " hero-download-note" >
277+ {{ heroDownloads .map ((download ) => download .note ).join (' · ' ) }} ·
278+ < a : href= " heroDownloadsPage" target= " _blank" rel= " noopener" > All downloads< / a>
279+ < / p>
280+ < / div>
281+ < p class = " hero-install-label" > Or install the CLI < / p>
263282 < div class = " hero-install" >
264283 < InstallCommand / >
265284 < / div>
266- < div class = " hero-download-milestone" >
267- < LegacyDownloadsPopup / >
268- < / div>
269285 < p class = " hero-caption" > Free and open source . MIT licensed . macOS , Linux, and Windows.< / p>
270286 < / div>
271287 < / header>
@@ -531,6 +547,10 @@ onUnmounted(() => {
531547 </div>
532548 </div>
533549 </section>
550+
551+ <div class="container milestone-footnote">
552+ <LegacyDownloadsPopup />
553+ </div>
534554 </main>
535555
536556 <footer class="site-footer">
@@ -728,40 +748,46 @@ onUnmounted(() => {
728748 line-height: 1.5;
729749}
730750
751+ .hero-download {
752+ margin-top: 24px;
753+ }
754+
755+ .hero-download-actions {
756+ display: flex;
757+ flex-wrap: wrap;
758+ justify-content: center;
759+ gap: 10px;
760+ }
761+
731762.hero-install {
732763 max-width: 720px;
733764 margin: 10px auto 0;
734765}
735766
736- .hero-download- milestone {
767+ .milestone-footnote {
737768 display: flex;
738- margin-top: 14px;
739769 justify-content: center;
770+ margin-block: 48px;
740771}
741772
742- .hero-npm-badge {
743- display: inline-flex;
744- margin-top: 14px;
745- border-radius: var(--radius);
746- opacity: 0.85;
747- transition: opacity 0.2s ease;
773+ .hero-download-note,
774+ .hero-install-label,
775+ .hero-caption {
776+ color: var(--ink-subtle);
777+ font-size: 13px;
748778}
749779
750- .hero-npm-badge:hover {
751- opacity: 1;
780+ .hero-download-note {
781+ margin-top: 10px;
782+ line-height: 1.38;
752783}
753784
754- /* ponytail: width:auto lets the badge grow as the download count does; the width attr only reserves space */
755- .hero-npm-badge img {
756- display: block;
757- width: auto;
758- height: 20px;
785+ .hero-install-label {
786+ margin-top: 20px;
759787}
760788
761789.hero-caption {
762790 margin-top: 12px;
763- color: var(--ink-subtle);
764- font-size: 13px;
765791 line-height: 1.38;
766792}
767793
@@ -830,11 +856,13 @@ onUnmounted(() => {
830856 height: 16px;
831857}
832858
833- .desktop-showcase-actions .button {
859+ .desktop-showcase-actions .button,
860+ .hero-download-actions .button {
834861 gap: 8px;
835862}
836863
837- .desktop-showcase-actions .button-primary .button-platform-icon {
864+ .desktop-showcase-actions .button-primary .button-platform-icon,
865+ .hero-download-actions .button-primary .button-platform-icon {
838866 filter: brightness(0) invert(1);
839867}
840868
0 commit comments