Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bazel_dep(name = "rules_tectonic", version = "0.1.0")
git_override(
module_name = "spear_resumes",
remote = "git@github.com:Jesssullivan/spear-resumes.git",
commit = "4507db4721e70711f4f1400e7d9392fb04ae7e49",
commit = "b648e3061152aa20de9510edb63d5e3ea1ba56aa",
)

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
Expand Down
11 changes: 8 additions & 3 deletions e2e/cv.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@ test.describe('CV page', () => {

test('tab switcher renders with Resume active by default', async ({ page }) => {
const resumeBtn = page.getByRole('button', { name: 'Resume', exact: true });
const targetedBtn = page.getByRole('button', { name: 'Resume — Targeted' });
const precisBtn = page.getByRole('button', { name: 'Précis' });
const cvBtn = page.getByRole('button', { name: 'Full CV' });
await expect(resumeBtn).toBeVisible();
await expect(targetedBtn).toBeVisible();
await expect(precisBtn).toBeVisible();
await expect(cvBtn).toBeVisible();
await expect(resumeBtn).toHaveClass(/preset-filled/);
await expect(targetedBtn).toHaveClass(/preset-outlined/);
await expect(precisBtn).toHaveClass(/preset-outlined/);
await expect(cvBtn).toHaveClass(/preset-outlined/);
});

test('switching to Précis tab updates links', async ({ page }) => {
await page.getByRole('button', { name: 'Précis' }).click();
await expect(page.getByRole('link', { name: 'Download Précis PDF' })).toBeVisible();
});

test('Resume download and source links visible by default', async ({ page }) => {
await expect(page.getByRole('link', { name: 'Download Resume PDF' })).toBeVisible();
await expect(page.getByRole('link', { name: 'View TeX Source' })).toBeVisible();
Expand Down
16 changes: 8 additions & 8 deletions src/routes/cv/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from 'svelte';

type Tab = 'resume' | 'resume_targeted' | 'cv';
type Tab = 'resume' | 'precis' | 'cv';

let activeTab = $state<Tab>('resume');
let hydrated = $state(false);
Expand All @@ -13,11 +13,11 @@
iframeTitle: 'Jess Sullivan Resume',
downloadLabel: 'Download Resume PDF',
},
resume_targeted: {
label: 'Resume — Targeted',
file: '/cv/jess_sullivan_resume_targeted.pdf',
iframeTitle: 'Jess Sullivan Resume — Targeted',
downloadLabel: 'Download Targeted Resume PDF',
precis: {
label: 'Précis',
file: '/cv/jess_sullivan_precis.pdf',
iframeTitle: 'Jess Sullivan Précis',
downloadLabel: 'Download Précis PDF',
},
cv: {
label: 'Full CV',
Expand All @@ -27,7 +27,7 @@
},
};

const order: Tab[] = ['resume', 'resume_targeted', 'cv'];
const order: Tab[] = ['resume', 'precis', 'cv'];

function setActiveTab(tab: Tab): void {
activeTab = tab;
Expand Down Expand Up @@ -98,7 +98,7 @@
<div class="card p-4 flex justify-center">
<img
src="/cv/build-flow.svg"
alt="Build flow: private spear-resumes XeLaTeX sources (//generic:resume, //generic:cv, //cra:resume) compile via rules_tectonic using the Tectonic XeLaTeX engine, producing three PDFs; bazel run //static/cv:sync_pdfs writes them into static/cv/ in this repo, which the /cv page serves as an iframe per tab. The build-cv.yml GitHub Actions workflow fetches the private source with an SSH deploy key, installs bazelisk, runs the sync, and auto-commits the refreshed PDFs."
alt="Build flow: private spear-resumes XeLaTeX sources (//generic:resume, //generic:precis, //generic:cv) compile via rules_tectonic using the Tectonic XeLaTeX engine, producing three PDFs; bazel run //static/cv:sync_pdfs writes them into static/cv/ in this repo, which the /cv page serves as an iframe per tab. The build-cv.yml GitHub Actions workflow fetches the private source with an SSH deploy key, installs bazelisk, runs the sync, and auto-commits the refreshed PDFs."
class="max-w-full h-auto"
loading="lazy"
/>
Expand Down
18 changes: 11 additions & 7 deletions static/cv/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
Run `bazel run //static/cv:sync_pdfs` to write/update the PDFs in the
source tree at:

static/cv/jess_sullivan_resume.pdf (from //generic:resume)
static/cv/jess_sullivan_resume_targeted.pdf (from //cra:resume)
static/cv/jess_sullivan_cv.pdf (from //generic:cv)
static/cv/jess_sullivan_resume.pdf (from //generic:resume)
static/cv/jess_sullivan_precis.pdf (from //generic:precis)
static/cv/jess_sullivan_cv.pdf (from //generic:cv)

SvelteKit reads them as plain static files; the diff-check action
The public /cv page surfaces the generic lane only (resume, precis, full
CV). The targeted (//cra:resume) lane stays in spear_resumes and is sent
privately, not published here.

SvelteKit reads them as plain static files; the pdfs_synced_test below
guards against forgetting to re-sync after a spear_resumes bump.
"""

Expand All @@ -18,7 +22,7 @@ write_source_files(
name = "sync_pdfs",
files = {
"jess_sullivan_resume.pdf": "@spear_resumes//generic:resume",
"jess_sullivan_resume_targeted.pdf": "@spear_resumes//cra:resume",
"jess_sullivan_precis.pdf": "@spear_resumes//generic:precis",
"jess_sullivan_cv.pdf": "@spear_resumes//generic:cv",
},
visibility = ["//visibility:public"],
Expand All @@ -28,10 +32,10 @@ js_test(
name = "pdfs_synced_test",
data = [
":jess_sullivan_cv.pdf",
":jess_sullivan_precis.pdf",
":jess_sullivan_resume.pdf",
":jess_sullivan_resume_targeted.pdf",
"@spear_resumes//cra:resume",
"@spear_resumes//generic:cv",
"@spear_resumes//generic:precis",
"@spear_resumes//generic:resume",
],
entry_point = "assert_pdfs_synced.mjs",
Expand Down
6 changes: 3 additions & 3 deletions static/cv/assert_pdfs_synced.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const pairs = [
static: ['static/cv/jess_sullivan_resume.pdf'],
},
{
name: 'targeted resume',
source: ['../spear_resumes+/cra/resume.pdf', 'spear_resumes+/cra/resume.pdf'],
static: ['static/cv/jess_sullivan_resume_targeted.pdf'],
name: 'précis',
source: ['../spear_resumes+/generic/precis.pdf', 'spear_resumes+/generic/precis.pdf'],
static: ['static/cv/jess_sullivan_precis.pdf'],
},
{
name: 'full CV',
Expand Down
8 changes: 3 additions & 5 deletions static/cv/build-flow.mmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
flowchart TD
subgraph SPEAR["spear-resumes · private repo"]
direction LR
GEN["//generic:resume<br/>//generic:cv"]
CRA["//cra:resume<br/>(targeted)"]
GEN["//generic:resume<br/>//generic:precis<br/>//generic:cv"]
end
REG[("tinyland-inc/<br/>bazel-registry")]
RT["rules_tectonic<br/>Tectonic · XeLaTeX engine"]
PDFS["resume · resume-targeted · cv<br/>3 compiled PDFs"]
PDFS["resume · précis · cv<br/>3 compiled PDFs"]
SYNC["bazel run //static/cv:sync_pdfs<br/>write_source_files"]
STATIC["static/cv/*.pdf<br/>(committed to this repo)"]
PAGE["/cv page<br/>iframe per tab"]

GEN --> RT
CRA --> RT
REG -. "bazel_dep · .bazelrc" .-> RT
RT --> PDFS
PDFS --> SYNC
Expand All @@ -26,7 +24,7 @@ flowchart TD
classDef bz fill:#bfdbfe,stroke:#1d4ed8,color:#1f2937;
classDef out fill:#bbf7d0,stroke:#15803d,color:#1f2937;
classDef ci fill:#e9d5ff,stroke:#7e22ce,color:#1f2937;
class GEN,CRA priv;
class GEN priv;
class RT,REG,SYNC bz;
class PDFS,STATIC,PAGE out;
class CI ci;
2 changes: 1 addition & 1 deletion static/cv/build-flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/cv/jess_sullivan_precis.pdf
Binary file not shown.
Binary file removed static/cv/jess_sullivan_resume_targeted.pdf
Binary file not shown.
Loading