jkorstad commited on
Commit
3e1ee4f
·
verified ·
1 Parent(s): 4ae0359

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -6
app.py CHANGED
@@ -141,10 +141,10 @@ def search_spaces(search_text="", category="All Categories", offset=0, limit=100
141
  <p style='color: var(--color-text-primary);'>Total Likes: {total_likes:,}</p>
142
  </div>
143
  <div style='max-height: 800px; overflow-y: auto;'>
144
- <div style='display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 10px;'>
 
145
  """
146
 
147
- # Changed page_size to limit here
148
  for _, row in spaces.iterrows():
149
  html_content += f"""
150
  <div style='padding: 15px;
@@ -155,12 +155,19 @@ def search_spaces(search_text="", category="All Categories", offset=0, limit=100
155
  display: flex;
156
  flex-direction: column;
157
  height: 100%;
158
- position: relative;'>
159
- <h3 style='margin-top: 0; margin-bottom: 10px;'>
 
 
 
160
  <a href='{row['url']}' target='_blank'
161
  style='color: #2196F3;
162
  text-decoration: none;
163
- font-weight: bold;'>{row['title']}</a>
 
 
 
 
164
  </h3>
165
  <div style='height: 2px;
166
  background: var(--color-border-primary);
@@ -170,7 +177,11 @@ def search_spaces(search_text="", category="All Categories", offset=0, limit=100
170
  <span style='background-color: var(--color-accent-soft);
171
  padding: 2px 8px;
172
  border-radius: 12px;
173
- font-size: 0.9em;'>
 
 
 
 
174
  {row['category']}
175
  </span>
176
  </p>
 
141
  <p style='color: var(--color-text-primary);'>Total Likes: {total_likes:,}</p>
142
  </div>
143
  <div style='max-height: 800px; overflow-y: auto;'>
144
+ <div style='display: grid; grid-template-columns: repeat(3, minmax(300px, 1fr));
145
+ gap: 15px; padding: 10px; width: 100%; max-width: 1800px; margin: 0 auto;'>
146
  """
147
 
 
148
  for _, row in spaces.iterrows():
149
  html_content += f"""
150
  <div style='padding: 15px;
 
155
  display: flex;
156
  flex-direction: column;
157
  height: 100%;
158
+ position: relative;
159
+ min-width: 0;'> /* Added min-width: 0 */
160
+ <h3 style='margin-top: 0; margin-bottom: 10px;
161
+ overflow: hidden; text-overflow: ellipsis;
162
+ word-wrap: break-word; hyphens: auto;'>
163
  <a href='{row['url']}' target='_blank'
164
  style='color: #2196F3;
165
  text-decoration: none;
166
+ font-weight: bold;
167
+ display: -webkit-box;
168
+ -webkit-line-clamp: 2;
169
+ -webkit-box-orient: vertical;
170
+ overflow: hidden;'>{row['title']}</a>
171
  </h3>
172
  <div style='height: 2px;
173
  background: var(--color-border-primary);
 
177
  <span style='background-color: var(--color-accent-soft);
178
  padding: 2px 8px;
179
  border-radius: 12px;
180
+ font-size: 0.9em;
181
+ display: inline-block;
182
+ max-width: 100%;
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;'>
185
  {row['category']}
186
  </span>
187
  </p>