File size: 1,587 Bytes
c4a540c
54e22d4
4215608
 
 
 
c4a540c
 
 
 
 
 
 
 
 
 
4215608
 
 
 
 
 
 
 
 
 
 
8666d1c
 
4215608
 
 
 
 
 
 
 
 
 
 
 
 
8666d1c
4215608
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
const LINKS = {
  github: "https://github.com/preyashyadav/pheromone-ai",
  demoVideo: "https://youtu.be/nqk8-5RG2k0",
  x: "https://x.com/preyashyadav_/status/2053254234741850309",
  technicalWalkthrough: "https://github.com/preyashyadav/pheromone-ai/blob/main/docs/TECHNICAL_WALKTHROUGH.md",
  site: "https://preyashyadav.com",
};

function setLink(id, href, label) {
  const el = document.getElementById(id);
  if (!el) return;
  el.setAttribute("href", href);
  if (label) el.textContent = label;
}

setLink("githubLinkTop", LINKS.github, "GitHub");
setLink("githubLink", LINKS.github, "GitHub");
setLink("githubLinkBottom", LINKS.github, "GitHub");
setLink("demoLink", LINKS.demoVideo, "View Demo Video");
setLink("demoLink2", LINKS.demoVideo, "View Demo Video");
setLink("demoLink3", LINKS.demoVideo, "Demo Video");
setLink("xLink", LINKS.x, "Build-in-Public Thread");
setLink("siteLink", LINKS.site, "preyashyadav.com");
setLink("techLink", LINKS.technicalWalkthrough, "Technical Walkthrough");

for (const el of document.querySelectorAll('[data-now="iso"]')) {
  el.textContent = new Date().toISOString();
}

const revealEls = Array.from(document.querySelectorAll(".reveal"));
for (const el of revealEls) el.classList.add("js-reveal");

const observer = new IntersectionObserver(
  (entries) => {
    for (const entry of entries) {
      if (!entry.isIntersecting) continue;
      entry.target.classList.add("inView");
      observer.unobserve(entry.target);
    }
  },
  { threshold: 0.15, rootMargin: "0px 0px -10% 0px" },
);

for (const el of revealEls) observer.observe(el);