mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
reduce character usage of icons
This commit is contained in:
parent
9f7d63da4b
commit
b25704b493
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ const { ICONS } = require('../constants')
|
||||||
|
|
||||||
module.exports.icon = function(icon){
|
module.exports.icon = function(icon){
|
||||||
if(!ICONS[icon]) return ICONS.question
|
if(!ICONS[icon]) return ICONS.question
|
||||||
return ICONS[icon]
|
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.highlight = function(content){
|
module.exports.highlight = function(content){
|
||||||
|
@ -34,13 +34,13 @@ module.exports.smallPill = function(content){
|
||||||
|
|
||||||
module.exports.iconPill = function(icon, content){
|
module.exports.iconPill = function(icon, content){
|
||||||
if(!ICONS[icon]) icon = "question"
|
if(!ICONS[icon]) icon = "question"
|
||||||
return ICONS[icon] + " **` " + content + " `**"
|
return ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:') + " **` " + content + " `**"
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.iconLinkPill = function(icon, url, content, tooltip = ""){
|
module.exports.iconLinkPill = function(icon, url, content, tooltip = ""){
|
||||||
if(!ICONS[icon]) icon = "question"
|
if(!ICONS[icon]) icon = "question"
|
||||||
if(tooltip.length) tooltip = ` '${tooltip}'`
|
if(tooltip.length) tooltip = ` '${tooltip}'`
|
||||||
if(content) return `${ICONS[icon]} [**\` ${content} \`**](${url}${tooltip})`
|
if(content) return `${ICONS[icon].replace(/:[a-z1-9_]*:/, ':i:')} [**\` ${content} \`**](${url}${tooltip})`
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
module.exports.linkPill = function(url, content, tooltip = ""){
|
module.exports.linkPill = function(url, content, tooltip = ""){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue