Skip to content

Commit db48275

Browse files
committed
fix(site): mobile landing preview scale and tentacle layout
1 parent 0738a40 commit db48275

5 files changed

Lines changed: 124 additions & 80 deletions

File tree

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Normalize line endings: LF in the repository (avoids false CRLF diffs on Windows).
2+
* text=auto eol=lf
3+
4+
# Windows launcher scripts keep CRLF when checked out on Windows.
5+
*.bat text eol=crlf
6+
*.cmd text eol=crlf
7+
8+
# Binary assets — do not modify line endings.
9+
*.png binary
10+
*.jpg binary
11+
*.jpeg binary
12+
*.ico binary
13+
*.gif binary
14+
*.webp binary
15+
*.zip binary
16+
*.exe binary

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
### Changed
1818

19-
- Landing page (`site/index.html`): external CSS/JS, SEO (dashboard screenshot, manifest, sitemap.xml), security panel, aligned copy and Octicons; tentacle preview unchanged.
19+
- Landing page (`site/index.html`): external CSS/JS, SEO (dashboard screenshot, manifest, sitemap.xml), security panel, aligned copy and Octicons.
20+
- Landing preview on mobile (`site/index.html`, `site/css/index.css`): proportional dashboard scale (full screenshot visible), no horizontal scroll; fine-tuned tentacle positions/sizes on small screens only (desktop layout unchanged).
2021
- Download page (`site/download.html`): static manifest, shared nav styles via `common.css`, centered OS picker, clearer prerequisites, tighter install steps.
2122
- README header uses `site/gitdock-logo-removebg-preview.png` (transparent logo for GitHub light and dark themes).
2223
- `server.js` imports validation helpers from `lib/` (behavior preserved; easier to test).
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Summary
2+
3+
Fixes the landing page product preview on mobile: the full dashboard screenshot stays visible at proportional scale, horizontal scroll is removed, and tentacle placement is tuned for small screens without changing desktop layout or image assets.
4+
5+
## Type of change
6+
7+
- [x] Documentation / site only
8+
9+
## What changed
10+
11+
- **`site/index.html`:** `.preview-stage` wrapper; mobile `@media` uses single `zoom` scale (with `transform` fallback); per-tentacle tweaks only where needed (left pair, front pair, right tentacle).
12+
- **`site/css/index.css`:** `.preview-stage` desktop wrapper; removed dead per-tentacle rules that never applied (inline CSS wins); mobile `overflow-x: clip` on preview/html/body.
13+
- **`.gitattributes`:** `text=auto eol=lf` so Windows/Cursor do not flip line endings on every save.
14+
15+
## Release
16+
17+
**No GitHub Release or version bump.** Site-only change (redeploy `site/` when you publish the site).
18+
19+
## Checklist
20+
21+
- [x] Site-only — `npm test` not required for this PR
22+
- [x] Smoke-tested preview at `http://localhost:3848/` (desktop + mobile ~390px)
23+
- [x] No secrets in commits
24+
- [x] Updated `CHANGELOG.md` under **Unreleased**
25+
26+
## Test plan
27+
28+
- [x] Desktop (~1280px): preview matches pre-change layout; tentacles and dashboard unchanged
29+
- [x] Mobile (390px): full dashboard visible, no horizontal scroll
30+
- [x] Tentacles: left pair separated; front pair sized/spaced; right tentacle lower, behind dashboard
31+
- [ ] After deploy: spot-check https://www.gitdock.dev/ on phone or DevTools

site/css/index.css

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,21 @@
126126

127127
/* Dashboard Preview (window only — tentacles in inline CSS) */
128128
.preview {
129+
width: 100%;
129130
padding: 0 24px 80px;
130131
margin-top: -40px;
131132
position: relative;
132133
z-index: 1;
133134
}
134135

136+
/* Scales on mobile via inline CSS; desktop = pass-through wrapper */
137+
.preview-stage {
138+
width: 100%;
139+
max-width: 1000px;
140+
margin: 0 auto;
141+
position: relative;
142+
}
143+
135144
.preview-window {
136145
max-width: 1000px;
137146
margin: 0 auto;
@@ -796,78 +805,18 @@
796805
.preview {
797806
padding: 0 16px 60px;
798807
margin-top: -20px;
808+
display: flex;
809+
justify-content: center;
810+
overflow-x: clip;
799811
}
800812

801-
.tentacle-scene {
802-
padding: 0 24px;
803-
}
804-
805-
.preview-window {
806-
max-width: 96%;
807-
}
808-
809-
.t-left {
810-
width: 180px;
811-
left: -60px;
812-
}
813-
814-
.t-left2 {
815-
width: 190px;
816-
left: -60px;
817-
}
818-
819-
.t-right {
820-
width: 140px;
821-
right: -15px;
822-
}
823-
824-
.t-bl {
825-
width: 150px;
826-
bottom: -40px;
827-
}
828-
829-
.t-bottom {
830-
width: 160px;
831-
bottom: -25px;
832-
}
833-
834-
.t-top {
835-
width: 90px;
836-
top: -40px;
813+
html,
814+
body {
815+
overflow-x: clip;
837816
}
838817
}
839818

840819
@media (max-width: 480px) {
841-
.t-left {
842-
width: 120px;
843-
left: -45px;
844-
}
845-
846-
.t-left2 {
847-
width: 130px;
848-
left: -45px;
849-
}
850-
851-
.t-right {
852-
width: 100px;
853-
right: -10px;
854-
}
855-
856-
.t-bl {
857-
width: 110px;
858-
bottom: -30px;
859-
}
860-
861-
.t-bottom {
862-
width: 120px;
863-
bottom: -20px;
864-
}
865-
866-
.t-top {
867-
width: 70px;
868-
top: -35px;
869-
}
870-
871820
.hero h1 {
872821
font-size: 24px;
873822
}

site/index.html

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,51 @@
189189
animation: none;
190190
}
191191
}
192+
193+
/* Mobile: one proportional scale — full dashboard always fits */
194+
@media (max-width: 768px) {
195+
.preview-stage {
196+
--tentacle-scale: min(1, calc((100vw - 48px) / 1000));
197+
width: 1000px;
198+
max-width: 1000px;
199+
margin-left: auto;
200+
margin-right: auto;
201+
zoom: var(--tentacle-scale);
202+
}
203+
@supports not (zoom: 1) {
204+
.preview-stage {
205+
transform: scale(var(--tentacle-scale));
206+
transform-origin: top center;
207+
margin-bottom: calc((1 - var(--tentacle-scale)) * -560px);
208+
}
209+
}
210+
.t-left {
211+
width: 270px;
212+
top: 3%;
213+
}
214+
.t-left2 {
215+
width: 225px;
216+
bottom: -6%;
217+
}
218+
.t-bl {
219+
width: 175px;
220+
bottom: -58px;
221+
left: 0%;
222+
}
223+
.t-bottom {
224+
width: 190px;
225+
bottom: -34px;
226+
right: 20%;
227+
}
228+
.t-right {
229+
z-index: 0;
230+
top: auto;
231+
right: -24px;
232+
bottom: 4%;
233+
width: 200px;
234+
rotate: -22deg;
235+
}
236+
}
192237
</style>
193238
</head>
194239
<body>
@@ -238,21 +283,23 @@ <h1>Your Git projects.<br><span class="grad">One Space.</span></h1>
238283
<section aria-label="Product screenshot">
239284
<!-- Dashboard Preview -->
240285
<div class="preview fade-in">
241-
<div class="tentacle-scene">
242-
<img class="tentacle t-left" src="./tentacle-left.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
243-
<img class="tentacle t-left2" src="./tentacle-left2.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
244-
<img class="tentacle t-right" src="./tentacle-right.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
245-
<img class="tentacle t-top" src="./tentacle-top.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
246-
<div class="preview-window">
247-
<div class="preview-bar">
248-
<span class="preview-dot" style="background:var(--red)"></span>
249-
<span class="preview-dot" style="background:var(--yellow)"></span>
250-
<span class="preview-dot" style="background:var(--green)"></span>
286+
<div class="preview-stage">
287+
<div class="tentacle-scene">
288+
<img class="tentacle t-left" src="./tentacle-left.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
289+
<img class="tentacle t-left2" src="./tentacle-left2.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
290+
<img class="tentacle t-right" src="./tentacle-right.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
291+
<img class="tentacle t-top" src="./tentacle-top.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
292+
<div class="preview-window">
293+
<div class="preview-bar">
294+
<span class="preview-dot" style="background:var(--red)"></span>
295+
<span class="preview-dot" style="background:var(--yellow)"></span>
296+
<span class="preview-dot" style="background:var(--green)"></span>
297+
</div>
298+
<img src="./dashboard_v2.jpg" alt="GitDock Dashboard" class="preview-img">
251299
</div>
252-
<img src="./dashboard_v2.jpg" alt="GitDock Dashboard" class="preview-img">
300+
<img class="tentacle t-bl" src="./tentacle-bottomleft.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
301+
<img class="tentacle t-bottom" src="./tentacle-bottom.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
253302
</div>
254-
<img class="tentacle t-bl" src="./tentacle-bottomleft.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
255-
<img class="tentacle t-bottom" src="./tentacle-bottom.png" alt="" aria-hidden="true" draggable="false" loading="lazy" onerror="this.remove()">
256303
</div>
257304
</div>
258305
</section>

0 commit comments

Comments
 (0)