Fixed card CSS and hint
This commit is contained in:
@@ -2,7 +2,7 @@ import { JSX } from "preact";
|
|||||||
import { Partial } from "$fresh/runtime.ts";
|
import { Partial } from "$fresh/runtime.ts";
|
||||||
import { RouteConfig } from "$fresh/server.ts";
|
import { RouteConfig } from "$fresh/server.ts";
|
||||||
|
|
||||||
export function getConfig(): RouteConfig {
|
export function getPartialsConfig(): RouteConfig {
|
||||||
return {
|
return {
|
||||||
skipAppWrapper: true,
|
skipAppWrapper: true,
|
||||||
skipInheritedLayouts: true,
|
skipInheritedLayouts: true,
|
||||||
|
|||||||
+3
-2
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import * as $_apps_layout from "./routes/(apps)/_layout.tsx";
|
import * as $_apps_layout from "./routes/(apps)/_layout.tsx";
|
||||||
import * as $_apps_mobility_index from "./routes/(apps)/mobility/index.tsx";
|
import * as $_apps_mobility_index from "./routes/(apps)/mobility/index.tsx";
|
||||||
|
import * as $_apps_mobility_partials_index from "./routes/(apps)/mobility/partials/index.tsx";
|
||||||
import * as $_apps_notes_index from "./routes/(apps)/notes/index.tsx";
|
import * as $_apps_notes_index from "./routes/(apps)/notes/index.tsx";
|
||||||
import * as $_apps_notes_partials_admin_courses from "./routes/(apps)/notes/partials/(admin)/courses.tsx";
|
import * as $_apps_notes_partials_admin_courses from "./routes/(apps)/notes/partials/(admin)/courses.tsx";
|
||||||
import * as $_apps_notes_partials_admin_students from "./routes/(apps)/notes/partials/(admin)/students.tsx";
|
import * as $_apps_notes_partials_admin_students from "./routes/(apps)/notes/partials/(admin)/students.tsx";
|
||||||
@@ -17,7 +18,6 @@ import * as $apps from "./routes/apps.tsx";
|
|||||||
import * as $index from "./routes/index.tsx";
|
import * as $index from "./routes/index.tsx";
|
||||||
import * as $login from "./routes/login.tsx";
|
import * as $login from "./routes/login.tsx";
|
||||||
import * as $logout from "./routes/logout.tsx";
|
import * as $logout from "./routes/logout.tsx";
|
||||||
import * as $Counter from "./islands/Counter.tsx";
|
|
||||||
import * as $_islands_AppNavigator from "./routes/(_islands)/AppNavigator.tsx";
|
import * as $_islands_AppNavigator from "./routes/(_islands)/AppNavigator.tsx";
|
||||||
import * as $_islands_Navbar from "./routes/(_islands)/Navbar.tsx";
|
import * as $_islands_Navbar from "./routes/(_islands)/Navbar.tsx";
|
||||||
import type { Manifest } from "$fresh/server.ts";
|
import type { Manifest } from "$fresh/server.ts";
|
||||||
@@ -26,6 +26,8 @@ const manifest = {
|
|||||||
routes: {
|
routes: {
|
||||||
"./routes/(apps)/_layout.tsx": $_apps_layout,
|
"./routes/(apps)/_layout.tsx": $_apps_layout,
|
||||||
"./routes/(apps)/mobility/index.tsx": $_apps_mobility_index,
|
"./routes/(apps)/mobility/index.tsx": $_apps_mobility_index,
|
||||||
|
"./routes/(apps)/mobility/partials/index.tsx":
|
||||||
|
$_apps_mobility_partials_index,
|
||||||
"./routes/(apps)/notes/index.tsx": $_apps_notes_index,
|
"./routes/(apps)/notes/index.tsx": $_apps_notes_index,
|
||||||
"./routes/(apps)/notes/partials/(admin)/courses.tsx":
|
"./routes/(apps)/notes/partials/(admin)/courses.tsx":
|
||||||
$_apps_notes_partials_admin_courses,
|
$_apps_notes_partials_admin_courses,
|
||||||
@@ -43,7 +45,6 @@ const manifest = {
|
|||||||
"./routes/logout.tsx": $logout,
|
"./routes/logout.tsx": $logout,
|
||||||
},
|
},
|
||||||
islands: {
|
islands: {
|
||||||
"./islands/Counter.tsx": $Counter,
|
|
||||||
"./routes/(_islands)/AppNavigator.tsx": $_islands_AppNavigator,
|
"./routes/(_islands)/AppNavigator.tsx": $_islands_AppNavigator,
|
||||||
"./routes/(_islands)/Navbar.tsx": $_islands_Navbar,
|
"./routes/(_islands)/Navbar.tsx": $_islands_Navbar,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ export default function AppCard(props: AppCardProps) {
|
|||||||
<a class="app-card" href={`/${props.href}`} f-client-nav={false}>
|
<a class="app-card" href={`/${props.href}`} f-client-nav={false}>
|
||||||
<span class="material-symbols-outlined">{props.app.icon}</span>
|
<span class="material-symbols-outlined">{props.app.icon}</span>
|
||||||
<p>{props.app.name}</p>
|
<p>{props.app.name}</p>
|
||||||
|
<span class="material-symbols-outlined info" data-hint={props.app.hint}>
|
||||||
|
info
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { AppProperties } from "../../../(_islands)/AppNavigator.tsx";
|
import { AppProperties } from "$root/defaults/interfaces.ts";
|
||||||
|
|
||||||
const properties: AppProperties = {
|
const properties: AppProperties = {
|
||||||
name: "PolyMobility",
|
name: "PolyMobility",
|
||||||
icon: "flight_takeoff",
|
icon: "flight_takeoff",
|
||||||
hint: "Gestionnaire de mobilité",
|
hint: "Gestionnaire de mobilité",
|
||||||
|
pages: {},
|
||||||
|
adminOnly: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default properties;
|
export default properties;
|
||||||
|
|||||||
@@ -1,11 +1,2 @@
|
|||||||
type ModulesProps = Record<string | number | symbol, never>;
|
import makeIndex from "$root/defaults/makeIndex.ts";
|
||||||
|
export default makeIndex(import.meta.dirname!);
|
||||||
export default function Modules(_props: ModulesProps) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h2>All PolyMPR modules</h2>
|
|
||||||
<nav>
|
|
||||||
</nav>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -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 <p>Nothing to see here...</p>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const config = getPartialsConfig();
|
||||||
|
export default makePartials(Index);
|
||||||
@@ -10,7 +10,7 @@ const properties: AppProperties = {
|
|||||||
students: "Students management",
|
students: "Students management",
|
||||||
},
|
},
|
||||||
adminOnly: ["courses", "students"],
|
adminOnly: ["courses", "students"],
|
||||||
hint: "Gestionnaire de note",
|
hint: "Student grading management",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default properties;
|
export default properties;
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import { getConfig, makePartials } from "$root/defaults/makePartials.tsx";
|
import {
|
||||||
|
getPartialsConfig,
|
||||||
|
makePartials,
|
||||||
|
} from "$root/defaults/makePartials.tsx";
|
||||||
|
|
||||||
type NotesIndexProps = Record<string | number | symbol, never>;
|
type NotesIndexProps = Record<string | number | symbol, never>;
|
||||||
|
|
||||||
@@ -6,5 +9,5 @@ export function Index(_props: NotesIndexProps) {
|
|||||||
return <a href="notes" f-partial={"notes/partials"}>bip boup</a>;
|
return <a href="notes" f-partial={"notes/partials"}>bip boup</a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const config = getConfig();
|
export const config = getPartialsConfig();
|
||||||
export default makePartials(Index);
|
export default makePartials(Index);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
padding: 1em;
|
padding: 1em;
|
||||||
border-radius: 0.5em;
|
border-radius: 0.5em;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
border: 1px solid
|
border: 1px solid
|
||||||
light-dark(
|
light-dark(
|
||||||
@@ -48,3 +49,40 @@
|
|||||||
.app-card > span {
|
.app-card > span {
|
||||||
font-size: 4em;
|
font-size: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -48,3 +48,10 @@
|
|||||||
transform: scaleY(1);
|
transform: scaleY(1);
|
||||||
transform-origin: top;
|
transform-origin: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1024px) {
|
||||||
|
#app {
|
||||||
|
grid-template-rows: auto 1fr;
|
||||||
|
grid-template-columns: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
--dark-background-color: hsl(250, 50%, 8%);
|
--dark-background-color: hsl(250, 50%, 8%);
|
||||||
--dark-foreground: hsl(250, 10%, 90%);
|
--dark-foreground: hsl(250, 10%, 90%);
|
||||||
--dark-foreground-dim: hsl(250, 10%, 70%);
|
--dark-foreground-dim: hsl(250, 10%, 70%);
|
||||||
|
--dark-foreground-dimmer: hsl(250, 10%, 25%);
|
||||||
|
|
||||||
--light-background-color: hsl(250, 50%, 92%);
|
--light-background-color: hsl(250, 50%, 92%);
|
||||||
--light-foreground: hsl(250, 10%, 10%);
|
--light-foreground: hsl(250, 10%, 10%);
|
||||||
--light-foreground-dim: hsl(250, 10%, 30%);
|
--light-foreground-dim: hsl(250, 10%, 30%);
|
||||||
|
--light-foreground-dimmer: hsl(250, 10%, 75%);
|
||||||
|
|
||||||
--dark-accent-color: hsl(150, 70%, 50%);
|
--dark-accent-color: hsl(150, 70%, 50%);
|
||||||
--dark-strong-color: hsl(50, 70%, 50%);
|
--dark-strong-color: hsl(50, 70%, 50%);
|
||||||
@@ -48,13 +50,9 @@ header {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid
|
border-bottom: 1px solid
|
||||||
color-mix(
|
|
||||||
in srgb,
|
|
||||||
light-dark(
|
light-dark(
|
||||||
var(--light-foreground-dim),
|
var(--light-foreground-dimmer),
|
||||||
var(--dark-foreground-dim)
|
var(--dark-foreground-dimmer)
|
||||||
) 30%,
|
|
||||||
transparent
|
|
||||||
);
|
);
|
||||||
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
Reference in New Issue
Block a user