From 728af86f9c7292a4a6b8f7f6f1cd3d25a5d157bf Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Fri, 9 May 2025 13:43:22 +0100 Subject: [PATCH 1/6] docs: update homepage nav --- views/common/homepage-nav.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/views/common/homepage-nav.html b/views/common/homepage-nav.html index 2868dca0b..e80141f2f 100644 --- a/views/common/homepage-nav.html +++ b/views/common/homepage-nav.html @@ -23,6 +23,13 @@

Building blocks

+ View all components + + + + +
  • Add another
  • @@ -178,7 +185,7 @@

    Building blocks

    - Ticket panel + Ticket Panel @@ -244,7 +251,7 @@

    Building blocks

    - Case list page + Case list pages @@ -291,7 +298,7 @@

    Building blocks

    - Question page + Question pages @@ -312,7 +319,7 @@

    Building blocks

    - Task list page + Task list pages From a2f310c8ca7b5a34e1ee4e55f0b854099bc755f3 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Fri, 9 May 2025 17:05:24 +0100 Subject: [PATCH 2/6] docs: submission image resizing --- docs/image-resizing.md | 28 +++++++++++++++++++++++++ docs/stylesheets/components/_prose.scss | 16 ++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/image-resizing.md diff --git a/docs/image-resizing.md b/docs/image-resizing.md new file mode 100644 index 000000000..79699d419 --- /dev/null +++ b/docs/image-resizing.md @@ -0,0 +1,28 @@ +--- +layout: layouts/content.njk +title: Image resizing +--- + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    diff --git a/docs/stylesheets/components/_prose.scss b/docs/stylesheets/components/_prose.scss index ce05ded81..69a502226 100644 --- a/docs/stylesheets/components/_prose.scss +++ b/docs/stylesheets/components/_prose.scss @@ -26,6 +26,22 @@ border: 1px solid #b1b4b6; } + .img-container { + width: fill; + height: fit-content; + padding: govuk-spacing(6); + background-color: white; + border: 1px solid #b1b4b6; + margin-bottom: govuk-spacing(9); + } + + img.submission { + height: 100%; + max-height: 600px; + object-fit: scale-down; + border: none; + } + strong, b { @include govuk-typography-weight-bold; From cb604507b1b55157b9b68c6f7acbc0d321ba99ba Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Mon, 12 May 2025 10:22:27 +0100 Subject: [PATCH 3/6] docs: apply image container --- docs/image-resizing.md | 28 ------------------------- docs/stylesheets/components/_prose.scss | 15 ++++++------- middleware/generate-documentation.js | 4 +++- 3 files changed, 11 insertions(+), 36 deletions(-) delete mode 100644 docs/image-resizing.md diff --git a/docs/image-resizing.md b/docs/image-resizing.md deleted file mode 100644 index 79699d419..000000000 --- a/docs/image-resizing.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: layouts/content.njk -title: Image resizing ---- - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    diff --git a/docs/stylesheets/components/_prose.scss b/docs/stylesheets/components/_prose.scss index 69a502226..bc8e36abc 100644 --- a/docs/stylesheets/components/_prose.scss +++ b/docs/stylesheets/components/_prose.scss @@ -33,13 +33,14 @@ background-color: white; border: 1px solid #b1b4b6; margin-bottom: govuk-spacing(9); - } - - img.submission { - height: 100%; - max-height: 600px; - object-fit: scale-down; - border: none; + + & img { + height: 100%; + max-height: 600px; + object-fit: scale-down; + border: none; + } + } strong, diff --git a/middleware/generate-documentation.js b/middleware/generate-documentation.js index 940d614e6..59fb2715d 100644 --- a/middleware/generate-documentation.js +++ b/middleware/generate-documentation.js @@ -173,7 +173,9 @@ eleventyNavigation: ## Overview -${files?.['/component-image'] ? '![' + componentName + '](/' + files['/component-image'].path + ')' : ''} +
    + ${files?.['/component-image'] ? '![' + componentName + '](/' + files['/component-image'].path + ')' : ''} +
    ${details?.componentOverview || ''} From 4cf49d251299cbff46c5e8bea4649d25d83ac214 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Mon, 12 May 2025 11:16:00 +0100 Subject: [PATCH 4/6] docs: fix linting issues --- docs/stylesheets/components/_prose.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stylesheets/components/_prose.scss b/docs/stylesheets/components/_prose.scss index bc8e36abc..4ff277fe5 100644 --- a/docs/stylesheets/components/_prose.scss +++ b/docs/stylesheets/components/_prose.scss @@ -30,9 +30,9 @@ width: fill; height: fit-content; padding: govuk-spacing(6); - background-color: white; - border: 1px solid #b1b4b6; margin-bottom: govuk-spacing(9); + border: 1px solid #b1b4b6; + background-color: govuk-colour(white); & img { height: 100%; From 87270d622d7fcefc5afbf143c5b8cdf225265798 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Mon, 12 May 2025 11:21:17 +0100 Subject: [PATCH 5/6] docs: apply prettier --- docs/stylesheets/components/_prose.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/stylesheets/components/_prose.scss b/docs/stylesheets/components/_prose.scss index 4ff277fe5..4a2d91b6b 100644 --- a/docs/stylesheets/components/_prose.scss +++ b/docs/stylesheets/components/_prose.scss @@ -33,14 +33,13 @@ margin-bottom: govuk-spacing(9); border: 1px solid #b1b4b6; background-color: govuk-colour(white); - + & img { height: 100%; max-height: 600px; object-fit: scale-down; - border: none; + border: none; } - } strong, From 91f2f0929278080c7d1de1575db50f1481dde2cd Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Mon, 12 May 2025 11:31:04 +0100 Subject: [PATCH 6/6] docs: linting --- docs/stylesheets/components/_prose.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/stylesheets/components/_prose.scss b/docs/stylesheets/components/_prose.scss index 4a2d91b6b..8a60306d2 100644 --- a/docs/stylesheets/components/_prose.scss +++ b/docs/stylesheets/components/_prose.scss @@ -29,10 +29,10 @@ .img-container { width: fill; height: fit-content; - padding: govuk-spacing(6); margin-bottom: govuk-spacing(9); + padding: govuk-spacing(6); border: 1px solid #b1b4b6; - background-color: govuk-colour(white); + background-color: govuk-colour("white"); & img { height: 100%;