diff --git a/example/source/index.html.md.erb b/example/source/index.html.md.erb index 528d67e9..6616d428 100644 --- a/example/source/index.html.md.erb +++ b/example/source/index.html.md.erb @@ -19,3 +19,5 @@ If you want slightly more control, you can always use HTML. For more detail and troubleshooting, take a look at the `README.md` file in the root of this project. <%= warning_text "Look out! A warning!" %> + +code element within a link diff --git a/example/source/nested-page/another-nested-page/index.html.md b/example/source/nested-page/another-nested-page/index.html.md new file mode 100644 index 00000000..71df944f --- /dev/null +++ b/example/source/nested-page/another-nested-page/index.html.md @@ -0,0 +1,5 @@ +--- +title: Another nested page +--- + +# Another nested page diff --git a/example/source/nested-page/index.html.md b/example/source/nested-page/index.html.md new file mode 100644 index 00000000..ced4df9e --- /dev/null +++ b/example/source/nested-page/index.html.md @@ -0,0 +1,5 @@ +--- +title: Nested page +--- + +# Nested page diff --git a/lib/assets/javascripts/_modules/anchored-headings.js b/lib/assets/javascripts/_modules/anchored-headings.js index 1dad5a87..a1e8c118 100644 --- a/lib/assets/javascripts/_modules/anchored-headings.js +++ b/lib/assets/javascripts/_modules/anchored-headings.js @@ -11,7 +11,7 @@ var $this = $(this) $this.addClass('anchored-heading') $this.prepend( - '' + '' ) } } diff --git a/lib/assets/javascripts/_modules/collapsible-navigation.js b/lib/assets/javascripts/_modules/collapsible-navigation.js index 1d5c2e62..56cf5309 100644 --- a/lib/assets/javascripts/_modules/collapsible-navigation.js +++ b/lib/assets/javascripts/_modules/collapsible-navigation.js @@ -22,7 +22,7 @@ var $topLevelItem = $($topLevelItems[i]) var $heading = $topLevelItem.find('> a') var $listing = $topLevelItem.find('> ul') - var id = 'toc-' + $heading.text().toLowerCase().replace(' ', '-') + var id = 'toc-' + $heading.text().toLowerCase().replace(/\s+/g, '-') // Only add collapsible functionality if there are children. if ($listing.length === 0) { continue diff --git a/lib/assets/stylesheets/modules/_technical-documentation.scss b/lib/assets/stylesheets/modules/_technical-documentation.scss index 6530fce7..b701dd89 100644 --- a/lib/assets/stylesheets/modules/_technical-documentation.scss +++ b/lib/assets/stylesheets/modules/_technical-documentation.scss @@ -1,13 +1,10 @@ .technical-documentation { - @include govuk-font($size: 19); + @include govuk-font($size: 19, $line-height: 1.4); // Required for IE11 to render
correctly display: block; margin: govuk-spacing(3); - font-size: 19px; max-width: 40em; - line-height: 1.4; - color: $govuk-text-colour; @include govuk-media-query(tablet) { @@ -135,10 +132,12 @@ font-family: monaco, Consolas, "Lucida Console", monospace; font-size: 15px; + font-size: 0.9375rem; color: $code-0E; @include govuk-media-query(tablet) { font-size: 16px; + font-size: 1rem; } // Handle long strings (URLs, long variable names, etc) by allowing them @@ -163,6 +162,16 @@ } } + // Ensure that if a code element is wrapped with a link that it renders correctly. + a code { + color: inherit; + } + + a:focus code { + background: inherit; + color: inherit; + } + .table-container { display: block; max-width: 100%; diff --git a/lib/govuk_tech_docs/table_of_contents/helpers.rb b/lib/govuk_tech_docs/table_of_contents/helpers.rb index 8da8d626..681c9d1b 100644 --- a/lib/govuk_tech_docs/table_of_contents/helpers.rb +++ b/lib/govuk_tech_docs/table_of_contents/helpers.rb @@ -63,7 +63,7 @@ def render_page_tree(resources, current_page, config, current_page_html) end if resource.children.any? && resource.url != home_url - output += %{
- <% if config[:tech_docs][:show_contribution_banner] %> - - <% end %> + <%= partial "layouts/footer" %> diff --git a/spec/table_of_contents/helpers_spec.rb b/spec/table_of_contents/helpers_spec.rb index ee53c69b..7ef8063b 100644 --- a/spec/table_of_contents/helpers_spec.rb +++ b/spec/table_of_contents/helpers_spec.rb @@ -148,7 +148,7 @@ def add_children(children) } expected_multi_page_table_of_contents = %{ -