A single-page, static marketing site for Moonwalk Manor (a fictional “hotel on the moon” concept). This repo can be opened directly in a browser, or served by any simple static file server.
- Live preview: https://moonwalkmanor.fcjamison.com/
- Local preview (VS Code task default): http://moonwalkmanor.localhost/
Change note: the VS Code Open in Browser task now targets
http://moonwalkmanor.localhost/.
- One-page layout: All content lives in
index.html. - Responsive images: A small script generates
srcset+sizesfor every<img>. - FlexSlider carousels:
- A “hero” promo slider at the top.
- A “Tales from the Moon” testimonial/story slider.
- Multi-level navigation: A dropdown toggle script enables the sub-menu on smaller screens.
- Icon system (Grunticon): SVG/PNG icon CSS is loaded dynamically with a fallback.
- Open
index.htmlin a modern browser. - If images/icons don’t load when using the
file://protocol, use Option B (a local static server) instead.
Use any static server you like. Examples:
- Python:
python -m http.server 8080 - Node:
npx serve .
Then open the server URL shown in your terminal.
If you want to keep using the moonwalkmanor.localhost hostname, you can typically access the same server via the same port, e.g. http://moonwalkmanor.localhost:8080/.
This workspace includes a VS Code task named “Open in Browser” (see .vscode/tasks.json).
- Default URL:
http://moonwalkmanor.localhost/ - If your local server uses a different host/port, update the task’s URL (for example:
http://localhost:8080/).
.
├─ index.html
├─ favicon.ico
├─ css/
│ └─ style-main.css
├─ JS/
│ ├─ script.js
│ ├─ flexslider.js
│ ├─ menu-toggle.js
│ └─ libs/
│ ├─ jquery-2.1.3.min.js
│ ├─ jquery.flexslider-min.js
│ └─ flexibility.js
├─ gfx/
│ ├─ grunticon.loader.js
│ ├─ icons.data.svg.css
│ ├─ icons.data.png.css
│ ├─ icons.fallback.css
│ ├─ preview.html
│ └─ png/
└─ images/
├─ experience/
├─ mainpromo/
└─ testimonials/
index.html- Loads the main stylesheet:
css/style-main.css - Loads scripts:
JS/script.js(deferred) – responsive image attributesJS/libs/flexibility.js– flexbox polyfill- Footer scripts:
JS/libs/jquery-2.1.3.min.jsJS/libs/jquery.flexslider-min.jsJS/menu-toggle.jsJS/flexslider.js
- Includes Grunticon loader inline, which loads:
gfx/icons.data.svg.css(preferred)gfx/icons.data.png.cssgfx/icons.fallback.css
- Loads the main stylesheet:
css/style-main.css- Includes a reset section at the top.
- Contains layout and component styles for headers, sliders, content blocks, and footer.
This script:
- Selects all
<img>elements on the page. - Assumes each image
srcends with-800.jpg. - Removes that suffix to get a base path.
- Generates a
srcsetwith 5 widths:-400.jpg,-800.jpg,-1200.jpg,-1600.jpg,-2000.jpg
- Sets the
sizesattribute based ondata-type:
| data-type | sizes value |
|---|---|
showcase |
100vw |
reason |
(max-width: 799px) 100vw, 372px |
feature |
(max-width: 799px) 100vw, 558px |
story |
(max-width: 799px) 100vw, 670px |
If you add new images, make sure you:
- Keep the naming convention (at minimum
*-800.jpg, ideally also the other generated sizes). - Add the correct
data-typeto match one of the entries above.
- Adds click behavior to
.dropdown-toggle. - Toggles CSS classes (
toggle-on,toggled-on) and updatesaria-expanded.
Initializes FlexSlider instances:
-
.front-slideranimation: "slide"controlNav: falsedirectionNav: false
-
.story-slideranimation: "slide"controlNav: truedirectionNav: true
This project vendors front-end libraries directly in JS/libs/:
- jQuery 2.1.3
- FlexSlider 2.6.1
- Flexibility (Flexbox polyfill)
- Grunticon loader + generated icon CSS in
gfx/
No package manager (npm/yarn) is required for this repo.
Most edits are straightforward:
- Text and sections: edit
index.html - Layout/visual styling: edit
css/style-main.css - Slider behavior: edit
JS/flexslider.js - Menu behavior: edit
JS/menu-toggle.js - Responsive image behavior: edit
JS/script.js
- Broken images: ensure each
srcends with-800.jpgand the corresponding image files exist. - Icons not showing: confirm the
gfx/icons.*.cssfiles are present and the Grunticon loader is running (or rely on the<noscript>fallback). - Dropdown not working: make sure jQuery is loading and
JS/menu-toggle.jsis included.
This repo contains vendored third-party libraries (jQuery, FlexSlider, Flexibility, Grunticon loader). Each library retains its own licensing and attribution as indicated in its header comments.