Partials OK, auto navbar and content
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AppProperties } from "$root/routes/(_islands)/AppNavigator.tsx";
|
||||
import { AppProperties } from "$root/defaults/interfaces.ts";
|
||||
|
||||
const properties: AppProperties = {
|
||||
name: "PolyNotes",
|
||||
@@ -7,9 +7,9 @@ const properties: AppProperties = {
|
||||
index: "Homepage",
|
||||
notes: "Notes",
|
||||
courses: "Courses management",
|
||||
students: "Students management"
|
||||
students: "Students management",
|
||||
},
|
||||
adminOnly: [ "courses", "students" ]
|
||||
adminOnly: ["courses", "students"],
|
||||
};
|
||||
|
||||
export default properties;
|
||||
export default properties;
|
||||
|
||||
@@ -1,9 +1,2 @@
|
||||
type ModulesProps = Record<string | number | symbol, never>;
|
||||
|
||||
export default function Modules(_props: ModulesProps) {
|
||||
return (
|
||||
<>
|
||||
<a href="notes/test" f-partial={"notes/partial/test"}>click</a>
|
||||
</>
|
||||
);
|
||||
}
|
||||
import makeIndex from "$root/defaults/makeIndex.ts";
|
||||
export default makeIndex(import.meta.dirname!);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
|
||||
type ModulesProps = Record<string | number | symbol, never>;
|
||||
|
||||
export const config: RouteConfig = {
|
||||
skipAppWrapper: true,
|
||||
skipInheritedLayouts: true,
|
||||
};
|
||||
|
||||
export default function Modules(_props: ModulesProps) {
|
||||
return (
|
||||
<Partial name="body">
|
||||
<a href="notes" f-partial={"notes/partials"}>notes</a>
|
||||
</Partial>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
|
||||
type ModulesProps = Record<string | number | symbol, never>;
|
||||
|
||||
export const config: RouteConfig = {
|
||||
skipAppWrapper: true,
|
||||
skipInheritedLayouts: true,
|
||||
};
|
||||
|
||||
export default function Modules(_props: ModulesProps) {
|
||||
return (
|
||||
<Partial name="body">
|
||||
<a href="notes" f-partial={"notes/partials"}>notes</a>
|
||||
</Partial>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { getConfig, makePartials } from "$root/defaults/makePartials.tsx";
|
||||
|
||||
type NotesIndexProps = Record<string | number | symbol, never>;
|
||||
|
||||
export function Index(_props: NotesIndexProps) {
|
||||
return <a href="notes" f-partial={"notes/partials"}>bip boup</a>;
|
||||
}
|
||||
|
||||
export const config = getConfig();
|
||||
export default makePartials(Index);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
|
||||
type ModulesProps = Record<string | number | symbol, never>;
|
||||
|
||||
export const config: RouteConfig = {
|
||||
skipAppWrapper: true,
|
||||
skipInheritedLayouts: true,
|
||||
};
|
||||
|
||||
export default function Modules(_props: ModulesProps) {
|
||||
return (
|
||||
<Partial name="body">
|
||||
<a href="notes" f-partial={"notes/partials"}>notes</a>
|
||||
</Partial>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user