Skip to content

Commit bd5ecdc

Browse files
authored
Merge pull request jsonwebtoken#655 from jsonwebtoken/add-devday-banner
Add devday banner
2 parents 7fa7b79 + e8febcf commit bd5ecdc

File tree

5 files changed

+1783
-1200
lines changed

5 files changed

+1783
-1200
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@
8383
"build:libraries": "node libraries.js"
8484
},
8585
"heroku-run-build-script": true
86-
}
86+
}

src/website/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
shareJwtTextElement,
1212
} from "./dom-elements.js";
1313
import { CCPAModal } from "./ccpa-modal.js";
14+
import { TopBanner } from "./top-banner.js";
1415

1516
import queryString from "querystring";
1617

@@ -54,4 +55,5 @@ parseLocationQuery();
5455
setupHighlighting();
5556
setupJwtCounter();
5657
setupShareJwtButton(shareJwtButton, shareJwtTextElement);
57-
CCPAModal();
58+
CCPAModal();
59+
TopBanner();

src/website/top-banner.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export function TopBanner() {
2+
document.addEventListener("DOMContentLoaded", function () {
3+
document.querySelector(".close-top-banner").addEventListener("click", () => {
4+
document.querySelector(".top-banner").classList.add('closed');
5+
document.querySelector(".top-banner-spacer").classList.add('hide');
6+
document.querySelector(".navbar").classList.remove("top-banner-open");
7+
});
8+
});
9+
}

0 commit comments

Comments
 (0)