Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions SiteKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,15 @@ public static class SiteKeys
/// A Google Fonts (or other) URL for use in a <c>link</c> element in the header.
/// </summary>
public const string FontLink = nameof(FontLink);

/// <summary>
/// Version of Bootstrap to use. Default is 4.4.1.
/// </summary>
public const string BootstrapVersion = nameof(BootstrapVersion);

/// <summary>
/// Integrity hash of Bootstrap vesion defined in <see cref="BootstrapVersion"/>. Default is integrity hash of Bootstrap 4.4.1.
/// </summary>
public const string BootstrapIntegrityHash = nameof(BootstrapIntegrityHash);
}
}
14 changes: 13 additions & 1 deletion input/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@
<link href="@Context.GetLink("/assets/css/theme.css")" rel="stylesheet" />
<link href="@Context.GetLink("/assets/css/styles.css")" rel="stylesheet" />

@{
string bootstrapVersion = Document.GetString(SiteKeys.BootstrapVersion);
if (bootstrapVersion.IsNullOrWhiteSpace())
{
bootstrapVersion = "4.4.1";
}
string bootstrapIntegrityHash = Document.GetString(SiteKeys.BootstrapIntegrityHash);
if (bootstrapIntegrityHash.IsNullOrWhiteSpace())
{
bootstrapIntegrityHash = "sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6";
}
}
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="@($"https://cdn.jsdelivr.net/npm/bootstrap@{bootstrapVersion}/dist/js/bootstrap.min.js")" integrity="@bootstrapIntegrityHash" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/a1cad7ed9a.js" crossorigin="anonymous" data-no-mirror></script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.4.8/dist/mermaid.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
Expand Down