File tree Expand file tree Collapse file tree 6 files changed +115
-24
lines changed Expand file tree Collapse file tree 6 files changed +115
-24
lines changed Original file line number Diff line number Diff line change 8383 "build:libraries" : " node libraries.js"
8484 },
8585 "heroku-run-build-script" : true
86- }
86+ }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 shareJwtTextElement ,
1212} from "./dom-elements.js" ;
1313import { CCPAModal } from "./ccpa-modal.js" ;
14- import { TopBar } from "./topbar .js" ;
14+ import { TopBanner } from "./top-banner .js" ;
1515
1616import queryString from "querystring" ;
1717
@@ -56,4 +56,4 @@ setupHighlighting();
5656setupJwtCounter ( ) ;
5757setupShareJwtButton ( shareJwtButton , shareJwtTextElement ) ;
5858CCPAModal ( ) ;
59- TopBar ( ) ;
59+ TopBanner ( ) ;
Original file line number Diff line number Diff line change 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+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -124,8 +124,12 @@ body {
124124 height : 100px ;
125125 }
126126
127- & .top-bar-open {
128- margin-top : 48px ;
127+ & .top-banner-open {
128+ margin-top : 5px ;
129+ transition : all 0.2s linear ;
130+ + breakpoint ('tablet' ) {
131+ margin-top : 48px ;
132+ }
129133 }
130134
131135 .container {
@@ -1836,18 +1840,95 @@ footer {
18361840 color : rgb (0 , 0 , 0 ) !important ;
18371841}
18381842
1839- .top-bar {
1840- max-width : 1444px ;
1841- margin : 0 auto ;
1843+ .top-banner {
1844+ background : linear-gradient (90deg , #ff 4f 40 0% , #ff 44 dd 99.99% );
1845+ border-radius : 8px ;
1846+ max-width : 1440px ;
1847+ padding : 8px 16px ;
1848+ border-bottom : 1px solid rgba (255 , 255 , 255 , 0.1 );
18421849 visibility : visible ;
18431850 opacity : 1 ;
1844- height : 48px ;
1851+ box-sizing : border-box ;
1852+ margin : 0 auto ;
1853+ position : absolute ;
1854+ top : 12px ;
1855+ z-index : 1000 ;
1856+ width : 100% ;
1857+ left : 0 ;
1858+ right : 0 ;
1859+ overflow : hidden ;
1860+
1861+ & .closed {
1862+ visibility : hidden ;
1863+ height : 0 ;
1864+ opacity : 0 ;
1865+ padding : 0 ;
1866+ transition : all 0.2s linear ;
1867+ }
1868+
1869+ .top-banner-container {
1870+ margin : 0 auto ;
1871+ display : grid ;
1872+ grid-template-columns : 1 fr 30px ;
1873+ max-width : 1200px ;
1874+ align-items : center ;
1875+
1876+ div {
1877+ + breakpoint ('tablet' ) {
1878+ display : flex ;
1879+ align-items : center ;
1880+ }
1881+ }
1882+ }
1883+
1884+ p {
1885+ font-size : 14px ;
1886+ color : #f f f ;
1887+ margin : 0 2rem 0 0 ;
1888+ display : inline ;
1889+ }
1890+
1891+ a {
1892+ font-weight : 600 ;
1893+ font-size : 14px ;
1894+ color : #f f f ;
1895+ text-decoration : none ;
1896+ display : block ;
1897+
1898+ span {
1899+ margin-left : 8px ;
1900+ }
1901+
1902+ & :hover {
1903+ text-decoration : underline ;
1904+ }
1905+
1906+ + breakpoint ('tablet' ) {
1907+ display : inline ;
1908+ }
1909+ }
1910+
1911+ button {
1912+ font-weight : 600 ;
1913+ font-size : 20px ;
1914+ color : #f f f ;
1915+ text-decoration : none ;
1916+ background : none ;
1917+ border : none ;
1918+ justify-self : flex-end ;
1919+ display : block ;
1920+ cursor : pointer ;
1921+ text-align : right ;
1922+ transform : rotate (45deg );
1923+ }
18451924}
18461925
1847- .top-bar.closed {
1848- visibility : hidden ;
1849- height : 0 ;
1850- opacity : 0 ;
1851- padding : 0 ;
1852- transition : all 0.2s linear ;
1926+ .top-banner-spacer {
1927+ background : black ;
1928+ height : 50px ;
1929+
1930+ & .hide {
1931+ height : 0 ;
1932+ transition : all 0.2s linear ;
1933+ }
18531934}
Original file line number Diff line number Diff line change 1- .top-bar
2- .top-bar-container
3- p Learn what's new with Auth0 at Devday23 on May 16
4- a( href ="https://developerday.com/register" target ="_blank" ) Register now
5- button +
1+ .top-banner
2+ .top-banner-container
3+ div
4+ p Learn what's new with Auth0 at Devday23 on May 16
5+ a( href ="https://developerday.com/register" target ="_blank" ) Register now
6+ span( aria-hiden ="true" ) →
7+ button.close-top-banner +
8+
9+ .top-banner-spacer
610
7- nav.navbar.closed
11+ nav.navbar.closed.top-banner-open
812 .container
913 .top-mobile
1014 .menu-trigger
You can’t perform that action at this time.
0 commit comments