From b19d3278fe32b946a3f5698266a3d5752e622e01 Mon Sep 17 00:00:00 2001 From: Reimar Date: Mon, 23 Mar 2026 20:12:02 +0100 Subject: [PATCH] Add provider pages for SEO --- .gitignore | 1 + build.sh | 16 ++++ provider-template.html | 82 ++++++++++++++++++++ public/assets/scripts/main.js | 4 +- public/assets/styles/file-picker-section.css | 2 +- public/assets/styles/main.css | 15 ++++ public/sitemap.txt | 8 ++ 7 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 provider-template.html create mode 100644 public/sitemap.txt diff --git a/.gitignore b/.gitignore index 65377ff..23f238e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ public/assets/scripts/ffmpeg/ public/assets/scripts/core/ +public/providers diff --git a/build.sh b/build.sh index 6af0241..60fbe9e 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,21 @@ #!/bin/sh +# Generate provider pages + +declare -a providers=(Discord Gmail "Yahoo Mail" Messenger Signal WhatsApp) +declare -a slugs=(discord gmail yahoo-mail messenger signal whatsapp) +declare -a sizes=(10 25 25 100 100 180) + +for i in "${!providers[@]}" +do + mkdir -p "public/providers/${slugs[$i]}" + cp provider-template.html "public/providers/${slugs[$i]}/index.html" + sed -i -e "s/{{provider}}/${providers[$i]}/g" -e "s/{{size}}/${sizes[$i]}/g" -e "s/{{slug}}/${slugs[$i]}/g" "public/providers/${slugs[$i]}/index.html" +done +exit + +# Download ffmpeg libraries + fetch () { echo "Downloading $1..." diff --git a/provider-template.html b/provider-template.html new file mode 100644 index 0000000..3bf82ac --- /dev/null +++ b/provider-template.html @@ -0,0 +1,82 @@ + + + + + + + Compress videos to {{size}}MB for uploading to {{provider}} + + + + + + + + + + + + + +

compact.video

+

Compress your video to {{size}}MB for uploading to {{provider}}

+ +
+ +
+ +
+ + + + + + +
+ +

+ To save storage space on their servers, {{provider}} only + allows uploading videos that are less than {{size}}MB in size. + This online tool will allow you to compress your video + file such that it hits exactly this file size, so you + can upload it to {{provider}}. +

+ + +
+ + + + + + + diff --git a/public/assets/scripts/main.js b/public/assets/scripts/main.js index bf5244c..931f804 100644 --- a/public/assets/scripts/main.js +++ b/public/assets/scripts/main.js @@ -94,8 +94,8 @@ async function compress(filesize, filesizeUnit) { } document.getElementById("compress").onclick = async () => { - const filesize = document.getElementById("filesize").value; - const filesizeUnit = document.getElementById("filesize-unit").value; + const filesize = window.FILE_SIZE || document.getElementById("filesize").value; + const filesizeUnit = window.FILE_SIZE_UNIT || document.getElementById("filesize-unit").value; await compress(filesize, filesizeUnit); } diff --git a/public/assets/styles/file-picker-section.css b/public/assets/styles/file-picker-section.css index 7f67669..56d870e 100644 --- a/public/assets/styles/file-picker-section.css +++ b/public/assets/styles/file-picker-section.css @@ -55,7 +55,7 @@ border-left: 1px solid #00BCD4; } -#compress { +#filesize ~ #compress { margin-left: 1rem; } diff --git a/public/assets/styles/main.css b/public/assets/styles/main.css index bd5a868..5df6e85 100644 --- a/public/assets/styles/main.css +++ b/public/assets/styles/main.css @@ -18,6 +18,15 @@ h1 { margin-bottom: 1rem; } +h2 { + color: #757575; +} + +section { + max-width: 500px; + margin: auto; +} + .gradient-text { background-image: linear-gradient(to right, #4CAF50, #4CAF50 20%, #00BCD4 80%); background-clip: text; @@ -29,6 +38,12 @@ p { font-size: 0.8rem; } +hr { + border: none; + border-top: 1px solid #CECECE; + margin: 3rem auto; +} + * { opacity: 1; transition: opacity 300ms; diff --git a/public/sitemap.txt b/public/sitemap.txt new file mode 100644 index 0000000..e5b1302 --- /dev/null +++ b/public/sitemap.txt @@ -0,0 +1,8 @@ +https://compact.video/ +https://compact.video/providers/discord/ +https://compact.video/providers/gmail/ +https://compact.video/providers/yahoo-mail/ +https://compact.video/providers/messenger/ +https://compact.video/providers/signal/ +https://compact.video/providers/whatsapp/ +