diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ecbecfd..6cbfc6d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,7 @@ name: "Check Deno code" on: - push: - branches: ["main"] pull_request: - types: - - opened branches: - main diff --git a/components/Button.tsx b/components/Button.tsx deleted file mode 100644 index f1b80a0..0000000 --- a/components/Button.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { JSX } from "preact"; -import { IS_BROWSER } from "$fresh/runtime.ts"; - -export function Button(props: JSX.HTMLAttributes) { - return ( - -

{props.count}

- - - ); -} diff --git a/routes/(_components)/AppCard.tsx b/routes/(_components)/AppCard.tsx index 189543f..2c91fbb 100644 --- a/routes/(_components)/AppCard.tsx +++ b/routes/(_components)/AppCard.tsx @@ -10,6 +10,9 @@ export default function AppCard(props: AppCardProps) { {props.app.icon}

{props.app.name}

+ + info +
); } diff --git a/routes/(apps)/mobility/(_props)/props.ts b/routes/(apps)/mobility/(_props)/props.ts index 3a89c13..f9c0b54 100644 --- a/routes/(apps)/mobility/(_props)/props.ts +++ b/routes/(apps)/mobility/(_props)/props.ts @@ -1,9 +1,11 @@ -import { AppProperties } from "../../../(_islands)/AppNavigator.tsx"; +import { AppProperties } from "$root/defaults/interfaces.ts"; const properties: AppProperties = { name: "PolyMobility", icon: "flight_takeoff", hint: "Gestionnaire de mobilité", + pages: {}, + adminOnly: [], }; export default properties; diff --git a/routes/(apps)/mobility/index.tsx b/routes/(apps)/mobility/index.tsx index dd79f2b..1d82f7f 100644 --- a/routes/(apps)/mobility/index.tsx +++ b/routes/(apps)/mobility/index.tsx @@ -1,11 +1,2 @@ -type ModulesProps = Record; - -export default function Modules(_props: ModulesProps) { - return ( - <> -

All PolyMPR modules

- - - ); -} +import makeIndex from "$root/defaults/makeIndex.ts"; +export default makeIndex(import.meta.dirname!); diff --git a/routes/(apps)/mobility/partials/index.tsx b/routes/(apps)/mobility/partials/index.tsx new file mode 100644 index 0000000..a5cffdb --- /dev/null +++ b/routes/(apps)/mobility/partials/index.tsx @@ -0,0 +1,14 @@ +import { + getPartialsConfig, + makePartials, +} from "$root/defaults/makePartials.tsx"; +import { EmptyObject } from "$root/defaults/interfaces.ts"; + +type MobilityIndexProps = EmptyObject; + +export function Index(_props: MobilityIndexProps) { + return

Nothing to see here...

; +} + +export const config = getPartialsConfig(); +export default makePartials(Index); diff --git a/routes/(apps)/notes/(_props)/props.ts b/routes/(apps)/notes/(_props)/props.ts index c433973..c3d9f0f 100644 --- a/routes/(apps)/notes/(_props)/props.ts +++ b/routes/(apps)/notes/(_props)/props.ts @@ -10,7 +10,7 @@ const properties: AppProperties = { students: "Students management", }, adminOnly: ["courses", "students"], - hint: "Gestionnaire de note", + hint: "Student grading management", }; export default properties; diff --git a/routes/(apps)/notes/partials/index.tsx b/routes/(apps)/notes/partials/index.tsx index cd6763c..85fcd2b 100644 --- a/routes/(apps)/notes/partials/index.tsx +++ b/routes/(apps)/notes/partials/index.tsx @@ -1,4 +1,7 @@ -import { getConfig, makePartials } from "$root/defaults/makePartials.tsx"; +import { + getPartialsConfig, + makePartials, +} from "$root/defaults/makePartials.tsx"; type NotesIndexProps = Record; @@ -6,5 +9,5 @@ export function Index(_props: NotesIndexProps) { return bip boup; } -export const config = getConfig(); +export const config = getPartialsConfig(); export default makePartials(Index); diff --git a/static/styles/app-cards.css b/static/styles/app-cards.css index c66d359..a67af2e 100644 --- a/static/styles/app-cards.css +++ b/static/styles/app-cards.css @@ -53,3 +53,40 @@ .app-card > span { font-size: 6em; } + +.app-card > span.info { + position: absolute; + top: 0.25em; + right: 0.25em; + font-size: 1.5em; +} + +.app-card > span.info::before { + font-family: var(--font-family-text); + content: attr(data-hint); + position: absolute; + bottom: 1.5rem; + left: 0; + z-index: 99999; + font-size: 1rem; + padding: 1em; + color: light-dark( + var(--light-foreground), + var(--dark-foreground) + ); + background-color: light-dark( + var(--light-background-color), + var(--dark-background-color) + ); + border: 1px solid + light-dark( + var(--light-foreground-dimmer), + var(--dark-foreground-dimmer) + ); + border-radius: 0.5em; + display: none; +} + +.app-card > span.info:hover::before { + display: block; +} diff --git a/static/styles/main.css b/static/styles/main.css index 2ac72b3..a36f5c4 100644 --- a/static/styles/main.css +++ b/static/styles/main.css @@ -4,10 +4,12 @@ --dark-background-color: hsl(250, 50%, 8%); --dark-foreground: hsl(250, 10%, 90%); --dark-foreground-dim: hsl(250, 10%, 70%); + --dark-foreground-dimmer: hsl(250, 10%, 25%); --light-background-color: hsl(250, 50%, 92%); --light-foreground: hsl(250, 10%, 10%); --light-foreground-dim: hsl(250, 10%, 30%); + --light-foreground-dimmer: hsl(250, 10%, 75%); --dark-accent-color: hsl(150, 70%, 50%); --dark-strong-color: hsl(50, 70%, 50%); @@ -48,13 +50,9 @@ header { justify-content: space-between; align-items: center; border-bottom: 1px solid - color-mix( - in srgb, - light-dark( - var(--light-foreground-dim), - var(--dark-foreground-dim) - ) 30%, - transparent + light-dark( + var(--light-foreground-dimmer), + var(--dark-foreground-dimmer) ); font-weight: 700;