winter sale: update banner interval.

Reset cookie and set the hide banner interval to 1 hour for the final
three hours of the sale.
This commit is contained in:
evazion
2021-12-31 15:06:09 -06:00
parent 18c08688df
commit 9ffc269e43
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ $(function() {
$("#hide-promotion-notice").on("click.danbooru", function(e) {
$("#promotion-notice").hide();
Cookie.put("hide_promotion_notice", "1", 1 * 18 * 60 * 60);
Cookie.put("hide_winter_sale_notice", "1", 1 * 60 * 60);
Cookie.put("hide_upgrade_account_notice", "1", 7 * 24 * 60 * 60);
e.preventDefault();
});

View File

@@ -80,7 +80,7 @@
<div id="page">
<%= render "users/verification_notice" %>
<% if Danbooru.config.is_promotion? && cookies[:hide_promotion_notice].blank? %>
<% if Danbooru.config.is_promotion? && cookies[:hide_winter_sale_notice].blank? %>
<div class="notice notice-info notice-small flex text-center items-center justify-center gap-2" id="promotion-notice">
<% file = %w[provgift.png kemogift.png padoru.gif ablobgift.gif].sample %>
<%= tag.img src: "/images/#{file}", width: 32, height: 32 %>