ZontreckWebsite/lib/pages/Main.dart
2024-05-17 17:40:04 -07:00

102 lines
3.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:footer/footer.dart';
import 'package:footer/footer_view.dart';
import 'package:zontreck/Constants.dart';
import 'package:zontreck/pages/LoginAccount.dart';
import 'package:zontreck/pages/OpenSim.dart';
import 'package:zontreck/pages/Portfolio.dart';
import 'package:zontreck/pages/RegisterAccount.dart';
class MainPage extends StatelessWidget {
const MainPage({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
routes: {
"/": (context) => const HomePage(),
"/opensim": (context) => const OpenSimPage(),
"/opensim/register": (context) => const RegisterAccountPage(),
"/opensim/login": (context) => const LoginAccountPage(),
"/portfolio": (context) => const PortfolioPage(),
"/portfolio/coun": (context) => const CardsOfUtterNonsense()
},
theme: ThemeData.dark(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
HomePageState createState() => HomePageState();
}
class HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Constants.TITLEBAR_COLOR,
title: const Text("Zontreck.com"),
),
body: FooterView(
footer: Footer(
alignment: Alignment.center,
backgroundColor: ThemeData.dark().focusColor,
child: const Text("${Constants.COPYRIGHT}\n${Constants.VERSION}")),
children: const [
Column(
children: [
Center(
child: ListTile(
title: Text(
"Zontreck.com is owned by, and operated by, Tara Piccari")),
),
ListTile(
title: Text(
"This site acts as both my portfolio, and as a portal to various different parts of my server"),
),
Text("Thank you for visiting"),
],
),
],
),
drawer: Drawer(
elevation: 8,
backgroundColor: Constants.DRAWER_COLOR,
child: Column(
children: [
const DrawerHeader(
child: Column(
children: [
Text("Zontreck.com"),
Text(""),
Text("Copyright 2024"),
Text("Tara Piccari")
],
)),
ListTile(
title: const Text("O P E N S I M"),
leading: const Icon(Icons.front_hand_outlined),
subtitle:
const Text("OpenSim management interface for private grid"),
onTap: () {
Navigator.pushNamed(context, "/opensim");
},
),
ListTile(
title: const Text("P O R T F O L I O"),
subtitle: const Text("View my work"),
leading: const Icon(Icons.book_online),
onTap: () {
Navigator.pushNamed(context, "/portfolio");
},
)
],
),
),
);
}
}