Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
remove d dark mode, fix gating on pdf
Browse files
app/scripts/notion-importer/static/frontmatter.mdx
CHANGED
|
@@ -49,7 +49,7 @@ tags:
|
|
| 49 |
- data visualization
|
| 50 |
tableOfContentsAutoCollapse: true
|
| 51 |
seoThumbImage: "/thumb.png"
|
| 52 |
-
pdfProOnly:
|
| 53 |
---
|
| 54 |
|
| 55 |
|
|
|
|
| 49 |
- data visualization
|
| 50 |
tableOfContentsAutoCollapse: true
|
| 51 |
seoThumbImage: "/thumb.png"
|
| 52 |
+
pdfProOnly: true
|
| 53 |
---
|
| 54 |
|
| 55 |
|
app/src/components/Hero.astro
CHANGED
|
@@ -24,7 +24,7 @@ const {
|
|
| 24 |
affiliation,
|
| 25 |
published,
|
| 26 |
doi,
|
| 27 |
-
pdfProOnly =
|
| 28 |
} = Astro.props as Props;
|
| 29 |
|
| 30 |
type Author = { name: string; url?: string; affiliationIndices?: number[] };
|
|
@@ -233,7 +233,7 @@ const pdfFilename = `${slugify(pdfBase)}.pdf`;
|
|
| 233 |
// PDF access control for Pro users only
|
| 234 |
|
| 235 |
// ⚙️ Configuration for local development
|
| 236 |
-
const LOCAL_IS_PRO =
|
| 237 |
|
| 238 |
const FALLBACK_TIMEOUT_MS = 3000;
|
| 239 |
let userPlanChecked = false;
|
|
|
|
| 24 |
affiliation,
|
| 25 |
published,
|
| 26 |
doi,
|
| 27 |
+
pdfProOnly = true,
|
| 28 |
} = Astro.props as Props;
|
| 29 |
|
| 30 |
type Author = { name: string; url?: string; affiliationIndices?: number[] };
|
|
|
|
| 233 |
// PDF access control for Pro users only
|
| 234 |
|
| 235 |
// ⚙️ Configuration for local development
|
| 236 |
+
const LOCAL_IS_PRO = false; // Set to true to test Pro access locally
|
| 237 |
|
| 238 |
const FALLBACK_TIMEOUT_MS = 3000;
|
| 239 |
let userPlanChecked = false;
|
app/src/components/ThemeToggle.astro
CHANGED
|
@@ -69,24 +69,6 @@
|
|
| 69 |
if (btn) {
|
| 70 |
btn.addEventListener("click", toggleTheme);
|
| 71 |
}
|
| 72 |
-
|
| 73 |
-
// Ajouter le raccourci clavier pour la touche D
|
| 74 |
-
document.addEventListener("keydown", (e) => {
|
| 75 |
-
// Vérifier que la touche D est pressée et qu'on n'est pas dans un input/textarea
|
| 76 |
-
if (e.key === "d" || e.key === "D") {
|
| 77 |
-
const activeElement = document.activeElement;
|
| 78 |
-
const isInput =
|
| 79 |
-
activeElement &&
|
| 80 |
-
(activeElement.tagName === "INPUT" ||
|
| 81 |
-
activeElement.tagName === "TEXTAREA" ||
|
| 82 |
-
(activeElement as HTMLElement).contentEditable === "true");
|
| 83 |
-
|
| 84 |
-
if (!isInput) {
|
| 85 |
-
e.preventDefault();
|
| 86 |
-
toggleTheme();
|
| 87 |
-
}
|
| 88 |
-
}
|
| 89 |
-
});
|
| 90 |
</script>
|
| 91 |
</button>
|
| 92 |
|
|
|
|
| 69 |
if (btn) {
|
| 70 |
btn.addEventListener("click", toggleTheme);
|
| 71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
</script>
|
| 73 |
</button>
|
| 74 |
|