Skip to content

Commit

Permalink
Update notification banner with Inc announcement (#6762)
Browse files Browse the repository at this point in the history
  • Loading branch information
emdecr authored Nov 3, 2023
1 parent 7f8e1ae commit 6048831
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
37 changes: 37 additions & 0 deletions source/_static/images/notification-bar/icon-green-rocket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions source/_static/myscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ $(document).ready(function () {

// Fallback for when a notification CTA expires - ie. webinar happens
const dateInFuture = (value) => new Date().getTime() <= new Date(value).getTime();
const expiryDate = '2023-11-01T00:00:00-0500';
const expiryDate = '2024-11-01T00:00:00-0500';
// 2023-11-01 @ 12am EST
const fallback_url = 'https://mattermost.com/solutions/mattermost-for-microsoft-teams/';
const fallback_text = 'Learn more about Mattermost for Microsoft Teams »';
Expand All @@ -192,7 +192,7 @@ $(document).ready(function () {
// So it will show up for new announcements
// Keep "mm_notification_banner__" at the beginning of the key
// Add system to clean out storage items that are no longer needed
let notification_banner_key = 'mm_notification_banner__hacktoberfest-23';
let notification_banner_key = 'mm_notification_banner__inc-23';
if (!dateInFuture(expiryDate)) {
notification_banner_key = 'mm_notification_banner__fallback-mst';
}
Expand Down
2 changes: 1 addition & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3408,7 +3408,7 @@ def setup(_: Sphinx):
# A list of JavaScript filenames. The entry must be a filename string or a tuple containing the filename string and the
# attributes dictionary. The filename must be relative to the html_static_path, or a full URI with scheme like
# https://example.org/script.js. The attributes is used for attributes of <script> tag. It defaults to an empty list.
html_js_files = ["myscript.js?version=v18"]
html_js_files = ["myscript.js?version=v19"]

# The name of an image file, relative to the configuration directory, to use as favicon of the docs. This file should
# be a Windows icon file (.ico) being 16x16 or 32x32 pixels in size.
Expand Down
2 changes: 1 addition & 1 deletion source/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span aria-hidden="true">×</span>
</a>
<div class="notification-bar__wrapper">
<img src="{{ pathto('_static/images/notification-bar/icon-megaphone.svg', 1) }}" alt="" class="notification-bar__icon"><a href="https://mattermost.com/hacktoberfest/" target="_blank" class="notification-bar__link">Hacktoberfest 2023: Code, Celebrate, and Conserve!</a>
<img src="{{ pathto('_static/images/notification-bar/icon-green-rocket.svg', 1) }}" alt="" class="notification-bar__icon"><a href="https://mattermost.com/blog/inc-recognizes-mattermost-as-a-power-partner/" target="_blank" class="notification-bar__link">Inc. Recognizes Mattermost as a 2023 'Power Partner'!</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 6048831

Please sign in to comment.