release polish

This commit is contained in:
Nuno Coração
2026-01-01 23:56:30 +00:00
parent 949e367a01
commit e8d22f1f1b
14 changed files with 139 additions and 22 deletions

View File

@@ -52,7 +52,7 @@ lite-youtube > iframe {
}
/* play button */
lite-youtube > .lty-playbtn {
lite-youtube > .lyt-playbtn {
display: block;
/* Make the button element cover the whole area for a large hover/click target… */
width: 100%;
@@ -69,8 +69,8 @@ lite-youtube > .lty-playbtn {
border: 0;
}
lite-youtube:hover > .lty-playbtn,
lite-youtube .lty-playbtn:focus {
lite-youtube:hover > .lyt-playbtn,
lite-youtube .lyt-playbtn:focus {
filter: none;
}
@@ -79,7 +79,7 @@ lite-youtube.lyt-activated {
cursor: unset;
}
lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated > .lty-playbtn {
lite-youtube.lyt-activated > .lyt-playbtn {
opacity: 0;
pointer-events: none;
}

View File

@@ -14,7 +14,7 @@ class LiteYTEmbed extends HTMLElement {
connectedCallback() {
this.videoId = this.getAttribute('videoid');
let playBtnEl = this.querySelector('.lty-playbtn');
let playBtnEl = this.querySelector('.lyt-playbtn,.lty-playbtn');
// A label for the button takes priority over a [playlabel] attribute on the custom-element
this.playLabel = (playBtnEl && playBtnEl.textContent.trim()) || this.getAttribute('playlabel') || 'Play';
@@ -34,7 +34,8 @@ class LiteYTEmbed extends HTMLElement {
if (!playBtnEl) {
playBtnEl = document.createElement('button');
playBtnEl.type = 'button';
playBtnEl.classList.add('lty-playbtn');
// Include the mispelled 'lty-' in case it's still being used. https://github.com/paulirish/lite-youtube-embed/issues/65
playBtnEl.classList.add('lyt-playbtn', 'lty-playbtn');
this.append(playBtnEl);
}
if (!playBtnEl.textContent) {
@@ -200,6 +201,8 @@ class LiteYTEmbed extends HTMLElement {
iframeEl.title = this.playLabel;
iframeEl.allow = 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture';
iframeEl.allowFullscreen = true;
// Required by Youtube to fix Error 153
iframeEl.referrerPolicy = 'strict-origin-when-cross-origin';
// AFAIK, the encoding here isn't necessary for XSS, but we'll do it only because this is a URL
// https://stackoverflow.com/q/64959723/89484
iframeEl.src = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`;

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [Persönliche Seite, Blog]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [sitio personal, Blog]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [Site personnel, Blogue]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [Sito personale, Blog]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [個人サイト, ブログ]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,13 @@
---
title: "Noor Khafidzin"
tags: [Personal site,Blog]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [Site pessoal, Blogue]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [Site pessoal, Blogue]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

View File

@@ -0,0 +1,14 @@
---
title: "Noor Khafidzin"
tags: [个人网站, 博客]
externalUrl: "https://noorkhafidzin.com/"
weight: 113
showDate: false
showAuthor: false
showReadingTime: false
showEdit: false
showLikes: false
showViews: false
layoutBackgroundHeaderSpace: false
---

14
package-lock.json generated
View File

@@ -825,13 +825,6 @@
"tailwindcss": "dist/index.mjs"
}
},
"node_modules/@tailwindcss/cli/node_modules/tailwindcss": {
"version": "4.1.17",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz",
"integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==",
"dev": true,
"license": "MIT"
},
"node_modules/@tailwindcss/forms": {
"version": "0.5.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.11.tgz",
@@ -860,13 +853,6 @@
"tailwindcss": "4.1.18"
}
},
"node_modules/@tailwindcss/node/node_modules/tailwindcss": {
"version": "4.1.17",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz",
"integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==",
"dev": true,
"license": "MIT"
},
"node_modules/@tailwindcss/oxide": {
"version": "4.1.18",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.18.tgz",

View File

@@ -127,9 +127,12 @@ async function translateFrontMatterTags(block, targetLang, tags) {
console.log(i, user.title, dir);
await fs.writeFile(dir + "/index.md", userMDFile);
for (const lang of targetLangs) {
for (var lang of targetLangs) {
const langfilename = lang
if (lang == "pt-br" || lang == "pt-pt")
lang = "pt"
const content = await translateFrontMatterTags(userMDFile, lang, user.tags);
await fs.writeFile(dir + `/index.${lang}.md`, content);
await fs.writeFile(dir + `/index.${langfilename}.md`, content);
}
await page.goto(user.url);
await page.screenshot({ path: dir + "/feature.webp", type: "webp", quality: 50 });