From e73edafc99b00e00d244c54f4ea38899c9e25b76 Mon Sep 17 00:00:00 2001 From: zontreck Date: Wed, 15 May 2024 03:38:29 -0700 Subject: [PATCH] Add initial pages --- lib/Constants.dart | 6 ++++ lib/main.dart | 3 +- lib/pages/Main.dart | 80 ++++++++++++++++++++++++++++++++++++++++++ lib/pages/OpenSim.dart | 21 +++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 lib/Constants.dart create mode 100644 lib/pages/Main.dart create mode 100644 lib/pages/OpenSim.dart diff --git a/lib/Constants.dart b/lib/Constants.dart new file mode 100644 index 0000000..103ecdd --- /dev/null +++ b/lib/Constants.dart @@ -0,0 +1,6 @@ +import 'package:flutter/material.dart'; + +class Constants { + static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0); + static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97); +} diff --git a/lib/main.dart b/lib/main.dart index 0ddb461..98a4cb2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:zontreck/pages/Main.dart'; void main() { - runApp(); + runApp(new MainPage()); } diff --git a/lib/pages/Main.dart b/lib/pages/Main.dart new file mode 100644 index 0000000..4100207 --- /dev/null +++ b/lib/pages/Main.dart @@ -0,0 +1,80 @@ +import 'package:flutter/material.dart'; +import 'package:zontreck/Constants.dart'; +import 'package:zontreck/pages/OpenSim.dart'; + +class MainPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + routes: { + "/": (context) => HomePage(), + "/opensim": (context) => OpenSimPage() + }, + theme: ThemeData.dark(), + ); + } +} + +class HomePage extends StatefulWidget { + HomePage({super.key}); + + @override + HomePageState createState() => HomePageState(); +} + +class HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Constants.TITLEBAR_COLOR, + title: Text("Zontreck.com"), + ), + body: 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"), + SizedBox( + height: 80, + ), + ListTile( + title: Text("Site build: 1.0.051524.0338"), + ) + ], + ), + drawer: Drawer( + elevation: 8, + backgroundColor: Constants.DRAWER_COLOR, + child: Column( + children: [ + DrawerHeader( + child: Column( + children: [ + Text("Zontreck.com"), + Text(""), + Text("Copyright 2024"), + Text("Tara Piccari") + ], + )), + ListTile( + title: Text("O P E N S I M"), + leading: Icon(Icons.front_hand_outlined), + subtitle: Text("OpenSim management interface for private grid"), + onTap: () { + Navigator.pushNamed(context, "/opensim"); + }, + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/OpenSim.dart b/lib/pages/OpenSim.dart new file mode 100644 index 0000000..a232145 --- /dev/null +++ b/lib/pages/OpenSim.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; +import 'package:zontreck/Constants.dart'; + +class OpenSimPage extends StatefulWidget { + OpenSimPage({super.key}); + + @override + OpenSimPageState createState() => OpenSimPageState(); +} + +class OpenSimPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Constants.TITLEBAR_COLOR, + title: Text("Zontreck.com - OpenSim Manager"), + ), + ); + } +}