Skip to content

Commit

Permalink
Adjusted mobile layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Aug 20, 2024
1 parent 68d29b8 commit 3f2ef99
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
3 changes: 1 addition & 2 deletions GuildWarsPartySearch.NodeJSServer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
<th class="header text-start">Description</th>
</tr>
<tr class="row show-on-mobile">
<th class="header text-start">Party Details</th>
<th class="header text-start">Description</th>
<th class="header">Party Details</th>
</tr>
</thead>
</table>
Expand Down
15 changes: 9 additions & 6 deletions GuildWarsPartySearch.NodeJSServer/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ async function navigateToLocation(map_id, showParties) {
setTimeout(() => {
navigating = 0;
}, 1200);

}

function get_parties_for_map(map_id) {
Expand Down Expand Up @@ -297,18 +297,21 @@ function redrawPartyWindow() {


party_rows_html += parties_by_type.map((party) => {
return `<tr class="${row_class} hide-on-mobile row small centered">
return `<tr class="${row_class} hide-on-mobile row small centered party-search-result">
<td class="text-start">${party.sender || ''}</td>\
<td>${getDistrictName(party.district_region) || ''}</td>\
<td>${party.party_size}</td>\
<td>${party.district_number}</td>\
<td class="text-start">${party.message || ''}</td>\
</tr>
<tr class="${row_class} show-on-mobile row small centered">
<tr class="${row_class} show-on-mobile row small centered party-search-result">
<td class="text-start">
${party.sender || ''}<br/>
${getDistrictName(party.district_region)} ${party.district_number}<br/>
</td><td class="text-start">${party.message}</td>
<div class="d-flex">
<div class="w-50">${party.sender || ''}</div>
<div class="w-50 text-end">${getDistrictName(party.district_region)} ${party.district_number}</div>
</div>
<div>${party.message}</div>
</td>
</tr>`;
}).join('');
});
Expand Down
4 changes: 4 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/src/css/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {

.party-search-result {
border-bottom: 1px solid rgba(200,200,200,0.2);
}

.show-on-mobile {
display:revert !important;
}
Expand Down
6 changes: 6 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/src/css/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@
.text-nowrap {
white-space: nowrap;
}
.text-end {
text-align:right;
}
.align-items-center {
align-items: center;
}
.align-self-stretch {
align-self: stretch;
}
.w-50 {
width:50%;
}

0 comments on commit 3f2ef99

Please sign in to comment.