From f2011506a3dcb7f8d9226bbe32e17a5dc22e41bf Mon Sep 17 00:00:00 2001 From: Anton Ilchuk Date: Sun, 13 Aug 2023 23:46:36 +0200 Subject: [PATCH 1/6] Added the notification banner - Added a configurable sidebar notification banner, with configurable copy, link, text color and background color - Added a close button that stores users choice in the cookie for 24h and makes, so if one closes it, it won't appear again on the page realod - Added a notification template to store the example of config - included the notification banner in the sidebar --- _data/notifications.yml | 6 +++ _data/notifications_template.yml | 6 +++ _includes/notification-banner.html | 8 ++++ _layouts/homepage.html | 1 + _layouts/split-view.html | 3 +- _sass/custom.scss | 77 ++++++++++++++++++++++++++++++ js/main.js | 59 ++++++++++++++++++++++- 7 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 _data/notifications.yml create mode 100644 _data/notifications_template.yml create mode 100644 _includes/notification-banner.html diff --git a/_data/notifications.yml b/_data/notifications.yml new file mode 100644 index 00000000..7e87f00c --- /dev/null +++ b/_data/notifications.yml @@ -0,0 +1,6 @@ +# Notification Banner +Instrumenting Sentry: + background: '#faaf4e' + textcolor: '#000' + title: Instrumenting Sentry + description: Instrumenting 1 Sentry for your backend project? Join us July 11th, at 10 AM PT for the Backend Error Monitoring 101 livestream. Register now. \ No newline at end of file diff --git a/_data/notifications_template.yml b/_data/notifications_template.yml new file mode 100644 index 00000000..60a460b0 --- /dev/null +++ b/_data/notifications_template.yml @@ -0,0 +1,6 @@ +# Notification Banner example +Instrumenting Sentry: + background: '#faaf4e' + textcolor: '#000' + title: Instrumenting Sentry + description: Instrumenting 1 Sentry for your backend project? Join us July 11th, at 10 AM PT for the Backend Error Monitoring 101 livestream. Register now. \ No newline at end of file diff --git a/_includes/notification-banner.html b/_includes/notification-banner.html new file mode 100644 index 00000000..a15d2b65 --- /dev/null +++ b/_includes/notification-banner.html @@ -0,0 +1,8 @@ + diff --git a/_layouts/homepage.html b/_layouts/homepage.html index 7542b459..deab7314 100644 --- a/_layouts/homepage.html +++ b/_layouts/homepage.html @@ -29,6 +29,7 @@

by Memfault