Skip to content

Commit 96cceed

Browse files
stephencdalypeteryates
authored andcommitted
Add guidance for adding custom licence HTML in footer
1 parent 482b753 commit 96cceed

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

guide/content/components/footer.slim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ p The footer provides copyright, licensing and other information about your
5151
code: footer_with_custom_copyright_and_licence,
5252
data: footer_copyright_and_licence_arguments)
5353

54+
== render('/partials/example.*',
55+
caption: "Footer with custom licence HTML",
56+
code: footer_with_custom_licence_html) do
57+
58+
markdown:
59+
The `meta_licence_html` slot allows replacing the licence information with any custom HTML.
60+
5461
== render('/partials/example.*',
5562
caption: "Footer with navigation",
5663
code: footer_with_navigation)

guide/lib/examples/footer_helpers.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ def footer_copyright_and_licence_arguments
6666
FOOTER_COPYRIGHT_AND_LICENCE
6767
end
6868

69+
def footer_with_custom_licence_html
70+
<<~FOOTER
71+
= govuk_footer do |footer|
72+
- footer.with_meta_licence_html do
73+
|> Some custom HTML for the licence,
74+
perhaps with a
75+
= govuk_footer_link_to("link", "https://x-govuk.github.io/")
76+
FOOTER
77+
end
78+
6979
def footer_with_navigation
7080
<<~FOOTER_WITH_NAVIGATION
7181
= govuk_footer do |footer|

0 commit comments

Comments
 (0)