-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgears.pug
53 lines (45 loc) · 2.57 KB
/
gears.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
extends layout
block content
.container
nav.navMain.gear(style="padding: 1rem 0 2rem;"): ul
li: a(href="/gear/") Camera Kit
li: a(href="/gear/podcasting") Podcasting Kit
li: a(href="/gear/travel") Travel Gear
li: a(href="/gear/desk") Desk Setup
li: a(href="/gear/software") Apps & Services
li: a(href="/gear/dream") Dream Gear
li: a(href="/gear/previous") Previously Owned
article.container
!= content
article.gear-list
-
categoryFilter = (typeof categoryFilter === 'string') ? categoryFilter.split(',').trim() : categoryFilter
const gearFiltered = gear.filter((g) => {
g.Categories = g.Categories.toLowerCase()
for (const f of categoryFilter) {
if (g.Categories.includes(f.toLowerCase())) continue;
else return false;
}
return true;
})
each g in gearFiltered
-
const isAmazon = (g.Link.includes('amazon'))
const linkAmazon = (isAmazon) ? `https://assoc-redirect.amazon.com/g/r/${g.Link}?tag=cstrax-20` : g.Link
.gear-item
- const imageGearItem = `/assets/images/gear/${g.Slug}.png`
img(src=meta.imageResizer(640, 0, imageGearItem) title=g.Title onerror="this.src='https://via.placeholder.com/640x427/FFFFFF/?text=Image+not+found'")
//- img(src=meta.imageResizer(640, 0, `/assets/images/gear/${g.Slug}.png`) title=g.Title)
h3: a(href=linkAmazon title=g.Title target='_blank')= g.Title
p= g.Description
a.gear-link(href=linkAmazon title=g.Title target='_blank')
.container
h2 Important Disclosure
p Most links on this page are affiliate links, which means that if you choose to make a purchase, I will earn a commission. This commission comes at no additional cost to you. Please understand that I have experience with all of these companies or products, and I recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.
p Please do not spend any money on these products unless you feel you need them or that they will help you achieve your goals.
p I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
//- Update Images (by downloading them from the server because there are more images than in Google Drive)
//- Make sure the links are correct and affiliated?!
//- Update the images that have strange bordres
//- Add new products and images
//- Create individual files for the books