Skip to content

Commit fb29483

Browse files
authored
Added and update fixed notificationbar (#79)
Signed-off-by: Mohin Uddin <[email protected]>
1 parent 0dd6f29 commit fb29483

File tree

4 files changed

+51
-48
lines changed

4 files changed

+51
-48
lines changed

layouts/_default/baseof.html

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -81,58 +81,59 @@
8181
</p>
8282
<![endif]-->
8383

84-
<!-- notification start -->
85-
<div onclick="goToWebinarPage()" class="notification-area notification is-primary" id="notification-area" style="display:none">
86-
<div class="container section">
87-
<div class="notification-inner is-flex is-align-items-center is-justify-content-center">
88-
<p>Join our upcoming webinar! Get your seat right now! <a href="/webinar/">Click</a> to register.</p>
89-
</div>
90-
</div>
91-
<button class="delete" onclick="event.stopPropagation(); closeItem('#notification-area')"></button>
92-
</div>
93-
94-
<script type="text/javascript">
95-
// close action start
96-
function closeItem(item) {
97-
const selcetedItem = document.querySelector(item)
98-
selcetedItem.style.display = 'none'
99-
}
100-
// close action end
101-
102-
// redirect to webinar pagte
103-
function goToWebinarPage() {
104-
window.open("/webinar/", "_blank");
105-
}
106-
107-
(function () {
108-
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
109-
xhr.onreadystatechange = function () {
110-
if (xhr.readyState === 4) {
111-
if (xhr.status === 200) {
112-
var result = JSON.parse(xhr.responseText);
113-
if (result.schedules) {
114-
let endDate = new Date(result.schedules[0]).getTime();
115-
let startDate = new Date().getTime();
116-
let timeRemaining = parseInt((endDate - startDate) / 1000);
117-
if (timeRemaining >= 0) {
118-
document.querySelector('#notification-area').style.display = 'block';
119-
}
120-
}
121-
}
122-
}
123-
}
124-
// console.log('GET', 'https://license-issuer.appscode.com/_/webinars/');
125-
xhr.open('GET', 'https://license-issuer.appscode.com/_/webinars/');
126-
xhr.send();
127-
}());
128-
</script>
129-
<!-- notification end -->
13084
<!-- header area start -->
13185
{{ block "header" . }}
13286
<header>
13387
{{ block "header-top" . }}
13488
<!-- header top start -->
13589
<div class="header-top {{if not .Params.product_name}}fixed-menu{{else}}fixed-menu-z-index{{end}}">
90+
<!-- notification start -->
91+
<div onclick="goToWebinarPage()" class="notification-area notification is-primary" id="notification-area"
92+
style="display:none">
93+
<div class="container section">
94+
<div class="notification-inner is-flex is-align-items-center is-justify-content-center">
95+
<p>Join our upcoming webinar! Get your seat right now! <a href="/webinar/">Click</a> to register.</p>
96+
</div>
97+
</div>
98+
<button class="delete" onclick="event.stopPropagation(); closeItem('#notification-area')"></button>
99+
</div>
100+
<script type="text/javascript">
101+
// close action start
102+
function closeItem(item) {
103+
const selcetedItem = document.querySelector(item)
104+
selcetedItem.style.display = 'none'
105+
}
106+
// close action end
107+
108+
// redirect to webinar pagte
109+
function goToWebinarPage() {
110+
window.open("/webinar/", "_blank");
111+
}
112+
113+
(function () {
114+
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
115+
xhr.onreadystatechange = function () {
116+
if (xhr.readyState === 4) {
117+
if (xhr.status === 200) {
118+
var result = JSON.parse(xhr.responseText);
119+
if (result.schedules) {
120+
let endDate = new Date(result.schedules[0]).getTime();
121+
let startDate = new Date().getTime();
122+
let timeRemaining = parseInt((endDate - startDate) / 1000);
123+
if (timeRemaining >= 0) {
124+
document.querySelector('#notification-area').style.display = 'block';
125+
}
126+
}
127+
}
128+
}
129+
}
130+
// console.log('GET', 'https://license-issuer.appscode.com/_/webinars/');
131+
xhr.open('GET', 'https://license-issuer.appscode.com/_/webinars/');
132+
xhr.send();
133+
}());
134+
</script>
135+
<!-- notification end -->
136+
<!-- notification end -->
136137
<div class="container section">
137138
<nav class="navbar">
138139
<div class="navbar-brand">
@@ -764,4 +765,4 @@ <h4>Legal</h4>
764765
<!--End of Tawk.to Script-->
765766
</body>
766767

767-
</html>
768+
</html>

static/assets/sass/base/_global.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ video:focus {
378378
padding: 0;
379379
border-radius: 0;
380380
margin-bottom: 0;
381+
margin-top: -6px;
381382
.delete {
382383
right: 15px;
383384
top: 11px;

static/assets/sass/main.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/assets/sass/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)