Skip to content

Commit 74ec329

Browse files
feat(site): rails cracker is Edge and rails, under a tram
1 parent a29aa34 commit 74ec329

5 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎site/src/components/ui/icon.astro‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ const ICONS = {
2727
round: true,
2828
body: `<path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/>`
2929
},
30+
tram: {
31+
width: 2,
32+
round: true,
33+
body: `<rect width="16" height="16" x="4" y="3" rx="2"/><path d="M4 11h16"/><path d="M12 3v8"/><path d="m8 19-2 3"/><path d="m18 22-2-3"/><path d="M8 15h.01"/><path d="M16 15h.01"/>`
34+
},
3035
fork: {
3136
width: 2,
3237
round: true,

‎site/src/data/programs.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { OWNER } from '../lib/account/handle'
44
export type Program = { slug: string; name: string; description: string; author: string }
55

66
export const programs: Program[] = [
7-
{ slug: 'rails-cracker', name: 'Rails cracker', description: 'Paste any git repo and follow its code graph to every vulnerability it can reach.', author: OWNER }
7+
{ slug: 'edge-and-rails', name: 'Edge and rails', description: 'Paste any git repo and follow its code graph to every vulnerability it can reach.', author: OWNER }
88
]

‎site/src/pages/index.astro‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { OWNER } from '../lib/account/handle'
1212
import { count } from '../lib/format'
1313
import { programs } from '../data/programs'
1414
15-
// Repos a visitor may know, each a tag that opens Rails cracker on it.
15+
// Repos a visitor may know, each a tag that opens Edge and rails on it.
1616
const repos = [['rails', 'rails/rails'], ['django', 'django/django'], ['express', 'expressjs/express'], ['flask', 'pallets/flask'], ['next.js', 'vercel/next.js']]
1717
1818
// Publishing needs a token, so signed out the same button opens the sign-in dialog.
@@ -77,12 +77,12 @@ const outline = 'flex items-center gap-2 transition border border-line text-fg-h
7777

7878
<section class="flex flex-col items-center gap-4 rounded-2xl border border-line-strong bg-page px-4 py-10">
7979
<div class="flex flex-col items-center gap-1">
80-
<h2 class="flex items-center gap-2 whitespace-nowrap text-sm"><Icon name="binoculars" size="sm" class="text-fg-hint" />Rails cracker</h2>
80+
<h2 class="flex items-center gap-2 whitespace-nowrap text-sm"><Icon name="tram" size="sm" class="text-fg-hint" />Edge and rails</h2>
8181
<p class="text-2xs text-fg-hint">Trace a repo to its vulnerabilities</p>
8282
</div>
8383

84-
{/* A repo sent from here lands on the Rails cracker page. */}
85-
<form data-trace action="/programs/rails-cracker" class="w-full max-w-[520px]">
84+
{/* A repo sent from here lands on the Edge and rails page. */}
85+
<form data-trace action="/programs/edge-and-rails" class="w-full max-w-[520px]">
8686
<label class="flex h-9 items-center gap-2.5 rounded-full border border-line-emphasis bg-surface px-4 text-sm transition-shadow hover:border-link/60 hover:ring-2 hover:ring-link/20 focus-within:border-link/60 focus-within:ring-2 focus-within:ring-link/20">
8787
<span class="sr-only">Git repo</span>
8888
<Icon name="fork" size="sm" class="shrink-0 text-fg-placeholder" />
@@ -92,7 +92,7 @@ const outline = 'flex items-center gap-2 transition border border-line text-fg-h
9292
</form>
9393

9494
<div class="flex flex-wrap justify-center gap-2">
95-
{repos.map(([label, repo]) => <a href={`/programs/rails-cracker?repo=${repo}`} data-repo={repo} class="rounded-full border border-line-strong px-3 py-1 text-xs text-fg-faint transition hover:text-fg">{label}</a>)}
95+
{repos.map(([label, repo]) => <a href={`/programs/edge-and-rails?repo=${repo}`} data-repo={repo} class="rounded-full border border-line-strong px-3 py-1 text-xs text-fg-faint transition hover:text-fg">{label}</a>)}
9696
</div>
9797
</section>
9898

site/src/pages/programs/rails-cracker.astro renamed to site/src/pages/programs/edge-and-rails.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const edge = 'pointer-events-none absolute inset-y-0 w-16 from-page to-transpare
2626
<head>
2727
<meta charset="UTF-8" />
2828
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
29-
<title>Rails cracker on Edge Python</title>
29+
<title>Edge and rails on Edge Python</title>
3030
<meta name="robots" content="noindex, nofollow" />
3131
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
3232
<link rel="author" href="/humans.txt" />

‎site/tests/package.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ test('shelves programs beside the packages under Community and sends std to its
145145
const { name } = await published(request)
146146

147147
await page.goto('/')
148-
await expect(page.locator('[data-cards]').getByRole('link', { name: 'Rails cracker' })).toHaveAttribute('href', '/programs/rails-cracker')
148+
await expect(page.locator('[data-cards]').getByRole('link', { name: 'Edge and rails' })).toHaveAttribute('href', '/programs/edge-and-rails')
149149
await expect(page.locator(`[data-cards] a[href="/package/${name}"]`)).toHaveCount(1)
150150

151151
await page.locator('[data-shelf] input').fill('nothing like it')

0 commit comments

Comments
 (0)