Feature/pedro the pug - Challenges 1 and 2 - #38
Open
PedroPLSR wants to merge 3 commits into
Open
Conversation
- Introduced a new header partial for the front page with an announcement bar and logo. - Updated the main header to include navigation links and a search bar. - Created a new front-page CSS file for styling specific to the front page layout. - Added a new content template for the front page featuring category tabs, a hero banner, and a card grid. - Included a cute pug image for branding purposes.
…F usage Adjust mobile responsiveness on the Airbnb front page (stacked search bar, burger menu, and responsive spacing) and restructure asset loading so the page renders correctly without relying on the broken MeanPug build pipeline. - Enqueue front-page CSS directly from source instead of compiled main.css - Replace Tailwind/@apply with plain CSS and BEM classes in templates - Guard compiled asset enqueues with file_exists to avoid errors on fresh clones - Add function_exists('get_field') checks in schema hooks so the site does not fatal when ACF is inactive (front page does not use ACF)
Config-driven registration, local CPT for offices, docs + seed for evaluators.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Challenge 1 + 2
Both MeanPug challenges on this branch. Each has its own Docker setup (
challenge-1/,challenge-2/).Challenge 1 — Airbnb-style front page
Visual replica of the Airbnb homepage above the fold
Main files
challenge-1/theme/template-parts/headers/header-front-page.php— header + pug logochallenge-1/theme/template-parts/content-front-page.php— page contentchallenge-1/theme/assets/css/templates/front-page.css— plain CSS, BEMchallenge-1/theme/assets/images/cute-pug.png— MeanPug pug replaces Airbnb logochallenge-1/theme/functions.php— enqueues front-page CSS without relying on the webpack pipelineNotes
file_exists/function_exists('get_field')guards so a fresh clone doesn't fatal without ACFTo view:
cd challenge-1 && docker compose up -d→ homepageChallenge 2 — Backend / content model (Law Firm of Pug and Puggle)
Filled the MeanPug skeleton with a PI law firm content model. CPTs, taxonomies, ACF, schema.
Full setup:
challenge-2/docs/SOLUTION.mdCPTs (4) —
theme/inc/cpt/post-types-config.php+register.phppractice-area(hierarchical)team→ public URLs under/attorney/local—content_typesplits Area Served vs Office LocationtestimonialsTaxonomies —
theme/inc/tax/register.phppractice-category,attorney-department,testimonial-sourcearea-servedonlocal+practice-areaevent-typeon nativepostDecisions
officeCPT — offices live inlocalpost+event-type+ ACF fieldstheme/acf-json/, sync viainc/acf.phpSchema —
inc/hooks.php+inc/utils/seo/schema.phpLocalBusiness, Product/Review, FAQPage depending on content type.
Also included
scripts/seed-demo-content.phpdocs/content-model-rationale.md,docs/plugin-decisions.mdPlugins: ACF, Yoast SEO, Classic Editor