diff --git a/docusaurus.config.js b/docusaurus.config.js index 55d64c5f..3f355fb4 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -50,12 +50,13 @@ module.exports = { to: 'https://github.com/rancher/rke2', label: 'GitHub', position: 'right', - className: 'navbar__github btn icon-github', + className: 'navbar__icon navbar__github', }, { - href: 'https://www.rancher.com', - label: 'Rancher Home', + to: 'https://www.rancher.com', + label: 'Rancher', position: 'right', + className: 'navbar__icon navbar__rancher', }, ], }, diff --git a/src/css/custom.css b/src/css/custom.css index c65f80fc..2c3b082c 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -74,63 +74,36 @@ hr { margin: 0 auto; } -.navbar__brand { - height: 40px; -} - -.btn.navbar__github { - font-weight: 400; - color: #fff!important; - border-color: #384745; - background-color: #384745; - text-align: center; - vertical-align: middle; - user-select: none; - border: 2px solid transparent; - /* padding: 5px 10px 5px 37px; */ - padding: 8px 20px 7px 47px; - font-size: 1rem; - line-height: 1.66; - border-radius: 3px; - transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; - box-shadow: inset 0 1px rgb(255 255 255 / 15%), 0 1px 1px rgb(0 0 0 / 8%); -} - -a.btn.navbar__github { +.navbar__icon { font-family: poppins,sans-serif; - position: relative; - text-decoration: none; - align-items: center; + font-size: 20px; } -.btn.navbar__github:hover { - color: #fff; - background-color: #273230; - border-color: #222a29; -} - -a.btn.navbar__github::before { +.navbar__icon:before { content: ""; - background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20.5 20%22%3E%3Cdefs/%3E%3Cpath fill=%22%23fff%22 d=%22M10.3.0C4.6.0.0 4.6.0 10.3c0 4.4 2.8 8.3 7 9.7.5.1.7-.2.7-.5v-1.9c-2.6.5-3.2-.6-3.4-1.2-.2-.6-.6-1.1-1-1.5-.4-.2-.9-.7.0-.7.7.1 1.3.5 1.6 1 .6 1.1 1.9 1.4 3 .8.0-.5.3-1 .7-1.4-2.3-.3-4.7-1.1-4.7-5.1.0-1 .4-2 1.1-2.8-.5-.6-.5-1.6-.1-2.5.0.0.9-.3 2.8 1.1 1.7-.5 3.4-.5 5.1.0 2-1.3 2.8-1.1 2.8-1.1.4.9.5 1.9.2 2.8.7.7 1.1 1.7 1.1 2.8.0 3.9-2.4 4.8-4.7 5.1.5.5.7 1.2.7 1.9v2.8c0 .3.2.6.7.5 5.4-1.8 8.3-7.6 6.5-13C18.6 2.8 14.7.0 10.3.0z%22/%3E%3C/svg%3E"); + display: inline-flex; height: 20px; width: 20px; - position: absolute; - left: 15px; - top: 10px; + margin-right: 4px; + background-color: var(--ifm-navbar-link-color); } +.navbar__icon:hover:before { + background-color: #2e68e9; +} + +.navbar__github:before { + mask: url(/static/img/github-mark.svg) no-repeat; + mask-size: cover; + padding-right: 1px; -.header-github-link::before { - content: ''; - width: 24px; - height: 24px; - display: flex; - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") - no-repeat; } -[data-theme='dark'] .header-github-link::before { - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") - no-repeat; + +.navbar__rancher:before { + mask: url(/static/img/rancher-favicon.png) no-repeat 100% 100%; + mask-size: cover; + width: 30px; + padding-bottom: 7px; } diff --git a/static/img/github-mark.svg b/static/img/github-mark.svg new file mode 100644 index 00000000..37fa923d --- /dev/null +++ b/static/img/github-mark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/rancher-favicon.png b/static/img/rancher-favicon.png new file mode 100644 index 00000000..a5f79e12 Binary files /dev/null and b/static/img/rancher-favicon.png differ