File tree Expand file tree Collapse file tree 7 files changed +58
-34
lines changed Expand file tree Collapse file tree 7 files changed +58
-34
lines changed Original file line number Diff line number Diff line change 1+ import { Minus } from 'lucide-react'
12import Code from '../components/Code'
23import CodeBlock from '../components/CodeBlock'
34import Heading from '../components/Heading'
@@ -59,6 +60,27 @@ const Docs = () => {
5960 < Heading size = { 2 } id = "documentation" >
6061 Documentation
6162 </ Heading >
63+ < Paragraph >
64+ The plugin provides utilities for a subset of CSS scroll-driven animation properties:
65+ </ Paragraph >
66+ < ul className = "mb-4" >
67+ < li >
68+ < Minus className = "inline" />
69+ < Code > animation-timeline</ Code >
70+ </ li >
71+ < li >
72+ < Minus className = "inline" />
73+ < Code > scroll-timeline</ Code > , < Code > view-timeline</ Code >
74+ </ li >
75+ < li >
76+ < Minus className = "inline" />
77+ < Code > animation-range</ Code >
78+ </ li >
79+ < li >
80+ < Minus className = "inline" />
81+ < Code > timeline-scope</ Code >
82+ </ li >
83+ </ ul >
6284 < Heading size = { 3 } id = "documentation-101" >
6385 How to Make Your CSS Animation Scroll-driven
6486 </ Heading >
Original file line number Diff line number Diff line change @@ -2,22 +2,18 @@ import React from 'react'
22import ReactDOM from 'react-dom/client'
33import { RouterProvider , createBrowserRouter } from 'react-router-dom'
44import './index.css'
5- import HomeView from './views/HomeView'
65import DocsView from './views/DocsView'
6+ import TechView from './views/TechView'
77
88const router = createBrowserRouter ( [
99 {
1010 path : '/' ,
11- element : < HomeView /> ,
12- errorElement : < HomeView /> ,
13- } ,
14- {
15- path : '/usage' ,
1611 element : < DocsView /> ,
12+ errorElement : < DocsView /> ,
1713 } ,
1814 {
19- path : '/docs ' ,
20- element : < DocsView /> ,
15+ path : '/tech ' ,
16+ element : < TechView /> ,
2117 } ,
2218] )
2319
Original file line number Diff line number Diff line change @@ -17,28 +17,6 @@ const Animations = () => {
1717 < Heading size = { 2 } id = { 'plugin' } >
1818 Plugin
1919 </ Heading >
20- < Paragraph >
21- The plugin provides utilities for a subset of CSS scroll-driven animation properties:
22- </ Paragraph >
23- < ul className = "mb-4" >
24- < li >
25- < Minus className = "inline" />
26- < Code > animation-timeline</ Code >
27- </ li >
28- < li >
29- < Minus className = "inline" />
30- < Code > scroll-timeline</ Code > , < Code > view-timeline</ Code >
31- </ li >
32- < li >
33- < Minus className = "inline" />
34- < Code > animation-range</ Code >
35- </ li >
36- < li >
37- < Minus className = "inline" />
38- < Code > timeline-scope</ Code >
39- </ li >
40- </ ul >
41-
4220 < Heading size = { 3 } id = { 'code' } href = "/docs#documentation-animation-timeline" >
4321 Animation Timeline
4422 </ Heading >
Original file line number Diff line number Diff line change 1+ import CodeBlock from '../components/CodeBlock'
2+ import Heading from '../components/Heading'
3+ import Paragraph from '../components/Paragraph'
4+
5+ const plugin = `module.exports = {
6+ plugins: [
7+ require('@adam.plesnik/tailwindcss-scroll-driven-animations'),
8+ // ...
9+ ],
10+ }`
11+
12+ const Installation = ( ) => {
13+ return (
14+ < div >
15+ < Heading size = { 2 } > Installation</ Heading >
16+ < Paragraph > Install the plugin from npm.</ Paragraph >
17+ < CodeBlock > npm install @adam.plesnik/tailwindcss-scroll-driven-animations</ CodeBlock >
18+ < Paragraph > Then add the plugin to your tailwind.config.js.</ Paragraph >
19+ < CodeBlock > { plugin } </ CodeBlock >
20+ </ div >
21+ )
22+ }
23+
24+ export default Installation
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ const Nav = () => {
66 return (
77 < div className = "sticky top-0 z-20 flex w-full items-stretch justify-center border-b border-b-slate-200/50 bg-white/20 text-zinc-800 shadow-lg backdrop-blur-sm dark:border-b-slate-600/50 dark:bg-slate-800/60 dark:text-zinc-300" >
88 < div className = "flex w-full max-w-screen-lg items-stretch gap-2 px-8 py-2 md:px-16 lg:px-20" >
9- < HeaderNavAnchor to = "/" > Plugin </ HeaderNavAnchor >
10- < HeaderNavAnchor to = "/docs" > Docs </ HeaderNavAnchor >
9+ < HeaderNavAnchor to = "/" > Docs </ HeaderNavAnchor >
10+ < HeaderNavAnchor to = "/tech" > Tech </ HeaderNavAnchor >
1111 < div className = "flex-1" />
1212 < DarkModeSwitch />
1313 < a
Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ import { WandSparkles } from 'lucide-react'
22import Docs from '../docs/Docs'
33import Page from '../layouts/Page'
44import Demo from '../partials/Demo'
5+ import Installation from '../partials/Installation'
6+ import MainTitle from '../partials/MainTitle'
57
68const DocsView = ( ) => {
79 return (
810 < Page >
11+ < MainTitle />
12+ < Installation />
913 < div className = "hidden gap-4 rounded-lg border border-amber-400 bg-amber-50 p-4 text-sm no-animations:flex dark:border-amber-600 dark:bg-stone-700/30" >
1014 < WandSparkles
1115 className = "size-6 shrink-0 text-amber-500 dark:text-amber-600"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Page from '../layouts/Page.tsx'
22import Animations from '../partials/Animations.tsx'
33import MainTitle from '../partials/MainTitle.tsx'
44
5- function HomeView ( ) {
5+ function TechView ( ) {
66 return (
77 < Page >
88 < MainTitle />
@@ -11,4 +11,4 @@ function HomeView() {
1111 )
1212}
1313
14- export default HomeView
14+ export default TechView
You can’t perform that action at this time.
0 commit comments