File tree Expand file tree Collapse file tree
dotcom-rendering/src/components/Masthead/Titlepiece Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,31 @@ const customSubNav: CustomSubnav = {
3333 pages : [ ] ,
3434} ;
3535
36+ /** Distinct images per breakpoint so it's obvious which one is being served. */
37+ const customSubNavWithImages : CustomSubnav = {
38+ ...customSubNav ,
39+ images : [
40+ {
41+ breakpoint : 'mobile' ,
42+ platforms : [ 'web' ] ,
43+ imageSrc :
44+ 'https://media.guim.co.uk/6537e163c9164d25ec6102641f6a04fa5ba76560/0_210_5472_3283/master/5472.jpg?width=740&height=140&quality=85&fit=crop&s=none' ,
45+ } ,
46+ {
47+ breakpoint : 'tablet' ,
48+ platforms : [ 'web' ] ,
49+ imageSrc :
50+ 'https://media.guim.co.uk/56b42eef576bc04c820da710459acd91082bb37b/0_0_6720_4480/6720.jpg?width=980&height=140&quality=85&fit=crop&s=none' ,
51+ } ,
52+ {
53+ breakpoint : 'desktop' ,
54+ platforms : [ 'web' ] ,
55+ imageSrc :
56+ 'https://media.guim.co.uk/c981848745e482e03e23b2ec9402e1f5c5bee6a6/102_73_3282_1848/2000.jpg?width=1300&height=140&quality=85&fit=crop&s=none' ,
57+ } ,
58+ ] ,
59+ } ;
60+
3661const meta = {
3762 component : CustomSubNav ,
3863 title : 'Components/Masthead/Titlepiece/CustomSubNav' ,
@@ -64,6 +89,14 @@ export const Front = {
6489 args : { renderingPage : 'front' } ,
6590} satisfies Story ;
6691
92+ /** On fronts, a web image is shown per breakpoint; resize the viewport to switch between mobile/tablet/desktop. */
93+ export const FrontWithImage = {
94+ args : {
95+ renderingPage : 'front' ,
96+ customSubNav : customSubNavWithImages ,
97+ } ,
98+ } satisfies Story ;
99+
67100export const Article = {
68101 args : { renderingPage : 'article' } ,
69102 parameters : {
You can’t perform that action at this time.
0 commit comments