Skip to content

Commit

Permalink
Merge pull request #935 from AlessiaYChen/gov-next-gen-layout
Browse files Browse the repository at this point in the history
update dropdown status
  • Loading branch information
AlessiaYChen authored Sep 19, 2024
2 parents 423f910 + ac838d8 commit 971ebed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 12 additions & 8 deletions Gov.News.WebApp/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@
<div class="container-fluid" id="sm-nav-container">
<div class="collapse navbar-collapse" id="navbarSupportedContent" data-bs-parent="#main-nav">
<ul class="navbar-nav ms-auto mb-2 me-3 mb-lg-0 gap-2" id="sm-nav-ul">
<li class="nav-item dropdown d-none d-md-block" id="ministry-dropdown">
<li class="nav-item dropdown d-none d-md-block ministry-dropdown" id="ministry-dropdown">
<a class="nav-link " href="#" id="news-dropdown" data-bs-toggle="collapse" data-bs-target="#menu" aria-expanded="false">
News&nbsp;&nbsp;
<span id="icon-dropdown"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
</a>

</li>
<li class="nav-item dropdown d-md-none" id="ministry-dropdown">
<li class="nav-item dropdown d-md-none ministry-dropdown" id="ministry-dropdown">

<a class="nav-link " href="#" id="sm-news-dropdown" data-bs-toggle="collapse" data-bs-target="#sm-menu" aria-expanded="false">
News&nbsp;&nbsp;
Expand Down Expand Up @@ -415,13 +415,17 @@
}
$("#smd-search-container").on('shown.bs.collapse', function() {
$("#search-md-button").find('i.fa').removeClass('fa-search').addClass('fa-times');
$("#search-md-button").addClass('active');
$(".d-md-block #search-md-button").find('i.fa').removeClass('fa-search').addClass('fa-times');
$(".d-md-none #search-md-button").find('i.fa').removeClass('fa-search').addClass('fa-times');
$(".d-md-block #search-md-button").addClass('active');
$(".d-md-none #search-md-button").addClass('active');
});
$("#smd-search-container").on('hidden.bs.collapse', function() {
$("#search-md-button").find('i.fa').removeClass('fa-times').addClass('fa-search');
$("#search-md-button").removeClass('active');
$(".d-md-block #search-md-button").find('i.fa').removeClass('fa-times').addClass('fa-search');
$(".d-md-none #search-md-button").find('i.fa').removeClass('fa-times').addClass('fa-search');
$(".d-md-none #search-md-button").removeClass('active');
$(".d-md-block #search-md-button").removeClass('active');
});
$("#navbarSupportedContent").on({
Expand Down Expand Up @@ -467,7 +471,7 @@
//$("#sm-menu").attr("aria-hidden", "false");
$("#navbarSupportedContent").find('#sm-news-dropdown').css("background-color", "#f2f2f2");
$('#sm-nav-container').css('overflow-y', 'scroll');
$("#sm-icon-dropdown").addClass('ative');
$(".ministry-dropdown").addClass('active');
},
"hide.bs.collapse": function (e) {
e.stopPropagation();
Expand All @@ -479,7 +483,7 @@
e.stopPropagation();
$('#sm-nav-container').css('overflow-y', 'hidden');
$('body').css('overflow-y', 'hidden');
$("#sm-icon-dropdown").removeClass('ative');
$(".ministry-dropdown").removeClass('active');
}
});
Expand Down
3 changes: 1 addition & 2 deletions Gov.News.WebApp/wwwroot/Content/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ body {
}

#nav-menu-sm.active,
#search-md-button.active,
#sm-news-dropdown.active {
#search-md-button.active {
background-color: #D7D7D7;
}

Expand Down

0 comments on commit 971ebed

Please sign in to comment.