diff --git a/About BBSS/About BBSS.xcodeproj/project.pbxproj b/About BBSS/About BBSS.xcodeproj/project.pbxproj index 5c85e40..451e412 100644 --- a/About BBSS/About BBSS.xcodeproj/project.pbxproj +++ b/About BBSS/About BBSS.xcodeproj/project.pbxproj @@ -283,7 +283,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 15.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "club.bbsshack.About-BBSS"; + PRODUCT_BUNDLE_IDENTIFIER = "club.bbsshack.About-bbss"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = auto; @@ -324,7 +324,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 15.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "club.bbsshack.About-BBSS"; + PRODUCT_BUNDLE_IDENTIFIER = "club.bbsshack.About-bbss"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = auto; diff --git a/About BBSS/About BBSS.xcodeproj/project.xcworkspace/xcuserdata/tkrobot.xcuserdatad/UserInterfaceState.xcuserstate b/About BBSS/About BBSS.xcodeproj/project.xcworkspace/xcuserdata/tkrobot.xcuserdatad/UserInterfaceState.xcuserstate index b12bc76..f76c2a6 100644 Binary files a/About BBSS/About BBSS.xcodeproj/project.xcworkspace/xcuserdata/tkrobot.xcuserdatad/UserInterfaceState.xcuserstate and b/About BBSS/About BBSS.xcodeproj/project.xcworkspace/xcuserdata/tkrobot.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/About BBSS/About BBSS/About BBSS Section/AboutBBSSView.swift b/About BBSS/About BBSS/About BBSS Section/AboutBBSSView.swift index 707186c..0f31a6a 100644 --- a/About BBSS/About BBSS/About BBSS Section/AboutBBSSView.swift +++ b/About BBSS/About BBSS/About BBSS Section/AboutBBSSView.swift @@ -13,13 +13,18 @@ struct AboutBBSSView: View { .resizable() .scaledToFit() .frame(width: 400, height: 200) - .padding(.top, 30) + Image("Sideshow_1") + .resizable() + .scaledToFit() + .frame(width: 400, height: 200) + + Text("Our Vision") .font(.title) .fontWeight(.bold) - .padding(.top, 20) + Text("Bukit Batok Secondary School is a premier school that provides quality holistic education to every BBSSian.") .font(.body) .padding(.horizontal, 20) diff --git a/About BBSS/About BBSS/About BBSS Section/AcademicView.swift b/About BBSS/About BBSS/About BBSS Section/AcademicView.swift index e656786..a7b884c 100644 --- a/About BBSS/About BBSS/About BBSS Section/AcademicView.swift +++ b/About BBSS/About BBSS/About BBSS Section/AcademicView.swift @@ -19,7 +19,7 @@ struct AcademicView: View { .fontWeight(.bold) .foregroundColor(Color(UIColor(red: 100/255, green: 80/255, blue: 20/255, alpha: 1.0))) - Text("In BBSS, the following subjects are offered as 'O' / 'N(A)' / 'N(T)' level examinable subjects, grouped by department.") + Text("In BBSS, the following subjects are offered as 'O' / 'N(A)' / 'N(T)' level examinable subjects.") .font(.headline) .foregroundColor(.gray) } diff --git a/About BBSS/About BBSS/About BBSS Section/CCA'S/ClubAndSocietyView.swift b/About BBSS/About BBSS/About BBSS Section/CCA'S/ClubAndSocietyView.swift index d48e72c..d4fbf9b 100644 --- a/About BBSS/About BBSS/About BBSS Section/CCA'S/ClubAndSocietyView.swift +++ b/About BBSS/About BBSS/About BBSS Section/CCA'S/ClubAndSocietyView.swift @@ -41,10 +41,14 @@ struct ClubAndSocietyView: View { NavigationLink(destination: OneEarthClubView()) { ClubButton(title: "One Earth Club") } - NavigationLink(destination: DramaAndDebateView()) { - ClubButton(title: "English Language Drama & Debating") + NavigationLink(destination: GymView()){ + ClubButton(title: "Gym Club") + } + } + + } } } @@ -131,3 +135,22 @@ struct DramaAndDebateView: View { } } + +struct GymView: View { + var body: some View { + NavigationStack { + ZStack { + Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) + .ignoresSafeArea() + + WebView(url: URL(string: "https://www.bukitbatoksec.moe.edu.sg/clubs/gym-club/")!) + } + .navigationTitle("Robotics Club Website") + .foregroundColor(Color.black) + .navigationBarTitleDisplayMode(.inline) + } + } +} + + + diff --git a/About BBSS/About BBSS/About BBSS Section/CCA'S/Uniformed Groups.swift b/About BBSS/About BBSS/About BBSS Section/CCA'S/Uniformed Groups.swift index 2e48ac7..dc3a13a 100644 --- a/About BBSS/About BBSS/About BBSS Section/CCA'S/Uniformed Groups.swift +++ b/About BBSS/About BBSS/About BBSS Section/CCA'S/Uniformed Groups.swift @@ -14,10 +14,30 @@ struct UniformedGroupsView: View { .padding(.top, 40) HStack(spacing: 20) { NavigationLink(destination: NCCLandView()) { - ClubButton(title: "NCC (Land)") +// ClubButton(title: " ***NCC (Land) *** + NCC (Sea)") + Text("`NCC (Land)` + NCC (Sea)") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + .padding(.horizontal) + } NavigationLink(destination: NCCSeaView()) { - ClubButton(title: "NCC (Sea)") +// ClubButton(title: "NCC (Land) + ***NCC (Sea)*** ") + Text("NCC (Land) + `NCC (Sea)`") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + .padding(.horizontal) + } } HStack(spacing: 20) { diff --git a/About BBSS/About BBSS/About BBSS Section/CCA'S/Visual and Performing Arts.swift b/About BBSS/About BBSS/About BBSS Section/CCA'S/Visual and Performing Arts.swift index adf2d31..7a33713 100644 --- a/About BBSS/About BBSS/About BBSS Section/CCA'S/Visual and Performing Arts.swift +++ b/About BBSS/About BBSS/About BBSS Section/CCA'S/Visual and Performing Arts.swift @@ -7,7 +7,7 @@ struct VisualArts: View { Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) .ignoresSafeArea() VStack(spacing: 30) { - Text("Visual and Performing Arts") + Text("Performing Arts") .font(.largeTitle) .bold() .foregroundColor(Color.black) @@ -32,6 +32,11 @@ struct VisualArts: View { NavigationLink(destination:MalayDanceView()){ ClubButton(title: "Malay Dance") } + + NavigationLink(destination: DramaAndDebateView()) { + ClubButton(title: "English Language Drama & Debating") + } + } } } diff --git a/About BBSS/About BBSS/About BBSS Section/CCAView.swift b/About BBSS/About BBSS/About BBSS Section/CCAView.swift index 8c4c49b..baf126a 100644 --- a/About BBSS/About BBSS/About BBSS Section/CCAView.swift +++ b/About BBSS/About BBSS/About BBSS Section/CCAView.swift @@ -7,73 +7,64 @@ struct CCAView: View { .ignoresSafeArea() VStack { - Spacer() - Text("CCA'S") .font(.title) .fontWeight(.bold) .padding() - Spacer() - - NavigationLink(destination: SportsView()){ - Text("Sports & Games") - .font(.title2) - .fontWeight(.bold) - .foregroundColor(.white) - .padding(25) - .frame(maxWidth: .infinity) - .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) - .cornerRadius(30) - } - .padding(.horizontal, 40) - - - NavigationLink(destination: UniformedGroupsView()){ - Text("Uniformed Groups") - .font(.title2) - .fontWeight(.bold) - .foregroundColor(.white) - .padding(25) - .frame(maxWidth: .infinity) - .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) - .cornerRadius(30) - } - .padding(.horizontal, 40) - - - - NavigationLink(destination: VisualArts()) { - Text("Visual and Performing Arts") - .font(.title2) - .fontWeight(.bold) - .foregroundColor(.white) - .padding(25) - .frame(maxWidth: .infinity) - .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) - .cornerRadius(30) - } - .padding(.horizontal, 40) - - - - NavigationLink(destination: ClubAndSocietyView()) { - Text("Clubs and Societies") - .font(.title2) - .fontWeight(.bold) - .foregroundColor(.white) - .padding(25) - .frame(maxWidth: .infinity) - .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) - .cornerRadius(30) - + VStack(spacing: 20) { + // First row + HStack(spacing: 20) { + NavigationLink(destination: SportsView()){ + Text("Sports & Games") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + } + + NavigationLink(destination: UniformedGroupsView()){ + Text("Uniformed Groups") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + } + } + // Second row + HStack(spacing: 20) { + NavigationLink(destination: VisualArts()) { + Text("Performing Arts") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + } + + NavigationLink(destination: ClubAndSocietyView()) { + Text("Clubs and Societies") + .font(.title2) + .fontWeight(.bold) + .foregroundColor(.white) + .padding(25) + .frame(maxWidth: .infinity) + .background(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .cornerRadius(30) + } + } } .padding(.horizontal, 40) - - Spacer() } } } } - diff --git a/About BBSS/About BBSS/About BBSS Section/HolisticView.swift b/About BBSS/About BBSS/About BBSS Section/HolisticView.swift index be62211..b31a02f 100644 --- a/About BBSS/About BBSS/About BBSS Section/HolisticView.swift +++ b/About BBSS/About BBSS/About BBSS Section/HolisticView.swift @@ -42,34 +42,40 @@ struct HolisticView: View { var body: some View { NavigationStack { ScrollView { - VStack(spacing: 30) { // Increased spacing + VStack(spacing: 10) { // Keep main stack spacing Text("Holistic Programmes") - .font(.system(size: 40, weight: .bold)) // Increased size + .font(.system(size: 40, weight: .bold)) .frame(maxWidth: .infinity, alignment: .leading) .padding() - ProgramCard( - title: "Applied Learning Programme", - description: "Developing Proactive Problem-Solvers through Robot Building, Coding & Programming! The Applied Learning Programme in BBSS focuses on developing each student to be a empathetic and active problem solver by utilising the mBot platform as a way to get students familiar with logical problem solving skills. This programme is compulsory for all secondary 1 and 2 students as part of their time in BBSS!", - imageName: "Image 1", - websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/applied-learning-programme/" - ) - - ProgramCard( - title: "Learning for Life Programme", - description: "The BBSS Learning for Life Programme (LLP) focuses on Community Youth Leadership, offering students opportunities to develop leadership and values through community service. Supported by the Habits of Mind Programme, the LLP includes two tiers: broad-based opportunities for all students (Tier 1) and specialized experiences for those with higher interest and ability (Tier 2). These tiers involve three stages where students discover their strengths, develop leadership skills, and lead their peers.", - imageName: "Image", - websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/learning-for-life-programme-llp/" - ) - - ProgramCard( - title: "Habits of Mind", - description: "Habits of Mind is a framework that helps students develop intelligent behaviors and critical thinking skills for solving problems. The program teaches 16 essential habits including persisting, managing impulsivity, listening with understanding and empathy, thinking flexibly, and striving for accuracy. Through this program, students learn to approach challenges thoughtfully and develop lifelong learning skills that will benefit them in academic and real-world situations.", - imageName: "HOM BANNER 2", - websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/habits-of-mind/" - ) + // Add horizontal padding to the cards container + VStack(spacing: 50) { // Increased spacing between cards to 40 + ProgramCard( + title: "Applied Learning Programme", + description: "Developing Proactive Problem-Solvers through Robot Building, Coding & Programming! The Applied Learning Programme in BBSS focuses on developing each student to be a empathetic and active problem solver by utilising the mBot platform as a way to get students familiar with logical problem solving skills. This programme is compulsory for all secondary 1 and 2 students as part of their time in BBSS!", + imageName: "Image 1", + websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/applied-learning-programme/" + ) + .padding(.horizontal, 50) // Add horizontal padding to each card + + ProgramCard( + title: "Learning for Life Programme", + description: "The BBSS Learning for Life Programme (LLP) focuses on Community Youth Leadership, offering students opportunities to develop leadership and values through community service. Supported by the Habits of Mind Programme, the LLP includes two tiers: broad-based opportunities for all students (Tier 1) and specialized experiences for those with higher interest and ability (Tier 2). These tiers involve three stages where students discover their strengths, develop leadership skills, and lead their peers.", + imageName: "Image", + websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/learning-for-life-programme-llp/" + ) + .padding(.horizontal, 50) + + ProgramCard( + title: "Habits of Mind", + description: "Habits of Mind is a framework that helps students develop intelligent behaviors and critical thinking skills for solving problems. The program teaches 16 essential habits including persisting, managing impulsivity, listening with understanding and empathy, thinking flexibly, and striving for accuracy. Through this program, students learn to approach challenges thoughtfully and develop lifelong learning skills that will benefit them in academic and real-world situations.", + imageName: "HOM BANNER 2", + websiteURL: "https://www.bukitbatoksec.moe.edu.sg/our-bbss-experience/Key-Programmes/habits-of-mind/" + ) + .padding(.horizontal, 50) + } + .padding(.bottom, 40) // Add bottom padding for last card } - .padding() } .background( Color(red: 250/255, green: 240/255, blue: 180/255) diff --git a/About BBSS/About BBSS/About BBSS Section/IntrestGroupView.swift b/About BBSS/About BBSS/About BBSS Section/IntrestGroupView.swift index 2c1b468..5c10a6f 100644 --- a/About BBSS/About BBSS/About BBSS Section/IntrestGroupView.swift +++ b/About BBSS/About BBSS/About BBSS Section/IntrestGroupView.swift @@ -1,36 +1,63 @@ import SwiftUI - -struct IntrestGroupView: View { - var body: some View { - ZStack { - Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) - .ignoresSafeArea() - VStack(spacing: 30) { - Text("Interest Groups!") - .font(.largeTitle) - .bold() - .padding(.top, 40) - HStack(spacing: 20) { - ClubButton(title: "MakerSpace") - ClubButton(title: "Model United Nations Intrest Group") - } - HStack(spacing: 20) { - ClubButton(title: "Gym Club") - ClubButton(title: "Band Intrest Group") - } - HStack(spacing: 20) { - NavigationLink(destination: HackClubView()){ - HackButton(title: "Hack Club") - } - ClubButton(title: "Crochet SIL Interest Group") - } - - } - } - } - -} - +// +//struct IntrestGroupView: View { +// var body: some View { +// ZStack { +// Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) +// .ignoresSafeArea() +// VStack(spacing: 30) { +// Text("Interest Groups!") +// .font(.largeTitle) +// .bold() +// .padding(.top, 40) +// HStack(spacing: 20) { +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "Dikir Barat") +// } +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "Handball") +// } +// } +// HStack(spacing: 20) { +// NavigationLink(destination: GymView()){ +// +// ClubButton(title: "Gym Club") +// } +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "Football") +// } +// } +// HStack(spacing: 20) { +// NavigationLink(destination: HackClubView()){ +// HackButton(title: "Hack Club") +// } +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "YiBBSS") +// } +// } +// HStack(spacing:20){ +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "iYuedo") +// } +// NavigationLink(destination: GenericSilView()){ +// +// ClubButton(title: "Esports") +// } +// +// } +// +// +// } +// } +// } +// +//} +// struct HackClubView: View { var body: some View { NavigationStack { @@ -46,8 +73,8 @@ struct HackClubView: View { } } } - - +// +// struct HackButton: View { var title: String @@ -62,4 +89,151 @@ struct HackButton: View { .cornerRadius(30) .padding(.horizontal) } -} +} +// +// +//struct GenericSilView: View { +// var body: some View { +// NavigationStack { +// ZStack { +// Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) +// .ignoresSafeArea() +// +// WebView(url: URL(string:"https://bbss.padlet.org/ng_boon_chong/sil-showcases-and-featured-walls-of-abundance-6yto4xn5ahqw6yvr")!) +// } +// .navigationTitle("See their progress!") +// .foregroundColor(Color.black) +// .navigationBarTitleDisplayMode(.inline) +// } +// } +//} +//struct GymView: View { +// var body: some View { +// NavigationStack { +// ZStack { +// Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) +// .ignoresSafeArea() +// +// WebView(url: URL(string:"https://www.bukitbatoksec.moe.edu.sg/clubs/gym-club/")!) +// } +// .navigationTitle("Gym Club!") +// .foregroundColor(Color.black) +// .navigationBarTitleDisplayMode(.inline) +// } +// } +//} +// +//#Preview{ +// IntrestGroupView() +//} + +struct InterestCard: View { + let title: String + let description: String + let imageName: String + let websiteURL: String + + var body: some View { + NavigationLink(destination: WebView(url: URL(string: websiteURL)!) + .navigationTitle(title) + .navigationBarTitleDisplayMode(.inline)) { + VStack(alignment: .center, spacing: 10) { if !imageName.isEmpty { + Image(imageName) + .resizable() + .scaledToFit() + .frame(height: 300) // Fixed height for images + .cornerRadius(12) + } + + Text(title) + .font(.title2) + .bold() + .foregroundColor(.white) + + Text(description) + .font(.body) + .foregroundColor(.white.opacity(0.9)) + .fixedSize(horizontal: false, vertical: false) + } + .padding() + .background( + RoundedRectangle(cornerRadius: 16) + .fill(Color(UIColor(red: 152/255, green: 29/255, blue: 32/255, alpha: 1.0))) + .shadow(radius: 4) + ) + } + } +} + + +import SwiftUI + +struct IntrestGroupView: View { + var body: some View { + NavigationStack { + ScrollView { + VStack(spacing: 20) { // Adjust spacing as needed + Text("Interest Groups") + .font(.system(size: 40, weight: .bold)) + .frame(maxWidth: .infinity, alignment: .leading) + .padding() + + // Card Container + VStack(spacing: 30) { // Space between cards + InterestCard( + title: "Hack Club BBSS", + description: "Take an idea you're interested in and bring it to Life. Empowering BBSS-ions with technology since 2024. Click here to view our website!", + imageName: "logo-Photoroom", + websiteURL: "https://dev.bbsshack.club/" + ) + + InterestCard( + title: "Dikir Barat", + description: "Dikir Barat is a traditional Malaysian musical and performance art form, often involving a seated chorus and a lead vocalist (tukang karut)...", + imageName: "", + websiteURL: "https://www.bukitbatoksec.moe.edu.sg/" + ) + +// InterestCard( +// title: "Handball", +// description: "Handball is a fast-paced team sport where two teams of seven players each aim to score by throwing a ball into the opposing team’s goal...", +// imageName: "", +// websiteURL: "https://www.bukitbatoksec.moe.edu.sg/" +// ) + + InterestCard( + title: "Football", + description: "Football!", + imageName: "interest2", + websiteURL: "https://www.bukitbatoksec.moe.edu.sg/" + ) + + InterestCard( + title: "ViBBSS", + description: "Interest Group dedicated to posting memes on instagram. Click this card to view it!", + imageName: "Image 2", + websiteURL: "https://www.instagram.com/vi.bbss/?hl=en" + ) + + InterestCard( + title: "iYuedo", + description: "Chinese Quote posting account. Click this card to view it!", + imageName: "Image 3", + websiteURL: "https://www.instagram.com/iyuedo/?hl=en" + ) + } + .padding(.horizontal, 20) // Add horizontal padding for cards + .padding(.bottom, 40) // Bottom padding for last card + } + } + .background(Color(red: 250/255, green: 240/255, blue: 180/255).ignoresSafeArea()) + } + } +} + + +#Preview { + IntrestGroupView() +} + + diff --git a/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Contents.json b/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Contents.json new file mode 100644 index 0000000..17f6fd9 --- /dev/null +++ b/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Image.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Image.png b/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Image.png new file mode 100644 index 0000000..802d72b Binary files /dev/null and b/About BBSS/About BBSS/Assets.xcassets/Image 2.imageset/Image.png differ diff --git a/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Contents.json b/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Contents.json new file mode 100644 index 0000000..17f6fd9 --- /dev/null +++ b/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Image.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Image.png b/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Image.png new file mode 100644 index 0000000..dd69ac5 Binary files /dev/null and b/About BBSS/About BBSS/Assets.xcassets/Image 3.imageset/Image.png differ diff --git a/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Contents.json b/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Contents.json new file mode 100644 index 0000000..17f6fd9 --- /dev/null +++ b/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Image.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Image.png b/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Image.png new file mode 100644 index 0000000..667c451 Binary files /dev/null and b/About BBSS/About BBSS/Assets.xcassets/interest1.imageset/Image.png differ diff --git a/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Contents.json b/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Contents.json new file mode 100644 index 0000000..17f6fd9 --- /dev/null +++ b/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Image.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Image.png b/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Image.png new file mode 100644 index 0000000..8257fca Binary files /dev/null and b/About BBSS/About BBSS/Assets.xcassets/interest2.imageset/Image.png differ diff --git a/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/Contents.json b/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/Contents.json new file mode 100644 index 0000000..bfc9bb5 --- /dev/null +++ b/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "logo-Photoroom.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/logo-Photoroom.png b/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/logo-Photoroom.png new file mode 100644 index 0000000..b32a461 Binary files /dev/null and b/About BBSS/About BBSS/Assets.xcassets/logo-Photoroom.imageset/logo-Photoroom.png differ diff --git a/About BBSS/About BBSS/ContentView.swift b/About BBSS/About BBSS/ContentView.swift index 3e8ef42..3871379 100644 --- a/About BBSS/About BBSS/ContentView.swift +++ b/About BBSS/About BBSS/ContentView.swift @@ -7,21 +7,24 @@ struct ContentView: View { var body: some View { NavigationStack { ZStack { - Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) + Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) .ignoresSafeArea() VStack { - Image("BBSS") - .resizable() - .scaledToFit() - .frame(width: 300, height: 300) - .padding(.top, 50) + NavigationLink(destination:propoganda()){ + Image("BBSS") + .resizable() + .scaledToFit() + .frame(width: 300, height: 300) + .padding(.top, 50) + .shadow(radius: 20) + } Spacer() HStack(spacing: 20) { // Reduced space between buttons Spacer() - + NavigationLink(destination: AboutBBSSView()) { Text("About BBSS") .font(.title2) @@ -44,14 +47,17 @@ struct ContentView: View { .cornerRadius(20) } Spacer() - + } .padding(.top, 20) // Added padding to top for better spacing Spacer() - NavigationLink(destination: TriviaQuizView()) { - Text("Trivia Quiz!") + // NavigationLink(destination: TriviaQuizView()) { + + NavigationLink(destination: FeedBack()) { + + Text("Feedback!") .font(.title2) .fontWeight(.bold) .foregroundColor(.white) @@ -89,7 +95,7 @@ struct ContentView: View { } } } -// .navigationTitle("Main Page") + // .navigationTitle("Main Page") } .foregroundColor(.black) .environmentObject(navigationManager) @@ -99,3 +105,38 @@ struct ContentView: View { #Preview{ ContentView() } + + + +struct propoganda: View { + var body: some View { + NavigationStack { + ZStack { + Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) + .ignoresSafeArea() + + WebView(url: URL(string:"https://www.moe.gov.sg/schoolfinder/schooldetail?schoolname=bukit-batok-secondary-school")!) + } + .navigationTitle("BBSS") + .foregroundColor(Color.black) + .navigationBarTitleDisplayMode(.inline) + } + } +} + + +struct FeedBack: View { + var body: some View { + NavigationStack { + ZStack { + Color(UIColor(red: 250/255, green: 240/255, blue: 180/255, alpha: 1.0)) + .ignoresSafeArea() + + WebView(url: URL(string:"https://docs.google.com/forms/d/11EIaaQngAFi9lIY8X2p1YzdfFGoUKArIyZZ4KjiaI3c/viewform")!) + } + .navigationTitle("BBSS") + .foregroundColor(Color.black) + .navigationBarTitleDisplayMode(.inline) + } + } +} diff --git a/About BBSS/About BBSS/Navigation Section/HowToGetToBBSSView.swift b/About BBSS/About BBSS/Navigation Section/HowToGetToBBSSView.swift index 4cdff5b..43cf0bf 100644 --- a/About BBSS/About BBSS/Navigation Section/HowToGetToBBSSView.swift +++ b/About BBSS/About BBSS/Navigation Section/HowToGetToBBSSView.swift @@ -2,18 +2,37 @@ import SwiftUI import MapKit import Foundation +// Custom Annotation Class +class FoodEstablishmentAnnotation: NSObject, MKAnnotation { + var coordinate: CLLocationCoordinate2D + var title: String? + + init(coordinate: CLLocationCoordinate2D, title: String) { + self.coordinate = coordinate + self.title = title + } +} + struct MapView: UIViewRepresentable { let coordinate = CLLocationCoordinate2D(latitude: 1.348628792170563, longitude: 103.7405316243571) - - let Field = CLLocationCoordinate2D(latitude: 1.3493218409464067, longitude: 103.74000762974674) - let PEPSbus = CLLocationCoordinate2D(latitude: 1.349778088339879, longitude: 103.74138942773084) - let PEPSoppbus = CLLocationCoordinate2D(latitude: 1.3499657385826525, longitude: 103.74096039545378) - let schlbus = CLLocationCoordinate2D(latitude: 1.3470962592069924, longitude: 103.7411245591305) - let schloppbuss = CLLocationCoordinate2D(latitude: 1.3469047797075866, longitude: 103.74106326878132) - + + // Food Establishment Coordinates + let Alfatah = CLLocationCoordinate2D(latitude: 1.3485823153032095, longitude: 103.74197408232882) + let McDonalds = CLLocationCoordinate2D(latitude: 1.3479143314175663, longitude: 103.74431436560764) + let Dominos = CLLocationCoordinate2D(latitude: 1.3483060111765586, longitude: 103.74425428286476) + let ITea = CLLocationCoordinate2D(latitude: 1.3477100651294638, longitude: 103.743946168088) + let Canadian241pizza = CLLocationCoordinate2D(latitude: 1.3478063173068207, longitude: 103.74280264385838) + let PizzaHut = CLLocationCoordinate2D(latitude: 1.3472991786972133, longitude: 103.74297254236457) + let SevenTEA = CLLocationCoordinate2D(latitude: 1.3487529888946135, longitude: 103.74318676617007) + let EachACup = CLLocationCoordinate2D(latitude: 1.3477872278938567, longitude: 103.74446509627695) + let WestMall = CLLocationCoordinate2D(latitude: 1.3502066592704436, longitude: 103.74943757765129) + let LeQuest = CLLocationCoordinate2D(latitude: 1.355998581681571, longitude: 103.74113113318512) + @Binding var isShowingBusTimingSheet: Bool @Binding var selectedBusStopCode: String - + @Binding var isShowingPopover: Bool + @Binding var selectedFoodEstablishment: String + func makeCoordinator() -> Coordinator { Coordinator(self) } @@ -25,41 +44,49 @@ struct MapView: UIViewRepresentable { let region = MKCoordinateRegion(center: coordinate, latitudinalMeters: 1000, longitudinalMeters: 1000) mapView.setRegion(region, animated: true) + + // Adding Annotations for Food Establishments + let foodEstablishments: [(coordinate: CLLocationCoordinate2D, title: String)] = [ + (Alfatah, "Alfatah Store"), + (McDonalds, "McDonalds"), + (Dominos, "Domino's Pizza"), + (ITea, "I Tea"), + (Canadian241pizza, "Canadian 241 Pizza"), + (PizzaHut, "Pizza Hut"), + (SevenTEA, "Seven TEA"), + (EachACup, "Each A Cup"), + (WestMall, "West Mall"), + (LeQuest, "Le Quest") + ] - let annotation = MKPointAnnotation() - annotation.coordinate = coordinate - annotation.title = "Bukit Batok Secondary School" - mapView.addAnnotation(annotation) - - let Fieldm = MKPointAnnotation() - Fieldm.coordinate = Field - Fieldm.title = "Our Field" - mapView.addAnnotation(Fieldm) - - let pepb = MKPointAnnotation() - pepb.coordinate = PEPSbus - pepb.title = "Princess E Pr Sch Bus Stop" - pepb.subtitle = "43531" - mapView.addAnnotation(pepb) - - let pepob = MKPointAnnotation() - pepob.coordinate = PEPSoppbus - pepob.title = "Opp Princess E Pr Sch Bus Stop" - pepob.subtitle = "43349" - mapView.addAnnotation(pepob) - - let schb = MKPointAnnotation() - schb.coordinate = schlbus - schb.title = "Blk 168 Bus Stop" - schb.subtitle = "43351" - mapView.addAnnotation(schb) - - let schlob = MKPointAnnotation() - schlob.coordinate = schloppbuss - schlob.title = "Blk 169 Bus Stop" - schlob.subtitle = "43359" - mapView.addAnnotation(schlob) + for food in foodEstablishments { + let foodAnnotation = FoodEstablishmentAnnotation(coordinate: food.coordinate, title: food.title) + mapView.addAnnotation(foodAnnotation) + } + + // Adding Annotations for Bus Stops + let busAnnotations: [(coordinate: CLLocationCoordinate2D, title: String, subtitle: String?)] = [ + (CLLocationCoordinate2D(latitude: 1.3493218409464067, longitude: 103.74000762974674), "Our Field", "43531"), + (CLLocationCoordinate2D(latitude: 1.349778088339879, longitude: 103.74138942773084), "Princess E Pr Sch Bus Stop", "43349"), + (CLLocationCoordinate2D(latitude: 1.3499657385826525, longitude: 103.74096039545378), "Opp Princess E Pr Sch Bus Stop", "43349"), + (CLLocationCoordinate2D(latitude: 1.3470962592069924, longitude: 103.7411245591305), "Blk 168 Bus Stop", "43351"), + (CLLocationCoordinate2D(latitude: 1.3469047797075866, longitude: 103.74106326878132), "Blk 169 Bus Stop", "43359") + ] + for busAnnotation in busAnnotations { + let busPoint = MKPointAnnotation() + busPoint.coordinate = busAnnotation.coordinate + busPoint.title = busAnnotation.title + busPoint.subtitle = busAnnotation.subtitle + mapView.addAnnotation(busPoint) + } + + // Adding BBSS Annotation + let bbssAnnotation = MKPointAnnotation() + bbssAnnotation.coordinate = coordinate + bbssAnnotation.title = "Bukit Batok Secondary School" + mapView.addAnnotation(bbssAnnotation) + return mapView } @@ -75,29 +102,89 @@ struct MapView: UIViewRepresentable { } func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) { - if let title = view.annotation?.title, title == "Bukit Batok Secondary School" { - let destination = MKMapItem(placemark: MKPlacemark(coordinate: view.annotation!.coordinate)) - destination.name = "Bukit Batok Secondary School" - destination.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving]) - } else if let subtitle = view.annotation?.subtitle, let busStopCode = subtitle { - parent.selectedBusStopCode = busStopCode - parent.isShowingBusTimingSheet = true + if let title = view.annotation?.title { + if title == "Alfatah Store" { + // Show popover with information for Alfatah + parent.selectedFoodEstablishment = title ?? "potato" + parent.isShowingPopover = true + } else if title == "Bukit Batok Secondary School" { + // Open directions to BBSS + let destination = MKMapItem(placemark: MKPlacemark(coordinate: parent.coordinate)) + destination.name = "Bukit Batok Secondary School" + destination.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving]) + } else if let subtitle = view.annotation?.subtitle, let busStopCode = subtitle { + // Show bus timing sheet for bus stops + parent.selectedBusStopCode = busStopCode + parent.isShowingBusTimingSheet = true + parent.isShowingPopover = false // Close popover when bus stop is selected + } else { + // Hide the popover if another annotation is selected + parent.isShowingPopover = false + } } } + + func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { + if let foodAnnotation = annotation as? FoodEstablishmentAnnotation { + let identifier = "FoodEstablishment" + var annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: identifier) as? MKMarkerAnnotationView + + if annotationView == nil { + annotationView = MKMarkerAnnotationView(annotation: foodAnnotation, reuseIdentifier: identifier) + annotationView?.canShowCallout = true + + // Use SF Symbols + let symbolConfiguration = UIImage.SymbolConfiguration(pointSize: 25, weight: .regular, scale: .large) + let image = UIImage(systemName: "fork.knife")?.withConfiguration(symbolConfiguration) + annotationView?.glyphImage = image + } else { + annotationView?.annotation = foodAnnotation + } + + return annotationView + } + return nil + } } - } struct HowToGetToBBSSView: View { @State private var isShowingBusTimingSheet = false @State private var selectedBusStopCode = "" - + @State private var isShowingPopover = false + @State private var selectedFoodEstablishment = "" + var body: some View { - MapView(isShowingBusTimingSheet: $isShowingBusTimingSheet, selectedBusStopCode: $selectedBusStopCode) - .edgesIgnoringSafeArea(.all) - .sheet(isPresented: $isShowingBusTimingSheet) { - BusTimingView(busStopCode: selectedBusStopCode) + ZStack { + MapView(isShowingBusTimingSheet: $isShowingBusTimingSheet, selectedBusStopCode: $selectedBusStopCode, isShowingPopover: $isShowingPopover, selectedFoodEstablishment: $selectedFoodEstablishment) + .edgesIgnoringSafeArea(.all) + .sheet(isPresented: $isShowingBusTimingSheet) { + BusTimingView(busStopCode: selectedBusStopCode) + } + + // Popover view + if isShowingPopover { + VStack { + Text("Information about \(selectedFoodEstablishment)") + .padding() + .background(Color.white) + .cornerRadius(8) + .shadow(radius: 5) + + Text("AlFatah is a store with a rich history! Serving BBSS-ions and the local community since 2010 with their delicious food and drinks!") + Button("Close") { + isShowingPopover = false + } + .padding(.top, 10) + } + .frame(width: 300, height: 200) + .background(Color.blue.opacity(0.7)) + .cornerRadius(10) + .padding() + .transition(.move(edge: .bottom)) + .animation(.default) } + } } }