Skip to content

Commit 1385dd5

Browse files
Added noreferrer and commented unwanted css
1 parent 442a101 commit 1385dd5

10 files changed

+121
-50
lines changed

src/components/Footer.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268
<a
269269
class="langOuter"
270270
target="_blank"
271+
rel="noopener noreferrer"
271272
href="https://crowdin.com/project/pattern-monster"
272273
><span>{lang[0]}</span>
273274
{#if lang[1] == 100}

src/components/LangSelect.svelte

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
e.stopPropagation();
3030
let menu = this.nextSibling;
3131
// let menu = document.getElementById('langMenu')
32-
document.getElementById('shopMenu').style.display = "none";
32+
document.getElementById("shopMenu").style.display = "none";
3333
3434
while (menu && menu.nodeType != 1) {
3535
menu = menu.nextSibling;
@@ -55,7 +55,11 @@
5555
<svelte:window on:click={closeWindow} />
5656

5757
<div class="menu">
58-
<button class="menuButton flex items-center" title={strings.translate} on:click={toggle}>
58+
<button
59+
class="menuButton flex items-center"
60+
title={strings.translate}
61+
on:click={toggle}
62+
>
5963
<svg
6064
xmlns="http://www.w3.org/2000/svg"
6165
width="2em"
@@ -88,10 +92,20 @@
8892
<ul id="langMenu" class="menuItems p-0">
8993
{#each languageList as lang}
9094
<li>
91-
<a class="px-4 py-3 {lang.name === languageName ? 'selectedLang' : ''}" href={lang.link}>{lang.name}</a>
95+
<a
96+
class="px-4 py-3 {lang.name === languageName ? 'selectedLang' : ''}"
97+
href={lang.link}>{lang.name}</a
98+
>
9299
</li>
93100
{/each}
94-
<li class="translateLink"><a class="px-4 py-3" href="https://crwd.in/pattern-monster" target="_blank">{strings.translate}</a></li>
101+
<li class="translateLink">
102+
<a
103+
class="px-4 py-3"
104+
href="https://crwd.in/pattern-monster"
105+
target="_blank"
106+
rel="noopener noreferrer">{strings.translate}</a
107+
>
108+
</li>
95109
</ul>
96110
</div>
97111

@@ -148,7 +162,8 @@
148162
-webkit-background-clip: padding-box;
149163
background-clip: padding-box;
150164
border-radius: var(--border-radius);
151-
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -2px rgb(0 0 0 / 5%);
165+
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%),
166+
0 4px 6px -2px rgb(0 0 0 / 5%);
152167
/* --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
153168
--tw-ring-offset-shadow: 0 0 #0000;
154169
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); */

src/routes/downloads.svelte

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
66
import Constants from "./_constants.js";
77
let page = "downloads";
8-
let { title, url, keywords, desc, image, versions } = Constants.pageDetails(page);
8+
let { title, url, keywords, desc, image, versions } =
9+
Constants.pageDetails(page);
910
1011
export let newPosts = [
1112
"Christmas Joy",
@@ -98,7 +99,9 @@
9899
];
99100
const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
100101
101-
const diffDays = Math.round(Math.abs((new Date() - new Date(2020, 11, 19)) / oneDay));
102+
const diffDays = Math.round(
103+
Math.abs((new Date() - new Date(2020, 11, 19)) / oneDay)
104+
);
102105
103106
let imagePrefix = "https://giguom.com/pattern.monster/images/";
104107
</script>
@@ -136,9 +139,24 @@
136139
{#each newPosts as post, i}
137140
{#if i < diffDays}
138141
<div class="elementGrid">
139-
<img loading="lazy" src={imagePrefix + "downloads/" + post.toLowerCase().replace(/ /g, "-") + "_Twitter.png"} alt={post} title={post} />
142+
<img
143+
loading="lazy"
144+
src={imagePrefix +
145+
"downloads/" +
146+
post.toLowerCase().replace(/ /g, "-") +
147+
"_Twitter.png"}
148+
alt={post}
149+
title={post}
150+
/>
140151
<h2>{post} patterns</h2>
141-
<a class="button-gumroad" href={"https://gum.co/" + post.toLowerCase().replace(/ /g, "-") + "?wanted=true"} target="_blank">
152+
<a
153+
class="button-gumroad"
154+
href={"https://gum.co/" +
155+
post.toLowerCase().replace(/ /g, "-") +
156+
"?wanted=true"}
157+
target="_blank"
158+
rel="noopener noreferrer"
159+
>
142160
<span class="logo" />
143161
<span>{strings.download}</span></a
144162
>
@@ -156,12 +174,6 @@
156174

157175
<Footer />
158176

159-
<!-- <a
160-
rel="prefetch"
161-
href="https://www.redbubble.com/shop/ap/64961293"
162-
class="pattern">
163-
<span>{post.title}</span>
164-
</a> -->
165177
<style>
166178
h1 {
167179
font-size: 2em;
@@ -193,7 +205,8 @@
193205
display: grid;
194206
gap: 0.75em;
195207
justify-items: center;
196-
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
208+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
209+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
197210
border-radius: var(--border-radius);
198211
overflow: hidden;
199212
padding-bottom: 2em;
@@ -206,7 +219,8 @@
206219
box-shadow: rgb(0 0 0 / 40%) 0 0 2px;
207220
color: #999;
208221
display: flex;
209-
font-family: -apple-system, ".SFNSDisplay-Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
222+
font-family: -apple-system, ".SFNSDisplay-Regular", "Helvetica Neue",
223+
Helvetica, Arial, sans-serif;
210224
font-size: 16px;
211225
font-style: normal;
212226
font-weight: 500;

src/routes/index.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@
716716
grid-template-columns: auto;
717717
}
718718
}
719-
.subscribe-waitlist {
719+
/* .subscribe-waitlist {
720720
padding: 0 0.5rem;
721721
background-color: var(--secondary-color);
722722
border-radius: var(--border-radius);
@@ -737,5 +737,5 @@
737737
.subscribe-waitlist span {
738738
padding: 1em 8px 0.75em;
739739
}
740-
}
740+
} */
741741
</style>

src/routes/pattern-accessories.svelte

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
77
const { data, error } = await supabase
88
.from("patterns_v")
9-
.select("pattern_id,pattern_name,category_id,category_name,image_id,item_id,creation_date,cost,from_cost,short_name,image_suffix")
9+
.select(
10+
"pattern_id,pattern_name,category_id,category_name,image_id,item_id,creation_date,cost,from_cost,short_name,image_suffix"
11+
)
1012
.match({ category_name: page })
1113
.order("creation_date", { ascending: false });
1214
@@ -26,12 +28,15 @@
2628
import { createClient } from "@supabase/supabase-js";
2729
export let data;
2830
29-
let { title, url, keywords, desc, image, versions } = Constants.pageDetails(page);
31+
let { title, url, keywords, desc, image, versions } =
32+
Constants.pageDetails(page);
3033
data.sort((a, b) => strings[a.item_id].localeCompare(strings[b.item_id]));
3134
3235
let selection = data[0].category_id;
3336
34-
$: selectedCategory = data.filter((category) => category.category_id === selection);
37+
$: selectedCategory = data.filter(
38+
(category) => category.category_id === selection
39+
);
3540
3641
let categories = data.map((cat) => {
3742
return {
@@ -41,9 +46,13 @@
4146
from_cost: cat.from_cost,
4247
};
4348
});
44-
const uniqCategories = [...new Map(categories.map((item) => [item["category_id"], item])).values()];
49+
const uniqCategories = [
50+
...new Map(categories.map((item) => [item["category_id"], item])).values(),
51+
];
4552
46-
$: selectedUnique = uniqCategories.filter((category) => category.category_id === selection);
53+
$: selectedUnique = uniqCategories.filter(
54+
(category) => category.category_id === selection
55+
);
4756
</script>
4857

4958
<svelte:head>
@@ -73,20 +82,32 @@
7382
</svelte:head>
7483

7584
<section class="p-2 py-6 secondary-text-color pattern-bg pb-20">
76-
<h1 class="text-center mt-12 p-2 mb-2 pb-6 font-semibold text-4xl uppercase">{strings[page]}</h1>
85+
<h1 class="text-center mt-12 p-2 mb-2 pb-6 font-semibold text-4xl uppercase">
86+
{strings[page]}
87+
</h1>
7788

7889
<div class="container mx-auto">
7990
<!-- <div class="range2Controls mt-8"> -->
8091
<div class="radio-toolbar">
8192
{#each uniqCategories as cat}
82-
<input type="radio" id={cat.category_id} name="bg" value={cat.category_id} bind:group={selection} />
83-
<label class="disable-select" for={cat.category_id}>{strings[cat.item_id]}</label>
93+
<input
94+
type="radio"
95+
id={cat.category_id}
96+
name="bg"
97+
value={cat.category_id}
98+
bind:group={selection}
99+
/>
100+
<label class="disable-select" for={cat.category_id}
101+
>{strings[cat.item_id]}</label
102+
>
84103
{/each}
85104
</div>
86105
<!-- </div> -->
87106
</div>
88107
<div class="container mx-auto gray-text p-4 pt-12 pb-4 title">
89-
<h2 class="inline-block font-semibold secondary-text-color">{strings[selectedUnique[0].item_id]}</h2>
108+
<h2 class="inline-block font-semibold secondary-text-color">
109+
{strings[selectedUnique[0].item_id]}
110+
</h2>
90111
<h3 class="inline-block font-normal">
91112
&nbsp;({selectedUnique[0].from_cost ? "From " : ""}
92113
{selectedUnique[0].cost})
@@ -100,34 +121,51 @@
100121
{#if i % 10 == 4}
101122
<a
102123
target="_blank"
124+
rel="noopener noreferrer"
103125
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
104126
' ',
105127
'-'
106128
)}-Pattern-Monster-by-catchspider2002/{link.pattern_id}.{link.category_id}?asc=u"
107-
class="col-span-2 row-span-2 md:col-start-3 md:row-start-{(i % 10) * Math.round(i / 10) + 1}"
129+
class="col-span-2 row-span-2 md:col-start-3 md:row-start-{(i % 10) *
130+
Math.round(i / 10) +
131+
1}"
108132
>
109-
<img src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg" alt="" class="right min-h-96 transition" />
133+
<img
134+
src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg"
135+
alt=""
136+
class="right min-h-96 transition"
137+
/>
110138
</a>
111139
{:else if i % 10 == 5}
112140
<a
113141
target="_blank"
142+
rel="noopener noreferrer"
114143
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
115144
' ',
116145
'-'
117146
)}-Pattern-Monster-by-catchspider2002/{link.pattern_id}.{link.category_id}?asc=u"
118147
class="col-span-2 row-span-2 md:col-start-1 md:row-start-3"
119148
>
120-
<img src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg" alt="" class="left rounded min-h-96 transition" />
149+
<img
150+
src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg"
151+
alt=""
152+
class="left rounded min-h-96 transition"
153+
/>
121154
</a>
122155
{:else}
123156
<a
124157
target="_blank"
158+
rel="noopener noreferrer"
125159
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
126160
' ',
127161
'-'
128162
)}-Pattern-Monster-by-catchspider2002/{link.pattern_id}.{link.category_id}?asc=u"
129163
>
130-
<img src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg" alt="" class="min-h-48 transition" />
164+
<img
165+
src="https://ih1.redbubble.net/image.{link.image_id}/{link.image_suffix}.jpg"
166+
alt=""
167+
class="min-h-48 transition"
168+
/>
131169
</a>
132170
{/if}
133171
{/each}
@@ -167,7 +205,8 @@
167205
border-radius: 0.25rem;
168206
--tw-bg-opacity: 1;
169207
background-color: rgba(var(--gray-500), var(--tw-bg-opacity));
170-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
208+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
209+
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
171210
}
172211
173212
.col-span-2 {
@@ -254,7 +293,8 @@
254293
255294
.transition {
256295
transform: scaleX(1) scaleY(1);
257-
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter,
296+
transition-property: background-color, border-color, color, fill, stroke,
297+
opacity, box-shadow, transform, filter, backdrop-filter,
258298
-webkit-backdrop-filter;
259299
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
260300
transition-duration: 500ms;
@@ -270,7 +310,8 @@
270310
width: 100%;
271311
overflow: hidden;
272312
border-radius: var(--border-radius);
273-
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
313+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
314+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
274315
}
275316
276317
.title {

src/routes/pattern-home-living.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
{#each selectedCategory as link, i}
100100
{#if i % 10 == 4}
101101
<a
102-
target="_blank"
102+
target="_blank" rel="noopener noreferrer"
103103
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
104104
' ',
105105
'-'
@@ -110,7 +110,7 @@
110110
</a>
111111
{:else if i % 10 == 5}
112112
<a
113-
target="_blank"
113+
target="_blank" rel="noopener noreferrer"
114114
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
115115
' ',
116116
'-'
@@ -121,7 +121,7 @@
121121
</a>
122122
{:else}
123123
<a
124-
target="_blank"
124+
target="_blank" rel="noopener noreferrer"
125125
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
126126
' ',
127127
'-'

src/routes/pattern-phone-cases.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
{#each selectedCategory as link, i}
100100
{#if i % 10 == 4}
101101
<a
102-
target="_blank"
102+
target="_blank" rel="noopener noreferrer"
103103
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
104104
' ',
105105
'-'
@@ -110,7 +110,7 @@
110110
</a>
111111
{:else if i % 10 == 5}
112112
<a
113-
target="_blank"
113+
target="_blank" rel="noopener noreferrer"
114114
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
115115
' ',
116116
'-'
@@ -121,7 +121,7 @@
121121
</a>
122122
{:else}
123123
<a
124-
target="_blank"
124+
target="_blank" rel="noopener noreferrer"
125125
href="https://www.redbubble.com/i/{link.short_name}/{link.pattern_name.replace(
126126
' ',
127127
'-'

0 commit comments

Comments
 (0)