diff --git a/docs/devGuide/projectManagement.md b/docs/devGuide/projectManagement.md index 4e9a4a849d..ea2b287399 100644 --- a/docs/devGuide/projectManagement.md +++ b/docs/devGuide/projectManagement.md @@ -381,4 +381,4 @@ Note that: * Result: 'tlylt' will be updated to have both icons(code and doc) {% from "njk/common.njk" import previous_next %} -{{ previous_next('githubActions/markbindReusableWorkflows', 'styleGuides') }} \ No newline at end of file +{{ previous_next('githubActions/markbindReusableWorkflows', 'styleGuides') }} diff --git a/docs/userGuide/syntax/lists.md b/docs/userGuide/syntax/lists.md index bcff639133..1b7b0292ed 100644 --- a/docs/userGuide/syntax/lists.md +++ b/docs/userGuide/syntax/lists.md @@ -72,6 +72,33 @@ Markdown can also be used in texts. You may need to add escape characters when using special characters for Markdown in text. +**You can add an icon or text that only applies to a specific item by using the `once` attribute.** + + +markdown + +* Item 1 { icon="glyphicon-education" } +* Item 2 { icon="fas-code-branch" once=true } + * Item 2.1 + * Item 2.2 +* Item 3 + + + +Subsequent items at the same level will not inherit icons or texts with the `once` attribute and will instead inherit the icons or texts before it. + +The `once` attribute also applies to all other attributes such as `i-size` and `t-size` as seen below. + + +markdown + +* Item 1 { icon="glyphicon-education" i-size="40px" i-class="text-primary" } +* Item 2 { i-size="25px" once=true } + * Sub-item 2.1 +* Item 3 + + + **You can adjust the icon and text's size by using the `i-size` and `t-size` attribute respectively.** diff --git a/packages/cli/test/functional/test_site/expected/testList.html b/packages/cli/test/functional/test_site/expected/testList.html index 58c3cc3470..246d4c3586 100644 --- a/packages/cli/test/functional/test_site/expected/testList.html +++ b/packages/cli/test/functional/test_site/expected/testList.html @@ -220,6 +220,14 @@

Testing Site-Nav +
  • +
    Only 1 item
    +
  • +
    1. One item with customization text
    @@ -252,6 +260,20 @@

    Testing Site-Nav +
  • +
    Only 1 item +
      +
    • +
      Only 1 item
      +
    • +
    +
    +
  • +
    1. One item + nested list with text customization
    @@ -633,6 +655,370 @@

    Testing Site-Nav +
  • +
    Item A
    +
  • +
  • Item B +
      +
    • +
      Sub-item B1
      +
    • +
    • +
      Sub-item B2
      +
    • +
    • +
      Sub-item B3 +
        +
      • Icon​​ +
        Sub-sub-item B3.1
        +
      • +
      • Icon​​ +
        Sub-sub-item B3.2
        +
      • +
      +
      +
    • +
    • +
      Sub-item B4
      +
    • +
    +
  • +
  • +
    Item C
    +
  • + +
      +
    1. Customization + none + once
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • +
        Sub-item B1
        +
      • +
      • +
        Sub-item B2
        +
      • +
      • +
        Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
        +
      • +
      • +
        Sub-item B4
        +
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. Customization + once + none
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. Once + customization + none
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. None + customization + once
    2. +
    +
      +
    • Item A
    • +
    • Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
    • +
    • Item C
    • +
    +
      +
    1. None + once + customization
    2. +
    +
      +
    • Item A
    • +
    • Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
    • +
    • Item C
    • +
    +
      +
    1. Customization + once + customization
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
      +
    • +
    • Icon​​ +
      Item C
      +
    • +
    +
      +
    1. String once
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
    • +
    • Item C
    • +
    +
      +
    1. False once for item A, rest of items will inherit
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. False once for item B, will overwrite item A
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      • Sub-item B2
      • +
      • Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
      • +
      • Sub-item B4
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. Once for specific attributes besides icon, does not overwrite
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. False once for specific attributes besides icon, does overwrite
    2. +
    +
      +
    • +
      Item A
      +
    • +
    • +
      Item B +
        +
      • Sub-item B1
      • +
      +
      +
    • +
    • +
      Item C
      +
    • +
    +
      +
    1. Sub-level
    2. +
    +
      +
    • Item A
    • +
    • Item B +
        +
      • +
        Sub-item B1
        +
      • +
      • Sub-item B2
      • +
      • +
        Sub-item B3 +
          +
        • Icon​​ +
          Sub-sub-item B3.1
          +
        • +
        • Icon​​ +
          Sub-sub-item B3.2
          +
        • +
        +
        +
      • +
      • +
        Sub-item B4
        +
      • +
      +
    • +
    • Item C
    • +