Skip to content

Commit 39371cb

Browse files
committed
copy landing header to docs, blueprint sidebar hover and spacing, docs crosshairs, partners in footer nav
1 parent 44f3da0 commit 39371cb

9 files changed

Lines changed: 126 additions & 107 deletions

File tree

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/www/index.html

Lines changed: 23 additions & 11 deletions
Large diffs are not rendered by default.

resources/css/app.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,9 @@ button {
570570

571571
/* Section labels — mono, uppercase, // prefixed */
572572
.docs-nav h2 {
573-
@apply mb-3 mt-8 flex items-center font-mono text-2xs font-bold uppercase tracking-widest text-zinc-500;
573+
@apply mb-3 mt-9 flex items-center font-mono text-2xs font-bold uppercase tracking-widest text-zinc-500;
574574
}
575-
.docs-nav ul li:first-child h2,
576-
.docs-nav h2:first-child {
575+
.docs-nav > ul > li:first-child > h2 {
577576
@apply mt-0;
578577
}
579578
.docs-nav h2::before {
@@ -582,15 +581,15 @@ button {
582581
}
583582

584583
.docs-nav ul li {
585-
@apply mb-0.5;
584+
@apply mb-1;
586585
}
587586
.docs-nav ul li a {
588-
@apply flex items-center rounded-md border-l border-transparent py-1.5 pl-3 font-sans text-sm font-normal text-zinc-400 no-underline transition-colors;
587+
@apply flex items-center py-1 font-sans text-sm font-normal text-zinc-400 no-underline underline-offset-4 transition-colors;
589588
}
590589
.docs-nav ul li a:focus,
591590
.docs-nav ul li a:hover {
592-
@apply border-zinc-700 text-zinc-200;
591+
@apply text-white underline;
593592
}
594593
.docs-nav ul li.active a {
595-
@apply border-rose-500 font-semibold text-zinc-100;
594+
@apply font-semibold text-white underline;
596595
}

resources/views/_partials/nav.blade.php

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<header class="sticky top-0 z-50 border-b border-zinc-700 bg-zinc-900/85 backdrop-blur-md">
2-
<nav aria-label="Main" class="h-15.5 mx-auto flex max-w-7xl items-center gap-3 px-5 sm:gap-6 sm:px-8">
3-
<div class="flex shrink-0 items-center gap-2.5" x-data="pestLogoMenu">
4-
<a aria-label="Home" class="flex items-center gap-2.5" href="/" @contextmenu.prevent="openMenu($event)">
5-
<span class="sr-only">Pest | The elegant PHP testing framework</span>
2+
<nav aria-label="Main" class="h-15.5 container mx-auto flex items-center gap-7 px-5 sm:px-10">
3+
<div class="flex items-center gap-2" x-data="pestLogoMenu">
4+
<a aria-label="Pest" class="flex items-center gap-2" href="/" @contextmenu.prevent="openMenu($event)">
65
<svg aria-label="PEST" class="block h-7 w-auto fill-zinc-200" role="img" viewBox="0 0 381 100" xmlns="http://www.w3.org/2000/svg">
76
<path clip-rule="evenodd" d="M16.607 27.51 22.994 0h85.181L93.484 63.272H36.697l-8.303 35.763H0l14.69-63.272h56.788l1.916-8.253zM295.574 0h85.181l-6.387 27.51h-39.752L318.01 99.035h-28.394l16.607-71.525h-73.824l-1.917 8.253h56.788l-6.387 27.51-1.916 8.252-6.387 27.51h-85.181l6.387-27.51h56.787l1.916-8.253h-56.787l6.387-27.51 1.916-8.252L210.392 0zm-93.7 0h-85.181l-6.387 27.51h85.181zm-25.34 35.763h-68.145l-6.387 27.51h68.145zm8.734 35.762h-85.182l-6.387 27.51h85.181z" fill-rule="evenodd" id="pest-wordmark" />
87
</svg>
9-
<span class="text-2xs hidden rounded-full border border-zinc-700 px-2 py-0.5 font-mono tracking-wide text-zinc-400 sm:inline-block">v{{ config('site.defaultVersion') }}</span>
108
</a>
119

1210
{{-- right-click brand menu --}}
@@ -31,24 +29,29 @@ class="fixed z-[100] w-56 overflow-hidden rounded-xl border border-zinc-700 bg-z
3129
</div>
3230
</template>
3331
</div>
34-
3532
<div class="ml-2 hidden gap-6 lg:flex">
36-
<a class="text-sm font-medium text-zinc-200 underline-offset-4 hover:underline" href="/docs">Documentation</a>
37-
<a class="text-sm font-medium text-zinc-400 underline-offset-4 hover:underline" href="https://youtube.com/@nunomaduro" target="_blank" rel="noopener">YouTube</a>
38-
<a class="text-sm font-medium text-zinc-400 underline-offset-4 hover:underline" href="https://github.com/sponsors/nunomaduro" target="_blank" rel="noopener">Sponsor</a>
33+
<a class="text-sm font-medium text-white underline-offset-4 hover:underline" href="/docs">Documentation</a>
34+
<a class="text-sm font-medium text-zinc-400 underline-offset-4 hover:underline" href="https://youtube.com/@nunomaduro">YouTube</a>
35+
<a class="text-sm font-medium text-zinc-400 underline-offset-4 hover:underline" href="https://github.com/sponsors/nunomaduro">Sponsor</a>
3936
</div>
40-
41-
<div class="ml-auto flex min-w-0 flex-1 items-center justify-end gap-3 sm:flex-none sm:gap-4">
42-
<div id="docsearch" class="min-w-0 max-w-xs flex-1 sm:flex-none"></div>
43-
44-
<a class="hidden items-center gap-2 text-sm font-semibold text-zinc-200 transition-colors hover:text-rose-400 sm:inline-flex" href="{{ config('site.github') }}" target="_blank" rel="noopener">
37+
<div class="ml-auto flex items-center gap-4">
38+
<a class="flex items-center gap-2 text-sm font-semibold text-zinc-200 transition-colors hover:text-rose-400" href="https://github.com/pestphp/pest" target="_blank">
4539
<svg class="size-4" fill="none" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
4640
<path clip-rule="evenodd" d="M16 0C7.16 0 0 7.16 0 16c0 7.08 4.58 13.06 10.94 15.18.8.14 1.1-.34 1.1-.76 0-.38-.02-1.64-.02-2.98-4.02.74-5.06-.98-5.38-1.88-.18-.46-.96-1.88-1.64-2.26-.56-.3-1.36-1.04-.02-1.06 1.26-.02 2.16 1.16 2.46 1.64 1.44 2.42 3.74 1.74 4.66 1.32.14-1.04.56-1.74 1.02-2.14-3.56-.4-7.28-1.78-7.28-7.9 0-1.74.62-3.18 1.64-4.3-.16-.4-.72-2.04.16-4.24 0 0 1.34-.42 4.4 1.64 1.28-.36 2.64-.54 4-.54 1.36 0 2.72.18 4 .54 3.06-2.08 4.4-1.64 4.4-1.64.88 2.2.32 3.84.16 4.24 1.02 1.12 1.64 2.54 1.64 4.3 0 6.14-3.74 7.5-7.3 7.9.58.5 1.08 1.46 1.08 2.96 0 2.14-.02 3.86-.02 4.4 0 .42.3.92 1.1.76A16.026 16.026 0 0 0 32 16c0-8.84-7.16-16-16-16Z" fill-rule="evenodd" fill="currentColor"></path>
4741
</svg>
48-
10k+
42+
12k+
4943
</a>
50-
51-
<button @click.prevent="toggle()" aria-label="Toggle Documentation Navigation" class="active:scale-96 flex size-8 shrink-0 items-center justify-center text-zinc-400 transition hover:text-zinc-200 lg:hidden" type="button">
44+
{{-- same pill as the landing header; DocSearch renders its real button hidden below and this one forwards the click --}}
45+
<div id="docsearch" class="hidden"></div>
46+
<button type="button" @click="document.querySelector('#docsearch button')?.click()" class="hidden w-56 cursor-pointer items-center gap-1 rounded-lg border border-zinc-700 bg-zinc-800 px-2 py-1.5 text-sm text-zinc-400 transition-colors hover:border-zinc-200/20 hover:text-zinc-200 sm:flex">
47+
<svg class="size-5" fill="none" stroke-linecap="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24">
48+
<circle cx="11" cy="11" r="7" />
49+
<path d="m20 20-3.5-3.5" />
50+
</svg>
51+
Search docs
52+
<kbd class="text-2xs ml-auto rounded-sm border border-zinc-700 bg-zinc-900 px-1 py-px font-sans">⌘K</kbd>
53+
</button>
54+
<button @click.prevent="toggle()" aria-label="Toggle Documentation Navigation" class="active:scale-96 flex size-8 items-center justify-center text-zinc-400 transition hover:text-zinc-200 lg:hidden" type="button">
5255
<svg class="size-5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6" stroke="currentColor" viewBox="0 0 24 24">
5356
<path d="M4 7h16M4 12h16M4 17h16" />
5457
</svg>

resources/views/components/docs/sidebar.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class="fixed inset-0 z-40 bg-zinc-900/80 backdrop-blur-sm lg:hidden"
2525
x-transition:leave="transition ease-in-out duration-200 transform"
2626
x-transition:leave-start="translate-x-0"
2727
x-transition:leave-end="translate-x-full"
28-
class="fixed inset-y-0 right-0 z-50 flex w-full max-w-xs flex-col overflow-y-auto border-l border-zinc-700 bg-zinc-900 px-6 py-5 lg:sticky lg:inset-auto lg:top-15.5 lg:z-0 lg:h-[calc(100vh-3.875rem)] lg:max-w-none lg:translate-x-0 lg:border-l-0 lg:border-r lg:border-zinc-700 lg:bg-transparent lg:px-5 lg:py-8"
28+
class="fixed inset-y-0 right-0 z-50 flex w-full max-w-xs flex-col overflow-y-auto border-l border-zinc-700 bg-zinc-900 px-6 py-5 lg:sticky lg:inset-auto lg:top-15.5 lg:z-0 lg:h-[calc(100vh-3.875rem)] lg:max-w-none lg:translate-x-0 lg:border-l-0 lg:bg-transparent lg:px-5 lg:py-8"
2929
>
3030
{{-- mobile drawer header --}}
3131
<div class="mb-6 flex items-center justify-between lg:hidden">

resources/views/docs.blade.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
<x-app-layout layout="app" :title="$matter['title']" :description="$matter['description']">
2-
<main role="main" class="w-full flex-auto">
1+
<x-app-layout :description="$matter['description']" :title="$matter['title']" layout="app">
2+
<main class="w-full flex-auto" role="main">
33
<div class="relative mx-auto min-h-[70vh] max-w-7xl border-x border-zinc-700">
4-
{{-- crosshair registration marks --}}
5-
<span class="crosshair -left-1 top-px"></span>
6-
<span class="crosshair -right-1 top-px"></span>
4+
{{-- crosshair registration marks: fixed pair riding under the sticky header, as on the landing --}}
5+
<div class="top-14.25 pointer-events-none fixed inset-x-0 z-10">
6+
<div class="relative mx-auto max-w-7xl">
7+
<span class="crosshair -left-1 top-px"></span>
8+
<span class="crosshair -right-1 top-px"></span>
9+
</div>
10+
</div>
11+
<span class="crosshair -left-1.25 -bottom-1.25"></span>
12+
<span class="crosshair -right-1.25 -bottom-1.25"></span>
13+
{{-- inner rails (content column border-x) meeting the bottom border --}}
14+
<span class="crosshair -bottom-1.25 left-59 hidden lg:block"></span>
15+
<span class="crosshair -bottom-1.25 right-59 hidden lg:block"></span>
716

817
<div class="lg:grid lg:grid-cols-[15rem_minmax(0,1fr)_15rem]">
918
{{-- left rail: documentation navigation --}}
@@ -16,7 +25,7 @@
1625
<span>docs</span>
1726
<span class="text-zinc-600">/</span>
1827
<span class="text-zinc-400">{{ $page }}</span>
19-
<a class="ml-auto hidden text-zinc-400 underline-offset-4 hover:text-rose-400 hover:underline lg:inline" href="https://github.com/pestphp/docs/edit/5.x/{{ $page }}.md" target="_blank" rel="noopener">edit this page →</a>
28+
<a class="ml-auto hidden text-zinc-400 underline-offset-4 hover:text-rose-400 hover:underline lg:inline" href="https://github.com/pestphp/docs/edit/5.x/{{ $page }}.md" rel="noopener" target="_blank">edit this page →</a>
2029
</div>
2130

2231
<article class="docs-main prose prose-invert max-w-none">

resources/views/ide.blade.php

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
<x-app-layout layout="app" title='IDE plugins' description="Pest has IDE plugins for PhpStorm and VSCode.">
2-
<main role="main" class="w-full flex-auto">
1+
<x-app-layout description="Pest has IDE plugins for PhpStorm and VSCode." layout="app" title='IDE plugins'>
2+
<main class="w-full flex-auto" role="main">
33
<div class="relative mx-auto min-h-[70vh] max-w-7xl border-x border-zinc-700">
4-
<span class="crosshair -left-1 top-px"></span>
5-
<span class="crosshair -right-1 top-px"></span>
4+
<div class="top-14.25 pointer-events-none fixed inset-x-0 z-10">
5+
<div class="relative mx-auto max-w-7xl">
6+
<span class="crosshair -left-1 top-px"></span>
7+
<span class="crosshair -right-1 top-px"></span>
8+
</div>
9+
</div>
10+
<span class="crosshair -left-1.25 -bottom-1.25"></span>
11+
<span class="crosshair -right-1.25 -bottom-1.25"></span>
12+
<span class="crosshair -bottom-1.25 left-59 hidden lg:block"></span>
13+
<span class="crosshair -bottom-1.25 right-59 hidden lg:block"></span>
614

715
<div class="lg:grid lg:grid-cols-[15rem_minmax(0,1fr)_15rem]">
816
<x-docs.sidebar>{!! $index !!}</x-docs.sidebar>
@@ -13,68 +21,44 @@
1321
<span>docs</span>
1422
<span class="text-zinc-600">/</span>
1523
<span class="text-zinc-400">editor-setup</span>
16-
<a class="ml-auto hidden text-zinc-400 underline-offset-4 hover:text-rose-400 hover:underline lg:inline" href="https://github.com/pestphp/pestphp.com/edit/next/resources/views/ide.blade.php" target="_blank" rel="noopener">edit this page →</a>
24+
<a class="ml-auto hidden text-zinc-400 underline-offset-4 hover:text-rose-400 hover:underline lg:inline" href="https://github.com/pestphp/pestphp.com/edit/next/resources/views/ide.blade.php" rel="noopener" target="_blank">edit this page →</a>
1725
</div>
1826

1927
<article class="docs-main prose prose-invert max-w-none">
20-
<h1>Editor Setup</h1>
28+
<h1>Editor Setup</h1>
2129

22-
<p>
23-
An editor plugin can enhance your experience when working with Pest. While most editors offer built-in support for Pest, a dedicated plugin adds helpful functionality on top of your editor, streamlining your workflow.
24-
</p>
30+
<p>
31+
An editor plugin can enhance your experience when working with Pest. While most editors offer built-in support for Pest, a dedicated plugin adds helpful functionality on top of your editor, streamlining your workflow.
32+
</p>
2533

26-
<p>
27-
Currently, the PhpStorm team at JetBrains maintains the Pest plugin for PhpStorm, which has been installed by default since PhpStorm 2023.3.
28-
</p>
34+
<p>
35+
Currently, the PhpStorm team at JetBrains maintains the Pest plugin for PhpStorm, which has been installed by default since PhpStorm 2023.3.
36+
</p>
2937

30-
<div class="mt-6 mb-12">
31-
<x-jetbrains-ide-plugin
32-
title="PhpStorm"
33-
plugin-id="14636"
34-
logo="https://upload.wikimedia.org/wikipedia/commons/c/c9/PhpStorm_Icon.svg"
35-
url="https://plugins.jetbrains.com/plugin/14636-pest"
36-
github="https://github.com/pestphp/pest-intellij">
37-
</x-jetbrains-ide-plugin>
38-
</div>
38+
<div class="mb-12 mt-6">
39+
<x-jetbrains-ide-plugin github="https://github.com/pestphp/pest-intellij" logo="https://upload.wikimedia.org/wikipedia/commons/c/c9/PhpStorm_Icon.svg" plugin-id="14636" title="PhpStorm" url="https://plugins.jetbrains.com/plugin/14636-pest">
40+
</x-jetbrains-ide-plugin>
41+
</div>
3942

40-
<p>
41-
If you do not use PhpStorm, you may wish to try one of the community-maintained plugins below. However, these alternatives may not offer the same experience as the official PhpStorm plugin.
42-
</p>
43+
<p>
44+
If you do not use PhpStorm, you may wish to try one of the community-maintained plugins below. However, these alternatives may not offer the same experience as the official PhpStorm plugin.
45+
</p>
4346

44-
<div class="space-y-6 mt-6">
45-
<x-vs-code-ide-plugin
46-
title="VSCode PHPUnit TestExplorer"
47-
extension="recca0120.vscode-phpunit"
48-
logo="https://raw.githubusercontent.com/recca0120/vscode-phpunit/main/img/icon.png"
49-
url="https://marketplace.visualstudio.com/items?itemName=recca0120.vscode-phpunit"
50-
github="https://github.com/recca0120/vscode-phpunit">
51-
</x-vs-code-ide-plugin>
52-
53-
<x-vs-code-ide-plugin
54-
title="VSCode"
55-
extension="m1guelpf.better-pest"
56-
logo="https://upload.wikimedia.org/wikipedia/commons/9/9a/Visual_Studio_Code_1.35_icon.svg"
57-
url="https://marketplace.visualstudio.com/items?itemName=m1guelpf.better-pest"
58-
github="https://github.com/m1guelpf/better-pest">
59-
</x-vs-code-ide-plugin>
47+
<div class="mt-6 space-y-6">
48+
<x-vs-code-ide-plugin extension="recca0120.vscode-phpunit" github="https://github.com/recca0120/vscode-phpunit" logo="https://raw.githubusercontent.com/recca0120/vscode-phpunit/main/img/icon.png" title="VSCode PHPUnit TestExplorer" url="https://marketplace.visualstudio.com/items?itemName=recca0120.vscode-phpunit">
49+
</x-vs-code-ide-plugin>
6050

61-
<x-vs-code-ide-plugin
62-
title="VSCode Snippets"
63-
extension="dansysanalyst.pest-snippets"
64-
logo="https://raw.githubusercontent.com/dansysanalyst/pest-snippets/main/images/icon.png"
65-
url="https://marketplace.visualstudio.com/items?itemName=dansysanalyst.pest-snippets"
66-
github="https://github.com/dansysanalyst/pest-snippets">
67-
</x-vs-code-ide-plugin>
51+
<x-vs-code-ide-plugin extension="m1guelpf.better-pest" github="https://github.com/m1guelpf/better-pest" logo="https://upload.wikimedia.org/wikipedia/commons/9/9a/Visual_Studio_Code_1.35_icon.svg" title="VSCode" url="https://marketplace.visualstudio.com/items?itemName=m1guelpf.better-pest">
52+
</x-vs-code-ide-plugin>
6853

69-
<x-neovim-ide-plugin
70-
title="Neovim (via Neotest)"
71-
logo="https://upload.wikimedia.org/wikipedia/commons/3/3a/Neovim-mark.svg"
72-
url="https://github.com/V13Axel/neotest-pest"
73-
github="https://github.com/V13Axel/neotest-pest">
74-
</x-ide-plugin>
75-
</div>
54+
<x-vs-code-ide-plugin extension="dansysanalyst.pest-snippets" github="https://github.com/dansysanalyst/pest-snippets" logo="https://raw.githubusercontent.com/dansysanalyst/pest-snippets/main/images/icon.png" title="VSCode Snippets" url="https://marketplace.visualstudio.com/items?itemName=dansysanalyst.pest-snippets">
55+
</x-vs-code-ide-plugin>
56+
57+
<x-neovim-ide-plugin github="https://github.com/V13Axel/neotest-pest" logo="https://upload.wikimedia.org/wikipedia/commons/3/3a/Neovim-mark.svg" title="Neovim (via Neotest)" url="https://github.com/V13Axel/neotest-pest">
58+
</x-ide-plugin>
59+
</div>
7660

77-
{!! $body !!}
61+
{!! $body !!}
7862
</article>
7963
</div>
8064

0 commit comments

Comments
 (0)