mirror of
https://github.com/placeAtlas/atlas.git
synced 2025-01-19 05:42:08 +01:00
Infoblock link text truncate
This commit is contained in:
parent
74f9f46e89
commit
01b07ffef6
1 changed files with 4 additions and 2 deletions
|
@ -115,7 +115,7 @@ function createInfoBlock(entry) {
|
||||||
entry.links.website.forEach(link => {
|
entry.links.website.forEach(link => {
|
||||||
if (link) {
|
if (link) {
|
||||||
const websiteLinkElement = document.createElement("a");
|
const websiteLinkElement = document.createElement("a");
|
||||||
websiteLinkElement.className = "btn btn-primary"
|
websiteLinkElement.className = "btn btn-primary text-truncate"
|
||||||
websiteLinkElement.target = "_blank";
|
websiteLinkElement.target = "_blank";
|
||||||
websiteLinkElement.rel = "noopener noreferrer";
|
websiteLinkElement.rel = "noopener noreferrer";
|
||||||
websiteLinkElement.href = link;
|
websiteLinkElement.href = link;
|
||||||
|
@ -138,8 +138,9 @@ function createInfoBlock(entry) {
|
||||||
entry.links.discord.forEach(link => {
|
entry.links.discord.forEach(link => {
|
||||||
if (link) {
|
if (link) {
|
||||||
const discordLinkElement = document.createElement("a");
|
const discordLinkElement = document.createElement("a");
|
||||||
|
discordLinkElement.className = "btn btn-primary text-truncate"
|
||||||
discordLinkElement.target = "_blank";
|
discordLinkElement.target = "_blank";
|
||||||
wikiLinkElement.rel = "noopener noreferrer";
|
discordLinkElement.rel = "noopener noreferrer";
|
||||||
discordLinkElement.href = "https://discord.gg/" + link;
|
discordLinkElement.href = "https://discord.gg/" + link;
|
||||||
discordLinkElement.innerHTML = `<i class="bi bi-discord" aria-hidden="true"></i> ${link}`;
|
discordLinkElement.innerHTML = `<i class="bi bi-discord" aria-hidden="true"></i> ${link}`;
|
||||||
discordGroupElement.appendChild(discordLinkElement);
|
discordGroupElement.appendChild(discordLinkElement);
|
||||||
|
@ -155,6 +156,7 @@ function createInfoBlock(entry) {
|
||||||
entry.links.wiki.forEach(link => {
|
entry.links.wiki.forEach(link => {
|
||||||
if (link) {
|
if (link) {
|
||||||
const wikiLinkElement = document.createElement("a");
|
const wikiLinkElement = document.createElement("a");
|
||||||
|
wikiLinkElement.className = "btn btn-primary text-truncate"
|
||||||
wikiLinkElement.target = "_blank";
|
wikiLinkElement.target = "_blank";
|
||||||
wikiLinkElement.rel = "noopener noreferrer";
|
wikiLinkElement.rel = "noopener noreferrer";
|
||||||
wikiLinkElement.href = "https://place-wiki.stefanocoding.me/wiki/" + link.replace(/ /g, '_');
|
wikiLinkElement.href = "https://place-wiki.stefanocoding.me/wiki/" + link.replace(/ /g, '_');
|
||||||
|
|
Loading…
Add table
Reference in a new issue