Skip to content

Commit

Permalink
doc: fix old version warner
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Dec 24, 2024
1 parent a281d81 commit fef1857
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 1 deletion.
124 changes: 124 additions & 0 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,127 @@ mjx-container > svg {
}

/* .mjx-container {font-size: calc(0.5 * var(--editor-font-size));} */

.outdated-warning-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
z-index: 999;
background-color: #282f2f;
color: #fff;
border-bottom: 3px solid rgba(0,0,0,0);
padding: 10px 35px;
text-align: center;
font-size: 15px
}

.dark .outdated-warning-overlay .outdated-warning-closer, .outdated-warning-overlay .outdated-warning-closer {
position: absolute;
top: calc(50% - 10px);
right: 18px;
cursor: pointer;
width: 12px
}

.outdated-warning-overlay a {
color: var(--vp-c-brand-1);
}

.dark .outdated-warning-overlay a {
color: var(--vp-c-brand-1);
}

.outdated-warning-overlay a:hover {
color: var(--vp-c-white);
}

.dark .outdated-warning-overlay a:hover {
color: var(--vp-c-white);
}

.dark .delete{
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-moz-appearance: none;
-webkit-appearance: none;
background-color: rgba(20,20,20,0.2);
border: none;
border-radius: 9999px;
cursor: pointer;
pointer-events: auto;
display: inline-block;
flex-grow: 0;
flex-shrink: 0;
font-size: 0;
height: 20px;
max-height: 20px;
max-width: 20px;
min-height: 20px;
min-width: 20px;
outline: none;
position: relative;
vertical-align: top;
width: 20px
}

.delete {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-moz-appearance: none;
-webkit-appearance: none;
background-color: rgba(10,10,10,0.2);
border: none;
border-radius: 9999px;
cursor: pointer;
pointer-events: auto;
display: inline-block;
flex-grow: 0;
flex-shrink: 0;
font-size: 0;
height: 20px;
max-height: 20px;
max-width: 20px;
min-height: 20px;
min-width: 20px;
outline: none;
position: relative;
vertical-align: top;
width: 20px
}

.delete::before,.delete::after {
background-color: #fff;
content: "";
display: block;
left: 50%;
position: absolute;
top: 50%;
transform: translateX(-50%) translateY(-50%) rotate(45deg);
transform-origin: center center
}

.delete::before {
height: 2px;
width: 50%;
}

.delete::after {
height: 50%;
width: 2px
}

.delete:hover,.delete:focus {
background-color: rgba(10,10,10,0.3)
}

.delete:active {
background-color: rgba(10,10,10,0.4)
}
2 changes: 1 addition & 1 deletion docs/src/public/warner.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function maybeAddWarning() {
closer.addEventListener("click", function () {
document.body.removeChild(div);
});
const href = window.documenterBaseURL + "/../" + window.DOCUMENTER_STABLE;
const href = "/../" + window.DOCUMENTER_STABLE;
div.innerHTML =
'This documentation is not for the latest stable release, but for either the development version or an older release.<br><a href="' +
href +
Expand Down

0 comments on commit fef1857

Please sign in to comment.