Skip to content

Commit

Permalink
Update landing page example
Browse files Browse the repository at this point in the history
- A more realistic example, with an attachment,
  breadcrumbs, nav groups, a theme, and a lot of blocks.
  • Loading branch information
KludgeKML committed Feb 19, 2025
1 parent 5fa670f commit 87fe3d9
Showing 1 changed file with 347 additions and 0 deletions.
347 changes: 347 additions & 0 deletions content_schemas/examples/landing_page/frontend/landing_page.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,355 @@
"title": "Some landing page",
"locale": "en",
"updated_at": "2024-10-08T15:37:00Z",
"theme": "default",
"links": {
},
"details": {
"attachments": [
{
"accessible": false,
"attachment_type": "document",
"content_type": "text/csv",
"file_size": 123,
"filename": "data_one.csv",
"id": 12345,
"preview_url": "https://ignored-asset-domain/media/000000000000000000000001/data_one.csv/preview",
"title": "Data One",
"url": "https://ignored-asset-domain/media/000000000000000000000001/data_one.csv"
}
],
"breadcrumbs": [
{
"title": "Some breadcrumb",
"href": "/some-breadcrumb"
},
{
"title": "Some other breadcrumb",
"href": "/some-other-breadcrumb"
}
],
"navigation_groups": [
{
"id": "Top Menu",
"name": "Some menu",
"links": [
{
"text": "Heading",
"links": [
{
"href": "/homepage",
"text": "Homepage"
},
{
"href": "/goals",
"text": "Goals"
}
]
},
{
"text": "Heading 2",
"links": [
{
"href": "/homepage",
"text": "Homepage 2"
},
{
"href": "/goals",
"text": "Goals 2"
}
]
}
]
},
{
"id": "Sidebar",
"links": [
{
"href": "/a",
"text": "Child a"
},
{
"href": "/b",
"text": "Child b"
}
]
}
],
"blocks": [
{
"type": "main_navigation",
"navigation_group_id": "Top Menu"
},
{
"type": "hero",
"image": {
"sources": {
"desktop": "landing_page/placeholder/desktop.png",
"desktop_2x": "landing_page/placeholder/desktop_2x.png",
"mobile": "landing_page/placeholder/mobile.png",
"mobile_2x": "landing_page/placeholder/mobile_2x.png",
"tablet": "landing_page/placeholder/tablet.png",
"tablet_2x": "landing_page/placeholder/tablet_2x.png"
}
},
"hero_content": {
"blocks": [
{
"type": "heading",
"content": "This is a heading"
},
{
"type": "govspeak",
"content": "<p>Lorem ipsum...</p>\n"
},
{
"type": "action_link",
"text": "See the missions",
"href": "todo"
}
]
}
},
{
"type": "does_not_exist",
"content": "replace me with a block-error block"
},
{
"type": "featured",
"image": {
"alt": "example alt text",
"sources": {
"desktop": "landing_page/placeholder/desktop.png",
"desktop_2x": "landing_page/placeholder/desktop_2x.png",
"mobile": "landing_page/placeholder/mobile.png",
"mobile_2x": "landing_page/placeholder/mobile_2x.png",
"tablet": "landing_page/placeholder/tablet.png",
"tablet_2x": "landing_page/placeholder/tablet_2x.png"
}
},
"featured_content": {
"blocks": [
{
"type": "heading",
"content": "Title of the content"
},
{
"type": "govspeak",
"content": "<p>Lorem ipsum dolor sit amet. In voluptas dolorum vel veniam nisi et voluptate dolores id voluptatem distinctio. Et quia accusantium At ducimus quis aut voluptates iusto aut esse suscipit.</p>\n"
}
]
}
},
{
"type": "heading",
"content": "Here's a heading"
},
{
"type": "govspeak",
"content": "<p>Here's some content!</p>\n<p>Here's some more content</p>\n<ul>\n <li>What?</li>\n <li>When?</li>\n</ul>\n<a href=\"/landing-page/sub-page-1\">Visit sub-page 1</a>\n"
},
{
"type": "govspeak",
"content": "<p>Here's some more content!</p>"
},
{
"type": "quote",
"text": "Here's a quote!",
"cite": "I said this"
},
{
"type": "two_column_layout",
"theme": "two_thirds_one_third",
"blocks": [
{
"type": "govspeak",
"content": "<a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" class=\"govuk-link\">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>"
},
{
"type": "govspeak",
"content": "<p>Right content!</p>"
}
]
},
{
"type": "heading",
"content": "Statistics"
},
{
"type": "columns_layout",
"blocks": [
{
"type": "card",
"image": {
"alt": "Placeholder alt text",
"source": "landing_page/placeholder/chart.png"
},
"card_content": {
"blocks": [
{
"type": "heading",
"content": "Title 1 govspeak title goes here",
"path": "http://gov.uk"
}
]
}
},
{
"type": "card",
"image": {
"alt": "Placeholder alt text",
"source": "landing_page/placeholder/chart.png"
},
"card_content": {
"blocks": [
{
"type": "heading",
"content": "Title 2 govspeak title goes here",
"path": "http://gov.uk"
}
]
}
},
{
"type": "card",
"image": {
"alt": "Placeholder alt text",
"source": "landing_page/placeholder/chart.png"
},
"card_content": {
"blocks": [
{
"type": "heading",
"content": "Title 3 govspeak title goes here",
"path": "http://gov.uk"
}
]
}
}
]
},
{
"type": "two_column_layout",
"theme": "one_third_two_thirds",
"blocks": [
{
"type": "side_navigation",
"navigation_group_id": "Sidebar",
"title": "Alternate title",
"alternative_line_style": true
},
{
"type": "blocks_container",
"blocks": [
{
"type": "card",
"image": {
"alt": "Placeholder alt text",
"source": "landing_page/placeholder/chart.png"
},
"card_content": {
"blocks": [
{
"type": "heading",
"content": "Title 1 govspeak title goes here",
"path": "http://gov.uk"
}
]
}
},
{
"type": "card",
"image": {
"alt": "Placeholder alt text",
"source": "landing_page/placeholder/chart.png"
},
"card_content": {
"blocks": [
{
"type": "heading",
"content": "Title 2 govspeak title goes here",
"path": "http://gov.uk"
}
]
}
}
]
}
]
},
{
"type": "document_list",
"taxon_base_path": "/a-taxon",
"items": [
{
"text": "An example link",
"path": "https://www.gov.uk",
"document_type": "Press release",
"public_updated_at": "2016-06-27 10:29:44 +0000"
},
{
"text": "Another example link",
"path": "https://www.gov.uk",
"document_type": "News article",
"public_updated_at": "2021-01-16 11:34:12 +0000"
},
{
"text": "A third example link",
"path": "https://www.gov.uk",
"document_type": "Consultation",
"public_updated_at": "2024-02-01 09:00:11 +0000"
}
]
},
{
"type": "columns_layout",
"ga4_tracking": true,
"ga4_type": "box",
"blocks": [
{
"type": "box",
"href": "/landing-page/be-kinder",
"content": "Preview pickles",
"theme_colour": 1,
"box_content": {
"blocks": [
{
"type": "govspeak",
"content": "<p>Yorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis class.</p>\n"
}
]
}
},
{
"type": "box",
"href": "/landing-page/be-kinder",
"content": "Empower elephants",
"theme_colour": 2,
"box_content": {
"blocks": [
{
"type": "govspeak",
"content": "<h3>Subtitle here</h3>\n<p>Yorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis class.</p>\n<h3>Subtitle here</h3>\n<p>Yorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis class.</p>\n"
}
]
}
},
{
"type": "box",
"href": "/landing-page/be-kinder",
"content": "Celebrate Caribou",
"theme_colour": 3,
"box_content": {
"blocks": [
{
"type": "govspeak",
"content": "<p>Yorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis class.</p>\n"
}
]
}
}
]
}
]
}
}

0 comments on commit 87fe3d9

Please sign in to comment.