Upload 18 files
Browse files- __pycache__/app.cpython-312.pyc +0 -0
- app.py +7 -5
- assets/style.css +39 -39
- components/__pycache__/buttons.cpython-312.pyc +0 -0
- components/__pycache__/card.cpython-312.pyc +0 -0
- components/__pycache__/header.cpython-312.pyc +0 -0
- components/buttons.py +2 -2
- components/card.py +3 -3
- components/header.py +2 -2
__pycache__/app.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
|
|
|
app.py
CHANGED
|
@@ -123,9 +123,11 @@ if not st.session_state.cards:
|
|
| 123 |
unsafe_allow_html=True,
|
| 124 |
)
|
| 125 |
|
|
|
|
| 126 |
for index, _card in enumerate(st.session_state.cards):
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
|
|
|
|
|
| 123 |
unsafe_allow_html=True,
|
| 124 |
)
|
| 125 |
|
| 126 |
+
card_columns = st.columns(2, gap="large")
|
| 127 |
for index, _card in enumerate(st.session_state.cards):
|
| 128 |
+
with card_columns[index % 2]:
|
| 129 |
+
render_card(
|
| 130 |
+
index=index,
|
| 131 |
+
on_save=handle_save,
|
| 132 |
+
on_delete=handle_delete,
|
| 133 |
+
)
|
assets/style.css
CHANGED
|
@@ -22,9 +22,9 @@
|
|
| 22 |
}
|
| 23 |
|
| 24 |
[data-testid="stAppViewContainer"] > .main {
|
| 25 |
-
max-width:
|
| 26 |
-
padding-top:
|
| 27 |
-
padding-bottom:
|
| 28 |
}
|
| 29 |
|
| 30 |
[data-testid="stHeader"] {
|
|
@@ -36,13 +36,13 @@
|
|
| 36 |
}
|
| 37 |
|
| 38 |
.hero-shell {
|
| 39 |
-
padding:
|
| 40 |
border: 1px solid var(--border);
|
| 41 |
border-radius: 22px;
|
| 42 |
background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.88));
|
| 43 |
backdrop-filter: blur(16px);
|
| 44 |
box-shadow: var(--shadow);
|
| 45 |
-
margin-bottom: 0.
|
| 46 |
}
|
| 47 |
|
| 48 |
.hero-row {
|
|
@@ -63,31 +63,25 @@
|
|
| 63 |
}
|
| 64 |
|
| 65 |
.hero-title {
|
| 66 |
-
font-size: clamp(1.
|
| 67 |
line-height: 1.1;
|
| 68 |
font-weight: 800;
|
| 69 |
margin: 0;
|
| 70 |
}
|
| 71 |
|
| 72 |
.hero-copy {
|
| 73 |
-
max-width:
|
| 74 |
color: var(--muted);
|
| 75 |
-
font-size: 0.
|
| 76 |
-
line-height: 1.
|
| 77 |
margin-top: 0;
|
| 78 |
margin-bottom: 0;
|
| 79 |
text-align: right;
|
| 80 |
}
|
| 81 |
|
| 82 |
-
.section-toolbar {
|
| 83 |
-
display: flex;
|
| 84 |
-
justify-content: flex-end;
|
| 85 |
-
margin: 1.25rem 0 1.5rem;
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
.card-label {
|
| 89 |
color: var(--muted);
|
| 90 |
-
font-size: 0.
|
| 91 |
text-transform: uppercase;
|
| 92 |
letter-spacing: 0.08em;
|
| 93 |
margin-bottom: 0.45rem;
|
|
@@ -96,18 +90,18 @@
|
|
| 96 |
|
| 97 |
.toolbar-note {
|
| 98 |
color: var(--muted);
|
| 99 |
-
font-size: 0.
|
| 100 |
text-align: right;
|
| 101 |
-
padding-top: 0.
|
| 102 |
}
|
| 103 |
|
| 104 |
[data-testid="stVerticalBlockBorderWrapper"] {
|
| 105 |
-
border-radius:
|
| 106 |
border-color: rgba(18, 32, 51, 0.08) !important;
|
| 107 |
background: var(--surface);
|
| 108 |
-
box-shadow: 0
|
| 109 |
-
padding: 0.
|
| 110 |
-
margin-bottom: 0.
|
| 111 |
}
|
| 112 |
|
| 113 |
[data-testid="stVerticalBlockBorderWrapper"] > div {
|
|
@@ -117,8 +111,8 @@
|
|
| 117 |
.card-index {
|
| 118 |
color: var(--text);
|
| 119 |
font-weight: 800;
|
| 120 |
-
font-size:
|
| 121 |
-
padding-top: 0.
|
| 122 |
}
|
| 123 |
|
| 124 |
.card-status {
|
|
@@ -126,28 +120,28 @@
|
|
| 126 |
align-items: center;
|
| 127 |
justify-content: center;
|
| 128 |
width: 100%;
|
| 129 |
-
min-height:
|
| 130 |
border-radius: 999px;
|
| 131 |
background: rgba(20, 125, 114, 0.1);
|
| 132 |
color: var(--primary-strong);
|
| 133 |
-
font-size: 0.
|
| 134 |
font-weight: 800;
|
| 135 |
}
|
| 136 |
|
| 137 |
.time-colon {
|
| 138 |
text-align: center;
|
| 139 |
-
font-size: 1.
|
| 140 |
font-weight: 800;
|
| 141 |
-
padding-top:
|
| 142 |
color: var(--text);
|
| 143 |
}
|
| 144 |
|
| 145 |
.end-time-mini {
|
| 146 |
border: 1px solid rgba(20, 125, 114, 0.12);
|
| 147 |
-
border-radius:
|
| 148 |
-
padding: 0.
|
| 149 |
background: linear-gradient(180deg, rgba(20, 125, 114, 0.08), rgba(20, 125, 114, 0.02));
|
| 150 |
-
min-height:
|
| 151 |
}
|
| 152 |
|
| 153 |
.end-time-mini-label {
|
|
@@ -160,16 +154,16 @@
|
|
| 160 |
|
| 161 |
.end-time-mini-value {
|
| 162 |
color: var(--text);
|
| 163 |
-
font-size: 1.
|
| 164 |
line-height: 1.1;
|
| 165 |
font-weight: 800;
|
| 166 |
-
margin-top: 0.
|
| 167 |
}
|
| 168 |
|
| 169 |
.end-time-mini-note {
|
| 170 |
color: var(--muted);
|
| 171 |
-
font-size: 0.
|
| 172 |
-
margin-top: 0.
|
| 173 |
}
|
| 174 |
|
| 175 |
.empty-state {
|
|
@@ -193,20 +187,22 @@
|
|
| 193 |
.stSelectbox label {
|
| 194 |
color: var(--text) !important;
|
| 195 |
font-weight: 700 !important;
|
|
|
|
| 196 |
}
|
| 197 |
|
| 198 |
.stTextInput input,
|
| 199 |
.stSelectbox div[data-baseweb="select"] > div {
|
| 200 |
-
border-radius:
|
| 201 |
border: 1px solid rgba(18, 32, 51, 0.12) !important;
|
| 202 |
background: var(--surface-strong) !important;
|
| 203 |
-
min-height:
|
| 204 |
}
|
| 205 |
|
| 206 |
.stButton > button {
|
| 207 |
border-radius: 999px !important;
|
| 208 |
-
min-height:
|
| 209 |
font-weight: 700 !important;
|
|
|
|
| 210 |
border: 1px solid transparent !important;
|
| 211 |
transition: all 0.2s ease !important;
|
| 212 |
}
|
|
@@ -214,7 +210,7 @@
|
|
| 214 |
.primary-action > button {
|
| 215 |
background: linear-gradient(135deg, var(--primary), #1a9f90) !important;
|
| 216 |
color: white !important;
|
| 217 |
-
box-shadow: 0
|
| 218 |
}
|
| 219 |
|
| 220 |
.primary-action > button:hover {
|
|
@@ -256,4 +252,8 @@
|
|
| 256 |
.toolbar-note {
|
| 257 |
display: none;
|
| 258 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
}
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
[data-testid="stAppViewContainer"] > .main {
|
| 25 |
+
max-width: 1600px;
|
| 26 |
+
padding-top: 0.7rem;
|
| 27 |
+
padding-bottom: 2rem;
|
| 28 |
}
|
| 29 |
|
| 30 |
[data-testid="stHeader"] {
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
.hero-shell {
|
| 39 |
+
padding: 0.8rem 1rem;
|
| 40 |
border: 1px solid var(--border);
|
| 41 |
border-radius: 22px;
|
| 42 |
background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.88));
|
| 43 |
backdrop-filter: blur(16px);
|
| 44 |
box-shadow: var(--shadow);
|
| 45 |
+
margin-bottom: 0.55rem;
|
| 46 |
}
|
| 47 |
|
| 48 |
.hero-row {
|
|
|
|
| 63 |
}
|
| 64 |
|
| 65 |
.hero-title {
|
| 66 |
+
font-size: clamp(1.25rem, 2vw, 1.8rem);
|
| 67 |
line-height: 1.1;
|
| 68 |
font-weight: 800;
|
| 69 |
margin: 0;
|
| 70 |
}
|
| 71 |
|
| 72 |
.hero-copy {
|
| 73 |
+
max-width: 280px;
|
| 74 |
color: var(--muted);
|
| 75 |
+
font-size: 0.88rem;
|
| 76 |
+
line-height: 1.35;
|
| 77 |
margin-top: 0;
|
| 78 |
margin-bottom: 0;
|
| 79 |
text-align: right;
|
| 80 |
}
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
.card-label {
|
| 83 |
color: var(--muted);
|
| 84 |
+
font-size: 0.78rem;
|
| 85 |
text-transform: uppercase;
|
| 86 |
letter-spacing: 0.08em;
|
| 87 |
margin-bottom: 0.45rem;
|
|
|
|
| 90 |
|
| 91 |
.toolbar-note {
|
| 92 |
color: var(--muted);
|
| 93 |
+
font-size: 0.86rem;
|
| 94 |
text-align: right;
|
| 95 |
+
padding-top: 0.5rem;
|
| 96 |
}
|
| 97 |
|
| 98 |
[data-testid="stVerticalBlockBorderWrapper"] {
|
| 99 |
+
border-radius: 18px;
|
| 100 |
border-color: rgba(18, 32, 51, 0.08) !important;
|
| 101 |
background: var(--surface);
|
| 102 |
+
box-shadow: 0 14px 34px rgba(19, 39, 71, 0.08);
|
| 103 |
+
padding: 0.08rem 0.2rem;
|
| 104 |
+
margin-bottom: 0.65rem;
|
| 105 |
}
|
| 106 |
|
| 107 |
[data-testid="stVerticalBlockBorderWrapper"] > div {
|
|
|
|
| 111 |
.card-index {
|
| 112 |
color: var(--text);
|
| 113 |
font-weight: 800;
|
| 114 |
+
font-size: 0.92rem;
|
| 115 |
+
padding-top: 0.05rem;
|
| 116 |
}
|
| 117 |
|
| 118 |
.card-status {
|
|
|
|
| 120 |
align-items: center;
|
| 121 |
justify-content: center;
|
| 122 |
width: 100%;
|
| 123 |
+
min-height: 28px;
|
| 124 |
border-radius: 999px;
|
| 125 |
background: rgba(20, 125, 114, 0.1);
|
| 126 |
color: var(--primary-strong);
|
| 127 |
+
font-size: 0.74rem;
|
| 128 |
font-weight: 800;
|
| 129 |
}
|
| 130 |
|
| 131 |
.time-colon {
|
| 132 |
text-align: center;
|
| 133 |
+
font-size: 1.15rem;
|
| 134 |
font-weight: 800;
|
| 135 |
+
padding-top: 1.95rem;
|
| 136 |
color: var(--text);
|
| 137 |
}
|
| 138 |
|
| 139 |
.end-time-mini {
|
| 140 |
border: 1px solid rgba(20, 125, 114, 0.12);
|
| 141 |
+
border-radius: 14px;
|
| 142 |
+
padding: 0.7rem 0.75rem;
|
| 143 |
background: linear-gradient(180deg, rgba(20, 125, 114, 0.08), rgba(20, 125, 114, 0.02));
|
| 144 |
+
min-height: 86px;
|
| 145 |
}
|
| 146 |
|
| 147 |
.end-time-mini-label {
|
|
|
|
| 154 |
|
| 155 |
.end-time-mini-value {
|
| 156 |
color: var(--text);
|
| 157 |
+
font-size: 1.2rem;
|
| 158 |
line-height: 1.1;
|
| 159 |
font-weight: 800;
|
| 160 |
+
margin-top: 0.22rem;
|
| 161 |
}
|
| 162 |
|
| 163 |
.end-time-mini-note {
|
| 164 |
color: var(--muted);
|
| 165 |
+
font-size: 0.76rem;
|
| 166 |
+
margin-top: 0.18rem;
|
| 167 |
}
|
| 168 |
|
| 169 |
.empty-state {
|
|
|
|
| 187 |
.stSelectbox label {
|
| 188 |
color: var(--text) !important;
|
| 189 |
font-weight: 700 !important;
|
| 190 |
+
font-size: 0.88rem !important;
|
| 191 |
}
|
| 192 |
|
| 193 |
.stTextInput input,
|
| 194 |
.stSelectbox div[data-baseweb="select"] > div {
|
| 195 |
+
border-radius: 12px !important;
|
| 196 |
border: 1px solid rgba(18, 32, 51, 0.12) !important;
|
| 197 |
background: var(--surface-strong) !important;
|
| 198 |
+
min-height: 38px !important;
|
| 199 |
}
|
| 200 |
|
| 201 |
.stButton > button {
|
| 202 |
border-radius: 999px !important;
|
| 203 |
+
min-height: 36px !important;
|
| 204 |
font-weight: 700 !important;
|
| 205 |
+
font-size: 0.92rem !important;
|
| 206 |
border: 1px solid transparent !important;
|
| 207 |
transition: all 0.2s ease !important;
|
| 208 |
}
|
|
|
|
| 210 |
.primary-action > button {
|
| 211 |
background: linear-gradient(135deg, var(--primary), #1a9f90) !important;
|
| 212 |
color: white !important;
|
| 213 |
+
box-shadow: 0 8px 18px rgba(20, 125, 114, 0.2) !important;
|
| 214 |
}
|
| 215 |
|
| 216 |
.primary-action > button:hover {
|
|
|
|
| 252 |
.toolbar-note {
|
| 253 |
display: none;
|
| 254 |
}
|
| 255 |
+
|
| 256 |
+
[data-testid="stHorizontalBlock"] {
|
| 257 |
+
gap: 0.45rem !important;
|
| 258 |
+
}
|
| 259 |
}
|
components/__pycache__/buttons.cpython-312.pyc
CHANGED
|
Binary files a/components/__pycache__/buttons.cpython-312.pyc and b/components/__pycache__/buttons.cpython-312.pyc differ
|
|
|
components/__pycache__/card.cpython-312.pyc
CHANGED
|
Binary files a/components/__pycache__/card.cpython-312.pyc and b/components/__pycache__/card.cpython-312.pyc differ
|
|
|
components/__pycache__/header.cpython-312.pyc
CHANGED
|
Binary files a/components/__pycache__/header.cpython-312.pyc and b/components/__pycache__/header.cpython-312.pyc differ
|
|
|
components/buttons.py
CHANGED
|
@@ -2,7 +2,7 @@ import streamlit as st
|
|
| 2 |
|
| 3 |
|
| 4 |
def render_add_card_button(on_click) -> None:
|
| 5 |
-
left_col, right_col = st.columns([0.
|
| 6 |
with left_col:
|
| 7 |
st.markdown('<div class="primary-action">', unsafe_allow_html=True)
|
| 8 |
st.button("+ Add Card", use_container_width=True, on_click=on_click)
|
|
@@ -15,7 +15,7 @@ def render_add_card_button(on_click) -> None:
|
|
| 15 |
|
| 16 |
|
| 17 |
def render_card_buttons(index: int, is_saved: bool, on_save, on_delete) -> None:
|
| 18 |
-
save_col, delete_col = st.columns(
|
| 19 |
with save_col:
|
| 20 |
st.markdown('<div class="secondary-action">', unsafe_allow_html=True)
|
| 21 |
st.button(
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
def render_add_card_button(on_click) -> None:
|
| 5 |
+
left_col, right_col = st.columns([0.18, 0.82])
|
| 6 |
with left_col:
|
| 7 |
st.markdown('<div class="primary-action">', unsafe_allow_html=True)
|
| 8 |
st.button("+ Add Card", use_container_width=True, on_click=on_click)
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
def render_card_buttons(index: int, is_saved: bool, on_save, on_delete) -> None:
|
| 18 |
+
save_col, delete_col = st.columns([1, 0.84])
|
| 19 |
with save_col:
|
| 20 |
st.markdown('<div class="secondary-action">', unsafe_allow_html=True)
|
| 21 |
st.button(
|
components/card.py
CHANGED
|
@@ -11,14 +11,14 @@ def render_card(index: int, on_save, on_delete) -> None:
|
|
| 11 |
minute_key = f"minute_{index}"
|
| 12 |
|
| 13 |
with st.container(border=True):
|
| 14 |
-
header_col, status_col = st.columns([0.
|
| 15 |
with header_col:
|
| 16 |
st.markdown(f'<div class="card-index">Card {index + 1}</div>', unsafe_allow_html=True)
|
| 17 |
with status_col:
|
| 18 |
badge = "Saved" if card.get("id") else "Draft"
|
| 19 |
st.markdown(f'<div class="card-status">{badge}</div>', unsafe_allow_html=True)
|
| 20 |
|
| 21 |
-
title_col, time_col, end_col = st.columns([1.
|
| 22 |
with title_col:
|
| 23 |
card["title"] = st.text_input(
|
| 24 |
"Title",
|
|
@@ -56,7 +56,7 @@ def render_card(index: int, on_save, on_delete) -> None:
|
|
| 56 |
<div class="end-time-mini">
|
| 57 |
<div class="end-time-mini-label">End</div>
|
| 58 |
<div class="end-time-mini-value">{format_time(end_hour, end_minute)}</div>
|
| 59 |
-
<div class="end-time-mini-note">
|
| 60 |
</div>
|
| 61 |
""",
|
| 62 |
unsafe_allow_html=True,
|
|
|
|
| 11 |
minute_key = f"minute_{index}"
|
| 12 |
|
| 13 |
with st.container(border=True):
|
| 14 |
+
header_col, status_col = st.columns([0.66, 0.34])
|
| 15 |
with header_col:
|
| 16 |
st.markdown(f'<div class="card-index">Card {index + 1}</div>', unsafe_allow_html=True)
|
| 17 |
with status_col:
|
| 18 |
badge = "Saved" if card.get("id") else "Draft"
|
| 19 |
st.markdown(f'<div class="card-status">{badge}</div>', unsafe_allow_html=True)
|
| 20 |
|
| 21 |
+
title_col, time_col, end_col = st.columns([1.2, 1.0, 0.72])
|
| 22 |
with title_col:
|
| 23 |
card["title"] = st.text_input(
|
| 24 |
"Title",
|
|
|
|
| 56 |
<div class="end-time-mini">
|
| 57 |
<div class="end-time-mini-label">End</div>
|
| 58 |
<div class="end-time-mini-value">{format_time(end_hour, end_minute)}</div>
|
| 59 |
+
<div class="end-time-mini-note">Auto +2h</div>
|
| 60 |
</div>
|
| 61 |
""",
|
| 62 |
unsafe_allow_html=True,
|
components/header.py
CHANGED
|
@@ -8,10 +8,10 @@ def render_header() -> None:
|
|
| 8 |
<div class="hero-row">
|
| 9 |
<div>
|
| 10 |
<span class="hero-eyebrow">Time Card Generator</span>
|
| 11 |
-
<h1 class="hero-title">Fast shift cards
|
| 12 |
</div>
|
| 13 |
<p class="hero-copy">
|
| 14 |
-
Add, adjust, and save
|
| 15 |
</p>
|
| 16 |
</div>
|
| 17 |
</section>
|
|
|
|
| 8 |
<div class="hero-row">
|
| 9 |
<div>
|
| 10 |
<span class="hero-eyebrow">Time Card Generator</span>
|
| 11 |
+
<h1 class="hero-title">Fast shift cards.</h1>
|
| 12 |
</div>
|
| 13 |
<p class="hero-copy">
|
| 14 |
+
Add, adjust, and save without leaving the page.
|
| 15 |
</p>
|
| 16 |
</div>
|
| 17 |
</section>
|