kopia lustrzana https://github.com/shoelace-style/shoelace
Remove button links plugin from docs
rodzic
f2a33ab070
commit
8387edb080
|
@ -1,19 +0,0 @@
|
|||
(() => {
|
||||
if (!window.$docsify) {
|
||||
throw new Error('Docsify must be loaded before installing this plugin.');
|
||||
}
|
||||
|
||||
window.$docsify.plugins.push((hook, vm) => {
|
||||
hook.mounted(function () {
|
||||
|
||||
document.addEventListener('click', event => {
|
||||
const tag = event.target.tagName.toLowerCase();
|
||||
const href = event.target.getAttribute('data-href');
|
||||
|
||||
if (tag === 'sl-button' && href) {
|
||||
window.open(href);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})();
|
|
@ -14,7 +14,7 @@ The [community chat](https://discord.gg/mg8f26C) is open to the public and power
|
|||
|
||||
Please be respectful of other users and remember that Shoelace is an open source project. We'll try to help when we can, but there's no guarantee we'll be able solve your problem. Please manage your expectations and don't forget to contribute back to the conversation when you can!
|
||||
|
||||
<sl-button type="primary" data-href="https://discord.gg/mg8f26C">
|
||||
<sl-button type="primary" href="https://discord.gg/mg8f26C" target="_blank">
|
||||
Join the Chat
|
||||
</sl-button>
|
||||
|
||||
|
@ -26,11 +26,11 @@ Follow [@shoelace_style](https://twitter.com/shoelace_style) on Twitter for gene
|
|||
|
||||
Oh, and don't forget to tweet Shoelace to your followers!
|
||||
|
||||
<sl-button type="primary" data-href="https://twitter.com/shoelace_style">
|
||||
<sl-button type="primary" href="https://twitter.com/shoelace_style" target="_blank">
|
||||
Follow on Twitter
|
||||
</sl-button>
|
||||
|
||||
<sl-button data-href="https://twitter.com/intent/tweet?text=I%20just%20discovered%20%40shoelace_style%2C%20an%20open%20source%20collection%20of%20professionally-designed%20web%20components%21%20Check%20it%20out%20at%20shoelace.style">
|
||||
<sl-button href="https://twitter.com/intent/tweet?text=Shoelace%20-%20a%20forward%20thinking%20library%20of%20web%20components.%20https%3A%2F%2Fshoelace.style%2F" target="_blank">
|
||||
Send a Tweet
|
||||
</sl-button>
|
||||
|
||||
|
|
|
@ -93,6 +93,5 @@
|
|||
<script src="/assets/plugins/code-block/code-block.js"></script>
|
||||
<script src="/assets/plugins/metadata/metadata.js"></script>
|
||||
<script src="/assets/plugins/sidebar/sidebar.js"></script>
|
||||
<script src="/assets/plugins/links/links.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Ładowanie…
Reference in New Issue