Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Linter
if: ${{ github.event_name == 'pull_request' }}
env:
PRE_COMMIT_SKIP: mkdocs-build
PRE_COMMIT_SKIP: mkdocs-build,linkcheckmd
run: |
pre-commit install
pre-commit run --all-files --verbose
Expand Down
4 changes: 2 additions & 2 deletions theme/css/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ blockquote{
.anchor-link:hover { opacity: 1; }

/* ensure the back-to-top is perfectly round */
.to_top {
/* .to_top {
width: 48px; height: 48px; border-radius: 50%;
display: grid; place-items: center;
}
.to_top .icon { width: 24px; height: 24px; }
.to_top .icon { width: 24px; height: 24px; } */

/* ───────── Polished non-home page system ───────── */
.osl-page{
Expand Down
4 changes: 2 additions & 2 deletions theme/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,13 @@
}

/* Back-to-top only: keep functional, not part of page layout language. */
.to_top{
/* .to_top{
width: 48px;
height: 48px;
display: grid;
place-items: center;
}
.to_top .icon{ width: 22px; height: 22px; }
.to_top .icon{ width: 22px; height: 22px; } */

html[data-mode="dim"] .home-editorial,
[data-bs-theme="dark"] .home-editorial{
Expand Down
15 changes: 14 additions & 1 deletion theme/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,20 @@
}

/* Back to top */
.to_top{ position: fixed; right: 1rem; bottom: 1rem; z-index: 10; opacity: .9; }
.to_top{ position: fixed;
right: 1rem;
bottom: 1rem;
z-index: 10;
opacity: 0;
width: 34px;
height: 34px;
border-radius: 50%;
display: grid;
place-items: center;
pointer-events: none;
transition: opacity 0.3s ease;
}
.to_top.visible{ opacity: 0.9;pointer-events: auto;}
.to_top .icon{ width: 34px; height: 34px; }


Expand Down
13 changes: 13 additions & 0 deletions theme/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@
});
});

/*8) Back to top button visibility */
const toTopBtn = document.querySelector(".to_top");

if(toTopBtn){
window.addEventListener("scroll", function(){
if(window.scrollY > 150){
toTopBtn.classList.add("visible");
}else{
toTopBtn.classList.remove("visible");
}
})
};

// Optional public API
window.OSLTheme = {
getMode: () => docEl.getAttribute('data-mode'),
Expand Down
Loading