diff --git a/assets/css/metadata.css b/assets/css/metadata.css index d6ab001..872fef6 100644 --- a/assets/css/metadata.css +++ b/assets/css/metadata.css @@ -47,7 +47,7 @@ /* Metadata popup */ .metadata-popup { - background: var(--card-bg); + background: var(--card-background); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); diff --git a/generate_gallery.py b/generate_gallery.py index e47e60f..65b622c 100644 --- a/generate_gallery.py +++ b/generate_gallery.py @@ -328,8 +328,6 @@ def main(clean_first: bool = False) -> None: else: print(f"Warning: Assets directory {assets_src} not found") - plot_metadata_cache = {} - for source in CONFIG.sources: source_path = Path(source.path) @@ -359,21 +357,12 @@ def main(clean_first: bool = False) -> None: else: print(f"Skipping {source_png_path.name} (up to date)") - # Resolve metadata for this single plot - plot_metadata = resolve_metadata_for_plot(source_path, {}) - plot_metadata_cache[source_path.stem] = plot_metadata - items = [{ "name": source_path.stem, "pdf_href": pdf_name, - "png_href": png_name, - "metadata": plot_metadata + "png_href": png_name }] - # Save metadata cache for this directory - plot_cache = {source_path.stem: plot_metadata} - save_metadata_cache(source_web_dir, plot_cache) - # Calculate statistics for single file current_stats = calculate_directory_stats(source_web_dir) stats = { diff --git a/refresh_gallery.py b/refresh_gallery.py index 6e978c2..e69de29 100755 --- a/refresh_gallery.py +++ b/refresh_gallery.py @@ -1,53 +0,0 @@ -#!/usr/bin/env python3 -""" -Simple CGI script to refresh the gallery. -Just calls the main generate_gallery.py script. -""" - -import subprocess - - -def main(): - # Output HTTP headers - print("Content-Type: text/plain") - print("Cache-Control: no-cache") - print() # Empty line to end headers - - try: - # Call the gallery generation script - result = subprocess.run( - [ - "python3", - "/work/kschmidt/web/generate_gallery.py" - ], - capture_output=True, - text=True, - timeout=300, - ) - - if result.returncode == 0: - print("Gallery refresh successful!") - print("\nOutput:") - print(result.stdout) - if result.stderr: - print("\nWarnings:") - print(result.stderr) - else: - print(f"Gallery refresh failed with return code " - f"{result.returncode}") - print("\nError output:") - print(result.stderr) - if result.stdout: - print("\nStandard output:") - print(result.stdout) - - except subprocess.TimeoutExpired: - print("Gallery refresh timed out after 5 minutes") - except Exception as e: - print(f"Error running gallery refresh: {e}") - import traceback - traceback.print_exc() - - -if __name__ == "__main__": - main() diff --git a/templates/gallery.html b/templates/gallery.html index db63f8a..6de9970 100644 --- a/templates/gallery.html +++ b/templates/gallery.html @@ -41,11 +41,7 @@ {{ item.name }} -
{{ item.name }}
diff --git a/test_metadata.html b/test_metadata.html new file mode 100644 index 0000000..e69de29