mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
Compare commits
3 Commits
1c25833e69
...
0f01a1f154
| Author | SHA1 | Date | |
|---|---|---|---|
|
0f01a1f154
|
|||
| 949cc0b5b5 | |||
|
|
42260f46b5 |
24
.github/dependabot.yml
vendored
Normal file
24
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: monthly
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: monthly
|
||||
groups:
|
||||
npm-development:
|
||||
dependency-type: development
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
npm-production:
|
||||
dependency-type: production
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
@@ -446,9 +446,24 @@ const previewHtml = await unified()
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize indicator position on load
|
||||
if (togglePreview) {
|
||||
updateIndicator(togglePreview);
|
||||
// Initialize indicator position after layout is complete
|
||||
// Use double requestAnimationFrame to ensure layout/paint is finished,
|
||||
// which fixes sizing issues on iOS Safari initial page load
|
||||
function initializeIndicator() {
|
||||
if (togglePreview) {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
updateIndicator(togglePreview);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for fonts to load before measuring, then initialize
|
||||
if (document.fonts && document.fonts.ready) {
|
||||
document.fonts.ready.then(initializeIndicator);
|
||||
} else {
|
||||
initializeIndicator();
|
||||
}
|
||||
|
||||
// Toggle event listeners
|
||||
|
||||
Reference in New Issue
Block a user