-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe07550
commit a3929ef
Showing
4 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
HarmonyDB.Playground/HarmonyDB.Playground.Web/Models/PlaygroundOptions.cs
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,6 @@ | ||
namespace HarmonyDB.Playground.Web.Models; | ||
|
||
public class PlaygroundOptions | ||
{ | ||
public string? GoogleTagId { get; init; } | ||
} |
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 |
---|---|---|
|
@@ -2,18 +2,33 @@ | |
@using System.Web | ||
@using Microsoft.AspNetCore.Mvc.Localization | ||
@using Microsoft.AspNetCore.Mvc.TagHelpers | ||
@using Microsoft.Extensions.Options | ||
@inject IViewLocalizer ViewLocalizer | ||
@inject IOptions<PlaygroundOptions> Options | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
@if (!string.IsNullOrWhiteSpace(Options.Value.GoogleTagId)) | ||
{ | ||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/[email protected]"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { dataLayer.push(arguments); } | ||
gtag('js', new Date()); | ||
gtag('config', '@Options.Value.GoogleTagId'); | ||
</script> | ||
} | ||
|
||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>@ViewData["Title"], Harmony DB</title> | ||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> | ||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" /> | ||
<link rel="stylesheet" href="~/css/chords.css" asp-append-version="true" /> | ||
<link rel="stylesheet" href="~/css/header.css" asp-append-version="true" /> | ||
<link rel="stylesheet" href="~/HarmonyDB.Playground.Web.styles.css" asp-append-version="true" /> | ||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css"/> | ||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/> | ||
<link rel="stylesheet" href="~/css/chords.css" asp-append-version="true"/> | ||
<link rel="stylesheet" href="~/css/header.css" asp-append-version="true"/> | ||
<link rel="stylesheet" href="~/HarmonyDB.Playground.Web.styles.css" asp-append-version="true"/> | ||
@await RenderSectionAsync("styles", false) | ||
</head> | ||
<body> | ||
|
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