Skip to content

Commit 85ee113

Browse files
Djangonaut Space Program Added
1 parent 1337ba8 commit 85ee113

5 files changed

Lines changed: 230 additions & 18 deletions

File tree

assets/djangonaut.png

14.8 KB
Loading

lib/home_page.dart

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
77
import 'package:opso/ChatBotpage.dart';
88
import 'package:opso/learning_path.dart';
99
import 'package:opso/opso_timeline.dart';
10+
import 'package:opso/programs%20screen/djangonautspace.dart';
1011
import 'package:opso/programs%20screen/fossasia.dart';
1112
import 'package:opso/programs%20screen/girl_script.dart';
1213
import 'package:opso/programs%20screen/github_campus.dart';
@@ -103,6 +104,10 @@ class _HomePageState extends State<HomePage> {
103104
title: 'Major League Hacking Fellowship',
104105
imageAssetPath: 'assets/mlh_logo.jpg',
105106
),
107+
Program(
108+
title: 'Djangonaut Space',
109+
imageAssetPath: 'assets/djangonaut.png',
110+
),
106111
Program(
107112
title: 'Summer of Bitcoin',
108113
imageAssetPath: 'assets/summer_of_bitcoin_logo.png',
@@ -417,6 +422,14 @@ class _HomePageState extends State<HomePage> {
417422
);
418423
break;
419424

425+
case 'Djangonaut Space':
426+
Navigator.push(
427+
context,
428+
MaterialPageRoute(
429+
builder: (context) => const DjangonautSpaceProgram()),
430+
);
431+
break;
432+
420433
case 'Summer of Bitcoin':
421434
Navigator.push(
422435
context,
@@ -425,9 +438,6 @@ class _HomePageState extends State<HomePage> {
425438
);
426439
break;
427440

428-
429-
430-
431441
case 'GirlScript Summer of Code':
432442
Navigator.push(
433443
context,
@@ -601,6 +611,11 @@ class ProgramSearchDelegate extends SearchDelegate<String> {
601611
title: 'Major League Hacking Fellowship',
602612
imageAssetPath: 'assets/mlh_logo.jpg',
603613
),
614+
Program(
615+
title: 'Djangonaut Space',
616+
imageAssetPath: 'assets/djangonaut.png',
617+
),
618+
604619
Program(
605620
title: 'Hyperledger',
606621
imageAssetPath: 'assets/hyperledger.png',
@@ -739,6 +754,15 @@ class ProgramSearchDelegate extends SearchDelegate<String> {
739754
builder: (context) => const MajorLeagueHackingFellowship(),
740755
),
741756
);
757+
break;
758+
759+
case 'Djangonaut Space':
760+
Navigator.push(
761+
context,
762+
MaterialPageRoute(
763+
builder: (context) => const DjangonautSpaceProgram(),
764+
),
765+
);
742766
break;
743767

744768
case 'Summer of Bitcoin':
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:opso/modals/book_mark_model.dart';
3+
import 'package:url_launcher/url_launcher.dart';
4+
5+
class DjangonautSpaceProgram extends StatefulWidget {
6+
const DjangonautSpaceProgram({super.key});
7+
8+
@override
9+
State<DjangonautSpaceProgram> createState() => _DjangonautSpaceProgramState();
10+
}
11+
12+
class _DjangonautSpaceProgramState extends State<DjangonautSpaceProgram> {
13+
bool isBookmarked = true;
14+
String currectPage = "/DjangonautSpaceProgram";
15+
String currentProject = "Djangonaut Space Program";
16+
17+
@override
18+
void initState() {
19+
super.initState();
20+
_checkBookmarkStatus();
21+
}
22+
23+
Future<void> _checkBookmarkStatus() async {
24+
bool bookmarkStatus = await HandleBookmark.isBookmarked(currentProject);
25+
setState(() {
26+
isBookmarked = bookmarkStatus;
27+
});
28+
}
29+
30+
Future<void> _refresh() async {
31+
setState(() {});
32+
}
33+
34+
@override
35+
Widget build(BuildContext context) {
36+
double screenWidth = MediaQuery.of(context).size.width;
37+
double gap = screenWidth * 0.05;
38+
double pad = screenWidth * 0.04;
39+
double titleSize = screenWidth * 0.05;
40+
double contentSize = screenWidth * 0.04;
41+
42+
return RefreshIndicator(
43+
onRefresh: _refresh,
44+
child: Scaffold(
45+
appBar: AppBar(
46+
leading: IconButton(
47+
icon: const Icon(Icons.arrow_back_ios),
48+
onPressed: () => Navigator.of(context).pop(),
49+
),
50+
centerTitle: true,
51+
title: const Text('Djangonaut Space Program'),
52+
actions: [
53+
IconButton(
54+
icon: Icon(
55+
isBookmarked
56+
? Icons.bookmark_add_rounded
57+
: Icons.bookmark_add_outlined,
58+
),
59+
onPressed: () {
60+
setState(() {
61+
isBookmarked = !isBookmarked;
62+
});
63+
ScaffoldMessenger.of(context).showSnackBar(
64+
SnackBar(
65+
content: Text(
66+
isBookmarked ? 'Bookmark added' : 'Bookmark removed'),
67+
duration: const Duration(seconds: 2),
68+
),
69+
);
70+
if (isBookmarked) {
71+
HandleBookmark.addBookmark(currentProject, currectPage);
72+
} else {
73+
HandleBookmark.deleteBookmark(currentProject);
74+
}
75+
},
76+
)
77+
],
78+
),
79+
body: SingleChildScrollView(
80+
padding: EdgeInsets.all(pad),
81+
child: Column(
82+
crossAxisAlignment: CrossAxisAlignment.start,
83+
children: [
84+
Text(
85+
'Become a Djangonaut and Explore the Open Source Universe!',
86+
style: TextStyle(
87+
fontSize: titleSize,
88+
fontWeight: FontWeight.bold,
89+
),
90+
),
91+
SizedBox(height: pad),
92+
Text(
93+
'The Djangonaut Space Program is a community-driven initiative that helps newcomers and enthusiasts contribute to the Django ecosystem. Whether you’re a beginner or an experienced dev, Djangonauts will guide you through real-world contributions and mentorship in Django.',
94+
style: TextStyle(fontSize: contentSize, height: 1.5),
95+
),
96+
SizedBox(height: pad * 1.5),
97+
Row(
98+
children: [
99+
ElevatedButton(
100+
style: ElevatedButton.styleFrom(
101+
backgroundColor: Colors.deepPurple,
102+
foregroundColor: Colors.white,
103+
),
104+
onPressed: () async {
105+
await _launchUrl("https://djangonaut.space/");
106+
},
107+
child: const Text("Website"),
108+
),
109+
SizedBox(width: gap),
110+
ElevatedButton(
111+
onPressed: () async {
112+
await _launchUrl("https://github.com/djangonaut-space/program/blob/main/README.md");
113+
},
114+
child: const Text("About Djangonaut"),
115+
),
116+
],
117+
),
118+
SizedBox(height: pad * 2),
119+
Text(
120+
'How to Get Started with Djangonaut Program',
121+
style: TextStyle(
122+
fontSize: titleSize,
123+
fontWeight: FontWeight.bold,
124+
),
125+
),
126+
SizedBox(height: pad),
127+
Text(
128+
'1. Visit the Django GitHub organization.\n'
129+
'2. Look for beginner-friendly issues with labels like "good first issue".\n'
130+
'3. Join the Django Forum and IRC channels for guidance.\n'
131+
'4. Start contributing and submit your PRs for review!',
132+
style: TextStyle(fontSize: contentSize, height: 1.8),
133+
),
134+
SizedBox(height: pad * 2),
135+
Text(
136+
'Mentorship in the Program',
137+
style: TextStyle(
138+
fontSize: titleSize,
139+
fontWeight: FontWeight.bold,
140+
),
141+
),
142+
SizedBox(height: pad),
143+
Text(
144+
'The program pairs experienced Django contributors with mentees to help them navigate:\n\n'
145+
'• The Django codebase\n'
146+
'• Contribution guidelines and standards\n'
147+
'• Submitting quality patches\n'
148+
'• Building confidence as a contributor',
149+
style: TextStyle(fontSize: contentSize, height: 1.6),
150+
),
151+
SizedBox(height: pad * 2),
152+
Text(
153+
'What Can You Contribute To?',
154+
style: TextStyle(
155+
fontSize: titleSize,
156+
fontWeight: FontWeight.bold,
157+
),
158+
),
159+
SizedBox(height: pad),
160+
Text(
161+
'As part of the Djangonaut Space Program, contributors can work on projects like Django, Django CMS, and Django Debug Toolbar. '
162+
'Session organizers guide contributors based on their skills and interests to ensure meaningful contributions across these projects.',
163+
style: TextStyle(fontSize: contentSize, height: 1.6),
164+
),
165+
SizedBox(height: pad * 2),
166+
Center(
167+
child: ElevatedButton(
168+
onPressed: () {
169+
_launchUrl('https://djangonaut.space/sessions/');
170+
},
171+
child: const Text('Explore Sessions'),
172+
),
173+
),
174+
],
175+
),
176+
),
177+
),
178+
);
179+
}
180+
181+
Future<void> _launchUrl(String url) async {
182+
final Uri uri = Uri.parse(url);
183+
if (!await launchUrl(uri)) {
184+
throw Exception('Could not launch $url');
185+
}
186+
}
187+
}

pubspec.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ packages:
9393
dependency: transitive
9494
description:
9595
name: collection
96-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
96+
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
9797
url: "https://pub.dev"
9898
source: hosted
99-
version: "1.18.0"
99+
version: "1.19.0"
100100
convert:
101101
dependency: transitive
102102
description:
@@ -300,18 +300,18 @@ packages:
300300
dependency: transitive
301301
description:
302302
name: leak_tracker
303-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
303+
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
304304
url: "https://pub.dev"
305305
source: hosted
306-
version: "10.0.5"
306+
version: "10.0.7"
307307
leak_tracker_flutter_testing:
308308
dependency: transitive
309309
description:
310310
name: leak_tracker_flutter_testing
311-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
311+
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
312312
url: "https://pub.dev"
313313
source: hosted
314-
version: "3.0.5"
314+
version: "3.0.8"
315315
leak_tracker_testing:
316316
dependency: transitive
317317
description:
@@ -492,7 +492,7 @@ packages:
492492
dependency: transitive
493493
description: flutter
494494
source: sdk
495-
version: "0.0.99"
495+
version: "0.0.0"
496496
source_span:
497497
dependency: transitive
498498
description:
@@ -505,10 +505,10 @@ packages:
505505
dependency: transitive
506506
description:
507507
name: stack_trace
508-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
508+
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
509509
url: "https://pub.dev"
510510
source: hosted
511-
version: "1.11.1"
511+
version: "1.12.0"
512512
stream_channel:
513513
dependency: transitive
514514
description:
@@ -521,10 +521,10 @@ packages:
521521
dependency: transitive
522522
description:
523523
name: string_scanner
524-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
524+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
525525
url: "https://pub.dev"
526526
source: hosted
527-
version: "1.2.0"
527+
version: "1.3.0"
528528
term_glyph:
529529
dependency: transitive
530530
description:
@@ -537,10 +537,10 @@ packages:
537537
dependency: transitive
538538
description:
539539
name: test_api
540-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
540+
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
541541
url: "https://pub.dev"
542542
source: hosted
543-
version: "0.7.2"
543+
version: "0.7.3"
544544
timeline_tile:
545545
dependency: "direct main"
546546
description:
@@ -657,10 +657,10 @@ packages:
657657
dependency: transitive
658658
description:
659659
name: vm_service
660-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
660+
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
661661
url: "https://pub.dev"
662662
source: hosted
663-
version: "14.2.5"
663+
version: "14.3.0"
664664
web:
665665
dependency: transitive
666666
description:

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ flutter:
102102
- assets/fossasia.png
103103
- assets/sokde.png
104104
- assets/redox.png
105+
- assets/djangonaut.png
105106
- assets/hacktoberfest.png
106107
- assets/hyperledger.png
107108
- assets/xyz_domain.png

0 commit comments

Comments
 (0)