From 73d146d10c06b5090d3e5b08d2e0d7086f9840b3 Mon Sep 17 00:00:00 2001 From: Declan Lynch Date: Fri, 13 Oct 2023 09:39:14 -0400 Subject: [PATCH] Fix some whitespace issues and reformat table in readme file. --- README.md | 8 ++++---- .../structurizr/site/generatr/site/model/MenuViewModel.kt | 1 - .../nl/avisi/structurizr/site/generatr/site/views/Menu.kt | 2 +- .../site/generatr/site/model/MenuViewModelTest.kt | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 21d307e6..e862ce91 100644 --- a/README.md +++ b/README.md @@ -261,10 +261,10 @@ architecture model: | `generatr.style.faviconPath` | Site logo location relative to the configured `assets` folder. When configured, the logo image will be place on the left side in the header bar. This requires the `--assets-dir` switch when generating the site and the corresponding file to be available in the `assets` folder. | | `site/favicon.ico` | | `generatr.style.logoPath` | Site favicon location relative to the configured `assets` folder. When configured, the favicon will be set for all generated pages. This requires the `--assets-dir` switch when generating the site and the corresponding file to be available in the `assets` folder. | | `site/logo.png` | | `generatr.style.customStylesheet` | URL to hosted custom stylesheet or path to custom stylesheet file (location relative to the configured `assets` folder). When configured this css file will be loaded for all pages. When using a path to a file the `--assets-dir` switch must be used when generating the site and the corresponding file is available in the `assets` folder. | | `site/custom.css` or 'https://uri.example/custom.css | -| `generatr.search.language` | Indexing/stemming language for the search index. See [Lunr language support](https://github.com/olivernn/lunr-languages) | `en` | `nl` | -| `generatr.markdown.flexmark.extensions` | Additional extensions to the markdown generator to add new markdown capabilities. [More Details](https://avisi-cloud.github.io/structurizr-site-generatr/main/extended-markdown-features/) | Tables | `Tables,Admonition` | -| `generatr.svglink.target` | Specifies the link target for element links in the exported svg | `_top` | `_self` | -| `generatr.site.nestGroups` | Will show software systems in the left side navigator in collapsable groups | `false` | `true` | +| `generatr.search.language` | Indexing/stemming language for the search index. See [Lunr language support](https://github.com/olivernn/lunr-languages) | `en` | `nl` | +| `generatr.markdown.flexmark.extensions` | Additional extensions to the markdown generator to add new markdown capabilities. [More Details](https://avisi-cloud.github.io/structurizr-site-generatr/main/extended-markdown-features/) | Tables | `Tables,Admonition` | +| `generatr.svglink.target` | Specifies the link target for element links in the exported svg | `_top` | `_self` | +| `generatr.site.nestGroups` | Will show software systems in the left side navigator in collapsable groups | `false` | `true` | See the included example for usage of some those properties in the diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModel.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModel.kt index 08c3cd1c..971d9e39 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModel.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModel.kt @@ -57,5 +57,4 @@ class MenuViewModel(generatorContext: GeneratorContext, private val pageViewMode .sortedBy { it.lowercase() } private val delimiter = '/' - } diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/views/Menu.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/views/Menu.kt index 438e8970..8e58bdb0 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/views/Menu.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/views/Menu.kt @@ -69,6 +69,7 @@ private fun buildHtmlTree(node: MenuNodeViewModel, viewModel: MenuViewModel): UL } } } + if (node.name.isEmpty() && node.children.isNotEmpty()) { ul(classes = "listree-submenu-items") { for (child in node.children) { @@ -76,5 +77,4 @@ private fun buildHtmlTree(node: MenuNodeViewModel, viewModel: MenuViewModel): UL } } } - } diff --git a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt index 094dde89..4e329664 100644 --- a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt +++ b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/MenuViewModelTest.kt @@ -154,7 +154,6 @@ class MenuViewModelTest : ViewModelTest() { assertThat(it.softwareSystemNodes().children[0].children[0].children[0].name).isEqualTo("System 4") } - } private fun createPageViewModel(generatorContext: GeneratorContext, url: String = "/master/page"): PageViewModel {