-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created ResultLink to handle the opening of result links in new tabs (#…
…178) * Created ResultLink to handle the opening of result links in new tabs * Removed period * Removed ResultLink from thesaurus & removed noreferrer
- Loading branch information
Showing
11 changed files
with
96 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- Template to simplify the logic of result links, checking the results in new tab setting --> | ||
|
||
<script lang="ts"> | ||
import { resultsInNewTab } from '$lib/stores'; | ||
import { improvements } from '$lib/improvements'; | ||
export let href: string; | ||
export let _class: string = ''; | ||
export let title: string | null = null; | ||
export let resultIndex: number | null = null; | ||
</script> | ||
|
||
{#if resultIndex != null} | ||
<a | ||
{href} | ||
class={_class} | ||
{title} | ||
use:improvements={resultIndex} | ||
target={$resultsInNewTab ? '_blank' : null} | ||
rel={$resultsInNewTab ? 'noopener' : null} | ||
> | ||
<slot /> | ||
</a> | ||
{:else} | ||
<a | ||
{href} | ||
class={_class} | ||
{title} | ||
target={$resultsInNewTab ? '_blank' : null} | ||
rel={$resultsInNewTab ? 'noopener' : null} | ||
> | ||
<slot /> | ||
</a> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script lang="ts"> | ||
import { resultsInNewTab } from '$lib/stores'; | ||
import RadioSelect from './RadioSelect.svelte'; | ||
</script> | ||
|
||
<RadioSelect store={resultsInNewTab} prefix="results-in-new-tabs" /> |