Jack commited on
Commit
e834f25
·
1 Parent(s): b88e346

hosting page image size ui fix

Browse files
app/static/styles.css CHANGED
@@ -141,19 +141,47 @@ pre {
141
 
142
  .nav-actions {
143
  justify-content: flex-end;
144
- flex: 1 1 280px;
145
- flex-wrap: wrap;
 
146
  min-width: 0;
 
 
 
147
  }
148
 
149
  .nav-actions form {
150
  display: flex;
 
 
 
 
 
 
151
  }
152
 
153
  .persona-pill {
154
  flex-wrap: wrap;
155
  }
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  .primary-button,
158
  .secondary-button,
159
  .ghost-button,
@@ -821,20 +849,24 @@ textarea {
821
  }
822
 
823
  .host-listings-grid {
824
- grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
825
  }
826
 
827
  .host-card {
828
  display: grid;
829
- grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
830
- gap: 20px;
831
  align-items: start;
832
  min-width: 0;
833
  }
834
 
835
  .host-card-media {
836
  display: block;
 
 
837
  min-width: 0;
 
 
838
  }
839
 
840
  .host-card-heading {
@@ -1100,10 +1132,6 @@ td {
1100
  flex-direction: row;
1101
  justify-content: flex-start;
1102
  }
1103
-
1104
- .host-card {
1105
- grid-template-columns: 1fr;
1106
- }
1107
  }
1108
 
1109
  @media (max-width: 720px) {
@@ -1139,3 +1167,23 @@ td {
1139
  align-items: flex-start;
1140
  }
1141
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
  .nav-actions {
143
  justify-content: flex-end;
144
+ flex: 0 1 auto;
145
+ flex-wrap: nowrap;
146
+ gap: 10px;
147
  min-width: 0;
148
+ white-space: nowrap;
149
+ overflow-x: auto;
150
+ scrollbar-width: none;
151
  }
152
 
153
  .nav-actions form {
154
  display: flex;
155
+ margin: 0;
156
+ flex: 0 0 auto;
157
+ }
158
+
159
+ .nav-actions::-webkit-scrollbar {
160
+ display: none;
161
  }
162
 
163
  .persona-pill {
164
  flex-wrap: wrap;
165
  }
166
 
167
+ .nav-actions > * {
168
+ flex: 0 0 auto;
169
+ }
170
+
171
+ .nav-persona,
172
+ .nav-button {
173
+ white-space: nowrap;
174
+ }
175
+
176
+ .nav-persona {
177
+ gap: 6px;
178
+ padding: 10px 14px;
179
+ }
180
+
181
+ .nav-button {
182
+ padding: 10px 16px;
183
+ }
184
+
185
  .primary-button,
186
  .secondary-button,
187
  .ghost-button,
 
849
  }
850
 
851
  .host-listings-grid {
852
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
853
  }
854
 
855
  .host-card {
856
  display: grid;
857
+ grid-template-columns: 140px minmax(0, 1fr);
858
+ gap: 18px;
859
  align-items: start;
860
  min-width: 0;
861
  }
862
 
863
  .host-card-media {
864
  display: block;
865
+ width: 100%;
866
+ max-width: 140px;
867
  min-width: 0;
868
+ align-self: start;
869
+ justify-self: start;
870
  }
871
 
872
  .host-card-heading {
 
1132
  flex-direction: row;
1133
  justify-content: flex-start;
1134
  }
 
 
 
 
1135
  }
1136
 
1137
  @media (max-width: 720px) {
 
1167
  align-items: flex-start;
1168
  }
1169
  }
1170
+
1171
+ @media (max-width: 1200px) {
1172
+ .persona-home {
1173
+ display: none;
1174
+ }
1175
+
1176
+ .nav-persona {
1177
+ padding: 9px 12px;
1178
+ }
1179
+
1180
+ .nav-button {
1181
+ padding: 9px 14px;
1182
+ }
1183
+ }
1184
+
1185
+ @media (max-width: 640px) {
1186
+ .host-card {
1187
+ grid-template-columns: 1fr;
1188
+ }
1189
+ }
app/templates/base.html CHANGED
@@ -25,13 +25,13 @@
25
  </nav>
26
  <div class="nav-actions">
27
  {% if current_user %}
28
- <span class="persona-pill">
29
  <span>{{ current_user.name }}</span>
30
- <small>{{ current_user.hometown }}</small>
31
  </span>
32
- <a class="secondary-button" href="/login?next={{ request.url.path }}">Switch Account</a>
33
- <form method="post" action="/logout">
34
- <button class="ghost-button" type="submit">Log Out</button>
35
  </form>
36
  {% else %}
37
  <a class="primary-button" href="/login?next={{ request.url.path }}">Sign In</a>
 
25
  </nav>
26
  <div class="nav-actions">
27
  {% if current_user %}
28
+ <span class="persona-pill nav-persona">
29
  <span>{{ current_user.name }}</span>
30
+ <small class="persona-home">{{ current_user.hometown }}</small>
31
  </span>
32
+ <a class="secondary-button nav-button" href="/login?next={{ request.url.path }}">Switch</a>
33
+ <form class="nav-logout-form" method="post" action="/logout">
34
+ <button class="ghost-button nav-button" type="submit">Log Out</button>
35
  </form>
36
  {% else %}
37
  <a class="primary-button" href="/login?next={{ request.url.path }}">Sign In</a>
app/templates/host_dashboard.html CHANGED
@@ -31,8 +31,8 @@
31
  <section class="host-listings-grid">
32
  {% for card in host_cards %}
33
  <article class="panel host-card">
34
- <a class="host-card-media" href="{{ request.app.url_path_for('listing_detail', slug=card.listing.slug) }}">
35
- <img class="panel-image" src="{{ card.listing.primary_image }}" alt="{{ card.listing.title }}" />
36
  </a>
37
  <div class="host-card-body">
38
  <div class="panel-heading host-card-heading">
 
31
  <section class="host-listings-grid">
32
  {% for card in host_cards %}
33
  <article class="panel host-card">
34
+ <a class="trip-thumb host-card-media" href="{{ request.app.url_path_for('listing_detail', slug=card.listing.slug) }}">
35
+ <img src="{{ card.listing.primary_image }}" alt="{{ card.listing.title }}" />
36
  </a>
37
  <div class="host-card-body">
38
  <div class="panel-heading host-card-heading">