|
1 | 1 | import { adamwathan } from '@/authors'
|
2 |
| -import commandPalette from './command-palette.png' |
3 | 2 | import convertkit from './convertkit.png'
|
4 | 3 | import darkmode from './darkmode.png'
|
5 | 4 | import documentation from './documentation.png'
|
@@ -34,21 +33,21 @@ We've got sticky code blocks that stay in view as you scroll through the request
|
34 | 33 |
|
35 | 34 | <div className="relative rounded-lg overflow-hidden">
|
36 | 35 | <div className="absolute inset-0 rounded-lg ring-1 ring-inset ring-slate-900/10 pointer-events-none"></div>
|
37 |
| - <video src="https://assets.tailwindcss.com/blog/2022-12-14-protocol-api-documentation-template/sticky-code-blocks.mp4?1" autoPlay playsInline loop muted className="block m-0" /> |
| 36 | + <video src="https://assets.tailwindcss.com/blog/2022-12-15-protocol-api-documentation-template/sticky-code-blocks.mp4" autoPlay playsInline loop muted className="block m-0" /> |
38 | 37 | </div>
|
39 | 38 |
|
40 | 39 | There's also this beautiful hover effect on the homepage cards — it follows your mouse cursor with this gradient glow that uncovers a subtle background pattern:
|
41 | 40 |
|
42 | 41 | <div className="relative rounded-lg overflow-hidden">
|
43 | 42 | <div className="absolute inset-0 rounded-lg ring-1 ring-inset ring-slate-900/10 pointer-events-none"></div>
|
44 |
| - <video src="https://assets.tailwindcss.com/blog/2022-12-14-protocol-api-documentation-template/hovering-cards.mp4?1" autoPlay playsInline loop muted className="block m-0" /> |
| 43 | + <video src="https://assets.tailwindcss.com/blog/2022-12-15-protocol-api-documentation-template/hovering-cards.mp4" autoPlay playsInline loop muted className="block m-0" /> |
45 | 44 | </div>
|
46 | 45 |
|
47 | 46 | My favorite detail though has to be the sidebar navigation, which tracks the visible page content but using a sort of "minimap" strategy, where _all_ visible page sections are highlighted:
|
48 | 47 |
|
49 | 48 | <div className="relative rounded-lg overflow-hidden">
|
50 | 49 | <div className="absolute inset-0 rounded-lg ring-1 ring-inset ring-slate-900/10 pointer-events-none"></div>
|
51 |
| - <video src="https://assets.tailwindcss.com/blog/2022-12-14-protocol-api-documentation-template/animated-sidebar.mp4?1" autoPlay playsInline loop muted className="block m-0" /> |
| 50 | + <video src="https://assets.tailwindcss.com/blog/2022-12-15-protocol-api-documentation-template/animated-sidebar.mp4" autoPlay playsInline loop muted className="block m-0" /> |
52 | 51 | </div>
|
53 | 52 |
|
54 | 53 | Watching this animate as you scroll through the page is really a sight to behold — props to [Framer Motion](https://www.framer.com/motion/) for doing the heavy lifting here as usual. Even if I absolutely hated React I'm pretty sure I'd still use it just to use this library, it's really that good.
|
@@ -199,8 +198,9 @@ We love Algolia for documentation search, and we use it for the Tailwind CSS web
|
199 | 198 |
|
200 | 199 | We've wired it up for Protocol as well, but this time using Algolia's headless [autocomplete library](https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/) so we had total control of the search UI:
|
201 | 200 |
|
202 |
| -<div className="my-8"> |
203 |
| - <img src={commandPalette.src} alt="Command palette with Algolia DocSearch integration" /> |
| 201 | +<div className="relative rounded-lg overflow-hidden"> |
| 202 | + <div className="absolute inset-0 rounded-lg ring-1 ring-inset ring-slate-900/10 pointer-events-none"></div> |
| 203 | + <video src="https://assets.tailwindcss.com/blog/2022-12-15-protocol-api-documentation-template/command-palette.mp4" autoPlay playsInline loop muted className="block m-0" /> |
204 | 204 | </div>
|
205 | 205 |
|
206 | 206 | The nice thing about this approach is we can use regular old utility classes to style everything instead of writing custom CSS to style an already-styled widget, which just feels a lot more _right_ in a Tailwind CSS project.
|
|
0 commit comments