From ab2bece39ab9cdefca259d95c777395caf333ea5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 08:30:32 +0000 Subject: [PATCH] feat: Add Forest Seeds Promotion video page This commit introduces a new page dedicated to promoting forest seeds through HTML5 videos. The new page, `forest_seeds.html`, allows users to view and share videos related to forest seeds. It includes: - A video submission form. - A gallery for featured videos. - A dedicated JavaScript file (`forest_seeds.js`) that interacts with a new API endpoint (`/api/forest_seeds_videos`). - A corresponding CSS file (`forest_seeds.css`) for styling. A link to the new page has been added to the "Community" section of the `index.html` file. --- eco_project/backend/static/forest_seeds.css | 23 ++++++ eco_project/backend/static/forest_seeds.html | 39 +++++++++ eco_project/backend/static/forest_seeds.js | 83 ++++++++++++++++++++ eco_project/backend/static/index.html | 1 + 4 files changed, 146 insertions(+) create mode 100644 eco_project/backend/static/forest_seeds.css create mode 100644 eco_project/backend/static/forest_seeds.html create mode 100644 eco_project/backend/static/forest_seeds.js diff --git a/eco_project/backend/static/forest_seeds.css b/eco_project/backend/static/forest_seeds.css new file mode 100644 index 0000000..83618aa --- /dev/null +++ b/eco_project/backend/static/forest_seeds.css @@ -0,0 +1,23 @@ +.video-container { + display: flex; + flex-wrap: wrap; + justify-content: space-around; + padding: 20px; +} + +.video-item { + width: 300px; + margin: 15px; + border: 1px solid #ccc; + box-shadow: 0 0 5px rgba(0,0,0,0.1); +} + +.video-item iframe { + width: 100%; + height: 170px; +} + +.video-item-title { + padding: 10px; + font-weight: bold; +} diff --git a/eco_project/backend/static/forest_seeds.html b/eco_project/backend/static/forest_seeds.html new file mode 100644 index 0000000..2bb0f78 --- /dev/null +++ b/eco_project/backend/static/forest_seeds.html @@ -0,0 +1,39 @@ + + +
+ + +Error fetching videos: ${error.message}
`; + } + } + + function displayVideos(videos) { + if (videos.length === 0) { + videoContainer.innerHTML = 'No videos to display.
'; + return; + } + let html = ''; + videos.forEach(video => { + const embedUrl = video.url.includes('youtube.com/watch?v=') + ? video.url.replace('watch?v=', 'embed/') + : video.url; + + html += ` +Share your ideas and connect with others.