feat: aggiunto prototipo di stile
This commit is contained in:
+11
-9
@@ -1,7 +1,9 @@
|
||||
---
|
||||
import Header from "../components/Header.astro";
|
||||
import '../style.css'
|
||||
|
||||
const { title, courses, selectedCourseLabel } = Astro.props;
|
||||
import Header from '../components/Header.astro'
|
||||
|
||||
const { title, courses, selectedCourseLabel } = Astro.props
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
@@ -26,21 +28,21 @@ const { title, courses, selectedCourseLabel } = Astro.props;
|
||||
integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk"
|
||||
crossorigin="anonymous"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// @ts-ignore
|
||||
renderMathInElement(document.body, {
|
||||
// customised options
|
||||
// • auto-render specific keys, e.g.:
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false },
|
||||
{ left: '\\(', right: '\\)', display: false },
|
||||
{ left: '\\[', right: '\\]', display: true },
|
||||
],
|
||||
// • rendering keys, e.g.:
|
||||
throwOnError: false,
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
---
|
||||
import Base from "./Base.astro";
|
||||
import Base from './Base.astro'
|
||||
|
||||
const years = await Astro.glob("../pages/archivio/*/index.md");
|
||||
const years = await Astro.glob('../pages/archivio/*/index.md')
|
||||
const currentYear = years
|
||||
.map((module) => module.file.split("/").at(-2))
|
||||
.map(module => module.file.split('/').at(-2))
|
||||
.toSorted()
|
||||
.at(-1);
|
||||
.at(-1)
|
||||
const {
|
||||
file,
|
||||
frontmatter: { title },
|
||||
} = Astro.props;
|
||||
const selectedCourseLabel = file.split("/").at(-1);
|
||||
} = Astro.props
|
||||
const selectedCourseLabel = file.split('/').at(-1)
|
||||
|
||||
const allCourses = await Astro.glob(`../pages/archivio/*/*`);
|
||||
const courses = allCourses.filter((module) =>
|
||||
module.file.includes(file.split("/").at(-2)),
|
||||
);
|
||||
const allCourses = await Astro.glob(`../pages/archivio/*/*`)
|
||||
const courses = allCourses.filter(module => module.file.includes(file.split('/').at(-2)))
|
||||
---
|
||||
|
||||
<Base title={title} courses={courses} selectedCourseLabel={selectedCourseLabel}>
|
||||
<h1>{title}</h1>
|
||||
<slot />
|
||||
</Base>
|
||||
|
||||
Reference in New Issue
Block a user