astro-accelerator 6.0.6 → 6.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.0.6",
2
+ "version": "6.0.8",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -34,9 +34,9 @@
34
34
  "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
35
35
  },
36
36
  "dependencies": {
37
- "@astrojs/mdx": "^5.0.3",
37
+ "@astrojs/mdx": "^5.0.2",
38
38
  "@img/sharp-linux-x64": "^0.34.5",
39
- "astro": "^6.1.1",
39
+ "astro": "^6.0.8",
40
40
  "astro-accelerator-utils": "^0.3.76",
41
41
  "cspell": "^9.7.0",
42
42
  "csv": "^6.5.1",
@@ -41,12 +41,11 @@ function handleClick(e) {
41
41
  const location = this.getAttribute(dataAttributeName);
42
42
 
43
43
  if (location) {
44
- // Ensure links are same origin
45
44
  const isSafeUrl = location.startsWith('/') || location.startsWith(window.location.origin);
46
45
 
47
46
  if (isSafeUrl) {
48
47
  e.preventDefault();
49
- document.location = location;
48
+ window.location.href = new URL(location, window.location.origin).href;
50
49
  return false;
51
50
  }
52
51
  }
@@ -40,10 +40,16 @@ function enhanceYoutubeLinks() {
40
40
  video.classList.add('init');
41
41
  video.setAttribute('role', 'button');
42
42
 
43
+ const text = video.textContent;
43
44
  video.innerHTML = `<div class="yt-video">
44
45
  <div class="play-icon" style="background-image: url(https://img.youtube.com/vi/${id}/0.jpg)">▶</div>
45
- <div class="title">${video.textContent}</div>
46
+ <div class="title"></div>
46
47
  </div>`;
48
+
49
+ const titleEl = video.querySelector('.title');
50
+ if (titleEl) {
51
+ titleEl.textContent = text;
52
+ }
47
53
  }
48
54
 
49
55
  /**