Set meta tag theme color to project's theme color #71
No reviewers
Labels
No Label
admins only
bug
design
duplicate
gimme feedback
good first issue
hmmmm
invalid
reference
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hmn/hmn#71
Loading…
Reference in New Issue
No description provided.
Delete Branch "AllanRegush/hmn:issue-66-ar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit sets the discord/link embed theme to match handmade brand
closes #66
Thank you for your contribution! While this works for the 2022 jam page specifically, it's actually not quite what we want in general, because the blue color in this PR is specific to the 2022 jam and not broadly a brand color for us.
I wasn't clear enough in #66, so I apologize for that - the
<meta>
tag I gave as an example was just intended as a specific example. In actuality the color situation on Handmade Network is a little more complicated - each project has its own color stored in the database, and we dynamically insert this color into the CSS where necessary. For example, https://handmade.network, https://hero.handmade.network, and https://4coder.handmade.network all have different base colors, and we'd like the<meta>
tag with the color to reflect that.To give you an idea of what this looks like, most of the project color stuff is done in project.css: https://git.handmade.network/hmn/hmn/src/branch/master/src/templates/src/project.css
I think all we need to do here is put the current project's color into that meta tag instead of it being hardcoded: https://git.handmade.network/hmn/hmn/src/branch/master/src/templates/types.go#L119
Thank you for the clarification. I'll make that change.
82336e6cb6
to35ccb67d6c
Add Meta data theme colorto Set meta tag theme color to project's theme color@ -54,0 +54,4 @@
<meta name="theme-color" content="#{{ .Project.Color1 }}">
{{ else }}
<meta name="theme-color" content="#ffffff">
{{ end }}
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).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.
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.