-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a lot of base code to start building up the platform
- Loading branch information
1 parent
47044b5
commit 2d87e37
Showing
14 changed files
with
475 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@page | ||
@page "/" | ||
@model NStart.Pages.Home.HomePageModel | ||
@{ | ||
ViewData["Title"] = "HomePage"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@using Microsoft.AspNetCore.Http.Features | ||
|
||
@{ | ||
var consentFeature = Context.Features.Get<ITrackingConsentFeature>(); | ||
var showBanner = !consentFeature?.CanTrack ?? false; | ||
var cookieString = consentFeature?.CreateConsentCookie(); | ||
} | ||
|
||
@if (showBanner) | ||
{ | ||
<div id="cookieConsent" class="alert alert-info alert-dismissible fade show" role="alert"> | ||
<h4>Cookie Consent</h4> | ||
In order to grant you access to our site's basic features, you have to accept cookies from us. | ||
<hr /> | ||
Our <a asp-area="" asp-controller="Privacy" asp-action="CookiePolicy">Cookie Policy</a> contains all the information about how we handle cookies on our sites. | ||
<br /> | ||
<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> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<system.webServer> | ||
<handlers> | ||
<remove name="aspNetCore" /> | ||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> | ||
</handlers> | ||
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess"> | ||
<environmentVariables> | ||
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44360" /> | ||
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> | ||
<environmentVariable name="COMPLUS_ForceENC" value="1" /> | ||
<environmentVariable name="ASPNETCORE_HOSTINGSTARTUPASSEMBLIES" value="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" /> | ||
</environmentVariables> | ||
</aspNetCore> | ||
<httpProtocol> | ||
<customHeaders> | ||
<remove name="X-Powered-By" /> | ||
<remove name="Server" /> | ||
<add name="X-XSS-Protection" value="1" /> | ||
<add name="Service-Worker-Allowed" value="/" /> | ||
<add name="X-Content-Type-Option" value="nosniff" /> | ||
</customHeaders> | ||
</httpProtocol> | ||
</system.webServer> | ||
<!-- To customize the asp.net core module uncomment and edit the following section. | ||
For more info see https://go.microsoft.com/fwlink/?linkid=838655 --> | ||
<!-- | ||
<system.webServer> | ||
<handlers> | ||
<remove name="aspNetCore"/> | ||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> | ||
</handlers> | ||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" /> | ||
</system.webServer> | ||
--> | ||
</configuration> |
Oops, something went wrong.