Login menu

Example

Input in content/some/file.md: shortcode
{{<element/login-menu "/users/54545719/menu" >}}
Hugo generated output: html
<details class="details-overlay details-reset js-feature-preview-indicator-container" data-feature-preview-indicator-src="/users/swiing/feature_preview/indicator_check">
  <summary class="Header-link" aria-label="View profile and more"><svg xmlns="http://www.w3.org/2000/svg"
  viewBox="0 0 24 24" width="24" height="24"
  class="avatar avatar-small" >
  <path fill-rule="evenodd"d="M12 2.5a5.5 5.5 0 00-3.096 10.047 9.005 9.005 0 00-5.9 8.18.75.75 0 001.5.045 7.5 7.5 0 0114.993 0 .75.75 0 101.499-.044 9.005 9.005 0 00-5.9-8.181A5.5 5.5 0 0012 2.5zM8 8a4 4 0 118 0 4 4 0 01-8 0z"></path>
</svg>
<span class="dropdown-caret"></span>
  </summary>
  <details-menu class="dropdown-menu dropdown-menu-sw" style="width: 180px" preload>
    <include-fragment src="/users/54545719/menu" loading="lazy">
      <p class="text-center mt-3" data-hide-on-error>
        <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate">
  <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" />
  <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" />
</svg>
      </p>
      <p class="ml-1 mb-2 mt-2 color-fg-default" data-show-on-error><svg xmlns="http://www.w3.org/2000/svg" version="1.1"
  height="16" viewBox="0 0 16 16" width="16"class="octicon octicon-alert" aria-hidden="true">
  <path fill-rule="evenodd"d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>Sorry, something went wrong.
      </p>
    </include-fragment>
  </details-menu>
</details>

Source code