@uqds/header 0.0.9-alpha.0 → 0.0.12-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/css/main.css +1 -1
- package/dist/js/uqds.js +56 -77
- package/dist/js/uqds.min.js +1 -1
- package/package.json +6 -6
- package/src/js/header.js +31 -29
- package/src/js/main.js +2 -4
- package/src/scss/_component.scss +279 -134
- package/src/scss/_global.scss +2 -2
- package/src/scss/main.scss +1 -1
package/README.md
CHANGED
package/dist/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.uq-header{background:#51247a;display:grid;align-items:center;grid-template-columns:auto;grid-template-areas:"mainheader" "secondarynav";position:relative}@media(min-width: 64rem){.uq-header{grid-template-areas:"secondarynav" "mainheader"}}.uq-header__container{display:grid;align-items:center;grid-template-columns:1fr 15fr 1fr;grid-area:mainheader;grid-template-areas:"menutoggle logo searchtoggle" "mainnav-mobile mainnav-mobile mainnav-mobile"}@media(min-width: 64rem){.uq-header__container{max-width:73.25rem;margin-left:auto;margin-right:auto;grid-template-areas:"logo mainnav searchtoggle";padding-left:1rem;padding-right:1rem}}.uq-header__menu-toggle{grid-area:menutoggle}@media(min-width: 64rem){.uq-header__menu-toggle{display:none}}.uq-header__search-toggle{grid-area:searchtoggle;height:100%;text-align:right;color:#fff}@media(min-width: 64rem){.uq-header__search-toggle{height:auto}}.uq-header__search-toggle .search-toggle__label{display:none}@media(min-width: 64rem){.uq-header__search-toggle .search-toggle__label{display:block;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;text-align:right;width:3.2rem}}.uq-header .nav-primary__toggle{background:none;border:none;padding:1.75rem 2rem;height:100%}@media(min-width: 64rem){.uq-header .nav-primary__toggle{padding:1rem 0 1rem 1.5rem;height:auto}}.uq-header .nav-primary__menu-toggle{cursor:pointer;color:#fff;position:relative;text-indent:-9999px;white-space:nowrap}.uq-header .nav-primary__menu-toggle::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4 18h16M4 12h16M4 6h16' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translate(50%, 50%);position:absolute;top:.625rem;right:2rem}.uq-header .nav-primary__menu-toggle--is-open::before{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5 5 14 14M19 5 5 19' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header .nav-primary__search-toggle{cursor:pointer;color:#fff;position:relative}.uq-header .nav-primary__search-toggle::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z' stroke='%23fff' stroke-width='1.5'%3e%3c/path%3e%3cpath d='M15.5 15.5 20 20' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translate(50%, 50%);position:absolute;top:.625rem;right:2rem}@media(min-width: 64rem){.uq-header .nav-primary__search-toggle::before{top:.1rem;left:-1rem}}@media(min-width: 64rem){.uq-header .nav-primary__search-toggle:hover{color:#d4c8de;text-decoration:underline}}.uq-header .nav-primary__search-toggle--is-open::before{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5 5 14 14M19 5 5 19' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header__logo{grid-area:logo}.uq-header__logo a{display:grid;padding:1rem 0}.uq-header__logo img{height:32px}@media(min-width: 64rem){.uq-header__logo img{height:40px}}.uq-header__nav-primary{grid-area:mainnav;display:none;width:100%;z-index:99}@media(min-width: 64rem){.uq-header__nav-primary{display:block}}@media(min-width: 64rem){.uq-header__nav-primary-container{padding:0 0 0 2.5rem}}.uq-header__nav-primary-list{list-style-type:none;margin:0;padding-left:0;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}@media(min-width: 64rem){.uq-header__nav-primary-list{align-items:center;flex-direction:row}}.uq-header__nav-primary-item{margin:0;padding-left:2rem}.uq-header__nav-primary-item:first-child{padding-left:0}.uq-header__nav-primary-item--is-open>.uq-header__megamenu{height:auto;visibility:visible}.uq-header__nav-primary-item--is-open .uq-header__nav-primary-link{border-bottom:4px solid #fff}.uq-header__nav-primary-item .uq-header__nav-primary-link--active{border-bottom:4px solid #fff}.uq-header__nav-primary-link{display:block;color:#fff;text-decoration:none;padding:1rem 1.5rem;transition:background-color .25s,border-color .25s;font-weight:400;position:relative;border-bottom:4px solid rgba(0,0,0,0)}.uq-header__nav-primary-link:hover{color:#fff;text-decoration:none}@media(min-width: 64rem){.uq-header__nav-primary-link{padding:2rem .5rem}}.uq-header .nav-primary-link--has-dropdown{padding:2rem 1.5rem 2rem .5rem}.uq-header .nav-primary-link--has-dropdown::after{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m7 10 5 5 5-5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1rem;height:1rem;transform:translateY(50%);position:absolute;top:1.7rem;right:1.75rem}@media(min-width: 64rem){.uq-header .nav-primary-link--has-dropdown::after{right:.25rem}}.uq-header .mega-menu{display:none;background-color:#fff;list-style-type:none;margin:0;padding-left:0}.uq-header .mega-menu li a{padding-left:3rem;color:#51247a}.uq-header .mega-menu ul{list-style-type:none;margin:0;padding-left:0}.uq-header .mega-menu ul li a{padding-left:4.5rem}.uq-header__nav-secondary{background-color:#48206c;grid-area:secondarynav}@media(min-width: 64rem){.uq-header__nav-secondary-container{text-align:right;max-width:73.25rem;margin-left:auto;margin-right:auto}}.uq-header__nav-secondary-list{list-style-type:none;margin:0;padding-left:0;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}@media(min-width: 64rem){.uq-header__nav-secondary-list{justify-content:flex-end;align-items:center;flex-direction:row}}.uq-header__nav-secondary-item{margin:0}.uq-header__nav-secondary-link{display:block;color:#fff;padding:1rem 1.5rem}@media(min-width: 64rem){.uq-header__nav-secondary-link{font-size:.875rem;padding:.625rem 1rem}}.uq-header__nav-secondary-link:hover{color:#d4c8de}.uq-header__search{background:#51247a;position:absolute;width:100%;top:3.95rem;z-index:20;box-shadow:0 .75rem 1.5rem rgba(24,24,24,.2);transition:max-height .2s ease-in-out,transform .2s ease-in-out;transform:translateY(-1rem);max-height:0;overflow:hidden;visibility:hidden}@media(min-width: 64rem){.uq-header__search{top:8.3rem}}.uq-header__search--is-open{transform:translateY(0);max-height:50vh;visibility:visible}.uq-header__search-container{padding:0 1.5rem}@media(min-width: 64rem){.uq-header__search-container{padding-left:1rem;padding-right:1rem;max-width:73.25rem;margin-left:auto;margin-right:auto;padding-top:0;padding-bottom:1rem}}.uq-header__search-query{position:relative;display:inline-block;max-width:100%;min-width:100%;border-radius:5px;background-position:1rem;padding-top:1rem;padding-bottom:1rem}.uq-header__search-query-label{color:#fff}.uq-header__search-query-input{margin:0 !important;padding:.75rem 1rem !important}.uq-header__search-query-button{background-clip:padding-box;background-color:#fff;border-radius:5px;border:2px solid rgba(0,0,0,0);color:#51247a;display:inline-block;font-size:1rem;height:2.75rem;line-height:1.5;margin-bottom:0;margin-right:0;overflow:hidden;position:absolute;right:.5rem;text-decoration:none;text-indent:0;top:calc(50% - 1.375rem);transition:color .2s,background-color .2s,border-color .2s;width:2.75rem}.uq-header__search-query-button::before{content:"";position:absolute;display:block;width:1.5rem;height:1.5rem;top:.5rem;left:.5rem;background-size:100%;background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z' stroke='%2351247A' stroke-width='1.5'%3e%3c/path%3e%3cpath d='M15.5 15.5 20 20' stroke='%2351247A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header__search-query-submit{color:rgba(0,0,0,0);position:relative;display:block;width:100%;height:100%;margin:0;border:0;background-color:rgba(0,0,0,0);z-index:3;cursor:pointer;outline-offset:-2px;font-size:1rem}.uq-header__search-range{display:inline-block}.uq-header__search-range label{color:#fff}.uq-header .uq-header__search-radio:checked{border-color:#fff}.uq-header .uq-header__search-radio:checked:focus{border-color:#fff}.uq-header .uq-header__search-radio:checked::after{background-color:#fff}.uq-header__search-label{font-size:.8rem !important;line-height:1.7 !important}@media(min-width: 64rem){.uq-header__search-label{font-size:1rem !important;line-height:1.4 !important}}@media(max-width: 63.9375rem){.uq-header__nav-primary,.uq-header__nav-secondary{display:none}}.uq-header__megamenu{position:absolute;top:8.3rem;left:0;width:100%;z-index:30;height:0;visibility:hidden}.uq-header__megamenu-container{max-width:73.25rem;margin-left:auto;margin-right:auto;padding:1rem 3rem 2.5rem 3rem;background:#fff;box-shadow:0 .75rem 1.5rem rgba(24,24,24,.2);border-radius:0 0 .25rem .25rem}@media(min-width: 75rem){.uq-header__megamenu-container{max-width:77.25rem}}.uq-header .megamenu__row{display:grid;grid-template-columns:repeat(auto-fit, minmax(250px, 1fr))}.uq-header .megamenu__overview-link{display:block;padding:1rem 0;color:#51247a}.uq-header .megamenu__heading{color:#51247a;font-weight:500;padding-top:.25rem;padding-bottom:.25rem}.uq-header .megamenu__heading:nth-of-type(2){padding-top:2.5rem}.uq-header .megamenu__menu ul{list-style-type:none;margin:0;padding-left:0}.uq-header .megamenu__menu ul li{margin:0}.uq-header .megamenu__menu ul li a{display:inline-block;padding-top:.5rem;color:#51247a}:root{--app-height: 100%}body.no-scroll{position:fixed}@media(min-width: 64rem){body.no-scroll{position:relative}}.slide-menu{width:100%;max-width:100%;background-color:#fff;height:calc(var(--app-height) - 4.3rem);display:none;box-sizing:border-box;transition:transform .3s ease-in-out;transform:translateX(100%);will-change:transform;z-index:1000;grid-area:mainnav-mobile;position:fixed;top:4.3rem;right:0;overflow-y:auto;overflow-x:hidden;font-size:1rem;color:#51247a}@media(min-width: 64rem){.slide-menu{display:none !important}}.slide-menu .slide-menu__slider{width:100%;transform:translateX(0);transition:transform .3s ease-in-out;will-change:transform}.slide-menu ul{position:relative;width:100%;margin:0;padding-left:0;list-style:none;background-color:#fff}.slide-menu ul ul{position:absolute;top:0;left:100%;display:none}.slide-menu ul ul a{padding:.75rem 1.5rem .75rem 3rem}.slide-menu ul a{display:block}.slide-menu li{margin-bottom:0}.slide-menu li:hover{background-color:#f1f1f1}.slide-menu .slide-menu__control{padding-top:1rem;padding-bottom:1rem}.slide-menu a{cursor:pointer;padding:.75rem 1.5rem;text-decoration:none;font-size:1rem;color:#51247a;position:relative}.slide-menu a:hover{color:#51247a;background-color:#f1f1f1}.slide-menu .slide-menu__backlink{font-weight:500;padding-left:3rem}.slide-menu .slide-menu__backlink::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m14 7-5 5 5 5' stroke='%2351247A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translateY(50%);position:absolute;left:1.25rem;top:.25rem}.slide-menu__decorator::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m10 17 5-5-5-5' stroke='%2351247A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translateY(50%);position:absolute;right:1.5rem;top:.25rem}.slide-menu .controls{display:flex;margin-bottom:1rem}.slide-menu .btn{padding:.75rem 1.5rem;flex:1 0 auto;font-size:90%;color:#51247a;background-color:#fff;text-transform:uppercase;border:none;cursor:pointer;font-family:inherit;line-height:1}.slide-menu .btn:first-of-type{text-align:left}.slide-menu .btn:first-of-type:before{content:"⮜ this";margin-right:.5rem}.slide-menu .btn:last-of-type{text-align:right}.slide-menu .btn:last-of-type:before{content:"✕";margin-right:.5rem}.slide-menu .uq-header__nav-secondary-item{background-color:#48206c}.slide-menu .uq-header__nav-secondary-item:hover{background-color:#48206c}.slide-menu .uq-header__nav-secondary-link{color:#fff}.slide-menu .uq-header__nav-secondary-link:hover{color:#fff;background-color:#48206c}.slide-menu .uq-header__newglobal-nav-parent{font-weight:500}.slide-menu .uq-header__newglobal-nav-item{background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link{color:#fff;background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link:hover{color:#fff;background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link .slide-menu__decorator::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m10 17 5-5-5-5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.global-mobile-nav .uq-site-header__title-container{margin:0;padding-left:0rem;padding-right:0rem}.global-mobile-nav .uq-site-header__title{padding:1rem 1.5rem;font-size:1rem;font-weight:500}.global-mobile-nav .uq-site-header__title:hover{background:none}.global-mobile-nav__audience-link{font-weight:500}.uq-site-header__navigation-toggle{display:none}
|
|
1
|
+
.uq-header{background:#51247a;display:grid;align-items:center;grid-template-columns:auto;grid-template-areas:"mainheader" "secondarynav";position:relative}@media(min-width: 64rem){.uq-header{grid-template-areas:"secondarynav" "mainheader"}}.uq-header__container{display:grid;align-items:center;grid-template-columns:1fr 15fr 1fr;grid-area:mainheader;grid-template-areas:"menutoggle logo searchtoggle" "mainnav-mobile mainnav-mobile mainnav-mobile"}@media(min-width: 64rem){.uq-header__container{max-width:73.25rem;margin-left:auto;margin-right:auto;grid-template-areas:"logo mainnav searchtoggle";padding-left:1rem;padding-right:1rem}}.uq-header__menu-toggle{grid-area:menutoggle}@media(min-width: 64rem){.uq-header__menu-toggle{display:none}}.uq-header__search-toggle{grid-area:searchtoggle;height:100%;text-align:right;color:#fff}@media(min-width: 64rem){.uq-header__search-toggle{height:auto}}.uq-header__search-toggle .search-toggle__label{display:none}@media(min-width: 64rem){.uq-header__search-toggle .search-toggle__label{display:block;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;text-align:right;width:3.2rem}}.uq-header .nav-primary__toggle{background:none;border:none;padding:1.75rem 2rem;height:100%}@media(min-width: 64rem){.uq-header .nav-primary__toggle{padding:1rem 0 1rem 1.5rem;height:auto}}.uq-header .nav-primary__menu-toggle{cursor:pointer;color:#fff;position:relative;text-indent:-9999px;white-space:nowrap}.uq-header .nav-primary__menu-toggle::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4 18h16M4 12h16M4 6h16' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translate(50%, 50%);position:absolute;top:.625rem;right:2rem}.uq-header .nav-primary__menu-toggle--is-open::before{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5 5 14 14M19 5 5 19' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header .nav-primary__search-toggle{cursor:pointer;color:#fff;position:relative}.uq-header .nav-primary__search-toggle::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z' stroke='%23fff' stroke-width='1.5'%3e%3c/path%3e%3cpath d='M15.5 15.5 20 20' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translate(50%, 50%);position:absolute;top:.625rem;right:2rem}@media(min-width: 64rem){.uq-header .nav-primary__search-toggle::before{top:.1rem;left:-1rem}}@media(min-width: 64rem){.uq-header .nav-primary__search-toggle:hover{color:#d4c8de;text-decoration:underline}}.uq-header .nav-primary__search-toggle--is-open::before{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5 5 14 14M19 5 5 19' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header__logo{grid-area:logo}.uq-header__logo a{display:grid;padding:1rem 0}.uq-header__logo img{height:32px}@media(min-width: 64rem){.uq-header__logo img{height:40px}}.uq-header__nav-primary{grid-area:mainnav;display:none;width:100%;z-index:99}@media(min-width: 64rem){.uq-header__nav-primary{display:block}}@media(min-width: 64rem){.uq-header__nav-primary-container{padding:0 0 0 2.5rem}}.uq-header__nav-primary-list{list-style-type:none;margin:0;padding-left:0;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}@media(min-width: 64rem){.uq-header__nav-primary-list{align-items:center;flex-direction:row}}.uq-header__nav-primary-item{margin:0;padding-left:2rem}.uq-header__nav-primary-item:first-child{padding-left:0}.uq-header__nav-primary-item--is-open>.uq-header__megamenu{height:auto;visibility:visible}.uq-header__nav-primary-item--is-open .uq-header__nav-primary-link{border-bottom:4px solid #fff}.uq-header__nav-primary-item .uq-header__nav-primary-link--active{border-bottom:4px solid #fff}.uq-header__nav-primary-link{display:block;color:#fff;text-decoration:none;padding:1rem 1.5rem;transition:background-color .25s,border-color .25s;font-weight:400;position:relative;border-bottom:4px solid rgba(0,0,0,0)}.uq-header__nav-primary-link:hover{color:#fff;text-decoration:none}@media(min-width: 64rem){.uq-header__nav-primary-link{padding:2rem .5rem}}.uq-header .nav-primary-link--has-dropdown{padding:2rem 1.5rem 2rem .5rem}.uq-header .nav-primary-link--has-dropdown::after{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m7 10 5 5 5-5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1rem;height:1rem;transform:translateY(50%);position:absolute;top:1.7rem;right:1.75rem}@media(min-width: 64rem){.uq-header .nav-primary-link--has-dropdown::after{right:.25rem}}.uq-header .mega-menu{display:none;background-color:#fff;list-style-type:none;margin:0;padding-left:0}.uq-header .mega-menu li a{padding-left:3rem;color:#51247a}.uq-header .mega-menu ul{list-style-type:none;margin:0;padding-left:0}.uq-header .mega-menu ul li a{padding-left:4.5rem}.uq-header__nav-secondary{background-color:#48206c;grid-area:secondarynav}@media(min-width: 64rem){.uq-header__nav-secondary-container{text-align:right;max-width:73.25rem;margin-left:auto;margin-right:auto}}.uq-header__nav-secondary-list{list-style-type:none;margin:0;padding-left:0;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}@media(min-width: 64rem){.uq-header__nav-secondary-list{justify-content:flex-end;align-items:center;flex-direction:row}}.uq-header__nav-secondary-item{margin:0}.uq-header__nav-secondary-link{display:block;color:#fff;padding:1rem 1.5rem}@media(min-width: 64rem){.uq-header__nav-secondary-link{font-size:.875rem;padding:.625rem 1rem}}.uq-header__nav-secondary-link:hover{color:#d4c8de}.uq-header__search{background:#51247a;position:absolute;width:100%;top:3.95rem;z-index:20;box-shadow:0 .75rem 1.5rem rgba(24,24,24,.2);transition:max-height .2s ease-in-out,transform .2s ease-in-out;transform:translateY(-1rem);max-height:0;overflow:hidden;visibility:hidden}@media(min-width: 64rem){.uq-header__search{top:8.3rem}}.uq-header__search--is-open{transform:translateY(0);max-height:50vh;visibility:visible}.uq-header__search-container{padding:0 1.5rem}@media(min-width: 64rem){.uq-header__search-container{padding-left:1rem;padding-right:1rem;max-width:73.25rem;margin-left:auto;margin-right:auto;padding-top:0;padding-bottom:1rem}}.uq-header__search-query{position:relative;display:inline-block;max-width:100%;min-width:100%;border-radius:5px;background-position:1rem;padding-top:1rem;padding-bottom:1rem}.uq-header__search-query-label{color:#fff}.uq-header__search-query-input{margin:0 !important;padding:.75rem 1rem !important}.uq-header__search-query-button{background-clip:padding-box;background-color:#fff;border-radius:5px;border:2px solid rgba(0,0,0,0);color:#51247a;display:inline-block;font-size:1rem;height:2.75rem;line-height:1.5;margin-bottom:0;margin-right:0;overflow:hidden;position:absolute;right:.5rem;text-decoration:none;text-indent:0;top:calc(50% - 1.375rem);transition:color .2s,background-color .2s,border-color .2s;width:2.75rem}.uq-header__search-query-button::before{content:"";position:absolute;display:block;width:1.5rem;height:1.5rem;top:.5rem;left:.5rem;background-size:100%;background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z' stroke='%2351247a' stroke-width='1.5'%3e%3c/path%3e%3cpath d='M15.5 15.5 20 20' stroke='%2351247a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-header__search-query-submit{color:rgba(0,0,0,0);position:relative;display:block;width:100%;height:100%;margin:0;border:0;background-color:rgba(0,0,0,0);z-index:3;cursor:pointer;outline-offset:-2px;font-size:1rem}.uq-header__search-range{display:inline-block}.uq-header__search-range label{color:#fff}.uq-header .uq-header__search-radio:checked{border-color:#fff}.uq-header .uq-header__search-radio:checked:focus{border-color:#fff}.uq-header .uq-header__search-radio:checked::after{background-color:#fff}.uq-header__search-label{font-size:.8rem !important;line-height:1.7 !important}@media(min-width: 64rem){.uq-header__search-label{font-size:1rem !important;line-height:1.4 !important}}@media(max-width: 63.9375rem){.uq-header__nav-primary,.uq-header__nav-secondary{display:none}}.uq-header__megamenu{position:absolute;top:8.3rem;left:0;width:100%;z-index:30;height:0;visibility:hidden}.uq-header__megamenu-container{max-width:73.25rem;margin-left:auto;margin-right:auto;padding:1rem 3rem 2.5rem 3rem;background:#fff;box-shadow:0 .75rem 1.5rem rgba(24,24,24,.2);border-radius:0 0 .25rem .25rem}@media(min-width: 75rem){.uq-header__megamenu-container{max-width:77.25rem}}.uq-header .megamenu__row{display:grid;grid-template-columns:repeat(auto-fit, minmax(250px, 1fr))}.uq-header .megamenu__overview-link{display:block;padding:1rem 0;color:#51247a}.uq-header .megamenu__heading{color:#51247a;font-weight:500;padding-top:.25rem;padding-bottom:.25rem}.uq-header .megamenu__heading:nth-of-type(2){padding-top:2.5rem}.uq-header .megamenu__menu ul{list-style-type:none;margin:0;padding-left:0}.uq-header .megamenu__menu ul li{margin:0}.uq-header .megamenu__menu ul li a{display:inline-block;padding-top:.5rem;color:#51247a}:root{--app-height: 100%}body.no-scroll{position:fixed;max-width:100%}@media(min-width: 64rem){body.no-scroll{position:relative}}.slide-menu{width:100%;max-width:100%;background-color:#fff;height:calc(var(--app-height) - 4.3rem);display:none;box-sizing:border-box;transition:transform .3s ease-in-out;transform:translateX(100%);will-change:transform;z-index:1000;grid-area:mainnav-mobile;position:fixed;top:4.3rem;right:0;overflow-y:auto;overflow-x:hidden;font-size:1rem;color:#51247a}@media(min-width: 64rem){.slide-menu{display:none !important}}.slide-menu .slide-menu__slider{width:100%;transform:translateX(0);transition:transform .3s ease-in-out;will-change:transform}.slide-menu ul{position:relative;width:100%;margin:0;padding-left:0;list-style:none;background-color:#fff}.slide-menu ul ul{position:absolute;top:0;left:100%;display:none}.slide-menu ul ul a{padding:.75rem 1.5rem .75rem 3rem}.slide-menu ul a{display:block}.slide-menu li{margin-bottom:0}.slide-menu li:hover{background-color:#f1f1f1}.slide-menu .slide-menu__control{padding-top:1rem;padding-bottom:1rem}.slide-menu a{cursor:pointer;padding:.75rem 1.5rem;text-decoration:none;font-size:1rem;color:#51247a;position:relative}.slide-menu a:hover{color:#51247a;background-color:#f1f1f1}.slide-menu .slide-menu__backlink{font-weight:500;padding-left:3rem}.slide-menu .slide-menu__backlink::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m14 7-5 5 5 5' stroke='%2351247a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translateY(50%);position:absolute;left:1.25rem;top:.25rem}.slide-menu__decorator::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m10 17 5-5-5-5' stroke='%2351247a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-repeat:no-repeat;width:1.5rem;height:1.5rem;transform:translateY(50%);position:absolute;right:1.5rem;top:.25rem}.slide-menu .controls{display:flex;margin-bottom:1rem}.slide-menu .btn{padding:.75rem 1.5rem;flex:1 0 auto;font-size:90%;color:#51247a;background-color:#fff;text-transform:uppercase;border:none;cursor:pointer;font-family:inherit;line-height:1}.slide-menu .btn:first-of-type{text-align:left}.slide-menu .btn:first-of-type:before{content:"⮜ this";margin-right:.5rem}.slide-menu .btn:last-of-type{text-align:right}.slide-menu .btn:last-of-type:before{content:"✕";margin-right:.5rem}.slide-menu .uq-header__nav-secondary-item{background-color:#48206c}.slide-menu .uq-header__nav-secondary-item:hover{background-color:#48206c}.slide-menu .uq-header__nav-secondary-link{color:#fff}.slide-menu .uq-header__nav-secondary-link:hover{color:#fff;background-color:#48206c}.slide-menu .uq-header__newglobal-nav-parent{font-weight:500}.slide-menu .uq-header__newglobal-nav-item{background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link{color:#fff;background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link:hover{color:#fff;background-color:#51247a}.slide-menu .uq-header__newglobal-nav-link .slide-menu__decorator::before{content:"";background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m10 17 5-5-5-5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.global-mobile-nav .uq-site-header__title-container{margin:0;padding:1rem 1.5rem}.global-mobile-nav .uq-site-header__title{padding:0;font-size:1rem;font-weight:500;display:block}.global-mobile-nav .uq-site-header__title:hover{background:none}.global-mobile-nav__audience-link{font-weight:500}.uq-site-header__navigation-toggle{display:none}.admin-menu .slide-menu{top:7.5rem}@media(min-width: 37.5rem){.admin-menu .slide-menu{top:6.15rem}}.uq-header{line-height:1.5;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}.uq-header__logo img{max-width:unset}.uq-header__search-query-submit{background-color:unset !important}.uq-header__search-range .uq-header__search-label{max-width:unset}.uq-header__nav-primary-list li{margin:0}.uq-header__nav-primary-list li:hover .uq-header__nav-primary-link{border-bottom:4px solid #fff}.uq-header__nav-primary-link,.uq-header__nav-primary-link:focus{display:block;color:#fff;text-decoration:none;transition:background-color .25s,border-color .25s;font-weight:400;position:relative;border-bottom:4px solid rgba(0,0,0,0)}.uq-header a:focus{color:#d4c8de}.uq-header__search-container form,.uq-header__search-container fieldset{border:unset;padding:0;margin:0}.uq-header__search-query-input{height:45px !important}.uq-header .nav-primary__search-toggle{margin-bottom:0}.uq-header .nav-primary__menu-toggle{margin-bottom:0 !important;font:initial;font-size:.833rem;line-height:normal}.uq-header__search-range{display:inline-block}.uq-header__search-range input[type=radio]{height:20px;width:20px;vertical-align:top;display:inline-block;border-radius:50%;background-color:rgba(0,0,0,0);margin:3px 3px 0 5px;position:absolute;appearance:none;-webkit-appearance:none;border:1px solid #e7e3e0;cursor:pointer}.uq-header__search-range input[type=radio]+label{margin-bottom:1rem;margin-left:.5rem;margin-right:1rem;padding-top:.125rem;padding-left:1.5rem}.uq-header__search-range label{color:#fff;font-weight:400;display:inline-block;vertical-align:top}input[type=radio].uq-header__search-radio:checked{border-color:#fff;border-width:2px}input[type=radio].uq-header__search-radio:focus{border-color:#fff}input[type=radio].uq-header__search-radio:checked::after{content:"";background-color:#fff;border-radius:50%;content:"";display:block;position:absolute;top:3px;left:3px;height:10px;width:10px}
|
package/dist/js/uqds.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
-
|
|
5
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
|
-
|
|
7
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
-
|
|
9
3
|
var uq = function (exports) {
|
|
10
4
|
'use strict';
|
|
11
5
|
/**
|
|
@@ -15,90 +9,75 @@ var uq = function (exports) {
|
|
|
15
9
|
* TODO: make this class configurable
|
|
16
10
|
*/
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_classCallCheck(this, NewHeader);
|
|
21
|
-
|
|
12
|
+
class NewHeader {
|
|
13
|
+
constructor(el) {
|
|
22
14
|
this.init(el);
|
|
23
15
|
}
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
_this.menuToggle.classList.remove('nav-primary__menu-toggle--is-open');
|
|
17
|
+
init(el) {
|
|
18
|
+
this.menuToggle = el.querySelector(".nav-primary__menu-toggle");
|
|
19
|
+
this.searchToggle = el.querySelector(".nav-primary__search-toggle");
|
|
20
|
+
this.searchLabel = el.querySelector(".search-toggle__label");
|
|
21
|
+
this.searchBlock = el.querySelector(".uq-header__search");
|
|
22
|
+
this.searchInput = el.querySelector(".uq-header__search-query-input");
|
|
23
|
+
this.menuToggle.addEventListener("click", () => {
|
|
24
|
+
document.body.classList.toggle("no-scroll");
|
|
25
|
+
this.menuToggle.classList.toggle("nav-primary__menu-toggle--is-open");
|
|
26
|
+
this.searchToggle.classList.remove("nav-primary__search-toggle--is-open");
|
|
27
|
+
this.searchBlock.classList.remove("uq-header__search--is-open");
|
|
28
|
+
this.searchLabel.innerHTML = "Search";
|
|
29
|
+
});
|
|
30
|
+
this.searchToggle.addEventListener("click", e => {
|
|
31
|
+
document.body.classList.remove("no-scroll");
|
|
32
|
+
this.searchToggle.classList.toggle("nav-primary__search-toggle--is-open");
|
|
33
|
+
this.searchBlock.classList.toggle("uq-header__search--is-open");
|
|
34
|
+
this.menuToggle.classList.remove("nav-primary__menu-toggle--is-open");
|
|
35
|
+
|
|
36
|
+
if (this.searchBlock.classList.contains("uq-header__search--is-open")) {
|
|
37
|
+
this.searchInput.focus();
|
|
38
|
+
} else {
|
|
39
|
+
this.searchInput.blur();
|
|
40
|
+
this.searchToggle.blur();
|
|
41
|
+
}
|
|
52
42
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
if (this.searchLabel.innerHTML === "Search") {
|
|
44
|
+
this.searchLabel.innerHTML = "Close";
|
|
45
|
+
} else {
|
|
46
|
+
this.searchLabel.innerHTML = "Search";
|
|
47
|
+
}
|
|
57
48
|
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
}); // megamenu
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
const megaMenuItem = document.querySelectorAll(".uq-header__nav-primary-item");
|
|
53
|
+
megaMenuItem.forEach(item => {
|
|
54
|
+
item.addEventListener("mouseenter", this.handleToggle);
|
|
55
|
+
item.addEventListener("mouseleave", this.handleToggle);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
66
58
|
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
handleToggle(event) {
|
|
60
|
+
let menuItem = event.target;
|
|
69
61
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
item.addEventListener('mouseenter', _this.handleToggle);
|
|
73
|
-
item.addEventListener('mouseleave', _this.handleToggle);
|
|
74
|
-
});
|
|
62
|
+
if (menuItem.tagName !== "LI") {
|
|
63
|
+
menuItem = menuItem.parentElement;
|
|
75
64
|
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "handleToggle",
|
|
78
|
-
value: function handleToggle(event) {
|
|
79
|
-
var menuItem = event.target;
|
|
80
65
|
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
menuItem.eventType = event.type;
|
|
67
|
+
window.setTimeout(function () {
|
|
68
|
+
if ((event.type === "mouseenter" || event.type === "mouseleave") && window.matchMedia("(max-width: 1024px)").matches) {
|
|
69
|
+
return;
|
|
83
70
|
}
|
|
84
71
|
|
|
85
|
-
menuItem.eventType
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
menuItem.classList.add('uq-header__nav-primary-item--is-open');
|
|
93
|
-
} else {
|
|
94
|
-
menuItem.classList.remove('uq-header__nav-primary-item--is-open');
|
|
95
|
-
}
|
|
96
|
-
}, 250);
|
|
97
|
-
}
|
|
98
|
-
}]);
|
|
72
|
+
if (menuItem.eventType === "mouseenter") {
|
|
73
|
+
menuItem.classList.add("uq-header__nav-primary-item--is-open");
|
|
74
|
+
} else {
|
|
75
|
+
menuItem.classList.remove("uq-header__nav-primary-item--is-open");
|
|
76
|
+
}
|
|
77
|
+
}, 250);
|
|
78
|
+
}
|
|
99
79
|
|
|
100
|
-
|
|
101
|
-
}();
|
|
80
|
+
}
|
|
102
81
|
|
|
103
82
|
exports.header = NewHeader;
|
|
104
83
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/js/uqds.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var uq=function(e){return e.header=class{constructor(e){this.init(e)}init(e){this.menuToggle=e.querySelector(".nav-primary__menu-toggle"),this.searchToggle=e.querySelector(".nav-primary__search-toggle"),this.searchLabel=e.querySelector(".search-toggle__label"),this.searchBlock=e.querySelector(".uq-header__search"),this.searchInput=e.querySelector(".uq-header__search-query-input"),this.menuToggle.addEventListener("click",()=>{document.body.classList.toggle("no-scroll"),this.menuToggle.classList.toggle("nav-primary__menu-toggle--is-open"),this.searchToggle.classList.remove("nav-primary__search-toggle--is-open"),this.searchBlock.classList.remove("uq-header__search--is-open"),this.searchLabel.innerHTML="Search"}),this.searchToggle.addEventListener("click",e=>{document.body.classList.remove("no-scroll"),this.searchToggle.classList.toggle("nav-primary__search-toggle--is-open"),this.searchBlock.classList.toggle("uq-header__search--is-open"),this.menuToggle.classList.remove("nav-primary__menu-toggle--is-open"),this.searchBlock.classList.contains("uq-header__search--is-open")?this.searchInput.focus():(this.searchInput.blur(),this.searchToggle.blur()),"Search"===this.searchLabel.innerHTML?this.searchLabel.innerHTML="Close":this.searchLabel.innerHTML="Search",e.preventDefault()});const s=document.querySelectorAll(".uq-header__nav-primary-item");s.forEach(e=>{e.addEventListener("mouseenter",this.handleToggle),e.addEventListener("mouseleave",this.handleToggle)})}handleToggle(e){let s=e.target;(s="LI"!==s.tagName?s.parentElement:s).eventType=e.type,window.setTimeout(function(){("mouseenter"===e.type||"mouseleave"===e.type)&&window.matchMedia("(max-width: 1024px)").matches||("mouseenter"===s.eventType?s.classList.add("uq-header__nav-primary-item--is-open"):s.classList.remove("uq-header__nav-primary-item--is-open"))},250)}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uqds/header",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12-alpha.0",
|
|
4
4
|
"description": "The POC UQ Header component package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uqds",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"url": "https://github.com/uq-its-ss/design-system/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@uqds/core": "^0.0.
|
|
41
|
-
"@uqds/form": "^0.0.
|
|
42
|
-
"@uqds/grid": "^0.0.
|
|
43
|
-
"@uqds/icon": "^0.0.
|
|
40
|
+
"@uqds/core": "^0.0.12-alpha.0",
|
|
41
|
+
"@uqds/form": "^0.0.12-alpha.0",
|
|
42
|
+
"@uqds/grid": "^0.0.12-alpha.0",
|
|
43
|
+
"@uqds/icon": "^0.0.12-alpha.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"gulp": "^4.0.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "125e487dfd2f7e46f2b29cc0e8646b92e61d6f2c"
|
|
49
49
|
}
|
package/src/js/header.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* NewHeader module
|
|
@@ -13,25 +13,26 @@ class NewHeader {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
init(el) {
|
|
16
|
-
this.menuToggle = el.querySelector(
|
|
17
|
-
this.searchToggle = el.querySelector(
|
|
18
|
-
this.searchLabel = el.querySelector(
|
|
19
|
-
this.searchBlock = el.querySelector(
|
|
20
|
-
this.searchInput = el.querySelector(
|
|
16
|
+
this.menuToggle = el.querySelector(".nav-primary__menu-toggle");
|
|
17
|
+
this.searchToggle = el.querySelector(".nav-primary__search-toggle");
|
|
18
|
+
this.searchLabel = el.querySelector(".search-toggle__label");
|
|
19
|
+
this.searchBlock = el.querySelector(".uq-header__search");
|
|
20
|
+
this.searchInput = el.querySelector(".uq-header__search-query-input");
|
|
21
21
|
|
|
22
|
-
this.menuToggle.addEventListener(
|
|
23
|
-
document.body.classList.toggle(
|
|
24
|
-
this.menuToggle.classList.toggle(
|
|
25
|
-
this.searchToggle.classList.remove(
|
|
26
|
-
this.searchBlock.classList.remove(
|
|
22
|
+
this.menuToggle.addEventListener("click", () => {
|
|
23
|
+
document.body.classList.toggle("no-scroll");
|
|
24
|
+
this.menuToggle.classList.toggle("nav-primary__menu-toggle--is-open");
|
|
25
|
+
this.searchToggle.classList.remove("nav-primary__search-toggle--is-open");
|
|
26
|
+
this.searchBlock.classList.remove("uq-header__search--is-open");
|
|
27
|
+
this.searchLabel.innerHTML = "Search";
|
|
27
28
|
});
|
|
28
29
|
|
|
29
|
-
this.searchToggle.addEventListener(
|
|
30
|
-
document.body.classList.remove(
|
|
31
|
-
this.searchToggle.classList.toggle(
|
|
32
|
-
this.searchBlock.classList.toggle(
|
|
33
|
-
this.menuToggle.classList.remove(
|
|
34
|
-
if (this.searchBlock.classList.contains(
|
|
30
|
+
this.searchToggle.addEventListener("click", (e) => {
|
|
31
|
+
document.body.classList.remove("no-scroll");
|
|
32
|
+
this.searchToggle.classList.toggle("nav-primary__search-toggle--is-open");
|
|
33
|
+
this.searchBlock.classList.toggle("uq-header__search--is-open");
|
|
34
|
+
this.menuToggle.classList.remove("nav-primary__menu-toggle--is-open");
|
|
35
|
+
if (this.searchBlock.classList.contains("uq-header__search--is-open")) {
|
|
35
36
|
this.searchInput.focus();
|
|
36
37
|
} else {
|
|
37
38
|
this.searchInput.blur();
|
|
@@ -46,33 +47,34 @@ class NewHeader {
|
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
// megamenu
|
|
49
|
-
const megaMenuItem = document.querySelectorAll(
|
|
50
|
+
const megaMenuItem = document.querySelectorAll(
|
|
51
|
+
".uq-header__nav-primary-item"
|
|
52
|
+
);
|
|
50
53
|
megaMenuItem.forEach((item) => {
|
|
51
|
-
item.addEventListener(
|
|
52
|
-
item.addEventListener(
|
|
54
|
+
item.addEventListener("mouseenter", this.handleToggle);
|
|
55
|
+
item.addEventListener("mouseleave", this.handleToggle);
|
|
53
56
|
});
|
|
54
|
-
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
handleToggle(event) {
|
|
58
60
|
let menuItem = event.target;
|
|
59
|
-
if (menuItem.tagName !==
|
|
61
|
+
if (menuItem.tagName !== "LI") {
|
|
60
62
|
menuItem = menuItem.parentElement;
|
|
61
63
|
}
|
|
62
64
|
menuItem.eventType = event.type;
|
|
63
65
|
|
|
64
|
-
window.setTimeout(function() {
|
|
66
|
+
window.setTimeout(function () {
|
|
65
67
|
if (
|
|
66
|
-
(event.type ===
|
|
67
|
-
window.matchMedia(
|
|
68
|
+
(event.type === "mouseenter" || event.type === "mouseleave") &&
|
|
69
|
+
window.matchMedia("(max-width: 1024px)").matches
|
|
68
70
|
) {
|
|
69
71
|
return;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
if (menuItem.eventType ===
|
|
73
|
-
menuItem.classList.add(
|
|
74
|
-
} else
|
|
75
|
-
menuItem.classList.remove(
|
|
74
|
+
if (menuItem.eventType === "mouseenter") {
|
|
75
|
+
menuItem.classList.add("uq-header__nav-primary-item--is-open");
|
|
76
|
+
} else {
|
|
77
|
+
menuItem.classList.remove("uq-header__nav-primary-item--is-open");
|
|
76
78
|
}
|
|
77
79
|
}, 250);
|
|
78
80
|
}
|
package/src/js/main.js
CHANGED
package/src/scss/_component.scss
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
2
|
@use "@uqds/icon/src/scss/global" as icon-constants;
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
3
|
+
@use "@uqds/grid/src/scss/global" as grid;
|
|
4
|
+
@use "global" as *;
|
|
5
5
|
|
|
6
6
|
.uq-header {
|
|
7
|
-
|
|
8
7
|
background: core.$uq-purple; //linear-gradient(90deg, $uq-purple 0%, 87%, #962A8B 100%);
|
|
9
8
|
display: grid;
|
|
10
9
|
align-items: center;
|
|
@@ -16,32 +15,30 @@
|
|
|
16
15
|
|
|
17
16
|
@media #{core.$screen-lg-up} {
|
|
18
17
|
grid-template-areas:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
"secondarynav"
|
|
19
|
+
"mainheader";
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
&__container {
|
|
24
21
|
|
|
22
|
+
&__container {
|
|
25
23
|
display: grid;
|
|
26
24
|
align-items: center;
|
|
27
25
|
grid-template-columns: 1fr 15fr 1fr;
|
|
28
26
|
grid-area: mainheader;
|
|
29
27
|
grid-template-areas:
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
"menutoggle logo searchtoggle"
|
|
29
|
+
"mainnav-mobile mainnav-mobile mainnav-mobile";
|
|
32
30
|
|
|
33
31
|
@media #{core.$screen-lg-up} {
|
|
34
32
|
max-width: 73.25rem;
|
|
35
33
|
margin-left: auto;
|
|
36
34
|
margin-right: auto;
|
|
37
|
-
grid-template-areas:
|
|
38
|
-
"logo mainnav searchtoggle";
|
|
35
|
+
grid-template-areas: "logo mainnav searchtoggle";
|
|
39
36
|
padding-left: core.$space;
|
|
40
37
|
padding-right: core.$space;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
&__menu-toggle
|
|
41
|
+
&__menu-toggle {
|
|
45
42
|
grid-area: menutoggle;
|
|
46
43
|
|
|
47
44
|
@media #{core.$screen-lg-up} {
|
|
@@ -88,24 +85,30 @@
|
|
|
88
85
|
cursor: pointer;
|
|
89
86
|
color: core.$uq-white;
|
|
90
87
|
position: relative;
|
|
91
|
-
text-indent: -9999px;
|
|
92
|
-
white-space: nowrap;
|
|
88
|
+
text-indent: -9999px;
|
|
89
|
+
white-space: nowrap;
|
|
93
90
|
|
|
94
91
|
&::before {
|
|
95
92
|
content: "";
|
|
96
|
-
background-image: url(icon-constants.get-icon(
|
|
93
|
+
background-image: url(icon-constants.get-icon(
|
|
94
|
+
"standard--navigation-menu",
|
|
95
|
+
core.$uq-white
|
|
96
|
+
));
|
|
97
97
|
background-repeat: no-repeat;
|
|
98
98
|
width: 1.5rem;
|
|
99
99
|
height: 1.5rem;
|
|
100
100
|
transform: translate(50%, 50%);
|
|
101
101
|
position: absolute;
|
|
102
|
-
top: .625rem;
|
|
102
|
+
top: 0.625rem;
|
|
103
103
|
right: core.$space-l;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&--is-open {
|
|
107
107
|
&::before {
|
|
108
|
-
background-image: url(icon-constants.get-icon(
|
|
108
|
+
background-image: url(icon-constants.get-icon(
|
|
109
|
+
"standard--x",
|
|
110
|
+
core.$uq-white
|
|
111
|
+
));
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
}
|
|
@@ -117,15 +120,18 @@
|
|
|
117
120
|
|
|
118
121
|
&::before {
|
|
119
122
|
content: "";
|
|
120
|
-
background-image: url(icon-constants.get-icon(
|
|
123
|
+
background-image: url(icon-constants.get-icon(
|
|
124
|
+
"standard--search",
|
|
125
|
+
core.$uq-white
|
|
126
|
+
));
|
|
121
127
|
background-repeat: no-repeat;
|
|
122
128
|
width: 1.5rem;
|
|
123
129
|
height: 1.5rem;
|
|
124
130
|
transform: translate(50%, 50%);
|
|
125
131
|
position: absolute;
|
|
126
|
-
top: .625rem;
|
|
132
|
+
top: 0.625rem;
|
|
127
133
|
right: core.$space-l;
|
|
128
|
-
|
|
134
|
+
|
|
129
135
|
@media #{core.$screen-lg-up} {
|
|
130
136
|
top: 0.1rem;
|
|
131
137
|
left: -1rem;
|
|
@@ -140,18 +146,18 @@
|
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
&--is-open {
|
|
143
|
-
|
|
144
149
|
&::before {
|
|
145
|
-
background-image: url(icon-constants.get-icon(
|
|
150
|
+
background-image: url(icon-constants.get-icon(
|
|
151
|
+
"standard--x",
|
|
152
|
+
core.$uq-white
|
|
153
|
+
));
|
|
146
154
|
}
|
|
147
155
|
}
|
|
148
|
-
|
|
149
156
|
}
|
|
150
157
|
|
|
151
158
|
&__logo {
|
|
152
159
|
grid-area: logo;
|
|
153
160
|
|
|
154
|
-
|
|
155
161
|
& a {
|
|
156
162
|
display: grid;
|
|
157
163
|
padding: 1rem 0;
|
|
@@ -180,7 +186,6 @@
|
|
|
180
186
|
}
|
|
181
187
|
|
|
182
188
|
&__nav-primary-container {
|
|
183
|
-
|
|
184
189
|
@media #{core.$screen-lg-up} {
|
|
185
190
|
padding: 0 0 0 core.$space-xl;
|
|
186
191
|
}
|
|
@@ -194,7 +199,7 @@
|
|
|
194
199
|
justify-content: flex-start;
|
|
195
200
|
align-items: stretch;
|
|
196
201
|
flex-direction: column;
|
|
197
|
-
|
|
202
|
+
|
|
198
203
|
@media #{core.$screen-lg-up} {
|
|
199
204
|
align-items: center;
|
|
200
205
|
flex-direction: row;
|
|
@@ -230,7 +235,7 @@
|
|
|
230
235
|
color: core.$uq-white; //core.$uq-purple;
|
|
231
236
|
text-decoration: none;
|
|
232
237
|
padding: core.$space core.$space-m;
|
|
233
|
-
transition: background-color .25s,border-color .25s;
|
|
238
|
+
transition: background-color 0.25s, border-color 0.25s;
|
|
234
239
|
font-weight: 400;
|
|
235
240
|
position: relative;
|
|
236
241
|
border-bottom: 4px solid transparent;
|
|
@@ -240,7 +245,6 @@
|
|
|
240
245
|
text-decoration: none;
|
|
241
246
|
}
|
|
242
247
|
|
|
243
|
-
|
|
244
248
|
@media #{core.$screen-lg-up} {
|
|
245
249
|
padding: core.$space-l core.$space-s;
|
|
246
250
|
}
|
|
@@ -251,7 +255,10 @@
|
|
|
251
255
|
|
|
252
256
|
&::after {
|
|
253
257
|
content: "";
|
|
254
|
-
background-image: url(icon-constants.get-icon(
|
|
258
|
+
background-image: url(icon-constants.get-icon(
|
|
259
|
+
"standard--chevron-down-sml",
|
|
260
|
+
core.$uq-white
|
|
261
|
+
));
|
|
255
262
|
background-repeat: no-repeat;
|
|
256
263
|
width: core.$space;
|
|
257
264
|
height: core.$space;
|
|
@@ -261,7 +268,7 @@
|
|
|
261
268
|
right: 1.75rem;
|
|
262
269
|
|
|
263
270
|
@media #{core.$screen-lg-up} {
|
|
264
|
-
right: .25rem;
|
|
271
|
+
right: 0.25rem;
|
|
265
272
|
}
|
|
266
273
|
}
|
|
267
274
|
}
|
|
@@ -274,7 +281,6 @@
|
|
|
274
281
|
padding-left: 0;
|
|
275
282
|
|
|
276
283
|
& li {
|
|
277
|
-
|
|
278
284
|
& a {
|
|
279
285
|
padding-left: core.$space-xxl;
|
|
280
286
|
color: core.$uq-purple;
|
|
@@ -288,7 +294,7 @@
|
|
|
288
294
|
|
|
289
295
|
& li {
|
|
290
296
|
& a {
|
|
291
|
-
padding-left: core.$space-ul;
|
|
297
|
+
padding-left: core.$space-ul;
|
|
292
298
|
}
|
|
293
299
|
}
|
|
294
300
|
}
|
|
@@ -316,7 +322,7 @@
|
|
|
316
322
|
justify-content: flex-start;
|
|
317
323
|
align-items: stretch;
|
|
318
324
|
flex-direction: column;
|
|
319
|
-
|
|
325
|
+
|
|
320
326
|
@media #{core.$screen-lg-up} {
|
|
321
327
|
justify-content: flex-end;
|
|
322
328
|
align-items: center;
|
|
@@ -335,7 +341,7 @@
|
|
|
335
341
|
|
|
336
342
|
@media #{core.$screen-lg-up} {
|
|
337
343
|
font-size: core.$font-size-s;
|
|
338
|
-
padding: .625rem core.$space;
|
|
344
|
+
padding: 0.625rem core.$space;
|
|
339
345
|
}
|
|
340
346
|
|
|
341
347
|
&:hover {
|
|
@@ -344,14 +350,13 @@
|
|
|
344
350
|
}
|
|
345
351
|
|
|
346
352
|
&__search {
|
|
347
|
-
|
|
348
353
|
background: core.$uq-purple;
|
|
349
354
|
position: absolute;
|
|
350
355
|
width: 100%;
|
|
351
356
|
top: 3.95rem;
|
|
352
357
|
z-index: 20;
|
|
353
|
-
box-shadow: 0 .75rem core.$space-m rgb(24 24 24 / 20%);
|
|
354
|
-
transition:
|
|
358
|
+
box-shadow: 0 0.75rem core.$space-m rgb(24 24 24 / 20%);
|
|
359
|
+
transition: max-height 0.2s ease-in-out, transform 0.2s ease-in-out; //, visibility .2s ease;
|
|
355
360
|
transform: translateY(-1rem);
|
|
356
361
|
max-height: 0;
|
|
357
362
|
overflow: hidden;
|
|
@@ -361,7 +366,7 @@
|
|
|
361
366
|
top: 8.3rem;
|
|
362
367
|
}
|
|
363
368
|
|
|
364
|
-
&--is-open {
|
|
369
|
+
&--is-open {
|
|
365
370
|
transform: translateY(0);
|
|
366
371
|
max-height: 50vh;
|
|
367
372
|
visibility: visible;
|
|
@@ -369,7 +374,6 @@
|
|
|
369
374
|
}
|
|
370
375
|
|
|
371
376
|
&__search-container {
|
|
372
|
-
|
|
373
377
|
padding: 0 core.$space-m;
|
|
374
378
|
|
|
375
379
|
@media #{core.$screen-lg-up} {
|
|
@@ -400,7 +404,7 @@
|
|
|
400
404
|
|
|
401
405
|
&__search-query-input {
|
|
402
406
|
margin: 0 !important;
|
|
403
|
-
padding: .75rem core.$space !important;
|
|
407
|
+
padding: 0.75rem core.$space !important;
|
|
404
408
|
}
|
|
405
409
|
|
|
406
410
|
&__search-query-button {
|
|
@@ -421,7 +425,7 @@
|
|
|
421
425
|
text-decoration: none;
|
|
422
426
|
text-indent: 0;
|
|
423
427
|
top: calc(50% - 1.375rem);
|
|
424
|
-
transition: color .2s,background-color .2s,border-color .2s;
|
|
428
|
+
transition: color 0.2s, background-color 0.2s, border-color 0.2s;
|
|
425
429
|
width: 2.75rem;
|
|
426
430
|
|
|
427
431
|
&::before {
|
|
@@ -433,7 +437,10 @@
|
|
|
433
437
|
top: core.$space-s;
|
|
434
438
|
left: core.$space-s;
|
|
435
439
|
background-size: 100%;
|
|
436
|
-
background-image: url(icon-constants.get-icon(
|
|
440
|
+
background-image: url(icon-constants.get-icon(
|
|
441
|
+
"standard--search",
|
|
442
|
+
core.$uq-purple
|
|
443
|
+
));
|
|
437
444
|
}
|
|
438
445
|
}
|
|
439
446
|
|
|
@@ -453,30 +460,29 @@
|
|
|
453
460
|
}
|
|
454
461
|
|
|
455
462
|
&__search-range {
|
|
456
|
-
|
|
457
463
|
display: inline-block;
|
|
458
464
|
|
|
459
465
|
& label {
|
|
460
466
|
color: core.$uq-white;
|
|
461
467
|
}
|
|
462
468
|
}
|
|
463
|
-
|
|
469
|
+
|
|
464
470
|
.uq-header__search-radio {
|
|
465
471
|
&:checked {
|
|
466
|
-
|
|
472
|
+
border-color: core.$uq-white;
|
|
467
473
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
474
|
+
&:focus {
|
|
475
|
+
border-color: core.$uq-white;
|
|
476
|
+
}
|
|
471
477
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
478
|
+
&::after {
|
|
479
|
+
background-color: core.$uq-white;
|
|
480
|
+
}
|
|
475
481
|
}
|
|
476
482
|
}
|
|
477
483
|
|
|
478
484
|
&__search-label {
|
|
479
|
-
font-size: .8rem !important;
|
|
485
|
+
font-size: 0.8rem !important;
|
|
480
486
|
line-height: 1.7 !important;
|
|
481
487
|
|
|
482
488
|
@media #{core.$screen-lg-up} {
|
|
@@ -510,8 +516,8 @@
|
|
|
510
516
|
padding: core.$space core.$space-xxl core.$space-xl core.$space-xxl;
|
|
511
517
|
background: core.$uq-white;
|
|
512
518
|
box-shadow: 0 0.75rem core.$space-m rgb(24 24 24 / 20%);
|
|
513
|
-
border-radius: 0 0 .25rem .25rem;
|
|
514
|
-
|
|
519
|
+
border-radius: 0 0 0.25rem 0.25rem;
|
|
520
|
+
|
|
515
521
|
@media #{core.$screen-xl-up} {
|
|
516
522
|
max-width: 77.25rem;
|
|
517
523
|
}
|
|
@@ -556,7 +562,7 @@
|
|
|
556
562
|
}
|
|
557
563
|
}
|
|
558
564
|
}
|
|
559
|
-
}
|
|
565
|
+
}
|
|
560
566
|
|
|
561
567
|
:root {
|
|
562
568
|
--app-height: 100%;
|
|
@@ -564,65 +570,66 @@
|
|
|
564
570
|
|
|
565
571
|
body.no-scroll {
|
|
566
572
|
position: fixed;
|
|
573
|
+
max-width: 100%;
|
|
567
574
|
@media #{core.$screen-lg-up} {
|
|
568
575
|
position: relative;
|
|
569
576
|
}
|
|
570
577
|
}
|
|
571
578
|
|
|
572
|
-
// Slide mobile menu
|
|
579
|
+
// Slide mobile menu
|
|
573
580
|
|
|
574
581
|
.slide-menu {
|
|
575
|
-
width:100%;
|
|
576
|
-
max-width:100%;
|
|
577
|
-
background-color
|
|
582
|
+
width: 100%;
|
|
583
|
+
max-width: 100%;
|
|
584
|
+
background-color: #ffffff;
|
|
578
585
|
height: calc(var(--app-height) - 4.3rem);
|
|
579
|
-
display:none;
|
|
580
|
-
box-sizing:border-box;
|
|
581
|
-
transition:transform .3s ease-in-out;
|
|
582
|
-
transform:translateX(100%);
|
|
583
|
-
will-change:transform;
|
|
584
|
-
z-index:1000;
|
|
586
|
+
display: none;
|
|
587
|
+
box-sizing: border-box;
|
|
588
|
+
transition: transform 0.3s ease-in-out;
|
|
589
|
+
transform: translateX(100%);
|
|
590
|
+
will-change: transform;
|
|
591
|
+
z-index: 1000;
|
|
585
592
|
grid-area: mainnav-mobile;
|
|
586
|
-
position:fixed;
|
|
593
|
+
position: fixed;
|
|
587
594
|
top: 4.3rem;
|
|
588
|
-
right:core.$space-none;
|
|
589
|
-
overflow-y:auto;
|
|
590
|
-
overflow-x:hidden;
|
|
595
|
+
right: core.$space-none;
|
|
596
|
+
overflow-y: auto;
|
|
597
|
+
overflow-x: hidden;
|
|
591
598
|
font-size: core.$font-size;
|
|
592
|
-
color:core.$uq-purple;
|
|
599
|
+
color: core.$uq-purple;
|
|
593
600
|
|
|
594
601
|
@media #{core.$screen-lg-up} {
|
|
595
602
|
display: none !important;
|
|
596
603
|
}
|
|
597
604
|
|
|
598
605
|
.slide-menu__slider {
|
|
599
|
-
width:100%;
|
|
600
|
-
transform:translateX(0);
|
|
601
|
-
transition:transform .3s ease-in-out;
|
|
602
|
-
will-change:transform;
|
|
606
|
+
width: 100%;
|
|
607
|
+
transform: translateX(0);
|
|
608
|
+
transition: transform 0.3s ease-in-out;
|
|
609
|
+
will-change: transform;
|
|
603
610
|
}
|
|
604
611
|
|
|
605
612
|
ul {
|
|
606
|
-
position:relative;
|
|
607
|
-
width:100%;
|
|
608
|
-
margin:core.$space-none;
|
|
609
|
-
padding-left:core.$space-none;
|
|
610
|
-
list-style:none;
|
|
613
|
+
position: relative;
|
|
614
|
+
width: 100%;
|
|
615
|
+
margin: core.$space-none;
|
|
616
|
+
padding-left: core.$space-none;
|
|
617
|
+
list-style: none;
|
|
611
618
|
background-color: core.$uq-white;
|
|
612
619
|
|
|
613
620
|
ul {
|
|
614
|
-
position:absolute;
|
|
615
|
-
top:core.$space-none;
|
|
616
|
-
left:100%;
|
|
617
|
-
display:none;
|
|
621
|
+
position: absolute;
|
|
622
|
+
top: core.$space-none;
|
|
623
|
+
left: 100%;
|
|
624
|
+
display: none;
|
|
618
625
|
|
|
619
626
|
a {
|
|
620
|
-
padding: .75rem core.$space-m .75rem core.$space-xxl;
|
|
627
|
+
padding: 0.75rem core.$space-m 0.75rem core.$space-xxl;
|
|
621
628
|
}
|
|
622
629
|
}
|
|
623
630
|
|
|
624
631
|
a {
|
|
625
|
-
display:block;
|
|
632
|
+
display: block;
|
|
626
633
|
}
|
|
627
634
|
}
|
|
628
635
|
|
|
@@ -630,9 +637,8 @@ body.no-scroll {
|
|
|
630
637
|
margin-bottom: core.$space-none;
|
|
631
638
|
|
|
632
639
|
&:hover {
|
|
633
|
-
background-color
|
|
640
|
+
background-color: #f1f1f1;
|
|
634
641
|
}
|
|
635
|
-
|
|
636
642
|
}
|
|
637
643
|
|
|
638
644
|
.slide-menu__control {
|
|
@@ -641,16 +647,16 @@ body.no-scroll {
|
|
|
641
647
|
}
|
|
642
648
|
|
|
643
649
|
a {
|
|
644
|
-
cursor:pointer;
|
|
645
|
-
padding: .75rem core.$space-m;
|
|
646
|
-
text-decoration:none;
|
|
650
|
+
cursor: pointer;
|
|
651
|
+
padding: 0.75rem core.$space-m;
|
|
652
|
+
text-decoration: none;
|
|
647
653
|
font-size: core.$font-size;
|
|
648
|
-
color:core.$uq-purple;
|
|
654
|
+
color: core.$uq-purple;
|
|
649
655
|
position: relative;
|
|
650
656
|
|
|
651
657
|
&:hover {
|
|
652
|
-
color:core.$uq-purple;
|
|
653
|
-
background-color
|
|
658
|
+
color: core.$uq-purple;
|
|
659
|
+
background-color: #f1f1f1;
|
|
654
660
|
}
|
|
655
661
|
}
|
|
656
662
|
|
|
@@ -660,7 +666,10 @@ body.no-scroll {
|
|
|
660
666
|
|
|
661
667
|
&::before {
|
|
662
668
|
content: "";
|
|
663
|
-
background-image: url(icon-constants.get-icon(
|
|
669
|
+
background-image: url(icon-constants.get-icon(
|
|
670
|
+
"standard--chevron-left-sml",
|
|
671
|
+
core.$uq-purple
|
|
672
|
+
));
|
|
664
673
|
background-repeat: no-repeat;
|
|
665
674
|
width: 1.5rem;
|
|
666
675
|
height: 1.5rem;
|
|
@@ -672,10 +681,12 @@ body.no-scroll {
|
|
|
672
681
|
}
|
|
673
682
|
|
|
674
683
|
&__decorator {
|
|
675
|
-
|
|
676
684
|
&::before {
|
|
677
685
|
content: "";
|
|
678
|
-
background-image: url(icon-constants.get-icon(
|
|
686
|
+
background-image: url(icon-constants.get-icon(
|
|
687
|
+
"standard--chevron-right-sml",
|
|
688
|
+
core.$uq-purple
|
|
689
|
+
));
|
|
679
690
|
background-repeat: no-repeat;
|
|
680
691
|
width: 1.5rem;
|
|
681
692
|
height: 1.5rem;
|
|
@@ -688,55 +699,56 @@ body.no-scroll {
|
|
|
688
699
|
|
|
689
700
|
/* Controls */
|
|
690
701
|
.controls {
|
|
691
|
-
display:flex;
|
|
692
|
-
margin-bottom:core.$space;
|
|
702
|
+
display: flex;
|
|
703
|
+
margin-bottom: core.$space;
|
|
693
704
|
}
|
|
694
705
|
|
|
695
706
|
.btn {
|
|
696
|
-
padding
|
|
697
|
-
flex:1 0 auto;
|
|
698
|
-
font-size:90%;
|
|
699
|
-
color:core.$uq-purple;
|
|
700
|
-
background-color:core.$uq-white;
|
|
701
|
-
text-transform:uppercase;
|
|
702
|
-
|
|
703
|
-
border:none;
|
|
704
|
-
cursor:pointer;
|
|
705
|
-
font-family:inherit;
|
|
706
|
-
line-height:1;
|
|
707
|
+
padding: 0.75rem core.$space-m;
|
|
708
|
+
flex: 1 0 auto;
|
|
709
|
+
font-size: 90%;
|
|
710
|
+
color: core.$uq-purple;
|
|
711
|
+
background-color: core.$uq-white;
|
|
712
|
+
text-transform: uppercase;
|
|
713
|
+
|
|
714
|
+
border: none;
|
|
715
|
+
cursor: pointer;
|
|
716
|
+
font-family: inherit;
|
|
717
|
+
line-height: 1;
|
|
707
718
|
|
|
708
719
|
&:first-of-type {
|
|
709
|
-
text-align:left;
|
|
720
|
+
text-align: left;
|
|
710
721
|
|
|
711
722
|
&:before {
|
|
712
|
-
content:"⮜ this";
|
|
713
|
-
margin-right
|
|
723
|
+
content: "⮜ this";
|
|
724
|
+
margin-right: 0.5rem;
|
|
714
725
|
}
|
|
715
726
|
}
|
|
716
727
|
|
|
717
728
|
&:last-of-type {
|
|
718
|
-
text-align:right;
|
|
729
|
+
text-align: right;
|
|
719
730
|
|
|
720
|
-
&:before {
|
|
721
|
-
|
|
731
|
+
&:before {
|
|
732
|
+
content: "✕";
|
|
733
|
+
margin-right: 0.5rem;
|
|
722
734
|
}
|
|
723
735
|
}
|
|
724
736
|
}
|
|
725
737
|
|
|
726
738
|
.uq-header__nav-secondary-item {
|
|
727
|
-
background-color
|
|
739
|
+
background-color: #48206c;
|
|
728
740
|
|
|
729
741
|
&:hover {
|
|
730
|
-
background-color
|
|
742
|
+
background-color: #48206c;
|
|
731
743
|
}
|
|
732
744
|
}
|
|
733
745
|
|
|
734
746
|
.uq-header__nav-secondary-link {
|
|
735
|
-
color:core.$uq-white;
|
|
747
|
+
color: core.$uq-white;
|
|
736
748
|
|
|
737
749
|
&:hover {
|
|
738
|
-
color:core.$uq-white;
|
|
739
|
-
background-color
|
|
750
|
+
color: core.$uq-white;
|
|
751
|
+
background-color: #48206c;
|
|
740
752
|
}
|
|
741
753
|
}
|
|
742
754
|
|
|
@@ -745,40 +757,42 @@ body.no-scroll {
|
|
|
745
757
|
}
|
|
746
758
|
|
|
747
759
|
.uq-header__newglobal-nav-item {
|
|
748
|
-
background-color:core.$uq-purple;
|
|
760
|
+
background-color: core.$uq-purple;
|
|
749
761
|
}
|
|
750
762
|
|
|
751
763
|
.uq-header__newglobal-nav-link {
|
|
752
|
-
color:core.$uq-white;
|
|
753
|
-
background-color:core.$uq-purple;
|
|
764
|
+
color: core.$uq-white;
|
|
765
|
+
background-color: core.$uq-purple;
|
|
754
766
|
|
|
755
767
|
&:hover {
|
|
756
|
-
color:core.$uq-white;
|
|
757
|
-
background-color:core.$uq-purple;
|
|
768
|
+
color: core.$uq-white;
|
|
769
|
+
background-color: core.$uq-purple;
|
|
758
770
|
}
|
|
759
771
|
}
|
|
760
772
|
|
|
761
773
|
.uq-header__newglobal-nav-link .slide-menu__decorator::before {
|
|
762
774
|
content: "";
|
|
763
|
-
background-image: url(icon-constants.get-icon(
|
|
775
|
+
background-image: url(icon-constants.get-icon(
|
|
776
|
+
"standard--chevron-right-sml",
|
|
777
|
+
core.$uq-white
|
|
778
|
+
));
|
|
764
779
|
}
|
|
765
780
|
}
|
|
766
781
|
|
|
767
782
|
/* LOCAL SITE NAVIGATION MODIFIERS */
|
|
768
783
|
|
|
769
784
|
.global-mobile-nav {
|
|
770
|
-
|
|
771
785
|
.uq-site-header__title-container {
|
|
772
786
|
margin: 0;
|
|
773
|
-
padding
|
|
774
|
-
padding-right: 0rem;
|
|
787
|
+
padding: 1rem 1.5rem;
|
|
775
788
|
}
|
|
776
789
|
|
|
777
790
|
.uq-site-header__title {
|
|
778
|
-
padding:
|
|
791
|
+
padding: 0;
|
|
779
792
|
font-size: 1rem;
|
|
780
793
|
font-weight: 500;
|
|
781
|
-
|
|
794
|
+
display: block;
|
|
795
|
+
|
|
782
796
|
&:hover {
|
|
783
797
|
background: none;
|
|
784
798
|
}
|
|
@@ -787,9 +801,140 @@ body.no-scroll {
|
|
|
787
801
|
&__audience-link {
|
|
788
802
|
font-weight: 500;
|
|
789
803
|
}
|
|
790
|
-
|
|
791
804
|
}
|
|
792
805
|
|
|
793
806
|
.uq-site-header__navigation-toggle {
|
|
794
807
|
display: none;
|
|
795
|
-
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/* D7 overrides and hacks */
|
|
811
|
+
|
|
812
|
+
.admin-menu {
|
|
813
|
+
.slide-menu {
|
|
814
|
+
top: 7.5rem;
|
|
815
|
+
|
|
816
|
+
@media #{core.$screen-md-up} {
|
|
817
|
+
top: 6.15rem;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
.uq-header {
|
|
822
|
+
line-height: 1.5;
|
|
823
|
+
font-family: core.$roboto;
|
|
824
|
+
}
|
|
825
|
+
.uq-header__logo img {
|
|
826
|
+
max-width: unset;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.uq-header__search-query-submit {
|
|
830
|
+
background-color: unset !important;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.uq-header__search-range .uq-header__search-label {
|
|
834
|
+
max-width: unset;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.uq-header__nav-primary-list li {
|
|
838
|
+
margin: 0;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.uq-header__nav-primary-list li:hover .uq-header__nav-primary-link {
|
|
842
|
+
border-bottom: 4px solid #fff;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.uq-header__nav-primary-link,
|
|
846
|
+
.uq-header__nav-primary-link:focus {
|
|
847
|
+
display: block;
|
|
848
|
+
color: #fff;
|
|
849
|
+
text-decoration: none;
|
|
850
|
+
transition: background-color 0.25s, border-color 0.25s;
|
|
851
|
+
font-weight: 400;
|
|
852
|
+
position: relative;
|
|
853
|
+
border-bottom: 4px solid transparent;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.uq-header a:focus {
|
|
857
|
+
color: #d4c8de;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.uq-header__search-container {
|
|
861
|
+
form,
|
|
862
|
+
fieldset {
|
|
863
|
+
border: unset;
|
|
864
|
+
padding: 0;
|
|
865
|
+
margin: 0;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.uq-header__search-query-input {
|
|
870
|
+
height: 45px !important;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.uq-header .nav-primary__search-toggle {
|
|
874
|
+
margin-bottom: 0;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.uq-header .nav-primary__menu-toggle {
|
|
878
|
+
margin-bottom: 0 !important;
|
|
879
|
+
font: initial;
|
|
880
|
+
font-size: 0.833rem;
|
|
881
|
+
line-height: normal;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/* D7 and D9 search fixes */
|
|
885
|
+
.uq-header__search-range {
|
|
886
|
+
display: inline-block;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.uq-header__search-range input[type="radio"] {
|
|
890
|
+
height: 20px;
|
|
891
|
+
width: 20px;
|
|
892
|
+
vertical-align: top;
|
|
893
|
+
display: inline-block;
|
|
894
|
+
border-radius: 50%;
|
|
895
|
+
background-color: transparent;
|
|
896
|
+
margin: 3px 3px 0 5px;
|
|
897
|
+
position: absolute;
|
|
898
|
+
|
|
899
|
+
/* Missing form component styles */
|
|
900
|
+
appearance: none;
|
|
901
|
+
-webkit-appearance: none;
|
|
902
|
+
border: 1px solid #e7e3e0;
|
|
903
|
+
cursor: pointer;
|
|
904
|
+
}
|
|
905
|
+
.uq-header__search-range input[type="radio"] + label {
|
|
906
|
+
margin-bottom: 1rem;
|
|
907
|
+
margin-left: 0.5rem;
|
|
908
|
+
margin-right: 1rem;
|
|
909
|
+
padding-top: 0.125rem;
|
|
910
|
+
padding-left: 1.5rem;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.uq-header__search-range label {
|
|
914
|
+
color: core.$uq-white;
|
|
915
|
+
font-weight: 400;
|
|
916
|
+
display: inline-block;
|
|
917
|
+
vertical-align: top;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
input[type="radio"].uq-header__search-radio:checked {
|
|
921
|
+
border-color: core.$uq-white;
|
|
922
|
+
border-width: 2px;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
input[type="radio"].uq-header__search-radio:focus {
|
|
926
|
+
border-color: core.$uq-white;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
input[type="radio"].uq-header__search-radio:checked::after {
|
|
930
|
+
content: "";
|
|
931
|
+
background-color: core.$uq-white;
|
|
932
|
+
border-radius: 50%;
|
|
933
|
+
content: "";
|
|
934
|
+
display: block;
|
|
935
|
+
position: absolute;
|
|
936
|
+
top: 3px;
|
|
937
|
+
left: 3px;
|
|
938
|
+
height: 10px;
|
|
939
|
+
width: 10px;
|
|
940
|
+
}
|
package/src/scss/_global.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
2
|
|
|
3
3
|
// Variables, functions, and mixins
|
|
4
4
|
$site-footer-color: mix(core.$uq-white, core.$uq-purple, 75%);
|
|
5
5
|
$site-footer-link-color: core.$uq-white;
|
|
6
|
-
$site-footer-font-size: .875rem;
|
|
6
|
+
$site-footer-font-size: 0.875rem;
|
package/src/scss/main.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "component";
|