From 8f72fcefe788543c9b9bebfd18bd5cf6d2d391b8 Mon Sep 17 00:00:00 2001 From: David Singleton Date: Tue, 1 Dec 2015 17:58:23 +0000 Subject: [PATCH 1/2] Add YouTube embed example to Govspeak Component Youtube links in govspeak will be converted into an embedded video player. Add an example of this to the fixtures for govspeak --- app/views/govuk_component/docs/govspeak.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/govuk_component/docs/govspeak.yml b/app/views/govuk_component/docs/govspeak.yml index 5ec440bd5..be6ce465b 100644 --- a/app/views/govuk_component/docs/govspeak.yml +++ b/app/views/govuk_component/docs/govspeak.yml @@ -155,3 +155,7 @@ fixtures: rich_govspeak: true content: |

This content has some rich govspeak

+ with_youtube_embed: + content: | +

This content has a YouTube video link, converted to an accessible embedded player

+

Operations: a developer's guide, by Anna Shipman

From d632357dc70146599bea468a611ca25ed5c6b52c Mon Sep 17 00:00:00 2001 From: David Singleton Date: Tue, 15 Dec 2015 13:54:49 +0000 Subject: [PATCH 2/2] Improve documentation of Govspeak component --- app/views/govuk_component/docs/govspeak.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/views/govuk_component/docs/govspeak.yml b/app/views/govuk_component/docs/govspeak.yml index be6ce465b..227b0e04c 100644 --- a/app/views/govuk_component/docs/govspeak.yml +++ b/app/views/govuk_component/docs/govspeak.yml @@ -1,5 +1,16 @@ name: Govspeak content -description: To display long form text which has been converted from markdown +description: To display long form text which has been converted from Govspeak +body: | + [Govspeak](https://github.com/alphagov/govspeak) is GOV.UK's extension of Markdown. + + This component has no control over markup, which is passed in to the component pre-generated. It only applies CSS/JS. + + It applies styling to standard Markdown content, eg; paragraphs, headings and lists. It also applies styling to Govspeak specific markup, like [callouts](https://github.com/alphagov/govspeak#callouts), [contacts](https://github.com/alphagov/govspeak#points-of-contact) and [highlights](https://github.com/alphagov/govspeak#highlights). + + In addition to styling, it also applies some Javascript behaviours. + + - Progressively enhanced, accessible charts (using [Magna Charta](https://github.com/alphagov/magna-charta), derived from tabular data (see example below) + - Progressively enhanced, accessible embedded YouTube player (using [AccessibleMediaPlayer](https://github.com/alphagov/Accessible-Media-Player) fixtures: basic_content: content: | @@ -157,5 +168,5 @@ fixtures:

This content has some rich govspeak

with_youtube_embed: content: | -

This content has a YouTube video link, converted to an accessible embedded player

+

This content has a YouTube video link, converted to an accessible embedded player by component JavaScript.

Operations: a developer's guide, by Anna Shipman