Skip to content

Commit

Permalink
fix: remove invalid HTML from palette dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 30, 2023
1 parent 134f4e2 commit 8568132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions assets/main/scss/_palettes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,10 @@ $palette-classes: 'btn', 'btn-outline';
width: 1.5rem;
}

.palette-dropdown-menu {
&.show {
display: flex !important;
}
}

/*! purgecss end ignore */
8 changes: 3 additions & 5 deletions layouts/partials/header/palettes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
<i class="fas fa-fw fa-palette"></i>
<span class="d-xxl-none">{{ i18n "palette" }}</span>
</a>
<ul class="dropdown-menu dropdown-menu-end px-2" aria-labelledby="paletteDropdown">
<div class="row">
{{- range .Site.Params.Palettes }}
<ul class="palette-dropdown-menu dropdown-menu dropdown-menu-end px-2 row g-2" aria-labelledby="paletteDropdown">
{{- range .Site.Params.Palettes }}
{{- $key := replace . " " "-" }}
{{- $title := replace . " " "_" | printf "color_%s" | i18n }}
<li class="col-4 my-1">
<a role="button" id="palette-{{ $key }}" aria-label="{{ $title }}"
class="btn btn-sm w-100 palette text-bg-{{ $key }}" data-palette="{{ $key }}">
</a>
</li>
{{- end }}
</div>
{{- end }}
</ul>
</li>
{{- end -}}

0 comments on commit 8568132

Please sign in to comment.