unijoh commited on
Commit
7280d57
·
verified ·
1 Parent(s): 725d076

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -41
app.py CHANGED
@@ -89,12 +89,19 @@ a{ color:var(--primary-700)!important; }
89
  white-space: normal !important; width: 64% !important;
90
  }
91
 
92
- /* Results header row: kill ALL white "cards"/panels behind the language buttons */
 
 
 
 
 
 
 
93
  #results_hdr{
94
- display:flex;
95
- align-items:center;
96
- justify-content:space-between;
97
- gap:12px;
98
  padding:0 !important;
99
  margin:0 !important;
100
  background:transparent !important;
@@ -104,22 +111,15 @@ a{ color:var(--primary-700)!important; }
104
  #results_hdr, #results_hdr *{
105
  background:transparent !important;
106
  box-shadow:none !important;
107
- }
108
- #results_hdr .gr-block,
109
- #results_hdr .gr-panel,
110
- #results_hdr .gr-box,
111
- #results_hdr .gr-group,
112
- #results_hdr .gr-form,
113
- #results_hdr .gr-row,
114
- #results_hdr .gr-column{
115
- background:transparent !important;
116
- box-shadow:none !important;
117
  border:0 !important;
118
  }
 
 
119
 
120
- /* Language toggle (gr.Radio) remove Gradio's own button styling, keep only ours */
121
  .lang_toggle{
122
  background: transparent !important;
 
123
  }
124
  .lang_toggle fieldset{
125
  border:0!important;
@@ -134,20 +134,21 @@ a{ color:var(--primary-700)!important; }
134
  padding:0!important;
135
  margin:0!important;
136
  }
 
 
 
 
 
137
  .lang_toggle label{
138
- /* This removes the OUTER "button" Gradio paints */
139
  background:transparent!important;
140
  border:0!important;
141
  padding:0!important;
142
  margin:0!important;
143
  box-shadow:none!important;
144
- border-radius:0!important;
145
- }
146
- .lang_toggle input{
147
- display:none!important; /* no cursor, no default radio */
148
  }
 
 
149
  .lang_toggle label span{
150
- /* This is the ONLY visible button layer */
151
  all: unset;
152
  display:inline-block;
153
  cursor:pointer;
@@ -156,33 +157,23 @@ a{ color:var(--primary-700)!important; }
156
  font-size:0.95rem;
157
  border-radius:10px;
158
  border:1px solid var(--primary-600);
159
- background: transparent; /* same as page background */
160
  color:#0b1b19;
161
  box-shadow:none!important;
162
- outline:none!important;
163
  }
164
- /* Selected = match Marka/Tag exactly */
165
- .lang_toggle input:checked + span{
 
 
166
  background:var(--primary-500)!important;
167
  border-color:var(--primary-600)!important;
168
  color:#0b1b19!important;
169
  }
170
- /* Hover = subtle */
171
- /* Keep selected button color on hover; only lighten UNSELECTED on hover */
172
- .lang_toggle label:hover input:not(:checked) + span{
173
- background:var(--primary-200)!important;
174
- }
175
 
176
- /* Push language buttons fully to the right */
177
- #results_hdr{
178
- width:100% !important;
179
- }
180
- #results_hdr > .gr-markdown{
181
- flex:1 1 auto !important;
182
- }
183
- .lang_toggle{
184
- margin-left:auto !important;
185
- justify-content:flex-end !important;
186
  }
187
  """
188
 
 
89
  white-space: normal !important; width: 64% !important;
90
  }
91
 
92
+ /* Selected = match Marka/Tag exactly */
93
+ /* Hover = subtle */
94
+ /* Keep selected button color on hover; only lighten UNSELECTED on hover */
95
+ /* Push language buttons fully to the right */
96
+ #results_hdr > .gr-markdown{
97
+ flex:1 1 auto !important;
98
+ }
99
+ /* Results header row: two-column layout, title left, toggle hard-right */
100
  #results_hdr{
101
+ display:grid !important;
102
+ grid-template-columns: 1fr auto !important;
103
+ align-items:center !important;
104
+ gap:12px !important;
105
  padding:0 !important;
106
  margin:0 !important;
107
  background:transparent !important;
 
111
  #results_hdr, #results_hdr *{
112
  background:transparent !important;
113
  box-shadow:none !important;
 
 
 
 
 
 
 
 
 
 
114
  border:0 !important;
115
  }
116
+ #results_hdr > .gr-column:first-child{ justify-self:start !important; }
117
+ #results_hdr > .gr-column:last-child{ justify-self:end !important; }
118
 
119
+ /* Language toggle (gr.Radio): make it look exactly like Marka/Tag, with no double-button layer */
120
  .lang_toggle{
121
  background: transparent !important;
122
+ justify-self:end !important;
123
  }
124
  .lang_toggle fieldset{
125
  border:0!important;
 
134
  padding:0!important;
135
  margin:0!important;
136
  }
137
+ .lang_toggle input{
138
+ display:none!important;
139
+ }
140
+
141
+ /* Remove Gradio's default label styling completely */
142
  .lang_toggle label{
 
143
  background:transparent!important;
144
  border:0!important;
145
  padding:0!important;
146
  margin:0!important;
147
  box-shadow:none!important;
 
 
 
 
148
  }
149
+
150
+ /* Single visible button layer */
151
  .lang_toggle label span{
 
152
  all: unset;
153
  display:inline-block;
154
  cursor:pointer;
 
157
  font-size:0.95rem;
158
  border-radius:10px;
159
  border:1px solid var(--primary-600);
160
+ background: transparent; /* same as page */
161
  color:#0b1b19;
162
  box-shadow:none!important;
 
163
  }
164
+
165
+ /* Selected state (robust selectors) */
166
+ .lang_toggle input:checked ~ span,
167
+ .lang_toggle label:has(input:checked) span{
168
  background:var(--primary-500)!important;
169
  border-color:var(--primary-600)!important;
170
  color:#0b1b19!important;
171
  }
 
 
 
 
 
172
 
173
+ /* Hover: only unselected gets light background */
174
+ .lang_toggle label:hover input:not(:checked) ~ span,
175
+ .lang_toggle label:hover:not(:has(input:checked)) span{
176
+ background:var(--primary-200)!important;
 
 
 
 
 
 
177
  }
178
  """
179