Add ASP.NET Identity.

This commit is contained in:
2019-11-07 00:25:43 +00:00
parent 84415fcf05
commit 63d04a6e97
26 changed files with 5978 additions and 13 deletions

View File

@@ -0,0 +1,25 @@
@using Microsoft.AspNetCore.Http.Features
@{
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
var showBanner = !consentFeature?.CanTrack ?? false;
var cookieString = consentFeature?.CreateConsentCookie();
}
@if (showBanner)
{
<div class="alert alert-dismissible alert-info fade show" id="cookieConsent" role="alert">
Use this space to summarize your privacy and cookie use policy.
<a asp-page="/Privacy">Learn More</a>.
<button type="button" class="accept-policy close" data-dismiss="alert" aria-label="Close" data-cookie-string="@cookieString">
<span aria-hidden="true">Accept</span>
</button>
</div>
<script>
(function () {
var button = document.querySelector("#cookieConsent button[data-cookie-string]");
button.addEventListener("click", function (event) {
document.cookie = button.dataset.cookieString;
}, false);
})();
</script>
}