Skip to content
Snippets Groups Projects
Commit 4054738f authored by Tarje Lavik's avatar Tarje Lavik
Browse files

Add nested block structure fragment

parent f2975999
No related branches found
No related tags found
No related merge requests found
......@@ -192,6 +192,77 @@ export const routeQuery = groq`
),
canvasUrl,
}
},
_type == 'SubStory' => { // Ai! Deeply nested full block content
...,
content[] {
...,
_type == 'SingleObject' => {
...,
item-> {
_id,
label,
"owner": hasCurrentOwner[]-> {
_id,
label
},
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
),
canvasUrl,
}
},
_type == 'PageHeader' => {
...,
"palette": illustration.image.asset->.metadata.palette{
darkMuted,
darkVibrant,
dominant,
lightMuted,
vibrantMuted,
muted,
vibrant
}
},
_type == 'MiradorGallery' => {
...,
items[] {
_id,
label,
view,
"owner": manifestRef->.hasCurrentOwner[]->{
_id,
label
},
"manifest": coalesce(
manifestRef->.subjectOfManifest,
manifestUrl,
"/api/manifest/" + manifestRef->._id
),
canvasUrl,
},
},
_type == 'SingleObject' => {
...,
view,
item-> {
_id,
label,
"owner": hasCurrentOwner[]-> {
_id,
label
},
"manifest": coalesce(
subjectOfManifest,
manifestUrl,
"/api/manifest/" + _id
),
canvasUrl,
}
},
}
}
},
content[] {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment