Skip to content

Commit

Permalink
Merge pull request #295 from GregFinzer/feature/fixDefects
Browse files Browse the repository at this point in the history
Fix mobile defects
  • Loading branch information
GregFinzer authored Sep 21, 2023
2 parents 4eb7584 + b0fba3f commit 8f093b7
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 70 deletions.
25 changes: 0 additions & 25 deletions BedBrigade.Client/Pages/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,4 @@
</div>
</div>

<style>
.e-card-image {
}

.card {
border-radius: 25px;
border: 1px solid rgb(0,0,255,.8);
width: 40%;
margin-left: 30%;
margin-bottom: 25px;
margin-top: 50px;
}
.e-card .e-card-content {
}
.e-card.e-card-horizontal img {
margin: 0px;
width: 50%
}
.login-error {
color: red;
margin: 10px;
}
</style>
28 changes: 19 additions & 9 deletions BedBrigade.Client/Pages/Login.razor.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
 .e-card-image {
.e-card-image {
}

.card {
.card {
border-radius: 25px;
border: 1px solid rgb(0,0,255,.8);
width: 40%;
margin-left: 30%;
margin-bottom: 25px;
margin-top: 50px;
width: 90%;
margin-left: 5%;
margin-right: 5%
}

.e-card .e-card-content {
@media (min-width: 768px) {
.card {
border-radius: 25px;
border: 1px solid rgb(0,0,255,.8);
width: 40%;
margin-left: 30%;
margin-bottom: 25px;
margin-top: 50px;
}
}

.e-card.e-card-horizontal img {
.e-card .e-card-content {
}

.e-card.e-card-horizontal img {
margin: 0px;
width: 50%
}

.login-error {
.login-error {
color: red;
margin: 10px;
}
18 changes: 18 additions & 0 deletions BedBrigade.Client/wwwroot/css/bedBrigade/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1320,3 +1320,21 @@ a.back-btn:hover {
height: 430px;
}
}
/* By default, no scrollbar for larger screens */
.admin-dropdown {
max-height: 100%;
overflow-y: visible;
}

/* Mobile screens with a max-width of 768px (you can adjust this breakpoint as needed) */
@media only screen and (max-width: 768px) {
.admin-dropdown {
max-height: 400px;
overflow-y: auto;
}
}
@media only screen and (max-width: 768px) {
main {
padding-top: 40px;
}
}
2 changes: 1 addition & 1 deletion BedBrigade.Client/wwwroot/css/bedBrigade/theme.min.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions BedBrigade.Client/wwwroot/css/bedBrigade/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1471,3 +1471,23 @@ a.back-btn:hover {
height: 430px;
}
}

/* By default, no scrollbar for larger screens */
.admin-dropdown {
max-height: 100%;
overflow-y: visible;
}

/* Mobile screens with a max-width of 768px (you can adjust this breakpoint as needed) */
@media only screen and (max-width: 768px) {
.admin-dropdown {
max-height: 400px;
overflow-y: auto;
}
}

@media only screen and (max-width: 768px) {
main {
padding-top: 40px;
}
}
13 changes: 13 additions & 0 deletions BedBrigade.Client/wwwroot/scripts/DisplayToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@
ele.style.display = value;
}
}

document.addEventListener('DOMContentLoaded', function () {
let navbarToggler = document.querySelector(".navbar-toggler");

document.querySelectorAll(".click-collapse").forEach(item => {
item.addEventListener("click", function () {
if (getComputedStyle(navbarToggler).display !== 'none') {
navbarToggler.click();
console.debug("navbarToggler clicked");
}
});
});
});
56 changes: 23 additions & 33 deletions BedBrigade.Data/Data/Seeding/SeedHtml/Header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,52 @@
<ul class="navbar-nav ms-auto mb-2 mb-lg-0 menu-main-menu menu">
<li class="navbar-nav ms-auto mb-2 mb-lg-0 menu-main-menu menu">
<li id="home" class="nav-item active">
<a class="nav-link" href="/National/Home">Home</a>
<a class="nav-link click-collapse" href="/National/Home">Home</a>
</li>
<li id="bed" class="nav-item">
<a class="nav-link" href="/request-bed">Request A Bed</a>
<a class="nav-link click-collapse" href="/request-bed">Request A Bed</a>
</li>
<li id="volunteer" class="nav-item">
<a class="nav-link" href="/volunteer">Volunteer</a>
<a class="nav-link click-collapse" href="/volunteer">Volunteer</a>
</li>
<li id="bedbrigadenearme" class="nav-item">
<a class="nav-link" href="/bed-brigade-near-me">Bed Brigade Near Me</a>
<a class="nav-link click-collapse" href="/bed-brigade-near-me">Bed Brigade Near Me</a>
</li>
<li id="about" class="dropdown nav-item">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="javascript:void(0);">About</a>
<ul class="dropdown-menu">
<li class="nav-item">
<a class="dropdown-item" href="/National/Aboutus">About Us</a>
<a class="dropdown-item click-collapse" href="/National/Aboutus">About Us</a>
</li>
<li class="nav-item">
<a class="dropdown-item" href="/contact-us">Contact Us</a>
<a class="dropdown-item click-collapse" href="/contact-us">Contact Us</a>
</li>
<li class="nav-item">
<a class="dropdown-item" href="/National/history">History of Bed Brigade</a>
<a class="dropdown-item click-collapse" href="/National/history">History of Bed Brigade</a>
</li>
<li class="nav-item">
<a href="/National/locations">Locations</a>
<a class="dropdown-item click-collapse" href="/National/locations">Locations</a>
</li>
</ul>
</li>
<li class="nav-item">
<a id="loginElement" class="nav-link" href="/Login">Login</a>
<a id="loginElement" class="nav-link click-collapse" href="/Login">Login</a>
</li>
<li id="administration" class="dropdown nav-item" style="display: none;">
<a class="dropdown-toggle nav-link" href="administration/dashboard">Administration</a>
<ul class="dropdown-menu">
<li class="dropdown nav-item">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" onclick="DisplayToggle.Toggle('adminAdmin'); DisplayToggle.SetDisplay('manageAdmin','none');" href="javascript:void(0);">Admin</a>
<ul id="adminAdmin" class="dropdown-menu" style="display: none;">
<li class="nav-link nadmin ladmin lsched"><a class="dropdown-item mx-2" href="administration/admin/email">Send Email</a></li>
</ul>
</li>
<li class="nadmin ladmin"><hr class="dropdown-divider"></li>
<li class="dropdown nav-item">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" onclick="DisplayToggle.Toggle('manageAdmin'); DisplayToggle.SetDisplay('adminAdmin', 'none');" href="javascript:void(0);">Manage</a>
<ul id="manageAdmin" class="dropdown-menu" style="display: none;">
<li class="nav-link nadmin ladmin lsched ltreasurer"><a class="dropdown-item mx-2" href="administration/manage/bedrequests">Bed Requests</a></li>
<li class="nav-link nadmin"><a class="dropdown-item mx-2" href="administration/manage/configuration">Configuration</a></li>
<li class="nav-link nadmin ladmin lsched"><a class="dropdown-item mx-2" href="administration/manage/Contacts">Contacts</a></li>
<li class="nav-link nadmin ladmin lscheduler"><a class="dropdown-item mx-2" href="administration/manage/schedules">Schedules</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2" href="administration/manage/donations">Donations</a></li>
<li class="nav-link nadmin"><a class="dropdown-item mx-2" href="administration/manage/locations">Locations</a></li>
<li class="nav-link nadmin ladmin nedit leditor"><a class="dropdown-item mx-2" href="administration/manage/fm">Media</a></li>
<li class="nav-link nadmin nedit ladmin leditor"><a class="dropdown-item mx-2" href="administration/manage/pages">Pages</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2" href="administration/manage/users">Users</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2" href="administration/manage/Volunteers">Volunteers</a></li>
</ul>
</li>
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="administration/dashboard">Administration</a>
<ul class="dropdown-menu admin-dropdown" >
<li class="nav-link nadmin ladmin lsched ltreasurer"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/bedrequests">Bed Requests</a></li>
<li class="nav-link nadmin"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/configuration">Configuration</a></li>
<li class="nav-link nadmin ladmin lsched"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/Contacts">Contacts</a></li>
<li class="nav-link"><a class="dropdown-item mx-2 click-collapse" href="administration/dashboard">Dashboard</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/donations">Donations</a></li>
<li class="nav-link nadmin ladmin lsched"><a class="dropdown-item mx-2 click-collapse" href="administration/admin/email">Email</a></li>
<li class="nav-link nadmin"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/locations">Locations</a></li>
<li class="nav-link nadmin ladmin nedit leditor"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/fm">Media</a></li>
<li class="nav-link nadmin nedit ladmin leditor"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/pages">Pages</a></li>
<li class="nav-link nadmin ladmin lscheduler"><a class="dropdown-item mx-2" href="administration/manage/schedules">Schedules</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/users">Users</a></li>
<li class="nav-link nadmin ladmin"><a class="dropdown-item mx-2 click-collapse" href="administration/manage/Volunteers">Volunteers</a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion BedBrigade.Data/Data/Seeding/SeedHtml/Locations.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3>Bed Brigade Living Hope Church</h3><h4>Serving Pataskala/Newark, Ohio</h4><p
<div class="widget widget-h-t-m-l-block widget-align-justify widget-size-50 widget-h-t-m-l-block">

<div class="widget-body">
<p><br></p><h3>Bed Brigade Upper Arlington Lutheran Church</h3><h4>Serving Upper Arlington, Ohio</h4><a href="javascript:window.location.href = '/arlington/Home';">Arlington Bedbrigade</a><br>
<p><br></p><h3>Bed Brigade Upper Arlington Lutheran Church</h3><h4>Serving Hilliard, Upper Arlington, and West Columbus, Ohio</h4><a href="javascript:window.location.href = '/arlington/Home';">Arlington Bedbrigade</a><br>

</div>

Expand Down
5 changes: 4 additions & 1 deletion BedBrigade.Data/Services/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ public virtual async Task<ServiceResponse<List<TEntity>>> GetAllAsync()

}

public virtual async Task<ServiceResponse<TEntity>> GetByIdAsync(object id)
public virtual async Task<ServiceResponse<TEntity>> GetByIdAsync(object? id)
{
if (id == null)
return new ServiceResponse<TEntity>($"Could not GetByIdAsync {GetEntityName()} with null id", false);

string cacheKey = _cachingService.BuildCacheKey(GetEntityName(), id.ToString());
TEntity? cachedContent = _cachingService.Get<TEntity>(cacheKey);

Expand Down

0 comments on commit 8f093b7

Please sign in to comment.