ministryofjustice / mkdocs-tech-docs-template

Build flexible technical documentation with a GOV.UK style using MkDocs
https://ministryofjustice.github.io/mkdocs-tech-docs-template/
8 stars 4 forks source link

Merged table of contents and upgrade to 9.2 #43

Closed gwionap closed 1 year ago

gwionap commented 1 year ago
SoumayaMauthoorMOJ commented 1 year ago

Thanks @gwionap ! I should have explained that I would like to limit the number of partials we create (if possible) to limit the amount of code we maintain and to make it easier to upgrade to new versions of mkdocs-material. So for example tabs-item.html was only temporary until the mkdocs-material made some changes (see https://github.com/squidfunk/mkdocs-material/pull/5138). Did you try to see if there was a way of making the changes just by updating the stylesheet? Also I hadn't realised the change was going to affect tabs_items otherwise I would have told you to wait until 9.2 is released (sorry!).

gwionap commented 1 year ago

The partials are only there to implement #37 as I needed a <span> element to enclose the title so that the yellow highlighting only applies to the text. Via css I could only clip the background to the content box. I can remove it if you'd rather tackle that separately. Unless you know of another way?

SoumayaMauthoorMOJ commented 1 year ago

Hey @gwionap made a few changes:

  1. Removed the partials. The highlighting stills works mostly well
  2. Upgrades to 9.2
  3. Made the styling look like https://design-system.service.gov.uk/styles/layout/: image by using the code from the DBT team: https://data-workspace.docs.trade.gov.uk/development/running-locally/
  4. Checked the layout works without tabs as well: image
  5. Fixed #16 by deleting the main panel section in the css

Would you mind reviewing? I did notice that longer subheadings don't carry over nicely so we will need to make sure the titles are nice and short: image

gwionap commented 1 year ago

@SoumayaMauthoorMOJ - happy with those changes. Very neat fix for the scrolling issue.