Skip to content

Commit c7ff8b0

Browse files
JohnL17czosel
authored andcommittedMar 11, 2024
fix(categories): format alexandria category descriptions
* Enable rendering of markdown * Change tooltip to uk-dropdown * Set min-width to icon
1 parent ef80fc3 commit c7ff8b0

File tree

4 files changed

+105
-10
lines changed

4 files changed

+105
-10
lines changed
 

‎addon/components/category-nav/category.hbs

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
{{@category.name}}
4040
</div>
4141
{{#if @category.description}}
42-
<div class="uk-margin-auto-left uk-margin-right uk-text-muted" {{uk-tooltip @category.description}}>
43-
<UkIcon @icon="info" />
42+
<UkIcon class="uk-margin-auto-left uk-margin-right uk-text-muted category-nav__category__info-icon" @icon="info" />
43+
<div uk-dropdown class="category-nav__category__info-box">
44+
<MarkdownToHtml @markdown={{@category.description}} />
4445
</div>
4546
{{/if}}
4647
</div>

‎app/styles/components/category-nav/_category.scss

+9
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,13 @@
3232
width: 70%;
3333
}
3434
}
35+
36+
&__info-icon {
37+
min-width: 20px;
38+
}
39+
40+
&__info-box > div > p:last-child {
41+
margin-bottom: 0;
42+
max-width: 400px;
43+
}
3544
}

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"ember-modifier": "^4.1.0",
6060
"ember-promise-helpers": "^2.0.0",
6161
"ember-resources": "^6.4.0",
62+
"ember-cli-showdown": "^7.0.0",
6263
"ember-simple-auth-oidc": "^6.0.1",
6364
"ember-truth-helpers": "^4.0.3",
6465
"ember-uikit": "^9.0.0",

‎pnpm-lock.yaml

+92-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)