[docs] add rel noreferrer to fix warning in tutorial (#8024)

Co-authored-by: vaishnav <vaishnav240204@gmail.com>
Co-authored-by: Alfredo Vecino <fredovecino@gmail.com>
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
pull/8081/head
Sanguansak Petchmeesri 2 years ago committed by GitHub
parent 8b462fd7da
commit 14f33cfe61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,8 +56,8 @@
> >
<p class='credit'> <p class='credit'>
<a target="_blank" href="https://www.flickr.com/photos/{d.path}">via Flickr</a> &ndash; <a target="_blank" rel="noreferrer" href="https://www.flickr.com/photos/{d.path}">via Flickr</a> &ndash;
<a target="_blank" href={d.license.url}>{d.license.name}</a> <a target="_blank" rel="noreferrer" href={d.license.url}>{d.license.name}</a>
</p> </p>
</div> </div>
{/await} {/await}

@ -13,7 +13,7 @@
<article> <article>
<span>{i + offset + 1}</span> <span>{i + offset + 1}</span>
<h2><a target="_blank" href={url}>{item.title}</a></h2> <h2><a target="_blank" rel="noreferrer" href={url}>{item.title}</a></h2>
<p class="meta"><a href="#/item/{item.id}">{comment_text()}</a> by {item.user} {item.time_ago}</p> <p class="meta"><a href="#/item/{item.id}">{comment_text()}</a> by {item.user} {item.time_ago}</p>
</article> </article>
@ -37,4 +37,4 @@
a { a {
color: #333; color: #333;
} }
</style> </style>

@ -10,7 +10,7 @@
<ul> <ul>
<!-- open each block --> <!-- open each block -->
<li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}"> <li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}" rel="noreferrer">
{cat.name} {cat.name}
</a></li> </a></li>
<!-- close each block --> <!-- close each block -->

@ -10,7 +10,7 @@
<ul> <ul>
{#each cats as { id, name }, i} {#each cats as { id, name }, i}
<li><a target="_blank" href="https://www.youtube.com/watch?v={id}"> <li><a target="_blank" href="https://www.youtube.com/watch?v={id}" rel="noreferrer">
{i + 1}: {name} {i + 1}: {name}
</a></li> </a></li>
{/each} {/each}

@ -7,7 +7,7 @@ If you need to loop over lists of data, use an `each` block:
```html ```html
<ul> <ul>
{#each cats as cat} {#each cats as cat}
<li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}"> <li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}" rel="noreferrer">
{cat.name} {cat.name}
</a></li> </a></li>
{/each} {/each}
@ -20,10 +20,10 @@ You can get the current *index* as a second argument, like so:
```html ```html
{#each cats as cat, i} {#each cats as cat, i}
<li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}"> <li><a target="_blank" href="https://www.youtube.com/watch?v={cat.id}" rel="noreferrer">
{i + 1}: {cat.name} {i + 1}: {cat.name}
</a></li> </a></li>
{/each} {/each}
``` ```
If you prefer, you can use destructuring — `each cats as { id, name }` — and replace `cat.id` and `cat.name` with `id` and `name`. If you prefer, you can use destructuring — `each cats as { id, name }` — and replace `cat.id` and `cat.name` with `id` and `name`.

Loading…
Cancel
Save