Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ nav {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(348px, 1fr));
gap: 15px;
max-height: 70vh;
overflow-y: scroll;
-ms-overflow-style: none;
scrollbar-width: none;
}

.main-grid::-webkit-scrollbar {
display: none;
}

@media screen and (max-width: 1345px) {
Expand Down
4 changes: 2 additions & 2 deletions src/Category.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<h2>{website.name}</h2>
<div class="outbound-cont">
{#if website.code && website.code !== null}
<a href="{website.code}" target="_blank" class="outbound code-link" aria-label="{website.name} snippet" on:click|stopPropagation>
<a href="{website.code}" target="_blank" rel="noopener noreferrer" class="outbound code-link" aria-label="{website.name} snippet" on:click|stopPropagation>
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="29" rx="3" fill="transparent"/>
<path d="M19 7L26 14L19 21" stroke="white"/>
Expand All @@ -79,7 +79,7 @@
{/if}


<a href="{website.url}" target="_blank" class="outbound" aria-label="{website.name}" on:click|stopPropagation>
<a href="{website.url}" target="_blank" rel="noopener noreferrer" class="outbound" aria-label="{website.name}" on:click|stopPropagation>
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="29" rx="3" fill="transparent"/>
<path d="M10.454 7.36396H23.182V20.0919" stroke="white"/>
Expand Down
8 changes: 4 additions & 4 deletions src/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<div class="modal-overlay" on:click|stopPropagation={handleOverlayClick}>
<div class="modal" aria-modal="true">
<div class="card-info">
<h2><a href="{websiteUrl}" target="_blank">{websiteName}</a></h2>
<h2><a href="{websiteUrl}" target="_blank" rel="noopener noreferrer">{websiteName}</a></h2>
<div class="modal-nav">

<svg on:click={prevModal} class="modal-nav-button" width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand Down Expand Up @@ -90,7 +90,7 @@

<!-- svelte-ignore missing-declaration -->
{#if websiteCode && websiteCode !== null}
<a href="{websiteCode}" target="_blank" class="outbound code-link">
<a href="{websiteCode}" target="_blank" rel="noopener noreferrer" class="outbound code-link">
<span>Check Code</span>
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="29" rx="3" fill="transparent"/>
Expand All @@ -99,7 +99,7 @@
</svg>
</a>
{:else if !codeLinkBoolean}
<a href="https://forms.gle/7gi8eLZZoQmbVyst5" target="_blank" class="outbound code-link empty-code">
<a href="https://forms.gle/7gi8eLZZoQmbVyst5" target="_blank" rel="noopener noreferrer" class="outbound code-link empty-code">
<span>Add CodePen Link</span>
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="29" rx="3" fill="transparent"/>
Expand All @@ -109,7 +109,7 @@
</a>
{/if}

<a href="{websiteUrl}" target="_blank" class="outbound site-link">
<a href="{websiteUrl}" target="_blank" rel="noopener noreferrer" class="outbound site-link">
<span>Visit Site</span>
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="29" rx="3" fill="transparent"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<button
class="option"
class:active={activeCategory === category}
aria-selected={path === category}
aria-current={activeCategory === category ? 'page' : undefined}
class:show={showButtons}
on:click={() => selectCategory(category)}
on:keydown={() => selectCategory(category)}
Expand Down
13 changes: 2 additions & 11 deletions src/scrollToTop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,24 @@
let showButton = false;

const scrollToTop = () => {
const mainGrid = document.querySelector('.main-grid');

window.scrollTo({ top: 0, behavior: 'smooth' });
mainGrid.scrollTo({ top: 0, behavior: 'smooth' });
};

const handleScroll = () => {
const mainGrid = document.querySelector('.main-grid');

showButton = window.scrollY > 100 || mainGrid.scrollTop > 100;
showButton = window.scrollY > 100;
};

onMount(() => {
const mainGrid = document.querySelector('.main-grid');

window.addEventListener('scroll', handleScroll);
mainGrid.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
mainGrid.removeEventListener('scroll', handleScroll);
};
});
</script>

{#if showButton}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div on:click={scrollToTop} class="back-to-top-btn">
<div on:click={scrollToTop} class="back-to-top-btn" role="button" tabindex="0" aria-label="Back to top">
<svg width="30" height="29" viewBox="0 0 30 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.0401 12.0543L15.0743 7.02002L20.1086 12.0543" stroke="white"/>
<path d="M15.0748 7.20886L15.0748 21.755" stroke="white"/>
Expand Down