feat(website): add KoalaSync vs Watch2Gether comparison page

This commit is contained in:
KoalaDev
2026-07-08 16:20:44 +02:00
parent c3827fa4b7
commit 9f02a47d98
21 changed files with 446 additions and 5 deletions
+15
View File
@@ -201,12 +201,15 @@ async function compile() {
// Read alternative page templates
const telepartyTemplatePath = path.join(websiteDir, 'alternatives/teleparty.html');
const screenSharingTemplatePath = path.join(websiteDir, 'alternatives/screen-sharing.html');
const watch2getherTemplatePath = path.join(websiteDir, 'alternatives/watch2gether.html');
const overviewTemplatePath = path.join(websiteDir, 'alternatives/index.html');
const hasTelepartyTemplate = fs.existsSync(telepartyTemplatePath);
const hasScreenSharingTemplate = fs.existsSync(screenSharingTemplatePath);
const hasWatch2getherTemplate = fs.existsSync(watch2getherTemplatePath);
const hasOverviewTemplate = fs.existsSync(overviewTemplatePath);
const telepartyTemplate = hasTelepartyTemplate ? fs.readFileSync(telepartyTemplatePath, 'utf8') : '';
const screenSharingTemplate = hasScreenSharingTemplate ? fs.readFileSync(screenSharingTemplatePath, 'utf8') : '';
const watch2getherTemplate = hasWatch2getherTemplate ? fs.readFileSync(watch2getherTemplatePath, 'utf8') : '';
const overviewTemplate = hasOverviewTemplate ? fs.readFileSync(overviewTemplatePath, 'utf8') : '';
// Preload English locale for fallback
@@ -261,6 +264,12 @@ async function compile() {
const ssCompiled = compileAlternativePage(screenSharingTemplate, locale, lang, '../', '');
fs.writeFileSync(path.join(altDir, 'screen-sharing.html'), ssCompiled);
}
if (hasWatch2getherTemplate) {
const altDir = path.join(wwwDir, 'alternatives');
fs.mkdirSync(altDir, { recursive: true });
const w2gCompiled = compileAlternativePage(watch2getherTemplate, locale, lang, '../', '');
fs.writeFileSync(path.join(altDir, 'watch2gether.html'), w2gCompiled);
}
if (hasOverviewTemplate) {
const altDir = path.join(wwwDir, 'alternatives');
fs.mkdirSync(altDir, { recursive: true });
@@ -288,6 +297,12 @@ async function compile() {
const ssCompiled = compileAlternativePage(screenSharingTemplate, locale, lang, '../../', lang + '/');
fs.writeFileSync(path.join(langAltDir, 'screen-sharing.html'), ssCompiled);
}
if (hasWatch2getherTemplate) {
const langAltDir = path.join(langDir, 'alternatives');
fs.mkdirSync(langAltDir, { recursive: true });
const w2gCompiled = compileAlternativePage(watch2getherTemplate, locale, lang, '../../', lang + '/');
fs.writeFileSync(path.join(langAltDir, 'watch2gether.html'), w2gCompiled);
}
if (hasOverviewTemplate) {
const langAltDir = path.join(langDir, 'alternatives');
fs.mkdirSync(langAltDir, { recursive: true });