style(frontend): polish student workspace
This commit is contained in:
@@ -46,60 +46,97 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 28),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const ProfileCard(
|
||||
name: DemoIdentity.userName,
|
||||
subtitle: DemoIdentity.userSubtitle,
|
||||
initials: DemoIdentity.userInitials,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
"Que souhaitez-vous faire ?",
|
||||
style: GoogleFonts.darkerGrotesque(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: EnsupColors.text,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ActionCard(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 28,
|
||||
vertical: 26,
|
||||
),
|
||||
child: Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 1040),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const ProfileCard(
|
||||
name: DemoIdentity.userName,
|
||||
subtitle: DemoIdentity.userSubtitle,
|
||||
initials: DemoIdentity.userInitials,
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
Text(
|
||||
"Que souhaitez-vous faire ?",
|
||||
style: GoogleFonts.darkerGrotesque(
|
||||
fontSize: 30,
|
||||
height: 1,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: EnsupColors.text,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
"Choisissez l’opération à réaliser sur ce poste.",
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
fontSize: 14,
|
||||
color: EnsupColors.muted,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final emprunter = ActionCard(
|
||||
icon: Icons.inventory_2_outlined,
|
||||
title: "EMPRUNTER",
|
||||
description:
|
||||
"Accéder au catalogue et emprunter du matériel éducatif",
|
||||
"Consulter les équipements disponibles et démarrer un nouvel emprunt.",
|
||||
color: EnsupColors.cyan,
|
||||
onTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const CatalogueScreen()),
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
const CatalogueScreen(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: ActionCard(
|
||||
);
|
||||
final restituer = ActionCard(
|
||||
icon: Icons.assignment_return_outlined,
|
||||
title: "RESTITUER",
|
||||
description:
|
||||
"Restituer un matériel que vous avez emprunté",
|
||||
"Sélectionner un emprunt en cours et contrôler le matériel rendu.",
|
||||
color: EnsupColors.teal,
|
||||
onTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const RestitutionSelectScreen(),
|
||||
builder: (_) =>
|
||||
const RestitutionSelectScreen(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (constraints.maxWidth < 720) {
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
emprunter,
|
||||
const SizedBox(height: 14),
|
||||
restituer,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
return IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(child: emprunter),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(child: restituer),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user