diff --git a/databuild/web/templates.rs b/databuild/web/templates.rs
index d48d35e..6fe0c85 100644
--- a/databuild/web/templates.rs
+++ b/databuild/web/templates.rs
@@ -212,20 +212,12 @@ impl Default for BaseContext {
}
// =============================================================================
-// Shared Template Components (as Askama macros)
+// Template Structure
// =============================================================================
//
-// Note: Askama's source attribute doesn't support concat! or any other way to
-// share template code between structs. So the macro definitions (head, nav, footer)
-// are duplicated in each template's source string. This is a limitation of
-// proc-macro attribute evaluation order.
-//
-// Each template defines three Askama macros:
-// - head(title): HTML head with CSS styles
-// - nav(active, graph_label): Navigation bar
-// - footer(): Closing tags
-//
-// The page-specific content is formatted for readability.
+// Templates are file-based and located in databuild/web/templates/.
+// Common components (head, nav, footer) are defined as macros in base.html
+// and imported by each page template with: {% import "base.html" as base %}
// =============================================================================
// Home Page
diff --git a/databuild/web/templates/base.html b/databuild/web/templates/base.html
new file mode 100644
index 0000000..391430a
--- /dev/null
+++ b/databuild/web/templates/base.html
@@ -0,0 +1,198 @@
+{#
+ Base template macros for DataBuild dashboard.
+ Import these in page templates with: {% import "base.html" as base %}
+ Then call: {% call base::head("Page Title") %}, {% call base::nav(...) %}, {% call base::footer() %}
+#}
+
+{% macro head(title) %}
+
+
+
@@ -88,8 +18,8 @@
{% match job_run.last_heartbeat_at %}
- {% when Some with (ts) %}{{ ts }}
- {% when None %}-
+ {% when Some with (ts) %}{{ ts }}
+ {% when None %}-
{% endmatch %}
@@ -97,8 +24,8 @@
{% match partition.last_updated_timestamp %}
- {% when Some with (ts) %}{{ ts }}
- {% when None %}-
+ {% when Some with (ts) %}{{ ts }}
+ {% when None %}-
{% endmatch %}