File tree Expand file tree Collapse file tree 4 files changed +126
-2
lines changed Expand file tree Collapse file tree 4 files changed +126
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 shareJwtTextElement ,
1212} from "./dom-elements.js" ;
1313import { CCPAModal } from "./ccpa-modal.js" ;
14+ import { TopBanner } from "./top-banner.js" ;
1415
1516import queryString from "querystring" ;
1617
@@ -54,4 +55,5 @@ parseLocationQuery();
5455setupHighlighting ( ) ;
5556setupJwtCounter ( ) ;
5657setupShareJwtButton ( shareJwtButton , shareJwtTextElement ) ;
57- CCPAModal ( ) ;
58+ CCPAModal ( ) ;
59+ TopBanner ( ) ;
Original file line number Diff line number Diff line change 1+ export function TopBanner ( ) {
2+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
3+ document
4+ . querySelector ( ".close-top-banner" )
5+ . addEventListener ( "click" , ( ) => {
6+ document . querySelector ( ".top-banner-bg" ) . classList . add ( "closed" ) ;
7+ document . querySelector ( ".top-banner" ) . classList . add ( "closed" ) ;
8+ document . querySelector ( ".top-banner-spacer" ) . classList . add ( "hide" ) ;
9+ document . querySelector ( ".navbar" ) . classList . remove ( "top-banner-open" ) ;
10+ } ) ;
11+ } ) ;
12+ }
Original file line number Diff line number Diff line change @@ -1848,4 +1848,105 @@ footer {
18481848 width : 100% ;
18491849 height : 48px ;
18501850 z-index : 100 ;
1851+
1852+ & .closed {
1853+ visibility : hidden ;
1854+ height : 0 ;
1855+ opacity : 0 ;
1856+ padding : 0 ;
1857+ transition : all 0.1s linear ;
1858+ }
1859+ }
1860+
1861+ .top-banner {
1862+ background : linear-gradient (90deg , #ff 4f 40 0% , #ff 44 dd 99.99% );
1863+ border-radius : 8px ;
1864+ max-width : 1216px ;
1865+ padding : 8px 16px ;
1866+ border-bottom : 1px solid rgba (255 , 255 , 255 , 0.1 );
1867+ visibility : visible ;
1868+ opacity : 1 ;
1869+ box-sizing : border-box ;
1870+ margin : 0 auto ;
1871+ position : fixed ;
1872+ top : 12px ;
1873+ z-index : 1000 ;
1874+ width : 100% ;
1875+ left : 0 ;
1876+ right : 0 ;
1877+ overflow : hidden ;
1878+
1879+ & .closed {
1880+ visibility : hidden ;
1881+ height : 0 ;
1882+ opacity : 0 ;
1883+ padding : 0 ;
1884+ transition : all 0.2s linear ;
1885+ }
1886+
1887+ .top-banner-container {
1888+ margin : 0 auto ;
1889+ display : grid ;
1890+ grid-template-columns : 1 fr 30px ;
1891+ max-width : 1200px ;
1892+ align-items : center ;
1893+
1894+ div {
1895+ + breakpoint ('tablet' ) {
1896+ display : flex ;
1897+ align-items : center ;
1898+ }
1899+ }
1900+ }
1901+
1902+ p {
1903+ font-size : 14px ;
1904+ color : #f f f ;
1905+ margin : 0 2rem 0 0 ;
1906+ display : inline ;
1907+ }
1908+
1909+ a {
1910+ font-weight : 600 ;
1911+ font-size : 14px ;
1912+ color : #f f f ;
1913+ text-decoration : none ;
1914+ display : block ;
1915+
1916+ span {
1917+ margin-left : 8px ;
1918+ }
1919+
1920+ & :hover {
1921+ text-decoration : underline ;
1922+ }
1923+
1924+ + breakpoint ('tablet' ) {
1925+ display : inline ;
1926+ }
1927+ }
1928+
1929+ button {
1930+ font-weight : 600 ;
1931+ font-size : 20px ;
1932+ color : #f f f ;
1933+ text-decoration : none ;
1934+ background : none ;
1935+ border : none ;
1936+ justify-self : flex-end ;
1937+ display : block ;
1938+ cursor : pointer ;
1939+ text-align : right ;
1940+ transform : rotate (45deg );
1941+ }
1942+ }
1943+
1944+ .top-banner-spacer {
1945+ background : black ;
1946+ height : 50px ;
1947+
1948+ & .hide {
1949+ height : 0 ;
1950+ transition : all 0.2s linear ;
1951+ }
18511952}
Original file line number Diff line number Diff line change 1- nav.navbar.closed
1+ .top-banner-bg
2+ .top-banner
3+ .top-banner-container
4+ a( href ="https://regionalevents.okta.com/soyouneedtobuildaloginbox/DeveloperCenter" target ="_blank" ) Developers! Catch our webinar and see how to build with Auth0 in minutes.
5+ span( aria-hiden ="true" ) →
6+ button.close-top-banner +
7+
8+ .top-banner-spacer
9+
10+ nav.navbar.closed.top-banner-open
211 .container
312 .top-mobile
413 .menu-trigger
You can’t perform that action at this time.
0 commit comments