Skip to content

Commit 0cfab1d

Browse files
Merge pull request #4 from hamdymohamedak/main
Enhance logo size and improve documentation layout
2 parents 7bfca54 + a2832c2 commit 0cfab1d

18 files changed

Lines changed: 624 additions & 13 deletions

File tree

‎.vitepress/Logo.jpg‎

71.3 KB
Loading

‎.vitepress/components/ComparisonMatrix.vue‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,4 +394,31 @@ function cellText(row: Row, colId: keyof Row["cells"]) {
394394
color: var(--vp-c-text-3);
395395
max-width: 52rem;
396396
}
397+
398+
@media (max-width: 639px) {
399+
.cmp-matrix__scroll {
400+
border-radius: 12px;
401+
margin-inline: 0;
402+
}
403+
404+
.cmp-matrix__table {
405+
min-width: 480px;
406+
font-size: 0.8125rem;
407+
}
408+
409+
.cmp-matrix__corner,
410+
.cmp-matrix__col-head {
411+
padding: 0.65rem 0.55rem;
412+
}
413+
414+
.cmp-matrix__row-label {
415+
padding: 0.55rem 0.65rem;
416+
font-size: 0.78rem;
417+
}
418+
419+
.cmp-pill {
420+
font-size: 0.72rem;
421+
padding: 0.22rem 0.45rem;
422+
}
423+
}
397424
</style>

‎.vitepress/components/HomeFetchAnimation.vue‎

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ onUnmounted(() => {
151151
padding: 8px 0 24px;
152152
}
153153
154+
@media (max-width: 959px) {
155+
.dock {
156+
padding: 12px clamp(8px, 3.5vw, 18px) 22px;
157+
max-width: min(100%, 400px);
158+
}
159+
}
160+
154161
@media (min-width: 960px) {
155162
.dock {
156163
padding: 0;
@@ -304,7 +311,7 @@ onUnmounted(() => {
304311
305312
.spinner {
306313
position: absolute;
307-
right: 8px;
314+
inset-inline-end: 8px;
308315
top: 4px;
309316
width: 22px;
310317
height: 22px;
@@ -450,6 +457,74 @@ onUnmounted(() => {
450457
}
451458
}
452459
460+
@media (max-width: 639px) {
461+
.dock {
462+
padding-top: 6px;
463+
padding-bottom: 16px;
464+
padding-inline: clamp(6px, 3.5vw, 16px);
465+
max-width: 100%;
466+
}
467+
468+
.card {
469+
border-radius: 14px;
470+
}
471+
472+
.card-top {
473+
flex-direction: column;
474+
align-items: stretch;
475+
gap: 10px;
476+
padding: 12px 14px 10px;
477+
}
478+
479+
.method {
480+
align-self: flex-start;
481+
}
482+
483+
.url-wrap {
484+
flex: 1 1 auto;
485+
min-width: 0;
486+
}
487+
488+
.url {
489+
font-size: 10px;
490+
}
491+
492+
.body {
493+
min-height: 140px;
494+
padding: 12px 14px 10px;
495+
}
496+
497+
.json {
498+
font-size: 10px;
499+
line-height: 1.5;
500+
}
501+
502+
.status-line {
503+
font-size: 11px;
504+
padding-inline-end: 28px;
505+
}
506+
507+
.card-foot {
508+
flex-wrap: wrap;
509+
padding: 10px 14px 12px;
510+
}
511+
}
512+
513+
@media (max-width: 400px) {
514+
.glow {
515+
opacity: 0.7;
516+
filter: blur(28px);
517+
}
518+
519+
.body {
520+
min-height: 128px;
521+
}
522+
523+
.card-top {
524+
padding-inline: 12px;
525+
}
526+
}
527+
453528
@media (prefers-reduced-motion: reduce) {
454529
.glow,
455530
.method.pulse,

‎.vitepress/config.mts‎

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ const localeConfigs = Object.fromEntries(
231231
lang: string;
232232
link: string;
233233
dir?: "ltr" | "rtl";
234+
titleTemplate?: string;
234235
themeConfig: {
235236
langMenuLabel: string;
236237
nav: { text: string; link: string }[];
@@ -241,6 +242,7 @@ const localeConfigs = Object.fromEntries(
241242
label,
242243
lang: langAttr,
243244
link: `/${code}/`,
245+
titleTemplate: ":title · openFetch",
244246
themeConfig: {
245247
langMenuLabel:
246248
code === "ar"
@@ -257,7 +259,6 @@ const localeConfigs = Object.fromEntries(
257259
text: LABELS[code].gettingStarted,
258260
link: `/${code}/getting-started`,
259261
},
260-
{ text: LANG_HOME_LABEL[code], link: "/languages/" },
261262
],
262263
sidebar: sidebarFor(code),
263264
outline: { level: [2, 3] },
@@ -277,15 +278,37 @@ const localeConfigs = Object.fromEntries(
277278
}
278279
>;
279280

281+
/** Canonical production URL (no trailing slash); pair with `base` for absolute links in meta tags. */
282+
const SITE_ORIGIN = "https://openfetch-js.github.io/openfetch-docs";
283+
280284
export default defineConfig({
281285
// GitHub Pages project site: https://openfetch-js.github.io/openfetch-docs/
282286
base: "/openfetch-docs/",
283287
title: "openFetch",
288+
titleTemplate: ":title · openFetch",
284289
description:
285-
"Documentation for @hamdymohamedak/openfetch — fetch-based HTTP client with interceptors, middleware, retry, and cache.",
290+
"Fetch-native HTTP client for Node 18+, browsers, and edge: interceptors, composable middleware, retry, memory cache, typed errors — no XHR dependency.",
286291
srcExclude: ["README.md", "skills.md"],
287292
lastUpdated: true,
293+
head: [
294+
["meta", { name: "theme-color", content: "#2563eb" }],
295+
["meta", { name: "application-name", content: "openFetch" }],
296+
["meta", { property: "og:site_name", content: "openFetch" }],
297+
["meta", { name: "twitter:card", content: "summary_large_image" }],
298+
[
299+
"meta",
300+
{
301+
property: "og:image",
302+
content: `${SITE_ORIGIN}/openfetch-logo.jpg`,
303+
},
304+
],
305+
["meta", { property: "og:image:alt", content: "openFetch" }],
306+
],
288307
themeConfig: {
308+
logo: {
309+
src: "/openfetch-logo.jpg",
310+
alt: "openFetch",
311+
},
289312
search: { provider: "local" },
290313
socialLinks: [
291314
{
@@ -310,10 +333,7 @@ export default defineConfig({
310333
link: "/",
311334
themeConfig: {
312335
langMenuLabel: "Language",
313-
nav: [
314-
{ text: "Guide", link: "/getting-started" },
315-
{ text: "Languages", link: "/languages/" },
316-
],
336+
nav: [{ text: "Guide", link: "/getting-started" }],
317337
sidebar: sidebarRoot(),
318338
outline: { level: [2, 3] },
319339
},

0 commit comments

Comments
 (0)