A white, minimal painting portfolio modeled on the Whitespace layout: a top row of horizontally-scrollable thumbnails with a large image stage below. Pure static HTML/CSS/JS — no build step, no dependencies. Designed to live on GitHub Pages at bernardbortnick.com.
index.html Page shell
css/style.css All styling (white theme, thumbnail strip, stage, edit mode)
js/main.js Gallery data + behavior ← edit this to add paintings
images/<category>/ One folder per category, holds that category's paintings
generate_placeholders.py Throwaway script that made the placeholders — delete later
content-overrides.json (optional) published title/description edits — see "Editing"
Each category has its own folder under images/. Drop Bernard's painting files
into the matching one:
images/portraits/
images/landscapes/
images/age-of-outrage/
images/figurative/
images/watercolors/
images/drawings-people-and-places/
images/drawings-political/
cd bernardbortnick-site
python3 -m http.server 8000
# then visit http://localhost:8000
- Put image files in the right
images/<category>/folder (JPG/PNG; ~1600px on the long edge is plenty). - Open
js/main.jsand edit theGALLERIESobject. Each work is one line:{ src: "images/landscapes/field.jpg", title: "Field, Late Afternoon", details: "Oil on canvas, 28 × 40 in, 2021" },
- Delete the
placeholder-*.svgfiles andgenerate_placeholders.pyonce real images are in.
There's an Edit link in the footer.
- Click it and enter the password (set by
EDIT_PASSWORDat the top ofjs/main.js— change it from the default). - Double-click any title or description in the gallery to edit it; press Enter to keep, Esc to cancel. Edits save instantly in that browser.
- Click Publish changes… to make them live for everyone.
Note: the password is light security — it lives in the page's code, so it keeps casual visitors out but is not a real secret. Fine for an art portfolio.
"Publish" commits a content-overrides.json file straight to GitHub via its API,
so the site updates on its own within ~1 minute. To enable it:
- Push the site to a GitHub repo and note the owner + repo name.
- In
js/main.js, fill in theGITHUBblock at the top:const GITHUB = { owner: "your-username", repo: "bernardbortnick", branch: "main", path: "content-overrides.json" };
- Create a fine-grained personal access token at
github.com → Settings → Developer settings → Fine-grained tokens:
- Repository access: only the site repo.
- Permissions: Contents → Read and write (nothing else).
- Copy the token.
- On your dad's computer, the first time he clicks Publish, paste that token when prompted. It's saved in his browser, so he's never asked again — from then on he just edits and clicks Publish.
The token is stored in the browser's local storage. Scope it to only this repo with only Contents write so that, worst case, it can edit nothing but this website. To revoke it, delete the token on GitHub and it stops working.
Until the GITHUB block is filled in, Publish simply downloads
content-overrides.json and you commit it to the repo manually.
- Create a repo (e.g.
bernardbortnick) and push these files. - Repo → Settings → Pages → deploy from
mainbranch, root folder. - Add a file named
CNAMEcontaining just:bernardbortnick.com - At your domain registrar, point DNS at GitHub Pages:
Arecords for@→185.199.108.153,.109.153,.110.153,.111.153CNAMEforwww→<your-github-username>.github.io
- Back in Settings → Pages, set the custom domain and enable "Enforce HTTPS".