Set meta tag theme color to project's theme color #71

Merged
bvisness merged 1 commits from AllanRegush/hmn:issue-66-ar into master 2022-07-25 20:16:05 +00:00
1 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,11 @@
<link rel="icon" type="image/png" sizes="400x400" href="{{ static "logo.png" }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ static "ms-icon-144x144.png" }}">
<meta name="theme-color" content="#ffffff">
{{ if .Project.Color1 }}
<meta name="theme-color" content="#{{ .Project.Color1 }}">
{{ else }}
<meta name="theme-color" content="#ffffff">
{{ end }}
bvisness marked this conversation as resolved
Review

Do we need the if statement here? I can't imagine a situation in which we wouldn't have .Project (since we have a dummy "project" for the main parts of the site).

Do we need the if statement here? I can't imagine a situation in which we wouldn't have `.Project` (since we have a dummy "project" for the main parts of the site).
Review

I can remove the if statment. No problem. I added it there because on my dev instance - when browsing to a personal project, the project.color1 is an empty string.

I can remove the if statment. No problem. I added it there because on my dev instance - when browsing to a personal project, the project.color1 is an empty string.
Review

Oh! Personal projects, right. I'm not sure what the best way is to handle that. Keep what you have for now, and I can figure something else out later if it's a problem.

Oh! Personal projects, right. I'm not sure what the best way is to handle that. Keep what you have for now, and I can figure something else out later if it's a problem.
<script>
MathJax = {