Skip to content

Commit

Permalink
Merge pull request #531 from DFE-Digital/mattb/SWCD-2569-breadcrumb-i…
Browse files Browse the repository at this point in the history
…ndentation

Mattb/swcd 2569 breadcrumb indentation
  • Loading branch information
mattb-hippo authored Oct 23, 2024
2 parents 6ea3e21 + 0087252 commit 2664974
Show file tree
Hide file tree
Showing 9 changed files with 396 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class MockApplicationConfiguration : IApplicationConfiguration
public string _contentfulGraphqlConnectionString = null;
public string _contentfulPreviewHost = null;
public string _contentfulPreviewId = null;
public bool _contentfulForcePreview = false;
public string _contentfulSpaceId = null;
public bool _disableSecureCookies = false;
public int _featurePollingInterval = 0;
Expand All @@ -35,6 +36,7 @@ public class MockApplicationConfiguration : IApplicationConfiguration
public string ContentfulGraphqlConnectionString => _contentfulGraphqlConnectionString;
public string ContentfulPreviewHost => _contentfulPreviewHost;
public string ContentfulPreviewId => _contentfulPreviewId;
public bool ContentfulForcePreview => _contentfulForcePreview;
public string ContentfulSpaceId => _contentfulSpaceId;
public bool DisableSecureCookies => _disableSecureCookies;
public int FeaturePollingInterval => _featurePollingInterval;
Expand All @@ -60,6 +62,7 @@ public void SetAllValid(string value = "foo")
_contentfulGraphqlConnectionString = value;
_contentfulPreviewHost = value;
_contentfulPreviewId = value;
_contentfulForcePreview = false;
_contentfulSpaceId = value;
_disableSecureCookies = false;
_featurePollingInterval = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class ApplicationConfiguration(IConfiguration configuration) : IApplicati
public string ContentfulGraphqlConnectionString => $"https://graphql.contentful.com/content/v1/spaces/{ContentfulSpaceId}/environments/{ContentfulEnvironment}";
public string ContentfulPreviewHost => "preview.contentful.com";
public string ContentfulPreviewId => configuration["CPD_PREVIEW_KEY"];
public bool ContentfulForcePreview => bool.TryParse(configuration["CPD_CONTENTFUL_FORCE_PREVIEW"], out var result) && result;
public string ContentfulSpaceId => configuration["CPD_SPACE_ID"];
public bool DisableSecureCookies => bool.TryParse(configuration["CPD_DISABLE_SECURE_COOKIES"], out var result) && result;
public int FeaturePollingInterval => int.TryParse(configuration["CPD_FEATURE_POLLING_INTERVAL"], out var result) ? result : 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Security.Policy;

namespace Childrens_Social_Care_CPD.Configuration;

Expand All @@ -10,6 +11,8 @@ public static bool IsPreviewEnabled(IApplicationConfiguration applicationConfigu
string azureEnvironment = applicationConfiguration.AzureEnvironment,
contentfulEnvironment = applicationConfiguration.ContentfulEnvironment;

if (applicationConfiguration.ContentfulForcePreview) return true;

// return true if azure environment is pre-prod
if (string.Equals(azureEnvironment, ApplicationEnvironment.PreProduction, StringComparison.OrdinalIgnoreCase)) return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public interface IApplicationConfiguration
[RequiredForEnvironment(ApplicationEnvironment.PreProduction, Hidden = false)]
string ContentfulPreviewId { get; }

[RequiredForEnvironment(ApplicationEnvironment.All, Hidden = false, Obfuscate = false)]
bool ContentfulForcePreview { get; }

[RequiredForEnvironment(ApplicationEnvironment.All, Hidden = false)]
string ContentfulSpaceId { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,3 +865,7 @@ content: "";
.govuk-breadcrumbs--inverse .govuk-breadcrumbs__list-item::before {
border-color: currentcolor;
}

.govuk-breadcrumbs ul {
padding-left: 0px;
}
Loading

0 comments on commit 2664974

Please sign in to comment.