This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit c7d60560176acb4835a3bf6446a006f6a5ac384e
Author: Greg Stein <[email protected]>
AuthorDate: Tue Oct 7 11:06:24 2025 -0500

    Shift CSS to an app-wide file. Add date pickers (draft).
    
    * pages.py: get the Election state, and pass to template
    * steve.css: new, pulled from the css that was inside manage.ezt
    * header.ezt: bring in the app CSS file.
    * manage.ezt: CSS has moved elsewhere. show the state (debug/draft).
        add a couple date pickers, to start experimenting.
---
 v3/server/pages.py             |  3 +++
 v3/server/static/css/steve.css | 51 +++++++++++++++++++++++++++++++++++++
 v3/server/templates/header.ezt |  4 ++-
 v3/server/templates/manage.ezt | 57 +++++++-----------------------------------
 4 files changed, 66 insertions(+), 49 deletions(-)

diff --git a/v3/server/pages.py b/v3/server/pages.py
index daaedd6..af68b68 100644
--- a/v3/server/pages.py
+++ b/v3/server/pages.py
@@ -191,6 +191,9 @@ async def manage_page(election):
     md = election.get_metadata()
     result.e_title = md[1]
 
+    state = election.get_state()
+    result.e_state = state
+
     result.issues = election.list_issues()
     result.issue_count = len(result.issues)
 
diff --git a/v3/server/static/css/steve.css b/v3/server/static/css/steve.css
new file mode 100644
index 0000000..21ca5d2
--- /dev/null
+++ b/v3/server/static/css/steve.css
@@ -0,0 +1,51 @@
+.state-diagram {
+    display: grid;
+    grid-template-columns: auto auto auto auto auto; /* State1 Arrow1 State2 
Arrow2 State3 */
+    grid-template-rows: auto auto; /* States row, Buttons row */
+    gap: 10px;
+    justify-items: center;
+    align-items: center;
+    max-width: 700px;
+    margin: 20px auto;
+    padding: 20px;
+    border: 1px solid #dee2e6;
+    border-radius: 8px;
+}
+
+.state {
+    padding: 8px 16px;
+    border-radius: 4px;
+    text-align: center;
+    font-size: 1rem;
+}
+
+.current {
+    font-weight: bold;
+    background-color: #fff3cd; /* Bootstrap warning light */
+    border: 1px solid #ffca2c;
+}
+
+.arrow {
+    font-size: 1.2em;
+    color: #6c757d; /* Bootstrap secondary */
+}
+
+.action-button {
+    grid-row: 2;
+    font-weight: bold;
+}
+
+.open-button {
+    grid-column: 3; /* Aligned under State2 (Open for voting) */
+}
+
+.close-button {
+    grid-column: 5; /* Aligned under State3 (Closed) */
+}
+
+/* State positions */
+#state-editing { grid-column: 1; grid-row: 1; }
+#arrow1 { grid-column: 2; grid-row: 1; }
+#state-open { grid-column: 3; grid-row: 1; }
+#arrow2 { grid-column: 4; grid-row: 1; }
+#state-closed { grid-column: 5; grid-row: 1; }
diff --git a/v3/server/templates/header.ezt b/v3/server/templates/header.ezt
index e33abc9..2a59c23 100644
--- a/v3/server/templates/header.ezt
+++ b/v3/server/templates/header.ezt
@@ -4,7 +4,9 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Apache STeVe: [title]</title>
-    <link href="/static/css/bootstrap.min.css" rel="stylesheet" 
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
+    <link href="/static/css/bootstrap.min.css" rel="stylesheet"
+          
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9">
+    <link href="/static/css/steve.css" rel="stylesheet">
 </head>
 <body>
 
diff --git a/v3/server/templates/manage.ezt b/v3/server/templates/manage.ezt
index dbcef4c..7a86d47 100644
--- a/v3/server/templates/manage.ezt
+++ b/v3/server/templates/manage.ezt
@@ -1,52 +1,4 @@
 [include "header.ezt"]
-
-    <style>
-        .state-diagram {
-            display: grid;
-            grid-template-columns: auto auto auto auto auto; /* State1 Arrow1 
State2 Arrow2 State3 */
-            grid-template-rows: auto auto; /* States row, Buttons row */
-            gap: 10px;
-            justify-items: center;
-            align-items: center;
-            max-width: 700px;
-            margin: 20px auto;
-            padding: 20px;
-            border: 1px solid #dee2e6;
-            border-radius: 8px;
-        }
-
-        .state {
-            padding: 8px 16px;
-            border-radius: 4px;
-            text-align: center;
-            font-size: 1rem;
-        }
-
-        .current {
-            font-weight: bold;
-            background-color: #fff3cd; /* Bootstrap warning light */
-            border: 1px solid #ffca2c;
-        }
-
-        .arrow {
-            font-size: 1.2em;
-            color: #6c757d; /* Bootstrap secondary */
-        }
-
-        .action-button {
-            grid-row: 2;
-            font-weight: bold;
-        }
-
-        .open-button {
-            grid-column: 3; /* Aligned under State2 (Open for voting) */
-        }
-
-        .close-button {
-            grid-column: 5; /* Aligned under State3 (Closed) */
-        }
-    </style>
-
     <div class="container">
         <h1>[title]</h1>
         <div class="sticky-top">
@@ -103,6 +55,15 @@
     </div>
 
 
+        <div>
+            State: [e_state]
+        </div>
+        <div>
+            Estimate to open: <input type="date">
+        </div>
+        <div class="mb-3">
+            Estimate to close: <input type="date">
+        </div>
         <ul>
             [for issues]
                 <li>[issues.title]</li>

Reply via email to