<commit_before>//- 💫 INCLUDES > MIXINS

include _functions
include _mixins-base


//- Headlines
    level - [integer] headline level, corresponds to h1, h2, h3 etc.
    id    - [string] unique identifier, creates permalink (optional)

mixin h(level, id)
    +headline(level).u-heading&attributes(attributes)
        +permalink(id)
            block


//- External links
    url     - [string] link href
    trusted - [boolean] if not set / false, rel="noopener nofollow" is added
              info: https://mathiasbynens.github.io/rel-noopener/

mixin a(url, trusted)
    a(href=url target="_blank" rel=!trusted ? "noopener nofollow" : false)&attributes(attributes)
        block


//- Source link (with added icon for "code")
    url - [string] link href, can also be gh() function to generate GitHub link
          see _functions.jade for more info

mixin src(url)
    +a(url)
        block

    |   #[+icon("code", 16).u-color-subtle]


//- API link (with added tag and automatically generated path)
    path - [string] path to API docs page relative to /docs/api/

mixin api(path)
    +a("/docs/api/" + path, true)(target="_self").u-no-border.u-inline-block
        block

        |  #[+icon("book", 18).o-help-icon.u-color-subtle]


//- Aside for text
    label - [string] aside title (optional)

mixin aside(label)
    +aside-wrapper(label)
        .c-aside__text.u-text-small
            block


//- Aside for code
    label    - [string] aside title (optional or false for no label)
    language - [string] language for syntax highlighting (default: "python")
               supports basic relevant languages available for PrismJS

mixin aside-code(label, language)
    +aside-wrapper(label)<commit_msg>Wrap src mixin in nowrap to prevent line break between text and icon<commit_after>//- 💫 INCLUDES > MIXINS

include _functions
include _mixins-base


//- Headlines
    level - [integer] headline level, corresponds to h1, h2, h3 etc.
    id    - [string] unique identifier, creates permalink (optional)

mixin h(level, id)
    +headline(level).u-heading&attributes(attributes)
        +permalink(id)
            block


//- External links
    url     - [string] link href
    trusted - [boolean] if not set / false, rel="noopener nofollow" is added
              info: https://mathiasbynens.github.io/rel-noopener/

mixin a(url, trusted)
    a(href=url target="_blank" rel=!trusted ? "noopener nofollow" : false)&attributes(attributes)
        block


//- Source link (with added icon for "code")
    url - [string] link href, can also be gh() function to generate GitHub link
          see _functions.jade for more info

mixin src(url)
    span.u-inline-block.u-nowrap
        +a(url)
            block

        |   #[+icon("code", 16).u-color-subtle]


//- API link (with added tag and automatically generated path)
    path - [string] path to API docs page relative to /docs/api/

mixin api(path)
    +a("/docs/api/" + path, true)(target="_self").u-no-border.u-inline-block
        block

        |  #[+icon("book", 18).o-help-icon.u-color-subtle]


//- Aside for text
    label - [string] aside title (optional)

mixin aside(label)
    +aside-wrapper(label)
        .c-aside__text.u-text-small
            block


//- Aside for code
    label    - [string] aside title (optional or false for no label)
    language - [string] language for syntax highlighting (default: "python")
               supports basic relevant languages available for PrismJS

mixin aside-code(label, language)
    +aside-wrapper(label)
{'fraction_non_alphanumeric': 0.1177639046538025, 'fraction_numerical': 0.003972758229284903, 'mean_word_length': 2.6528497409326426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7296191', 'n_tokens_mistral': 1139, 'n_tokens_neox': 1085, 'n_words': 338}