提交记录修改README.md+1 −1看文件
修改www/README.md+8 −0看文件
修改www/package.json+2 −1看文件
新增www/public/apple-touch-icon.png看文件 新增www/public/favicon.png看文件 新增www/scripts/build-favicon.mjs+29 −0看文件
修改www/src/components/Contribute.astro+15 −1看文件
修改www/src/components/Footer.astro+3 −0看文件
修改www/src/i18n/en.ts+2 −0看文件
修改www/src/i18n/fr.ts+2 −0看文件
修改www/src/layouts/Base.astro+2 −0看文件
| @@ -4,7 +4,7 @@ Run AI coding agents in a disposable Linux VM per project, with permissions bypa | ||
| 4 | 4 | |
| 5 | 5 | Built on [Lima](https://lima-vm.io/). Ships dev tools, Docker, headless Chromium with [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp), and [Claude Code](https://claude.ai/code), [OpenCode](https://github.com/anomalyco/opencode), [Codex CLI](https://github.com/openai/codex), [Mistral Vibe](https://docs.mistral.ai/vibe/code/cli/install-setup) and, opt-in, [Pi](https://pi.dev). macOS, Linux, and Windows (Git Bash, experimental). |
| 6 | 6 | |
| 7 | 删除:**Documentation: [www.agent-vm.org](https://www.agent-vm.org/)** | |
| 7 | 新增:**Documentation: [www.agent-vm.org](https://www.agent-vm.org/)** · Chat: [#agent-vm:matrix.org](https://matrix.to/#/#agent-vm:matrix.org) | |
| 8 | 8 | |
| 9 | 9 | ## Install |
| 10 | 10 | |
| @@ -55,6 +55,14 @@ npm run og | ||
| 55 | 55 | That needs `sharp` (a devDependency) and a font on the machine. The deploy does |
| 56 | 56 | not: it only reads the committed PNG. |
| 57 | 57 | |
| 58 | 新增:`public/favicon.png`, the fallback for browsers without SVG favicons, and | |
| 59 | 新增:`public/apple-touch-icon.png` are committed too. Regenerate them after changing | |
| 60 | 新增:`public/favicon.svg`: | |
| 61 | 新增: | |
| 62 | 新增:```bash | |
| 63 | 新增:npm run favicon | |
| 64 | 新增:``` | |
| 65 | 新增: | |
| 58 | 66 | ## Deploying |
| 59 | 67 | |
| 60 | 68 | `.github/workflows/www.yml` builds on every push to `main` that touches `www/` |
| @@ -11,7 +11,8 @@ | ||
| 11 | 11 | "build": "astro build", |
| 12 | 12 | "preview": "astro preview", |
| 13 | 13 | "check": "astro check", |
| 14 | 删除: "og": "node scripts/build-og.mjs" | |
| 14 | 新增: "og": "node scripts/build-og.mjs", | |
| 15 | 新增: "favicon": "node scripts/build-favicon.mjs" | |
| 15 | 16 | }, |
| 16 | 17 | "dependencies": { |
| 17 | 18 | "@astrojs/sitemap": "^3.7.4", |
二进制文件,不显示改动。
二进制文件,不显示改动。
| @@ -0,0 +1,29 @@ | ||
| 1 | 新增:/** | |
| 2 | 新增: * Renders the PNG icons from public/favicon.svg: favicon.png for browsers | |
| 3 | 新增: * without SVG favicons, apple-touch-icon.png for iOS home screens. | |
| 4 | 新增: * | |
| 5 | 新增: * Run with `npm run favicon` after changing the SVG. The PNGs are committed, | |
| 6 | 新增: * like og.png. | |
| 7 | 新增: */ | |
| 8 | 新增: | |
| 9 | 新增:import { dirname, resolve } from 'node:path'; | |
| 10 | 新增:import { fileURLToPath } from 'node:url'; | |
| 11 | 新增:import sharp from 'sharp'; | |
| 12 | 新增: | |
| 13 | 新增:const here = dirname(fileURLToPath(import.meta.url)); | |
| 14 | 新增:const pub = resolve(here, '../public'); | |
| 15 | 新增:const svg = resolve(pub, 'favicon.svg'); | |
| 16 | 新增: | |
| 17 | 新增:// Sizes match the `sizes` attributes in Base.astro. | |
| 18 | 新增:async function render(name, size, flatten) { | |
| 19 | 新增: // Rasterized at 8x the target, then scaled down. The SVG's viewBox is 32px. | |
| 20 | 新增: let img = sharp(svg, { density: (72 * 8 * size) / 32 }).resize(size, size); | |
| 21 | 新增: if (flatten) img = img.flatten({ background: flatten }); | |
| 22 | 新增: await img.png({ compressionLevel: 9 }).toFile(resolve(pub, name)); | |
| 23 | 新增: console.log(`wrote ${resolve(pub, name)}`); | |
| 24 | 新增:} | |
| 25 | 新增: | |
| 26 | 新增:await render('favicon.png', 32); | |
| 27 | 新增:// iOS fills transparency with black and rounds the corners itself: the | |
| 28 | 新增:// background goes to the edges instead. | |
| 29 | 新增:await render('apple-touch-icon.png', 180, '#191713'); | |
| @@ -84,6 +84,10 @@ const d = t(locale); | ||
| 84 | 84 | <span class="contribute__link-label">{d.contribute.repoLabel}</span> |
| 85 | 85 | <span class="contribute__link-arrow" aria-hidden="true">→</span> |
| 86 | 86 | </a> |
| 87 | 新增: <a class="contribute__link" href={d.contribute.chatHref} rel="noopener" target="_blank"> | |
| 88 | 新增: <span class="contribute__link-label">{d.contribute.chatLabel}</span> | |
| 89 | 新增: <span class="contribute__link-arrow" aria-hidden="true">→</span> | |
| 90 | 新增: </a> | |
| 87 | 91 | </div> |
| 88 | 92 | </div> |
| 89 | 93 | </section> |
| @@ -147,7 +151,7 @@ const d = t(locale); | ||
| 147 | 151 | |
| 148 | 152 | .contribute__links { |
| 149 | 153 | display: grid; |
| 150 | 删除: grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); | |
| 154 | 新增: grid-template-columns: repeat(4, minmax(0, 1fr)); | |
| 151 | 155 | gap: 1px; |
| 152 | 156 | margin-top: clamp(2.5rem, 5vw, 4rem); |
| 153 | 157 | background: var(--line); |
| @@ -191,5 +195,15 @@ const d = t(locale); | ||
| 191 | 195 | grid-template-columns: minmax(0, 1fr); |
| 192 | 196 | gap: 2.5rem; |
| 193 | 197 | } |
| 198 | 新增: | |
| 199 | 新增: .contribute__links { | |
| 200 | 新增: grid-template-columns: repeat(2, minmax(0, 1fr)); | |
| 201 | 新增: } | |
| 202 | 新增: } | |
| 203 | 新增: | |
| 204 | 新增: @media (max-width: 36rem) { | |
| 205 | 新增: .contribute__links { | |
| 206 | 新增: grid-template-columns: minmax(0, 1fr); | |
| 207 | 新增: } | |
| 194 | 208 | } |
| 195 | 209 | </style> |
| @@ -20,6 +20,9 @@ const d = t(locale); | ||
| 20 | 20 | <a class="footer__link" href="https://github.com/sylvinus/agent-vm" rel="noopener" target="_blank"> |
| 21 | 21 | {d.nav.github} |
| 22 | 22 | </a> |
| 23 | 新增: <a class="footer__link" href={d.contribute.chatHref} rel="noopener" target="_blank"> | |
| 24 | 新增: Matrix | |
| 25 | 新增: </a> | |
| 23 | 26 | <a |
| 24 | 27 | class="footer__link" |
| 25 | 28 | href="https://github.com/sylvinus/agent-vm/blob/main/LICENSE" |
| @@ -744,6 +744,8 @@ export const en = { | ||
| 744 | 744 | prHref: 'https://github.com/sylvinus/agent-vm/pulls', |
| 745 | 745 | repoLabel: 'Read the source', |
| 746 | 746 | repoHref: 'https://github.com/sylvinus/agent-vm', |
| 747 | 新增: chatLabel: 'Chat on Matrix', | |
| 748 | 新增: chatHref: 'https://matrix.to/#/#agent-vm:matrix.org', | |
| 747 | 749 | }, |
| 748 | 750 | |
| 749 | 751 | credits: { |
| @@ -746,6 +746,8 @@ export const fr: Dictionary = { | ||
| 746 | 746 | prHref: 'https://github.com/sylvinus/agent-vm/pulls', |
| 747 | 747 | repoLabel: 'Lire le code', |
| 748 | 748 | repoHref: 'https://github.com/sylvinus/agent-vm', |
| 749 | 新增: chatLabel: 'Discuter sur Matrix', | |
| 750 | 新增: chatHref: 'https://matrix.to/#/#agent-vm:matrix.org', | |
| 749 | 751 | }, |
| 750 | 752 | |
| 751 | 753 | credits: { |
| @@ -26,6 +26,8 @@ const canonical = new URL(localeHref(locale), site).href; | ||
| 26 | 26 | <meta name="description" content={d.meta.description} /> |
| 27 | 27 | <link rel="canonical" href={canonical} /> |
| 28 | 28 | <link rel="icon" href="/favicon.svg" type="image/svg+xml" /> |
| 29 | 新增: <link rel="icon" href="/favicon.png" type="image/png" sizes="32x32" /> | |
| 30 | 新增: <link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" /> | |
| 29 | 31 | <meta name="generator" content={Astro.generator} /> |
| 30 | 32 | |
| 31 | 33 | { |

