Skip to content

Commit

Permalink
fix(categories): format alexandria category descriptions
Browse files Browse the repository at this point in the history
* Enable rendering of markdown
* Change tooltip to uk-dropdown
* Set min-width to icon
  • Loading branch information
JohnL17 authored and czosel committed Mar 11, 2024
1 parent ef80fc3 commit c7ff8b0
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 10 deletions.
5 changes: 3 additions & 2 deletions addon/components/category-nav/category.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
{{@category.name}}
</div>
{{#if @category.description}}
<div class="uk-margin-auto-left uk-margin-right uk-text-muted" {{uk-tooltip @category.description}}>
<UkIcon @icon="info" />
<UkIcon class="uk-margin-auto-left uk-margin-right uk-text-muted category-nav__category__info-icon" @icon="info" />
<div uk-dropdown class="category-nav__category__info-box">
<MarkdownToHtml @markdown={{@category.description}} />
</div>
{{/if}}
</div>
Expand Down
9 changes: 9 additions & 0 deletions app/styles/components/category-nav/_category.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@
width: 70%;
}
}

&__info-icon {
min-width: 20px;
}

&__info-box > div > p:last-child {
margin-bottom: 0;
max-width: 400px;
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"ember-modifier": "^4.1.0",
"ember-promise-helpers": "^2.0.0",
"ember-resources": "^6.4.0",
"ember-cli-showdown": "^7.0.0",
"ember-simple-auth-oidc": "^6.0.1",
"ember-truth-helpers": "^4.0.3",
"ember-uikit": "^9.0.0",
Expand Down
100 changes: 92 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7ff8b0

Please sign in to comment.