diff --git a/lib/Constants.dart b/lib/Constants.dart index 933f7a1..fe134bd 100644 --- a/lib/Constants.dart +++ b/lib/Constants.dart @@ -6,6 +6,7 @@ import 'package:zontreck/Settings.dart'; class Constants { static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0); static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97); + static const PORTFOLIO_CARD_COLOR = Color.fromARGB(255, 0, 71, 97); static const VERSION = "1.0.051524.1622"; static const COPYRIGHT = "Copyright 2024 - Tara Piccari. All rights Reserved"; diff --git a/lib/pages/Main.dart b/lib/pages/Main.dart index 5d08a65..aa8696d 100644 --- a/lib/pages/Main.dart +++ b/lib/pages/Main.dart @@ -3,6 +3,7 @@ import 'package:footer/footer.dart'; import 'package:footer/footer_view.dart'; import 'package:zontreck/Constants.dart'; import 'package:zontreck/pages/OpenSim.dart'; +import 'package:zontreck/pages/Portfolio.dart'; class MainPage extends StatelessWidget { const MainPage({super.key}); @@ -12,7 +13,9 @@ class MainPage extends StatelessWidget { return MaterialApp( routes: { "/": (context) => const HomePage(), - "/opensim": (context) => const OpenSimPage() + "/opensim": (context) => const OpenSimPage(), + "/portfolio": (context) => PortfolioPage(), + "/portfolio/coun": (context) => CardsOfUtterNonsense() }, theme: ThemeData.dark(), ); @@ -73,10 +76,19 @@ class HomePageState extends State { 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"), + subtitle: + const Text("OpenSim management interface for private grid"), onTap: () { Navigator.pushNamed(context, "/opensim"); }, + ), + ListTile( + title: Text("P O R T F O L I O"), + subtitle: Text("View my work"), + leading: Icon(Icons.book_online), + onTap: () { + Navigator.pushNamed(context, "/portfolio"); + }, ) ], ), diff --git a/lib/pages/Portfolio.dart b/lib/pages/Portfolio.dart new file mode 100644 index 0000000..9589d68 --- /dev/null +++ b/lib/pages/Portfolio.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; +import 'package:zontreck/Constants.dart'; + +class PortfolioPage extends StatelessWidget { + PortfolioPage({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Zontreck.com - Portfolio of Tara Piccari"), + backgroundColor: Constants.TITLEBAR_COLOR, + ), + body: Padding( + padding: EdgeInsets.all(8), + child: SingleChildScrollView( + child: Row( + children: [ + PortfolioEntry( + title: ListTile(title: Text("Cards of Utter Nonsense")), + body: Text( + "A product I created for Second Life, but may port to the mobile phone at some point"), + onTap: () { + Navigator.pushNamed(context, "/portfolio/coun"); + }, + ), + PortfolioEntry( + title: Text("Zontreck.com"), + body: Text( + ("This website, which is written entirely in Flutter, with some supporting API files in PHP")), + onTap: () {}) + ], + ), + ), + ), + ); + } +} + +class PortfolioEntry extends StatelessWidget { + final Widget title; + final Widget body; + final Function() onTap; + + PortfolioEntry( + {required this.title, required this.body, required this.onTap}); + + @override + Widget build(BuildContext context) { + return Card( + color: Constants.PORTFOLIO_CARD_COLOR, + elevation: 8, + child: InkWell( + onTap: onTap, + child: Padding( + padding: EdgeInsets.all(8), + child: SizedBox( + width: 225, + height: 325, + child: Column( + children: [ + title, + Divider( + thickness: 4, + ), + body + ], + ), + ), + ), + ), + ); + } +} + +class CardsOfUtterNonsense extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Portfolio Entry - Cards of Utter Nonsense"), + backgroundColor: Constants.TITLEBAR_COLOR, + ), + body: Padding( + padding: EdgeInsets.all(8), + child: SingleChildScrollView( + child: Column( + children: [ + Text( + "Cards of Utter Nonsense is primarily written in Linden Scripting Language (LSL). It depends upon a MariaDB backend and PHP. The game uses a Heads Up Display (HUD), which is written in Flutter/Dart.") + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/RegisterAccount.dart b/lib/pages/RegisterAccount.dart new file mode 100644 index 0000000..4f854a2 --- /dev/null +++ b/lib/pages/RegisterAccount.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:zontreck/Constants.dart'; + +class RegisterAccountPage extends StatefulWidget { + RegisterAccountPage({super.key}); + + @override + RegisterAccountState createState() => RegisterAccountState(); +} + +class RegisterAccountState extends State { + RegisterAccountState(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("OpenSim - Register Account"), + backgroundColor: Constants.TITLEBAR_COLOR, + ), + body: Padding( + padding: EdgeInsets.all(8), + child: SingleChildScrollView( + child: Column( + children: [], + ), + ), + ), + ); + } +} diff --git a/php/Common.php b/php/Common.php index a96dc48..673bc20 100644 --- a/php/Common.php +++ b/php/Common.php @@ -3,7 +3,7 @@ if(defined("COMMON")) return; define("COMMON", 1); function get_DB() { - return mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME); + return mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); } diff --git a/web/index.html b/web/index.html index 5092a51..2f638e6 100644 --- a/web/index.html +++ b/web/index.html @@ -35,4 +35,4 @@ - \ No newline at end of file +