Skip to content

Commit

Permalink
chore(docs): Links jump to section (part 2) + fix tarot images (#1867)
Browse files Browse the repository at this point in the history
* docs: make links jump to beginning of the section

* Revise links

* Fix links for the tarot cards

* Fix interpolations link

Co-authored-by: Simon Lemieux <1105380+simlmx@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 30, 2022
1 parent f5acef6 commit d2d46cd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
12 changes: 6 additions & 6 deletions demo/src/sandboxes/cards-stack/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { useDrag } from 'react-use-gesture'
import styles from './styles.module.css'

const cards = [
'https://upload.wikimedia.org/wikipedia/en/f/f5/RWS_Tarot_08_Strength.jpg',
'https://upload.wikimedia.org/wikipedia/en/5/53/RWS_Tarot_16_Tower.jpg',
'https://upload.wikimedia.org/wikipedia/en/9/9b/RWS_Tarot_07_Chariot.jpg',
'https://upload.wikimedia.org/wikipedia/en/d/db/RWS_Tarot_06_Lovers.jpg',
'https://upload.wikimedia.org/wikipedia/en/thumb/8/88/RWS_Tarot_02_High_Priestess.jpg/690px-RWS_Tarot_02_High_Priestess.jpg',
'https://upload.wikimedia.org/wikipedia/en/d/de/RWS_Tarot_01_Magician.jpg',
'https://upload.wikimedia.org/wikipedia/commons/f/f5/RWS_Tarot_08_Strength.jpg',
'https://upload.wikimedia.org/wikipedia/commons/5/53/RWS_Tarot_16_Tower.jpg',
'https://upload.wikimedia.org/wikipedia/commons/9/9b/RWS_Tarot_07_Chariot.jpg',
'https://upload.wikimedia.org/wikipedia/commons/d/db/RWS_Tarot_06_Lovers.jpg',
'https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/RWS_Tarot_02_High_Priestess.jpg/690px-RWS_Tarot_02_High_Priestess.jpg',
'https://upload.wikimedia.org/wikipedia/commons/d/de/RWS_Tarot_01_Magician.jpg',
]

// These two are just helpers, they curate spring data, values that are later being interpolated into css
Expand Down
44 changes: 23 additions & 21 deletions docs/src/references/pages.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


export type Page = {
title: string
url?: string
Expand All @@ -7,11 +9,11 @@ export type Page = {
export const PAGES: Page[] = [
{
title: 'Introduction',
url: '/',
url: '/#introduction',
},
{
title: 'Basics',
url: '/basics',
url: '/basics#basics',
},
{
title: 'API',
Expand All @@ -21,19 +23,19 @@ export const PAGES: Page[] = [
routes: [
{
title: 'Props',
url: '/common/props',
url: '/common/props#props',
},
{
title: 'Configs',
url: '/common/configs',
url: '/common/configs#configs',
},
{
title: 'Imperatives & Refs',
url: '/common/imperatives-and-refs',
url: '/common/imperatives-and-refs#imperatives--refs',
},
{
title: 'Interpolations',
url: '/common/interpolation',
url: '/common/interpolation#interpolations',
},
],
},
Expand All @@ -42,23 +44,23 @@ export const PAGES: Page[] = [
routes: [
{
title: 'useChain',
url: '/hooks/use-chain',
url: '/hooks/use-chain#usechain',
},
{
title: 'useSpring',
url: '/hooks/use-spring',
url: '/hooks/use-spring#usespring',
},
{
title: 'useSprings',
url: '/hooks/use-springs',
url: '/hooks/use-springs#usesprings',
},
{
title: 'useTrail',
url: '/hooks/use-trail',
url: '/hooks/use-trail#usetrail',
},
{
title: 'useTransition',
url: '/hooks/use-transition',
url: '/hooks/use-transition#usetransition',
},
],
},
Expand All @@ -67,31 +69,31 @@ export const PAGES: Page[] = [
routes: [
{
title: 'Parallax',
url: '/components/parallax',
url: '/components/parallax#parallax',
},
{
title: 'Spring',
url: '/components/spring',
url: '/components/spring#spring',
},
{
title: 'Spring Context',
url: '/components/spring-context',
url: '/components/spring-context#springcontext',
},
{
title: 'Trail',
url: '/components/trail',
url: '/components/trail#trail',
},
{
title: 'Transition',
url: '/components/transition',
url: '/components/transition#transition',
},
],
},
{
title: 'Additional Classes',
routes: [
{ title: 'Controller', url: '/classes/controller' },
{ title: 'Spring Value', url: '/classes/spring-value' },
{ title: 'Controller', url: '/classes/controller#controller' },
{ title: 'Spring Value', url: '/classes/spring-value#springvalue' },
],
},
],
Expand All @@ -101,15 +103,15 @@ export const PAGES: Page[] = [
routes: [
{
title: 'Accessibility',
url: '/guides/accessibility',
url: '/guides/accessibility#accessibility',
},
{
title: 'React Three Fiber',
url: '/guides/r3f',
url: '/guides/r3f#react-three-fiber',
},
{
title: 'Testing',
url: '/guides/testing',
url: '/guides/testing#testing',
},
],
},
Expand Down

1 comment on commit d2d46cd

@vercel
Copy link

@vercel vercel bot commented on d2d46cd Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.