Closed timothystewart6 closed 2 years ago
The easiest way is to add an option for ~3 buttons (like email) that render if an env is passed in.
ah didn't see this, I have raised a PR for the short-term email text issue
An idea:
Having 2 envs LINKS_HREF and LINKS_TEXT with splittable string.
if (env.LINKS_HREF && env.LINKS_TEXT) {
var hrefs = LINKS_HREF.split(',');
var texts = LINKS_TEXT.split(',');
if (hrefs.length == texts.length) {
for (let index = 0; index < hrefs.length; index++) {
//need a generic icon
// create a new element that match:
// <a class="button button-default" href="' + hrefs[index] + '" target="_blank" rel="noopener"><img class="icon" src="icons/generic_link.svg" alt="Generic Icon">' + texts[index] + '</a><br>;
//need to have an empty div with id 'generics' in the template
document.getElementById('generics').appendChild(button);
}
}
}
Unlimited links for unlimited power lol
Would love this to be added, so I can add all my website links. The only thing I'm missing! :D
Soon! Just need 30 min to crank it out :) Maybe tonight!
@Choubakawa @kenjibailly @Cur50r https://github.com/techno-tim/littlelink-server/pull/61 Should be available now!
support for generic text based buttons