Skip to content

Commit d1a0553

Browse files
committed
Update video links and add command palette video
1 parent 41b99d6 commit d1a0553

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Binary file not shown.

src/pages/blog/2022-12-15-protocol-api-documentation-template/index.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { adamwathan } from '@/authors'
2-
import commandPalette from './command-palette.png'
32
import convertkit from './convertkit.png'
43
import darkmode from './darkmode.png'
54
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
3433

3534
<div className="relative rounded-lg overflow-hidden">
3635
<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" />
3837
</div>
3938

4039
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:
4140

4241
<div className="relative rounded-lg overflow-hidden">
4342
<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" />
4544
</div>
4645

4746
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:
4847

4948
<div className="relative rounded-lg overflow-hidden">
5049
<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" />
5251
</div>
5352

5453
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
199198

200199
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:
201200

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" />
204204
</div>
205205

206206
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

Comments
 (0)