Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #87 from jhihyulin/main
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
jhihyulin authored Aug 16, 2023
2 parents aca3e70 + 800560e commit 5d2daf4
Show file tree
Hide file tree
Showing 38 changed files with 4,260 additions and 948 deletions.
Binary file added assets/fonts/MyIcons.ttf
Binary file not shown.
24 changes: 24 additions & 0 deletions assets/fonts/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "MyIcons",
"css_prefix_text": "",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "363e7ed079367b1c714e443dd168b416",
"css": "x-twitter",
"code": 59392,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M760.2 93.8H898L596.9 437.9 951.2 906.3H673.8L456.4 622.3 208 906.3H69.9L392 538.1 52.3 93.8H336.7L533 353.3 760.2 93.8ZM711.7 823.8H788.1L295.1 171.9H213.1L711.7 823.8Z",
"width": 1000
},
"search": [
"x-twitter"
]
}
]
}
1 change: 1 addition & 0 deletions assets/images/x-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;

/// Default [FirebaseOptions] for use with your Firebase apps.
///
Expand Down Expand Up @@ -57,7 +58,8 @@ class DefaultFirebaseOptions {
messagingSenderId: '897798864282',
projectId: 'webpage-349c7',
authDomain: 'auth.jhihyulin.live',
databaseURL: 'https://webpage-349c7-default-rtdb.asia-southeast1.firebasedatabase.app',
databaseURL:
'https://webpage-349c7-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'webpage-349c7.appspot.com',
measurementId: 'G-JDZTQWRMLT',
);
Expand Down
12 changes: 9 additions & 3 deletions lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ class HomePage extends StatelessWidget {
padding: const EdgeInsets.all(20),
constraints: BoxConstraints(
//maxWidth: 700,
minHeight: MediaQuery.of(context).size.height - AppBar().preferredSize.height - (MediaQuery.of(context).size.width > 700 ? 0 : 80), //NavigationBar Height
minHeight: MediaQuery.of(context).size.height -
AppBar().preferredSize.height -
(MediaQuery.of(context).size.width > 700
? 0
: 80), //NavigationBar Height
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand All @@ -34,7 +38,8 @@ class HomePage extends StatelessWidget {
speed: const Duration(milliseconds: 200),
textStyle: TextStyle(
// fontFamily: GoogleFonts.firaCode().fontFamily,
fontSize: Theme.of(context).textTheme.displayLarge?.fontSize,
fontSize:
Theme.of(context).textTheme.displayLarge?.fontSize,
),
cursor: '|',
),
Expand All @@ -44,7 +49,8 @@ class HomePage extends StatelessWidget {
speed: const Duration(milliseconds: 50),
textStyle: TextStyle(
fontFamily: GoogleFonts.firaCode().fontFamily,
fontSize: Theme.of(context).textTheme.displaySmall?.fontSize,
fontSize:
Theme.of(context).textTheme.displaySmall?.fontSize,
),
cursor: '|',
),
Expand Down
40 changes: 28 additions & 12 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import '../pages/qr_generator.dart' deferred as qr_generator;
import '../pages/clock.dart' deferred as clock;
import '../pages/zhsh_3d_map.dart' deferred as zhsh_3d_map;
import '../pages/not_found.dart' deferred as not_found;
import '../pages/tw_university_result_query.dart' deferred as tw_university_result_query;
import '../pages/tw_university_result_query.dart'
deferred as tw_university_result_query;
import '../pages/spin_wheel.dart' deferred as spin_wheel;
import '../pages/privacy_policy.dart' deferred as privacy_policy;
import '../pages/terms_of_service.dart' deferred as terms_of_service;
Expand All @@ -50,7 +51,9 @@ void main() async {
webRecaptchaSiteKey: '6LcPhjgkAAAAAAUtPybk3GHCkYZTxDd6w4kVOiQJ',
);
// Load IanSui Font
await CustomLoadFont.loadFont('https://raw.githubusercontent.com/ButTaiwan/iansui/main/Iansui-Regular.ttf', 'IanSui');
await CustomLoadFont.loadFont(
'https://raw.githubusercontent.com/ButTaiwan/iansui/main/Iansui-Regular.ttf',
'IanSui');
usePathUrlStrategy();
runApp(const MyApp());
}
Expand All @@ -63,7 +66,8 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
Widget Function(BuildContext) loadPage(Future<void> Function() loadLibrary, Widget Function(BuildContext) page) {
Widget Function(BuildContext) loadPage(
Future<void> Function() loadLibrary, Widget Function(BuildContext) page) {
return (BuildContext context) => FutureBuilder(
future: loadLibrary(),
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
Expand Down Expand Up @@ -229,14 +233,18 @@ class _MyAppState extends State<MyApp> {
break;
case '/twuniversityresultquery':
if (parameters != null) {
builder = loadPage(tw_university_result_query.loadLibrary, (context) {
return tw_university_result_query.TWUniversityResultQueryPage(
builder = loadPage(tw_university_result_query.loadLibrary,
(context) {
return tw_university_result_query
.TWUniversityResultQueryPage(
id: parameters!['id'] ?? '',
);
});
} else {
builder = loadPage(tw_university_result_query.loadLibrary, (context) {
return tw_university_result_query.TWUniversityResultQueryPage();
builder = loadPage(tw_university_result_query.loadLibrary,
(context) {
return tw_university_result_query
.TWUniversityResultQueryPage();
});
}
break;
Expand Down Expand Up @@ -266,7 +274,8 @@ class _MyAppState extends State<MyApp> {
});
break;
case '/':
builder = (BuildContext context) => const NavigationController();
builder =
(BuildContext context) => const NavigationController();
break;
default:
builder = loadPage(not_found.loadLibrary, (context) {
Expand Down Expand Up @@ -444,20 +453,27 @@ class _NavigationControllerState extends State<NavigationController> {
),
bottomNavigationBar: MediaQuery.of(context).size.width < desktopModeWidth
? NavigationBar(
labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
labelBehavior:
NavigationDestinationLabelBehavior.onlyShowSelected,
selectedIndex: _currentIndex,
onDestinationSelected: _onItemClick,
destinations: <Widget>[
NavigationDestination(
icon: _currentIndex == 0 ? const Icon(Icons.home) : const Icon(Icons.home_outlined),
icon: _currentIndex == 0
? const Icon(Icons.home)
: const Icon(Icons.home_outlined),
label: 'Home',
),
NavigationDestination(
icon: _currentIndex == 1 ? const Icon(Icons.build) : const Icon(Icons.build_outlined),
icon: _currentIndex == 1
? const Icon(Icons.build)
: const Icon(Icons.build_outlined),
label: 'Tool',
),
NavigationDestination(
icon: _currentIndex == 2 ? const Icon(Icons.settings) : const Icon(Icons.settings_outlined),
icon: _currentIndex == 2
? const Icon(Icons.settings)
: const Icon(Icons.settings_outlined),
label: 'Setting',
),
],
Expand Down
Loading

0 comments on commit 5d2daf4

Please sign in to comment.