Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,19 @@ export default defineConfig({

function createOverscrollMessage() {
if (!isLandingPage()) return;
var command = 'curl https://cli.sentry.dev/install -fsS | bash';
overscrollEl = document.createElement('div');
overscrollEl.className = 'overscroll-message';
overscrollEl.innerHTML = '<span>You made it to the end. Might as well give it a try → <code>npx sentry@latest</code></span>';
overscrollEl.innerHTML = '<span>You made it to the end. Might as well give it a try → <code class="overscroll-copy-cmd" title="Click to copy">' + command + '</code></span>';
document.body.appendChild(overscrollEl);
var codeEl = overscrollEl.querySelector('.overscroll-copy-cmd');
codeEl.addEventListener('click', function() {
if (!navigator.clipboard) return;
navigator.clipboard.writeText(command).then(function() {
codeEl.textContent = 'copied!';
setTimeout(function() { codeEl.textContent = command; }, 1500);
}).catch(function() {});
});
}

function updateOverscroll(distance) {
Expand Down
6 changes: 6 additions & 0 deletions docs/src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,12 @@ summary[id="starlight__on-this-page--mobile"] .caret {
font-family: "JetBrains Mono", ui-monospace, monospace;
font-size: 0.85em;
color: #a78bfa;
cursor: pointer;
pointer-events: auto;
}

.overscroll-message code:hover {
background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
Expand Down
Loading