SiegeEngineers / aoe2cm2

Captains Mode for Age of Empires II
https://aoe2cm.net
51 stars 25 forks source link

Allow customization of the Drafts page using URL Params #76

Closed lalitpatel closed 3 years ago

lalitpatel commented 3 years ago

Summary

Allow any user to customize the look and feel of the Drafts page by passing color codes via URL params. This is helpful for streamers who would want to use brand colors on the drafts page for their stream.

Currently supported URL Params

  1. color_pick - Hex color code of the border of Pick box without the # prefix. eg. color_pick=0084AC
  2. color_ban - Hex color code of the border of Ban box without the # prefix. eg. color_ban=0084AC

Example URL

http://localhost:3001/draft/WlQaG?color_pick=0084AC&color_ban=008400
HSZemi commented 3 years ago

I thought we were using en_GB and not en_US :smile:

lalitpatel commented 3 years ago

LOL 🙈 We have color elsewhere in code eg ColorScheme. Should URL params be considered code?

HSZemi commented 3 years ago

Oh no :weary:

HSZemi commented 3 years ago

@lalitpatel Given that streamers can comparatively easily add their own CSS via OBS (see #78) or a browser plugin, I wonder if it is really worth it to implement a less flexible functionality natively

lalitpatel commented 3 years ago

I agree that given the options you mentioned, there might not be as much value in adding this complexity in the code. We can shelf this idea for now. Thanks!