Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Change govspeak spacing model #4623

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions app/views/govuk_publishing_components/components/docs/govspeak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,35 @@ examples:
</li>
<li>three</li>
</ul>
typography:
description: An example of the elements shown above to demonstrate their spacing.
data:
block: |
<h2>Heading 2</h2>
<p>Paragraph of text, containing some words, such as the word 'words'. I know all the words.</p>
<h3>Heading 3</h3>
<p>Another paragraph of text, containing some more words, now including 'including'. These words are longer and more exciting, particularly 'exciting', which is genuinely a thrill to see on such a page as this.</p>
<ul>
<li>An unordered list item.</li>
<li>Another unordered list item.</li>
<li>Yet another unordered list item.</li>
</ul>
<p>A paragraph of text following the list. I'm not going to talk about the words anymore.</p>
<blockquote>
<p>This text is inside a blockquote.</p>
</blockquote>
<p>Yet another paragraph of text. This is starting to sound familiar.</p>
<ol>
<li>
<p>An ordered list, this time containing paragraphs in the list items.</p>
<p>It's not common that this happens, but it does occur and we need to be aware of it and make sure the layout works consistently.</p>
</li>
<li>
<p>Still an ordered list, also containing a paragraph.</p>
</li>
</ol>
<h3>Another heading 3</h3>
<p>And another paragraph.</p>
ordered_lists_types:
description: |
Govspeak/markdown does not generate HTML with type and start attributes,
Expand Down Expand Up @@ -630,6 +659,15 @@ examples:
file_size: 1024,
content_type: "application/vnd.oasis.opendocument.text" }
%>
<p>Another attachment as a block</p>

<%= render "govuk_publishing_components/components/attachment",
attachment: { url: "https://example.com/file.odt",
title: "Attachment",
file_size: 1024,
content_type: "application/vnd.oasis.opendocument.text",
alternative_format_contact_email: "defra.helpline@defra.gsi.gov.uk" }
%>
inline_attachment:
description: Legacy inline attachment embed used by Whitehall and Specialist Publisher
data:
Expand Down