Skip to content

Commit 990105a

Browse files
committed
💯
0 parents  commit 990105a

27 files changed

+865
-0
lines changed

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Flutter build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: subosito/flutter-action@v2
15+
with:
16+
flutter-version: '3.0.0'
17+
- run: flutter pub get
18+
- run: flutter build web --base-href "/website-test/"
19+
- uses: JamesIves/[email protected]
20+
with:
21+
branch: gh-pages
22+
folder: build/web

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Web related
36+
lib/generated_plugin_registrant.dart
37+
38+
# Symbolication related
39+
app.*.symbols
40+
41+
# Obfuscation related
42+
app.*.map.json
43+
44+
# Android Studio will place build artifacts here
45+
/android/app/debug
46+
/android/app/profile
47+
/android/app/release

.metadata

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
17+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
18+
- platform: web
19+
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
20+
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# commit451
2+
3+
Website for Commit 451

analysis_options.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

assets/fonts/firacode-bold.ttf

312 KB
Binary file not shown.

assets/fonts/roboto-thin.ttf

165 KB
Binary file not shown.

assets/images/avatar.png

65 KB
Loading

assets/images/bg.png

226 KB
Loading

lib/app.dart

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import 'package:commit451/home_page.dart';
2+
import 'package:commit451/privacy_page.dart';
3+
import 'package:commit451/terms_conditions_page.dart';
4+
import 'package:commit451/ui/commit451_colors.dart';
5+
import 'package:flutter/material.dart';
6+
7+
class App extends StatelessWidget {
8+
const App({Key? key}) : super(key: key);
9+
10+
@override
11+
Widget build(BuildContext context) {
12+
return MaterialApp(
13+
title: 'Commit 451',
14+
theme: ThemeData(
15+
primarySwatch: Commit451Colors.primaryMaterialColor(),
16+
),
17+
debugShowCheckedModeBanner: false,
18+
initialRoute: "/",
19+
routes: {
20+
'/': (context) => const HomePage(),
21+
'/privacy': (context) => const PrivacyPage(),
22+
'/terms-conditions': (context) => const TermsConditionsPage(),
23+
},
24+
);
25+
}
26+
}

lib/home_page.dart

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
import 'package:commit451/nav.dart';
2+
import 'package:commit451/ui/commit451_styles.dart';
3+
import 'package:commit451/ui/commit451_urls.dart';
4+
import 'package:commit451/ui/snackbar_helper.dart';
5+
import 'package:commit451/ui/ui_factory.dart';
6+
import 'package:flutter/material.dart';
7+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
8+
import 'package:url_launcher/url_launcher.dart';
9+
10+
class HomePage extends StatefulWidget {
11+
const HomePage({Key? key}) : super(key: key);
12+
13+
@override
14+
State<HomePage> createState() => _HomePageState();
15+
}
16+
17+
class _HomePageState extends State<HomePage> {
18+
void _launchUrl(String url) async {
19+
Uri uri = Uri.parse(url);
20+
if (!await launchUrl(uri)) {
21+
SnackBarHelper.show(context, 'Could not launch $url');
22+
}
23+
}
24+
25+
@override
26+
Widget build(BuildContext context) {
27+
return Scaffold(
28+
body: Container(
29+
decoration: const BoxDecoration(
30+
image: DecorationImage(
31+
image: AssetImage("assets/images/bg.png"),
32+
fit: BoxFit.cover,
33+
),
34+
),
35+
child: Stack(children: [
36+
Align(alignment: AlignmentDirectional.center, child: centerCard()),
37+
Align(
38+
alignment: AlignmentDirectional.bottomCenter,
39+
child: Column(mainAxisSize: MainAxisSize.min, children: [
40+
bottomCard(),
41+
verticalSeparator(),
42+
]))
43+
])),
44+
);
45+
}
46+
47+
Widget centerCard() {
48+
return Card(
49+
elevation: 8.0,
50+
margin: const EdgeInsets.all(20.0),
51+
child: Container(
52+
margin: const EdgeInsets.all(20.0),
53+
child: Column(
54+
mainAxisAlignment: MainAxisAlignment.center,
55+
mainAxisSize: MainAxisSize.min,
56+
children: [
57+
verticalSeparator(),
58+
ClipRRect(
59+
borderRadius: BorderRadius.circular(100.0),
60+
child: Image.asset("assets/images/avatar.png",
61+
width: 200, height: 200),
62+
),
63+
verticalSeparator(),
64+
Text(
65+
"Commit 451",
66+
style: logoStyle,
67+
),
68+
Text(
69+
"451 times more committed to creating apps with clean code and modern design for a true experience inspired by user instinct.",
70+
style: Theme.of(context).textTheme.headlineSmall,
71+
textAlign: TextAlign.center,
72+
),
73+
verticalSeparator(),
74+
Center(
75+
child: Row(
76+
mainAxisAlignment: MainAxisAlignment.center,
77+
children: [
78+
button(FontAwesomeIcons.twitter, urlTwitter),
79+
button(FontAwesomeIcons.github, urlGitHub),
80+
button(Icons.android, urlPlayStore),
81+
],
82+
),
83+
),
84+
verticalSeparator(),
85+
],
86+
),
87+
),
88+
);
89+
}
90+
91+
Widget bottomCard() {
92+
return Row(
93+
mainAxisSize: MainAxisSize.min,
94+
children: [
95+
link("Privacy", () {
96+
Nav.navigateToPrivacy(context);
97+
}),
98+
horizontalSeparator(),
99+
link("Terms & Conditions", () {
100+
Nav.navigateToTermsAndConditions(context);
101+
}),
102+
],
103+
);
104+
}
105+
106+
Widget link(String text, GestureTapCallback callback) {
107+
return InkWell(
108+
onTap: callback,
109+
child: Text(
110+
text,
111+
style: const TextStyle(fontWeight: FontWeight.bold),
112+
),
113+
);
114+
}
115+
116+
Widget button(IconData iconData, String url) {
117+
return RawMaterialButton(
118+
onPressed: () {
119+
_launchUrl(url);
120+
},
121+
elevation: 2.0,
122+
fillColor: Colors.white,
123+
padding: const EdgeInsets.all(15.0),
124+
shape: const CircleBorder(),
125+
child: Icon(
126+
iconData,
127+
size: 35.0,
128+
),
129+
);
130+
}
131+
}

lib/main.dart

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import 'package:commit451/app.dart';
2+
import 'package:flutter/material.dart';
3+
4+
void main() {
5+
runApp(const App());
6+
}

lib/nav.dart

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import 'package:commit451/privacy_page.dart';
2+
import 'package:commit451/terms_conditions_page.dart';
3+
import 'package:flutter/material.dart';
4+
5+
/// Navigation helper.
6+
class Nav {
7+
static void navigateToPrivacy(BuildContext context) {
8+
Navigator.push(
9+
context,
10+
MaterialPageRoute(builder: (context) => const PrivacyPage()),
11+
);
12+
}
13+
14+
static void navigateToTermsAndConditions(BuildContext context) {
15+
Navigator.push(
16+
context,
17+
MaterialPageRoute(builder: (context) => const TermsConditionsPage()),
18+
);
19+
}
20+
21+
/// Android bias lol
22+
static void finish(BuildContext context) {
23+
Navigator.of(context).pop();
24+
}
25+
}

lib/privacy_page.dart

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import 'package:commit451/ui/ui_factory.dart';
2+
import 'package:flutter/material.dart';
3+
4+
class PrivacyPage extends StatelessWidget {
5+
const PrivacyPage({Key? key}) : super(key: key);
6+
7+
@override
8+
Widget build(BuildContext context) {
9+
return Scaffold(
10+
appBar: AppBar(
11+
title: const Text('Commit 451 Privacy Policy'),
12+
),
13+
body: ListView(padding: const EdgeInsets.all(40.0), children: [
14+
title("Terms of Use and Privacy Policy"),
15+
verticalSeparator(),
16+
text(
17+
"Commit 451 is committed to protecting your privacy. We will not distribute your personal information to third parties not affiliated with Commit 451 without your consent and we do not sell or rent your personal information. This privacy policy explains the guidelines we use in protecting your privacy, which is applicable to the use of commit451.com and our mobile apps (collectively, the “Services”)."),
18+
verticalSeparator(),
19+
title("Information We Collect Automatically"),
20+
verticalSeparator(),
21+
text(
22+
"Commit 451 collects anonymous usage statistics and crash reports through our mobile applications. The usage statistics and crash reports help us diagnose problems, help us understand how users interact with our mobile applications, and help us improve the performance of our mobile applications. This data, along with any other automatic anonymous data we collect is not linked to any personal information you provide. Persistent identifiers may automatically be collected from users, either by Commit 451 or by a third party on behalf of Commit 451. Persistent identifiers are used to support the internal operations of our Services, which may include maintaining and analyzing our Services, performing network communications, authenticating users, personalizing content, and protecting the security or integrity of the Services."),
23+
verticalSeparator(),
24+
title("Information You Provide"),
25+
verticalSeparator(),
26+
text(
27+
"Commit 451 may collect information you provide directly to us through our Services. When submitting information through a form, support request, or other inquiry to Commit 451, you may choose to provide us with your name, email address, and other contact information (such as your telephone number). This information will be used to respond to any communications you submit through the Services."),
28+
verticalSeparator(),
29+
title("Third Party Applications"),
30+
verticalSeparator(),
31+
text(
32+
"Commit 451 uses a variety of services hosted by third parties to help enhance and understand the use of our Services. These companies are authorized to use your anonymized information only as necessary to provide these services to us. These services may use cookies and collect other information sent by your browser or mobile device, such as your IP address or the applications that were running at the time of a malfunction. This information is processed by these third party tools to generate statistical usage information. The collection of this information will allow us to better understand and improve the performance, usability, and effectiveness of our Services."),
33+
verticalSeparator(),
34+
title("Disclosure of Information"),
35+
verticalSeparator(),
36+
text(
37+
"Commit 451 may disclose your personal information as required by law, such as to comply with a subpoena, or similar legal process and when we believe in good faith that disclosure is necessary to protect our rights, protect your safety or the safety of others, investigate fraud, or respond to a government request."),
38+
title("Security"),
39+
verticalSeparator(),
40+
text(
41+
"The security of your personal information is important to us. We take appropriate technical measures for generally accepted standards for keeping your personal information confidential and protected against accidental or unlawful destruction or loss, alteration, unauthorized disclosure or access."),
42+
verticalSeparator(),
43+
title("Notification of Changes"),
44+
verticalSeparator(),
45+
text(
46+
"If we change our privacy statement, we will post those changes to this privacy statement and update the date at the bottom of this document. We encourage you to periodically review this page for the latest information on our privacy practices."),
47+
verticalSeparator(),
48+
title("Questions"),
49+
verticalSeparator(),
50+
text(
51+
"If you have any questions about this privacy policy, please send an email to [email protected]."),
52+
verticalSeparator(),
53+
title("Last Updated: September 21, 2018"),
54+
verticalSeparator(),
55+
]));
56+
}
57+
}

0 commit comments

Comments
 (0)