Closed durden closed 7 years ago
I'll rebase these changes after the publish_date PR is accepted because this change depends on and includes those changes. The end result of this PR is a small banner to distinguish guides participating in the tutorial contest:
We can easily change this banner to be some kind of image or something prettier. This is just a suggestion. You can see an example of this code running on the staging site.
A guide is considered to be part of the contest if it's creation date falls within the start and end date of the contest, which are setup as new environment variables in the application environment.
We could further narrow down guides in the contest if we segmented based on stacks that are part of the sponsor list. However, we keep getting new sponsors so we could potentially have to change the list of stacks included in the contest. So, this implementation keeps things simple since the start/end date of the contest is fixed.
Furthermore, segmented based on stack still wouldn't tell the whole story. For example, if a guide is submitted in the 'interesting apis' stack it could be for an API that is not part of the contest anyway. So, it seems like there's no benefit to restricting this banner by which stack the guide is submitted into.
What do you think @prtkgpt ?
Closing old PR. The tutorial contests are handled differently now so no need for this.
This PR builds on the code in #92 to add a banner to every guide submitted during any tutorial contest that is currently running.