style the fake icon
When no icon is provided, we use the first two letters as icon. A fancy border makes it look more like an icon.
This commit is contained in:
parent
f293a16b9c
commit
285c4f96a7
2 changed files with 25 additions and 1 deletions
|
@ -14,7 +14,8 @@ jQuery(function () {
|
|||
const data = $me.text().split('@', 2);
|
||||
const text = data[0].trim();
|
||||
const $icon = jQuery('<span>')
|
||||
.text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase());
|
||||
.text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
|
||||
.wrapInner('<strong>');
|
||||
if (data[1]) {
|
||||
const src = data[1].trim();
|
||||
$icon.load(DOKU_BASE + 'lib/tpl/sprintdoc/svg.php?svg=' + src + '&e=1'); // directly embed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue