mirror of
https://github.com/GuerillaStudio/vanillalist.git
synced 2024-12-30 11:51:57 +00:00
Add rel="noopener" to externalinks
This commit is contained in:
parent
6601c22bd7
commit
ced2596ee9
2 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
Copyleft ∴ <a href="https://glitch.family">Glitch.Family</a> — This project is <a href="https://github.com/GlitchFamily/vanillalist">open-source</a> but the plugin's visuals belong to their respective owners
|
Copyleft ∴ <a href="https://glitch.family">Glitch.Family</a> — This project is <a href="https://github.com/GlitchFamily/vanillalist" rel="noopener">open-source</a> but the plugin's visuals belong to their respective owners
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -5,14 +5,14 @@ module.exports = function (plugin) {
|
||||||
if (plugin.url_npm) { sources.push({ label: 'npm', url: plugin.url_npm }) }
|
if (plugin.url_npm) { sources.push({ label: 'npm', url: plugin.url_npm }) }
|
||||||
|
|
||||||
const links = sources.map(source => {
|
const links = sources.map(source => {
|
||||||
return `<a class="plugin__link plugin__link--${source.label}" href="${source.url}?ref=vanillalist" target="_blank">${source.label}</a>`
|
return `<a class="plugin__link plugin__link--${source.label}" href="${source.url}?ref=vanillalist" target="_blank" rel="noopener">${source.label}</a>`
|
||||||
}).join('')
|
}).join('')
|
||||||
|
|
||||||
const visualLink = plugin.url_demo ? plugin.url_demo : plugin.url_github ? plugin.url_github : plugin.url_npm ? plugin.url_npm : ''
|
const visualLink = plugin.url_demo ? plugin.url_demo : plugin.url_github ? plugin.url_github : plugin.url_npm ? plugin.url_npm : ''
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="plugin">
|
<div class="plugin">
|
||||||
<a class="plugin__visual" href="${visualLink}?ref=vanillalist">
|
<a class="plugin__visual" href="${visualLink}?ref=vanillalist" target="_blank" rel="noopener">
|
||||||
<img srcset="${plugin.image} 1x, ${plugin.image2x} 2x" alt="${plugin.title}" width="308" height="195">
|
<img srcset="${plugin.image} 1x, ${plugin.image2x} 2x" alt="${plugin.title}" width="308" height="195">
|
||||||
</a>
|
</a>
|
||||||
<h2 class="plugin__name">${plugin.title}</h2>
|
<h2 class="plugin__name">${plugin.title}</h2>
|
||||||
|
|
Loading…
Reference in a new issue