Skip to content

Commit

Permalink
Code changes to load CSS specific to the page
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgnagepatil committed Oct 4, 2023
1 parent 9430691 commit 4711907
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 774 deletions.
12 changes: 11 additions & 1 deletion Childrens-Social-Care-CPD/Views/Content/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@section SideMenu {
@if (Model.SideMenu != null)
{
<partial name="_SideMenu" model="Model.SideMenu"/>
<partial name="_SideMenu" model="Model.SideMenu" />
}
}

Expand All @@ -50,4 +50,14 @@
<script src=/javascript/mediaelement-configuration.js></script>
}
}
}

@section Head {
@if (ViewData.TryGetValue("StateModel", out var stateModel))
{
if (((StateModel)stateModel).IncludeMediaPlayer)
{
<link href="/css/mediaelement-player.min.css" rel="stylesheet" />
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
@await RenderSectionAsync("Scripts", required: false)
}

@section Head {
@await RenderSectionAsync("Head", required: false)
}


@await RenderSectionAsync("Hero", required: false)
<div class="dfe-width-container">
@RenderBody()
Expand Down
1 change: 1 addition & 0 deletions Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
<partial name="_GoogleAnalyticsPartial" />
}
@await RenderSectionAsync("Head", required: false);

<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="~/assets/images/favicon.ico" type="image/x-icon">
</head>
Expand Down
4 changes: 4 additions & 0 deletions Childrens-Social-Care-CPD/Views/Shared/_SubPageLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
@await RenderSectionAsync("Scripts", required: false)
}

@section Head {
@await RenderSectionAsync("Head", required: false)
}

<div class="govuk-width-container dfe-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-quarter">
Expand Down
3 changes: 1 addition & 2 deletions Childrens-Social-Care-CPD/styles/scss/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ $moj-images-path: "/assets/images/moj/";
@import "overrides/dfe-overrides";
@import "overrides/dfe-vertical-nav";
@import "overrides/govuk-overrides";
@import "overrides/site";
@import "overrides/mediaelement-player";
@import "overrides/site";
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-h
}

.mejs__button > button {
background: transparent url('mejs-controls.svg');
background: transparent url('../assets/images/media-element/mejs-controls.svg');
border: 0;
cursor: pointer;
display: block;
Expand Down
Loading

0 comments on commit 4711907

Please sign in to comment.