diff --git a/.DS_Store b/.DS_Store index aff1690..60f6ed3 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/HongikYeolgong2.xcodeproj/project.pbxproj b/HongikYeolgong2.xcodeproj/project.pbxproj index 71d35be..cc02a54 100644 --- a/HongikYeolgong2.xcodeproj/project.pbxproj +++ b/HongikYeolgong2.xcodeproj/project.pbxproj @@ -25,6 +25,11 @@ 474B29472D27CBAF00DB410D /* RecordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474B29462D27CBAF00DB410D /* RecordView.swift */; }; 474B294A2D27CBD300DB410D /* RankingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474B29492D27CBD300DB410D /* RankingView.swift */; }; 474B294D2D27CBE100DB410D /* SettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474B294C2D27CBE100DB410D /* SettingView.swift */; }; + 474D76522D290DDE00AF8CA2 /* WeeklyStudy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474D76512D290DDE00AF8CA2 /* WeeklyStudy.swift */; }; + 474D76552D290E6B00AF8CA2 /* WeeklyStudyFeature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474D76542D290E6B00AF8CA2 /* WeeklyStudyFeature.swift */; }; + 474D76582D2913C000AF8CA2 /* Quote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474D76572D2913C000AF8CA2 /* Quote.swift */; }; + 474D765B2D291B0A00AF8CA2 /* TimerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474D765A2D291B0A00AF8CA2 /* TimerView.swift */; }; + 474D765D2D291CC300AF8CA2 /* StudyPeriod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474D765C2D291CC300AF8CA2 /* StudyPeriod.swift */; }; 47581ED02CF01EB200A2EA31 /* AmplitudeSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 47581ECF2CF01EB200A2EA31 /* AmplitudeSwift */; }; 476120AB2D2827CF005EC300 /* SettingFeature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 476120AA2D2827CF005EC300 /* SettingFeature.swift */; }; 476120B22D282B17005EC300 /* LoginFeature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 476120B12D282B17005EC300 /* LoginFeature.swift */; }; @@ -118,6 +123,11 @@ 474B29462D27CBAF00DB410D /* RecordView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordView.swift; sourceTree = ""; }; 474B29492D27CBD300DB410D /* RankingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankingView.swift; sourceTree = ""; }; 474B294C2D27CBE100DB410D /* SettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingView.swift; sourceTree = ""; }; + 474D76512D290DDE00AF8CA2 /* WeeklyStudy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeeklyStudy.swift; sourceTree = ""; }; + 474D76542D290E6B00AF8CA2 /* WeeklyStudyFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeeklyStudyFeature.swift; sourceTree = ""; }; + 474D76572D2913C000AF8CA2 /* Quote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Quote.swift; sourceTree = ""; }; + 474D765A2D291B0A00AF8CA2 /* TimerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimerView.swift; sourceTree = ""; }; + 474D765C2D291CC300AF8CA2 /* StudyPeriod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyPeriod.swift; sourceTree = ""; }; 476120AA2D2827CF005EC300 /* SettingFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingFeature.swift; sourceTree = ""; }; 476120B12D282B17005EC300 /* LoginFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginFeature.swift; sourceTree = ""; }; 476120B32D282B21005EC300 /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; @@ -265,6 +275,32 @@ path = Setting; sourceTree = ""; }; + 474D76532D290DF000AF8CA2 /* WeeklyStudy */ = { + isa = PBXGroup; + children = ( + 474D76512D290DDE00AF8CA2 /* WeeklyStudy.swift */, + 474D76542D290E6B00AF8CA2 /* WeeklyStudyFeature.swift */, + ); + path = WeeklyStudy; + sourceTree = ""; + }; + 474D76562D2913AB00AF8CA2 /* Quote */ = { + isa = PBXGroup; + children = ( + 474D76572D2913C000AF8CA2 /* Quote.swift */, + ); + path = Quote; + sourceTree = ""; + }; + 474D76592D291AD100AF8CA2 /* Timer */ = { + isa = PBXGroup; + children = ( + 474D765A2D291B0A00AF8CA2 /* TimerView.swift */, + 474D765C2D291CC300AF8CA2 /* StudyPeriod.swift */, + ); + path = Timer; + sourceTree = ""; + }; 474FF2FB2CE36F4100ABEE63 /* Recovered References */ = { isa = PBXGroup; children = ( @@ -441,6 +477,9 @@ 47F6B7CC2D26FAE20096CCA5 /* Home */ = { isa = PBXGroup; children = ( + 474D76592D291AD100AF8CA2 /* Timer */, + 474D76562D2913AB00AF8CA2 /* Quote */, + 474D76532D290DF000AF8CA2 /* WeeklyStudy */, 47F6B7CD2D26FAF00096CCA5 /* HomeView.swift */, 47F6B7CF2D26FAF90096CCA5 /* HomeFeature.swift */, ); @@ -670,11 +709,13 @@ 474B29472D27CBAF00DB410D /* RecordView.swift in Sources */, 471940D32CAFEE5B00426D30 /* Font+Uikit.swift in Sources */, 471940D12CAFE61A00426D30 /* LineHeight.swift in Sources */, + 474D765B2D291B0A00AF8CA2 /* TimerView.swift in Sources */, 47F6B7D02D26FAF90096CCA5 /* HomeFeature.swift in Sources */, 473671A52CB13D8100527896 /* SafeArea.swift in Sources */, 47F6B7D42D26FB2D0096CCA5 /* HomeClient.swift in Sources */, 471940C82CAFCB1B00426D30 /* SizeCheckModifier.swift in Sources */, 47B1D4AC2C9CB1740071B62B /* HongikYeolgong2App.swift in Sources */, + 474D765D2D291CC300AF8CA2 /* StudyPeriod.swift in Sources */, 4780044E2CCAAE3200FFAF00 /* String+.swift in Sources */, 478F84372CD30A8F0097CAA1 /* IOSBackground.swift in Sources */, 474B294A2D27CBD300DB410D /* RankingView.swift in Sources */, @@ -682,10 +723,13 @@ 473E8EB42CCE6827000F102C /* TimeInterval+.swift in Sources */, 476120AB2D2827CF005EC300 /* SettingFeature.swift in Sources */, 47BE30E32CC813BB0015D973 /* KeyChainManager.swift in Sources */, + 474D76582D2913C000AF8CA2 /* Quote.swift in Sources */, + 474D76522D290DDE00AF8CA2 /* WeeklyStudy.swift in Sources */, 473E8EB22CCE5267000F102C /* SystemOverlay.swift in Sources */, 476120B22D282B17005EC300 /* LoginFeature.swift in Sources */, 478B75462CE659C3000190EF /* BaseTextField.swift in Sources */, 47F79B302CCCB7FC00DD0899 /* TimePicker.swift in Sources */, + 474D76552D290E6B00AF8CA2 /* WeeklyStudyFeature.swift in Sources */, 47D5EDCF2CCBD10300ACA469 /* BaseButton.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/HongikYeolgong2/Presentation/Home/HomeView.swift b/HongikYeolgong2/Presentation/Home/HomeView.swift index 44750b0..7606c22 100644 --- a/HongikYeolgong2/Presentation/Home/HomeView.swift +++ b/HongikYeolgong2/Presentation/Home/HomeView.swift @@ -9,7 +9,29 @@ import SwiftUI struct HomeView: View { var body: some View { - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + VStack(spacing: 0) { + Spacer() + .frame(height: 32) + WeeklyStudy() + Spacer() + .frame(height: 120) + Quote() + StudyPeriod(startTime: .now, endTime: .now) + Spacer() + .frame(height: 32) + TimerView() + Spacer() + HStack(spacing: 12) { + BaseButton(width: 69, backgroundColor: .clear, action: {}) + .modifier(ImageBackground(imageName: .seatButton)) + + BaseButton(backgroundColor: .clear, action: {}) + .modifier(ImageBackground(imageName: .startButton)) + } + Spacer().frame(height: 36) + } + .padding(.horizontal, 32) + .modifier(IOSBackground()) } } diff --git a/HongikYeolgong2/Presentation/Home/Quote/Quote.swift b/HongikYeolgong2/Presentation/Home/Quote/Quote.swift new file mode 100644 index 0000000..e9abb4c --- /dev/null +++ b/HongikYeolgong2/Presentation/Home/Quote/Quote.swift @@ -0,0 +1,28 @@ +// +// Quote.swift +// HongikYeolgong2 +// +// Created by 권석기 on 1/4/25. +// + +import SwiftUI + +struct Quote: View { + var body: some View { + VStack { + Text("행동보다 빠르게 불안감을 \n 없앨 수 있는 것은 없습니다.") + .font(.pretendard(size: 18, weight: .regular), lineHeight: 20) + .foregroundColor(.gray100) + .multilineTextAlignment(.center) + + Text("- 윌터 앤더슨") + .font(.pretendard(size: 12, weight: .regular), lineHeight: 18) + .foregroundColor(.gray200) + .multilineTextAlignment(.center) + } + } +} + +#Preview { + Quote() +} diff --git a/HongikYeolgong2/Presentation/Home/Timer/StudyPeriod.swift b/HongikYeolgong2/Presentation/Home/Timer/StudyPeriod.swift new file mode 100644 index 0000000..6b6d360 --- /dev/null +++ b/HongikYeolgong2/Presentation/Home/Timer/StudyPeriod.swift @@ -0,0 +1,61 @@ +// +// StudyPeriod.swift +// HongikYeolgong2 +// +// Created by 권석기 on 1/4/25. +// + +import SwiftUI + +struct StudyPeriod: View { + let startTime: Date + let endTime: Date + + var body: some View { + HStack(spacing: 0) { + VStack(alignment: .leading, spacing: 11) { + HStack(spacing: 13) { + Text("Start") + .font(.suite(size: 12, weight: .medium), lineHeight: 15) + .foregroundStyle(.gray300) + Image(.lineArrow) + .offset(y: -3) + } + + HStack(alignment: .firstTextBaseline, spacing: 6) { + Text(startTime.getHourMinutes()) + .font(.suite(size: 30, weight: .black), lineHeight: 32) + .foregroundColor(.gray100) + Text(startTime.getDaypart()) + .font(.suite(size: 14, weight: .medium), lineHeight: 32) + .foregroundStyle(.gray100) + } + } + + VStack(alignment: .leading, spacing: 11) { + HStack(spacing: 13) { + Text("End") + .font(.suite(size: 12, weight: .medium), lineHeight: 15) + .foregroundStyle(.gray300) + } + + HStack(alignment: .firstTextBaseline, spacing: 6) { + Text(endTime.getHourMinutes()) + .font(.suite(size: 30, weight: .black), lineHeight: 32) + .foregroundColor(.gray100) + Text(endTime.getDaypart()) + .font(.suite(size: 14, weight: .medium), lineHeight: 32) + .foregroundStyle(.gray100) + } + } + .padding(.leading, 18) + + Spacer() + } + } +} + + +//#Preview { +// StudyPeriod(startTime: .now, endTime: .now) +//} diff --git a/HongikYeolgong2/Presentation/Home/Timer/TimerView.swift b/HongikYeolgong2/Presentation/Home/Timer/TimerView.swift new file mode 100644 index 0000000..b0f441d --- /dev/null +++ b/HongikYeolgong2/Presentation/Home/Timer/TimerView.swift @@ -0,0 +1,49 @@ +// +// TimerView.swift +// HongikYeolgong2 +// +// Created by 권석기 on 1/4/25. +// + +import SwiftUI + +struct TimerView: View { + var body: some View { + VStack(alignment: .leading, spacing: 0) { + Text("Time Left") + .font(.suite(size: 12, weight: .medium), lineHeight: 15) + .foregroundStyle(.gray300) + + Text("06:00:00") + .font(.suite(size: 30, weight: .black), lineHeight: 32) + .foregroundColor(.white) + .padding(.top, 11) + + LinearProgressView(shape: Rectangle(), value: 1) + .frame(height: 8) + .padding(.top, 16) + } + } +} + +struct LinearProgressView: View { + var shape: Shape + let value: Double + + var body: some View { + VStack { + shape.fill(.gray600) + .overlay(alignment: .leading) { + GeometryReader { proxy in + shape.fill(.blue100) + .frame(width: proxy.size.width * value) + } + } + } + .animation(.easeInOut, value: value) + } +} + +#Preview { + TimerView() +} diff --git a/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudy.swift b/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudy.swift new file mode 100644 index 0000000..53d7339 --- /dev/null +++ b/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudy.swift @@ -0,0 +1,46 @@ +// +// WeeklyStudy.swift +// HongikYeolgong2 +// +// Created by 권석기 on 1/4/25. +// + +import SwiftUI + +struct WeeklyStudy: View { + var body: some View { + HStack { + ForEach(0..<7, id: \.self) { number in + if number != 0 && number != 7 { + Spacer() + } + WeeklyStudyCell() + } + } + } +} + +struct WeeklyStudyCell: View { + var body: some View { + VStack { + Text("월") + .font(.pretendard(size: 12, weight: .regular), lineHeight: 18) + .foregroundStyle(.gray400) + + VStack { + Image(.shineCount00) + } + .frame(height: 28) + .padding(.top, 8) + .padding(.bottom, 2) + + Text("1/1") + .font(.pretendard(size: 12, weight: .regular), lineHeight: 18) + .foregroundStyle(.gray400) + } + } +} + +//#Preview { +// WeeklyStudy() +//} diff --git a/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudyFeature.swift b/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudyFeature.swift new file mode 100644 index 0000000..36751f4 --- /dev/null +++ b/HongikYeolgong2/Presentation/Home/WeeklyStudy/WeeklyStudyFeature.swift @@ -0,0 +1,8 @@ +// +// WeeklyStudyFeature.swift +// HongikYeolgong2 +// +// Created by 권석기 on 1/4/25. +// + +import Foundation diff --git a/HongikYeolgong2/Presentation/MainTabView.swift b/HongikYeolgong2/Presentation/MainTabView.swift index 76898f6..8d4842d 100644 --- a/HongikYeolgong2/Presentation/MainTabView.swift +++ b/HongikYeolgong2/Presentation/MainTabView.swift @@ -55,7 +55,7 @@ struct MainTabView: View { } } - .frame(height: 88) + .frame(height: SafeAreaHelper.getTabBarHeight()) .background(Image(.tabview) .resizable() .frame(maxWidth: .infinity))