diff --git a/source/_static/scss/includes/_alert.scss b/source/_static/scss/includes/_alert.scss index b6fc4b13..6520e390 100644 --- a/source/_static/scss/includes/_alert.scss +++ b/source/_static/scss/includes/_alert.scss @@ -42,7 +42,8 @@ div.admonition { background-color: var(--alert-#{$variant}-bg); code, - div.highlight pre { + .copybtn, + .highlight pre { background-color: var(--alert-#{$variant}-code-bg); color: var(--alert-#{$variant}-color); } diff --git a/source/_static/scss/includes/_footer.scss b/source/_static/scss/includes/_footer.scss index e2ea90d4..b0c9975d 100644 --- a/source/_static/scss/includes/_footer.scss +++ b/source/_static/scss/includes/_footer.scss @@ -3,10 +3,9 @@ div.footer { background-color: var(--footer-bg); width: 100%; margin: 0; - &, a { - color: $white; + color: var(--footer-color); } a { diff --git a/source/_static/scss/includes/_misc.scss b/source/_static/scss/includes/_misc.scss index bc107a51..5113b51c 100644 --- a/source/_static/scss/includes/_misc.scss +++ b/source/_static/scss/includes/_misc.scss @@ -214,4 +214,51 @@ .sd-card-title { line-height: 100%; margin: -0.2rem 0 1rem; +} + + +// ----------------------------- +// Copy button +// ----------------------------- +button.copybtn { + border-radius: $border-radius-sm; + top: 0.1; + right: 0rem; + border: 0; + background-color: transparent; + width: auto; + font-family: $font-family-base; + font-size: 0.7rem; + display: flex; + align-items: center; + padding: 0.75rem; + font-weight: $font-weight-medium; + cursor: pointer; + + &:hover { + background-color: transparent !important; + + &:after { + opacity: 1; + } + } + + & > img { + display: none; + } + + &:after { + all: revert; + transform: none !important; + transition-delay: 0ms !important; + transition: opacity 300ms; + opacity: 0.75; + content: "Copy"; + } + + &.success { + &:after { + content: "Copied"; + } + } } \ No newline at end of file diff --git a/source/_static/scss/includes/_nav.scss b/source/_static/scss/includes/_nav.scss index d1af6647..8a251cd6 100644 --- a/source/_static/scss/includes/_nav.scss +++ b/source/_static/scss/includes/_nav.scss @@ -157,10 +157,11 @@ .nav__link { padding: 0.5rem 0 0.6rem; cursor: pointer; - - &, + color: var(--nav-text-color); + transition: color 300ms; + &:hover { - color: var(--nav-text-color); + color: $white; } & > span { diff --git a/source/_static/scss/includes/_theme.scss b/source/_static/scss/includes/_theme.scss index 229585bf..d8b3fb6a 100644 --- a/source/_static/scss/includes/_theme.scss +++ b/source/_static/scss/includes/_theme.scss @@ -93,6 +93,7 @@ $theme-properties: ( // Footer --footer-bg: #1D1D1D #151c24, + --footer-color: $white $text-dark-color, // Icon --icon-sidebar-toggle-hover-bg: rgba($white, 0.1) $dark-200, diff --git a/source/_templates/content-navigation.html b/source/_templates/content-navigation.html index 68ae86bb..36d57493 100644 --- a/source/_templates/content-navigation.html +++ b/source/_templates/content-navigation.html @@ -1,31 +1,31 @@