|
| 1 | +import type { Meta, StoryObj } from '@storybook/react'; |
| 2 | +import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat'; |
| 3 | +import { getDataLinkNameCard } from '../lib/getDataLinkName'; |
| 4 | +import { MoreGalleries as MoreGalleriesComponent } from './MoreGalleries'; |
| 5 | + |
| 6 | +const meta = { |
| 7 | + title: 'Components/MoreGalleries', |
| 8 | + component: MoreGalleriesComponent, |
| 9 | +} satisfies Meta<typeof MoreGalleriesComponent>; |
| 10 | + |
| 11 | +export default meta; |
| 12 | + |
| 13 | +type Story = StoryObj<typeof meta>; |
| 14 | + |
| 15 | +export const MoreGalleries = { |
| 16 | + args: { |
| 17 | + absoluteServerTimes: false, |
| 18 | + discussionApiUrl: |
| 19 | + 'https://discussion.code.dev-theguardian.com/discussion-api', |
| 20 | + heading: 'More galleries', |
| 21 | + url: 'http://localhost:9000/more-galleries', |
| 22 | + onwardsSource: 'more-galleries', |
| 23 | + trails: [ |
| 24 | + { |
| 25 | + url: 'http://localhost:9000/environment/gallery/2025/aug/22/week-in-wildlife-a-clumsy-fox-swinging-orangutang-and-rescued-jaguarundi-cub', |
| 26 | + linkText: |
| 27 | + 'Week in wildlife: a clumsy fox, a swinging orangutan and a rescued jaguarundi cub', |
| 28 | + showByline: false, |
| 29 | + byline: 'Pejman Faratin', |
| 30 | + image: { |
| 31 | + src: 'https://media.guim.co.uk/a81e974ffee6c8c88fa280c2d02eaf5dc2af863e/151_292_1020_816/master/1020.jpg', |
| 32 | + altText: '', |
| 33 | + }, |
| 34 | + format: { |
| 35 | + theme: Pillar.News, |
| 36 | + design: ArticleDesign.Gallery, |
| 37 | + display: ArticleDisplay.Standard, |
| 38 | + }, |
| 39 | + webPublicationDate: '2025-08-22T06:00:25.000Z', |
| 40 | + headline: |
| 41 | + 'Week in wildlife: a clumsy fox, a swinging orangutan and a rescued jaguarundi cub', |
| 42 | + shortUrl: 'https://www.theguardian.com/p/x32n89', |
| 43 | + discussion: { |
| 44 | + isCommentable: false, |
| 45 | + isClosedForComments: true, |
| 46 | + discussionId: '/p/x32n89', |
| 47 | + }, |
| 48 | + dataLinkName: getDataLinkNameCard( |
| 49 | + { |
| 50 | + theme: Pillar.News, |
| 51 | + design: ArticleDesign.Gallery, |
| 52 | + display: ArticleDisplay.Standard, |
| 53 | + }, |
| 54 | + '0', |
| 55 | + 0, |
| 56 | + ), |
| 57 | + trailText: |
| 58 | + 'Guinness World Records is looking back at the extraordinary feats achieved since its inception - as well as unveiling 70 whacky and unclaimed records ', |
| 59 | + kickerText: 'Politics', // Get data for this |
| 60 | + mainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for this |
| 61 | + }, |
| 62 | + { |
| 63 | + url: 'http://localhost:9000/money/gallery/2025/aug/22/characterful-cottages-for-sale-in-england-in-pictures', |
| 64 | + linkText: |
| 65 | + 'Characterful cottages for sale in England – in pictures', |
| 66 | + showByline: false, |
| 67 | + byline: 'Anna White', |
| 68 | + image: { |
| 69 | + src: 'https://media.guim.co.uk/58cd9356e6d68e8efa6028162bb959f9798307d5/515_0_5000_4000/master/5000.jpg', |
| 70 | + altText: '', |
| 71 | + }, |
| 72 | + format: { |
| 73 | + design: ArticleDesign.Gallery, |
| 74 | + theme: Pillar.Lifestyle, |
| 75 | + display: ArticleDisplay.Standard, |
| 76 | + }, |
| 77 | + webPublicationDate: '2025-08-22T06:00:24.000Z', |
| 78 | + headline: |
| 79 | + 'Characterful cottages for sale in England – in pictures', |
| 80 | + shortUrl: 'https://www.theguardian.com/p/x32gqj', |
| 81 | + discussion: { |
| 82 | + isCommentable: false, |
| 83 | + isClosedForComments: true, |
| 84 | + discussionId: '/p/x32gqj', |
| 85 | + }, |
| 86 | + dataLinkName: getDataLinkNameCard( |
| 87 | + { |
| 88 | + design: ArticleDesign.Gallery, |
| 89 | + theme: Pillar.Lifestyle, |
| 90 | + display: ArticleDisplay.Standard, |
| 91 | + }, |
| 92 | + '0', |
| 93 | + 1, |
| 94 | + ), |
| 95 | + trailText: |
| 96 | + 'Picked from a record 60,636 entries, the first images from the Natural History Museum’s wildlife photographer of the year competition have been released. The photographs, which range from a lion facing down a cobra to magnified mould spores, show the diversity, beauty and complexity of the natural world and humanity’s relationship with it', |
| 97 | + mainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for this |
| 98 | + }, |
| 99 | + { |
| 100 | + url: 'http://localhost:9000/news/gallery/2025/aug/22/sunsets-aid-parachutes-and-giant-pandas-photos-of-the-day-friday', |
| 101 | + linkText: |
| 102 | + 'Sunsets, aid parachutes and giant pandas: photos of the day – Friday ', |
| 103 | + showByline: false, |
| 104 | + byline: 'Eithne Staunton', |
| 105 | + image: { |
| 106 | + src: 'https://media.guim.co.uk/4ce0b080206fe9b65b976c1acf219d81072cc814/0_0_2113_1690/master/2113.png', |
| 107 | + altText: '', |
| 108 | + }, |
| 109 | + format: { |
| 110 | + design: ArticleDesign.Gallery, |
| 111 | + theme: Pillar.News, |
| 112 | + display: ArticleDisplay.Standard, |
| 113 | + }, |
| 114 | + webPublicationDate: '2025-08-22T12:49:42.000Z', |
| 115 | + headline: |
| 116 | + 'Sunsets, aid parachutes and giant pandas: photos of the day – Friday ', |
| 117 | + shortUrl: 'https://www.theguardian.com/p/x3359z', |
| 118 | + discussion: { |
| 119 | + isCommentable: false, |
| 120 | + isClosedForComments: true, |
| 121 | + discussionId: '/p/x3359z', |
| 122 | + }, |
| 123 | + dataLinkName: getDataLinkNameCard( |
| 124 | + { |
| 125 | + design: ArticleDesign.Gallery, |
| 126 | + theme: Pillar.News, |
| 127 | + display: ArticleDisplay.Standard, |
| 128 | + }, |
| 129 | + '0', |
| 130 | + 2, |
| 131 | + ), |
| 132 | + trailText: |
| 133 | + 'From the mock-Tudor fad of the 1920s to drivers refuelling on a roundabout, each era produces its own distinctive petrol stations – as photographer Philip Butler discovered', |
| 134 | + mainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for this |
| 135 | + }, |
| 136 | + { |
| 137 | + url: 'http://localhost:9000/fashion/gallery/2025/aug/22/what-to-wear-to-notting-hill-carnival', |
| 138 | + linkText: 'On parade: what to wear to Notting Hill carnival', |
| 139 | + showByline: false, |
| 140 | + byline: 'Melanie Wilkinson', |
| 141 | + image: { |
| 142 | + src: 'https://media.guim.co.uk/49a9656cd10c4f64f8bdd54380afb915c7a3648b/207_0_1500_1200/master/1500.jpg', |
| 143 | + altText: '', |
| 144 | + }, |
| 145 | + format: { |
| 146 | + design: ArticleDesign.Gallery, |
| 147 | + theme: Pillar.Lifestyle, |
| 148 | + display: ArticleDisplay.Standard, |
| 149 | + }, |
| 150 | + webPublicationDate: '2025-08-22T05:00:23.000Z', |
| 151 | + headline: 'On parade: what to wear to Notting Hill carnival', |
| 152 | + shortUrl: 'https://www.theguardian.com/p/x32mte', |
| 153 | + discussion: { |
| 154 | + isCommentable: false, |
| 155 | + isClosedForComments: true, |
| 156 | + discussionId: '/p/x32mte', |
| 157 | + }, |
| 158 | + dataLinkName: getDataLinkNameCard( |
| 159 | + { |
| 160 | + design: ArticleDesign.Gallery, |
| 161 | + theme: Pillar.Lifestyle, |
| 162 | + display: ArticleDisplay.Standard, |
| 163 | + }, |
| 164 | + '0', |
| 165 | + 1, |
| 166 | + ), |
| 167 | + trailText: |
| 168 | + 'The Guardian’s picture editors select photographs from around the world', |
| 169 | + mainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for thismainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for this |
| 170 | + }, |
| 171 | + { |
| 172 | + url: 'http://localhost:9000/artanddesign/gallery/2025/aug/21/psychedelic-rock-glass-mountain-michael-lundgren', |
| 173 | + linkText: |
| 174 | + 'Psychedelic rock! Formations that mess with your mind – in pictures ', |
| 175 | + showByline: false, |
| 176 | + image: { |
| 177 | + src: 'https://media.guim.co.uk/2810af61b2d2d2d5f71ec01e56e6555e0a6d4635/55_0_2813_2250/master/2813.jpg', |
| 178 | + altText: '', |
| 179 | + }, |
| 180 | + format: { |
| 181 | + design: ArticleDesign.Gallery, |
| 182 | + theme: Pillar.Culture, |
| 183 | + display: ArticleDisplay.Standard, |
| 184 | + }, |
| 185 | + webPublicationDate: '2025-08-21T06:01:01.000Z', |
| 186 | + headline: |
| 187 | + 'Psychedelic rock! Formations that mess with your mind – in pictures ', |
| 188 | + shortUrl: 'https://www.theguardian.com/p/x2p663', |
| 189 | + discussion: { |
| 190 | + isCommentable: false, |
| 191 | + isClosedForComments: true, |
| 192 | + discussionId: '/p/x2p663', |
| 193 | + }, |
| 194 | + dataLinkName: getDataLinkNameCard( |
| 195 | + { |
| 196 | + design: ArticleDesign.Gallery, |
| 197 | + theme: Pillar.Culture, |
| 198 | + display: ArticleDisplay.Standard, |
| 199 | + }, |
| 200 | + '0', |
| 201 | + 1, |
| 202 | + ), |
| 203 | + trailText: |
| 204 | + 'Politicians and their partners put on their best show at this year’s Midwinter Ball, an annual dinner hosted by the Federal Parliamentary Press Gallery in Canberra', |
| 205 | + mainMedia: { type: 'Gallery', count: '6' }, // TODO: get data for this |
| 206 | + }, |
| 207 | + ], |
| 208 | + }, |
| 209 | +} satisfies Story; |
0 commit comments