Skip to content

Commit 60f015f

Browse files
Rebuild homepage to match original, fix overlays, update skills
- Replace pink/purple gradient overlay with dark overlay matching original - Rebuild homepage with proper section structure: hero with curved bottom, icon cards overlapping hero, blog posts, location banner with lab background, partner logos, bottom cityscape banner - Add Font Awesome for proper icons - Add homepage-specific SCSS partial - Fix featured image on latest blog post - Update wp-to-ghpages and wp-audit skills with lessons learned: extract actual overlay colors from CSS, include icon libraries, check per-page CSS for backgrounds/sections, verify post images
1 parent 8d52891 commit 60f015f

12 files changed

Lines changed: 496 additions & 176 deletions

.claude/skills/wp-audit.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,37 @@ done
103103

104104
**Gotcha: Use headless Chrome screenshots to see actual colors/fonts — don't search for theme defaults.** WordPress sites customize colors via the Theme Customizer, overriding theme defaults. The actual values live in inline `<style>` blocks, not the theme's CSS file.
105105

106+
**CRITICAL: Extract per-page CSS for every key page.** WordPress page builders (Elementor, WPBakery, Divi, etc.) generate per-page CSS files that contain the REAL design values — background images, overlay colors, section padding, shape dividers, font sizes/families, icon sizes, and hover effects. The theme CSS only has defaults. You must find these per-page CSS files and extract the actual values.
107+
108+
```bash
109+
# Find per-page CSS URLs (look for page/post ID-based CSS files)
110+
curl -sL "$SITE_URL" | grep -oP "href='[^']*post-[0-9]+\.css[^']*'"
111+
112+
# Fetch each one and extract:
113+
# - Background images: url("...")
114+
# - Overlay colors: background-color:rgba(...)
115+
# - Section padding: padding:...
116+
# - Shape divider dimensions (SVG width/height)
117+
# - Font families, sizes, weights, colors
118+
curl -sL "<per-page-css-url>" > page-styles.css
119+
120+
# Extract background images
121+
grep -oP 'url\("[^"]*"\)' page-styles.css
122+
123+
# Extract overlay colors and opacities
124+
grep -oP 'background-color:rgba\([^)]+\)' page-styles.css
125+
grep -oP 'opacity:[0-9.]+' page-styles.css
126+
127+
# Extract section padding values
128+
grep -oP 'padding:[^;]+' page-styles.css
129+
130+
# Extract font specs
131+
grep -oP 'font-family:"[^"]*"' page-styles.css | sort -u
132+
grep -oP 'font-size:[0-9]+px' page-styles.css | sort -u
133+
```
134+
135+
**Gotcha: Don't invent overlay colors.** Many themes apply dark semi-transparent overlays over hero/banner images, NOT colored gradients. If you guess a pink/purple gradient when the site uses a dark overlay, every page header will look wrong. Always extract the exact overlay `background-color` and `opacity` from the site's actual CSS.
136+
106137
```bash
107138
# Google Fonts
108139
curl -sL "$SITE_URL" | grep -oP 'fonts\.googleapis\.com[^"'"'"']*'
@@ -117,11 +148,11 @@ curl -sL "$SITE_URL" | grep -oP '#[0-9a-fA-F]{3,8}' | sort -u
117148
curl -sL "$SITE_URL" | grep -oP 'linear-gradient[^;)]+[);]'
118149

119150
# Take screenshots to visually confirm colors and layout
120-
google-chrome --headless --disable-gpu --screenshot=homepage.png --window-size=1400,3000 "$SITE_URL"
121-
google-chrome --headless --disable-gpu --screenshot=blogpost.png --window-size=1400,3000 "$SITE_URL/<any-post-slug>/"
151+
google-chrome --headless --disable-gpu --no-sandbox --screenshot=homepage.png --window-size=1400,5000 "$SITE_URL"
152+
google-chrome --headless --disable-gpu --no-sandbox --screenshot=blogpost.png --window-size=1400,5000 "$SITE_URL/<any-post-slug>/"
122153
```
123154

124-
For theme-specific custom properties (e.g., Hestia uses `--hestia-primary-color`), search for the theme name:
155+
For theme-specific custom properties, search for the theme name found in Step 1:
125156
```bash
126157
curl -sL "$SITE_URL" | grep -oP '--[a-z]+-primary[^}]*'
127158
```
@@ -202,11 +233,13 @@ Compile all findings into a structured summary:
202233
2. **Nav menu structure** — with dropdowns and **exact href URLs** extracted from the HTML (these become the Jekyll permalinks)
203234
3. **Blog posts** — date, author, slug, featured image, comment count
204235
4. **Comments** — total count, distribution by post
205-
5. **Design tokens** — fonts, colors, gradients, spacing
236+
5. **Design tokens** — fonts, colors, gradients, spacing, overlay colors/opacities (from Elementor per-page CSS, NOT guessed)
206237
6. **Image inventory** — organized by category (logos, team, blog, headers, etc.)
207-
7. **Interactive elements** — what needs special handling or must be skipped
208-
8. **Forms** — which can be replaced with Google Forms links, which to skip
209-
9. **External dependencies** — Google Maps, third-party scripts, etc.
238+
7. **Full-width sections** — for each page (especially the homepage), document every full-width background section: what background image it uses, what overlay color/opacity, what shape dividers separate it from adjacent sections, and what content sits on top of it
239+
8. **Icon libraries** — which icon library the site loads (Font Awesome, Material Icons, etc.) and the CDN URL
240+
9. **Interactive elements** — what needs special handling or must be skipped
241+
10. **Forms** — which can be replaced with Google Forms links, which to skip
242+
11. **External dependencies** — Google Maps, third-party scripts, etc.
210243

211244
## Output
212245

.claude/skills/wp-to-ghpages.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ Create partials from the audit's design tokens:
118118
- `_sass/_variables.scss` — colors, fonts, spacing, shadows from the audit
119119
- `_sass/_base.scss` — reset, typography, links, tables, code blocks
120120
- `_sass/_nav.scss` — sticky header, dropdown menus, mobile toggle
121-
- `_sass/_page-header.scss` — hero/page header with background image + gradient overlay
121+
- `_sass/_page-header.scss` — hero/page header with background image + overlay
122+
- `_sass/_homepage.scss` — homepage-specific sections (icon cards, blog preview, location, banners)
122123
- `_sass/_content.scss` — content cards, grids, tabs, carousels, team cards, equipment items
123124
- `_sass/_blog.scss` — blog listing, post preview cards, single post styles
124125
- `_sass/_comments.scss` — comment thread styling
@@ -136,15 +137,21 @@ Entry point `assets/css/style.scss` (must have empty front matter for Jekyll to
136137

137138
**Key design decisions:**
138139
- Use the exact colors, fonts, and gradients from the audit's design tokens
139-
- Keep the WordPress site's visual structure (sticky nav, page header with gradient overlay, content cards with shadow)
140+
- Keep the WordPress site's visual structure (sticky nav, page header, content cards with shadow)
140141
- Page backgrounds should match the original (usually light gray, not white)
141142
- Content areas should be white cards with subtle shadows, floating above the background
142143

144+
**CRITICAL: Extract overlay/background values from the site's actual CSS — never guess.**
145+
Many WordPress themes use dark overlays (`rgba(0,0,0,0.3)`) over hero/banner images, not colored gradients. If you invent a pink/purple gradient when the site actually uses a subtle dark overlay, every page header will look wrong. Fetch the site's per-page CSS files (look for `<link>` tags with CSS URLs containing `post-` or `page-` IDs) and extract the exact `background-color`, `opacity`, and `background-image` values for each section.
146+
147+
**CRITICAL: Include any icon libraries the original site uses.**
148+
WordPress sites commonly use Font Awesome, Material Icons, or similar icon libraries. Check the original page source for icon `<link>` tags (e.g., Font Awesome CDN) and include the same library in your `default.html` `<head>`. Don't substitute emoji Unicode characters for proper icons — they look completely different.
149+
143150
### Step 5: Create layouts
144151

145152
Four layouts cover most WordPress sites:
146153

147-
**`_layouts/default.html`** — HTML shell with head, nav, main, footer, scripts.
154+
**`_layouts/default.html`** — HTML shell with head, nav, main, footer, scripts. Include any icon libraries (Font Awesome, etc.) and Google Fonts the original site uses in the `<head>`.
148155

149156
**`_layouts/home.html`** — extends default, includes page-header, renders content directly (no card wrapper — homepage has custom sections).
150157

@@ -375,8 +382,12 @@ No GitHub Actions configuration needed. GitHub Pages detects the Jekyll project
375382
1. **`collections_dir` breaks post discovery** — Do NOT set `collections_dir: .` (or any value) in `_config.yml`. With the github-pages gem, this silently prevents Jekyll from finding `_posts/`. You'll get zero posts with no error message — blog sections render empty, homepage blog previews show nothing. Just omit the key entirely.
376383
2. **`{{ content }}` in page-header include causes duplication** — If `_includes/page-header.html` contains `{{ content }}`, every page's body renders twice: once inside the header overlay (mangled, overlapping the hero image) and once in the normal position. The include should only render title and subtitle — never `{{ content }}`.
377384
3. **Permalink mismatches break navigation** — Extract every URL from the original site's nav links. Set each Jekyll page's `permalink:` to match exactly. Don't guess — fetch the page and read the hrefs. If the WP blog is at `/posts/`, use `permalink: /posts/`, not `/blog/`.
378-
4. **GitHub Pages gem version conflicts** — `github-pages` pins specific gem versions. Don't add gems that conflict.
379-
5. **Sass deprecation warnings** — GitHub Pages uses an older Sass version. Avoid newer Sass features (`@use`, `@forward`). Stick with `@import`.
380-
6. **Large files** — GitHub has a 100MB file limit. Compress images before committing.
381-
7. **Missing images** — After porting, grep for any remaining `wp-content/uploads` references and replace them.
382-
8. **Comment slugs** — The comment YAML filename must match the post's `page.slug` (derived from the filename by default). If you set a custom `slug` in front matter, use `comment_slug` to override.
385+
4. **Wrong overlay colors on page headers** — Don't guess overlay colors. Most WordPress sites use a dark semi-transparent overlay on hero/banner images, not a colored gradient. Extract the exact overlay `background-color` and `opacity` values from the site's per-page CSS files. A pink gradient on a site that uses a dark overlay makes every page look completely wrong.
386+
5. **Missing full-width background sections** — WordPress pages often have full-width sections with background images, overlays, and shape dividers between them. If you don't fetch the per-page CSS to discover these background images, you'll miss entire sections. Check the CSS for every `background-image: url(...)` on each page you're porting.
387+
6. **Wrong images on blog posts** — If the site uses featured images or inline images in posts, verify each post's images individually against the original. Don't reuse the same image across posts or guess which image belongs to which post.
388+
7. **Missing icon libraries** — WordPress sites commonly use Font Awesome or similar icon libraries. If you substitute emoji characters for proper icons, the visual match will be way off. Check the original `<head>` for icon library `<link>` tags and include them.
389+
8. **GitHub Pages gem version conflicts** — `github-pages` pins specific gem versions. Don't add gems that conflict.
390+
9. **Sass deprecation warnings** — GitHub Pages uses an older Sass version. Avoid newer Sass features (`@use`, `@forward`). Stick with `@import`.
391+
10. **Large files** — GitHub has a 100MB file limit. Compress images before committing.
392+
11. **Missing images** — After porting, grep for any remaining `wp-content/uploads` references and replace them.
393+
12. **Comment slugs** — The comment YAML filename must match the post's `page.slug` (derived from the filename by default). If you set a custom `slug` in front matter, use `comment_slug` to override.

_includes/page-header.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@ <h1>{{ page.header_title | default: page.title }}</h1>
66
<p class="page-subtitle">{{ page.subtitle }}</p>
77
{% endif %}
88
</div>
9+
{% if page.layout == 'home' %}
10+
<div class="hero-curve">
11+
<svg viewBox="0 0 1000 100" preserveAspectRatio="none">
12+
<path d="M0,0 C400,100 600,100 1000,0 L1000,100 L0,100 Z"></path>
13+
</svg>
14+
</div>
15+
{% endif %}
916
</div>

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
77
<meta name="description" content="{{ page.description | default: site.description | strip_html | truncate: 160 }}">
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
89
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
910
<link rel="icon" href="{{ '/assets/images/logos/gencore-logo-new.png' | relative_url }}" type="image/png">
1011
</head>

_posts/2024-06-12-nextflow-nf-core-on-nyu-hpc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: post
33
title: "Nextflow & nf-core on NYU HPC"
44
date: 2024-06-12
55
author: "Eric Borenstein"
6-
featured_image: /assets/images/blog/nf-core-rnaseq-featured-image-2.png
6+
featured_image: /assets/images/blog/m0b37vel.png
77
header_image: /assets/images/header-blog.jpg
88
comments: true
99
---

_sass/_content.scss

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515

1616
.page-content {
17-
padding: 0 20px 3em;
17+
padding: 0 20px 2em;
1818
}
1919

2020
// Team cards
@@ -70,43 +70,6 @@
7070
}
7171
}
7272

73-
// Icon button grid (homepage)
74-
.icon-buttons {
75-
display: flex;
76-
justify-content: center;
77-
gap: 2em;
78-
flex-wrap: wrap;
79-
margin: 2em 0;
80-
}
81-
82-
.icon-btn {
83-
text-align: center;
84-
width: 100px;
85-
86-
.icon-circle {
87-
width: 64px;
88-
height: 64px;
89-
border: 2px solid $text-light;
90-
border-radius: 50%;
91-
display: flex;
92-
align-items: center;
93-
justify-content: center;
94-
margin: 0 auto 0.5em;
95-
color: $text-light;
96-
font-size: 1.5rem;
97-
transition: background 0.2s;
98-
99-
&:hover {
100-
background: rgba(255, 255, 255, 0.2);
101-
}
102-
}
103-
104-
span {
105-
color: $text-light;
106-
font-size: 0.85rem;
107-
font-weight: 500;
108-
}
109-
}
11073

11174
// Resource card grid (bioinformatics)
11275
.resource-grid {
@@ -211,64 +174,6 @@
211174
}
212175
}
213176

214-
// Location section (homepage)
215-
.location-section {
216-
text-align: center;
217-
padding: 2em 0;
218-
219-
h2 {
220-
font-size: 2rem;
221-
}
222-
}
223-
224-
.location-grid {
225-
display: grid;
226-
grid-template-columns: 1fr 1fr;
227-
gap: 2em;
228-
margin: 1.5em 0;
229-
230-
@media (max-width: 700px) {
231-
grid-template-columns: 1fr;
232-
}
233-
}
234-
235-
.location-card {
236-
h3 {
237-
color: $purple;
238-
}
239-
240-
p {
241-
font-size: 0.9rem;
242-
color: $text-muted;
243-
}
244-
245-
iframe {
246-
width: 100%;
247-
height: 250px;
248-
border: 0;
249-
border-radius: $border-radius;
250-
}
251-
}
252-
253-
// Partner logos
254-
.partner-logos {
255-
display: flex;
256-
justify-content: center;
257-
align-items: center;
258-
gap: 2em;
259-
flex-wrap: wrap;
260-
margin: 2em 0;
261-
262-
img {
263-
height: 60px;
264-
opacity: 0.8;
265-
transition: opacity 0.2s;
266-
267-
&:hover {
268-
opacity: 1;
269-
}
270-
}
271-
}
272177

273178
// Carousel (sequencing platforms)
274179
.carousel {

0 commit comments

Comments
 (0)