Centered Header BHL
Black Highlighter Theme » Centered Header BHL
NOTICE:
This is a component page used internally by the SCP Wiki. It is intended to be used and included on other pages.
What this does
Rearranges the header so that the titles and logos are centered
- Does NOT work on Sigma-9. This ONLY functions with Black Highlighter.
- Highly suggest using with either Collapsible Sidebar or Toggle Sidebar
How to use
1. Copy code below.
2. Paste in article after Black Highlighter and any other Theme include.
[[include :scp-wiki:component:centered-header-bhl]]
@supports((display: -ms-grid) or (display: grid)) { :root { /* header measurements */ --header-height-on-desktop: 10rem; --header-height-on-mobile: 10rem; --header-h1-font-size: -webkit-calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); --header-h1-font-size: -moz-calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); --header-h1-font-size: calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); } #header { background: none; } #header::before { content: " "; position: absolute; width: 100%; height: 100%; left: 0; top: 0.75rem; background-image: var(--logo-image); background-repeat: no-repeat; background-position: center -3.5rem; -webkit-background-size: auto 8rem; -moz-background-size: auto 8rem; -o-background-size: auto 8rem; background-size: auto 8rem; background-position: center top; opacity: 0.45; pointer-events: none; } #header h1, #header h1 a, #header h1 a::before { position: absolute; top: 0; left: 0; margin: 0; padding: 0; width: 100%; height: 100%; display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -moz-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -webkit-justify-content: center; -moz-box-pack: center; -ms-flex-pack: center; justify-content: center; max-height: inherit; z-index: 0; } #header>h1>a>span { width: 100%; height: 100%; top: 0; left: 0; max-width: inherit; } #header h1 { height: -webkit-calc(100% - 2.25rem); height: -moz-calc(100% - 2.25rem); height: calc(100% - 2.25rem); } #header h1 a::before, #header h1 a { text-align: center; line-height: 0.8; } #header h2, #header h2 span, #header h2 span::before { position: absolute; left: 0; top: 0.15em; margin-left: 0; padding: 0; width: 100%; display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex; -webkit-box-align: end; -webkit-align-items: flex-end; -moz-box-align: end; -ms-flex-align: end; align-items: flex-end; -webkit-box-pack: center; -webkit-justify-content: center; -moz-box-pack: center; -ms-flex-pack: center; justify-content: center; max-height: inherit; z-index: 0; text-transform: uppercase; pointer-events: none; } #login-status { min-height: -webkit-calc(var(--base-font-size) * 1.5); min-height: -moz-calc(var(--base-font-size) * 1.5); min-height: calc(var(--base-font-size) * 1.5); -webkit-border-radius: .0625rem; -moz-border-radius: .0625rem; border-radius: .0625rem; -webkit-border-radius: var(--border-radius-width); -moz-border-radius: var(--border-radius-width); border-radius: var(--border-radius-width); color: rgb(var(--pale-gray-monochrome)); background-color: rgba(0, 0, 0, 0); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-box-flex: 1; -webkit-flex-grow: 1; -moz-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; left: 3%; right: initial; } #login-status .printuser { --wght: 900; position: relative; top: 0; left: 0; color: rgb(var(--swatch-menutxt-light-color)); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; padding: 0.25rem; margin: 0; font-weight: 900; } #login-status #my-account { --wght: 300; color: rgb(var(--pale-gray-monochrome)); font-weight: 300; } #login-status #account-topbutton { border: initial; padding: 0.5em 0.5em 0.5em 0.25em; position: relative; height: 100%; top: 0; left: 0; margin: 0; font-size: 1em; } #account-options { width: auto; padding: 0.5em; border-color: rgba(var(--bright-accent)); background: var(--gradient-header); color: rgb(var(--swatch-text-light)); } #account-options ul li a { color: rgb(var(--swatch-text-light)); } #account-options li a:hover { color: rgb(var(--swatch-text-light)); text-decoration: underline; } @media only screen and (min-width: 769px) { #search-top-box { right: 3%; top: 0.5rem; } #search-top-box-form>input, #search-top-box-form>input:hover, #search-top-box-form>input:focus { background: rgb(var(--black-monochrome)); } #search-top-box-form>input { -webkit-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); -moz-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); } #search-top-box-form>input:hover, #search-top-box-form>input:focus { -webkit-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); -moz-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); } #search-top-box-form input[type="submit"], #search-top-box-form input[type="submit"]:focus, #search-top-box-form input[type="submit"]:hover { border: none; border-left: 0.0625rem solid rgb(var(--swatch-primary-darkest)); -webkit-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); -moz-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-dark-color)); } #search-top-box-form input[type="submit"] { background: rgb(var(--swatch-primary-darkest)); color: rgb(var(--swatch-menutxt-light-color)); } #search-top-box-form input[type="submit"]:focus, #search-top-box-form input[type="submit"]:hover { background: rgb(var(--swatch-primary)); -webkit-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); -moz-box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); box-shadow: 0 0 0 0.125rem rgb(var(--swatch-menubg-medium-dark-color)); } } #page-title { text-align: center; } @media only screen and (max-width:768px) { :root { --header-h1-font-size: -webkit-calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); --header-h1-font-size: -moz-calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); --header-h1-font-size: calc(2rem + (2.5 - 2) * ((100vw - 18.750rem) / (60 - 18.750))); } #header h1, #header h1 a, #header h1 a::before { top: 0.25rem; } #header h2, #header h2 a, #header h2 a::before { top: 0; } #header h2 span { margin-top: -webkit-calc(var(--header-height-on-mobile)/2 + var(--header-h1-font-size)/2 + .25rem); margin-top: -moz-calc(var(--header-height-on-mobile)/2 + var(--header-h1-font-size)/2 + .25rem); margin-top: calc(var(--header-height-on-mobile)/2 + var(--header-h1-font-size)/2 - .25rem); } }
page revision: 28, last edited: 05 Apr 2021 22:43










