diff --git a/Projects/Features/MemeDetail/Sources/HashTagView.swift b/Projects/Features/MemeDetail/Sources/HashTagView.swift deleted file mode 100644 index 4b4795b..0000000 --- a/Projects/Features/MemeDetail/Sources/HashTagView.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// HashTagView.swift -// MemeDetail -// -// Created by kimchansoo on 6/29/24. -// - -import SwiftUI - -public struct HashTagView: View { - - // MARK: - Properties - - private let keywords: [String] - - // MARK: - Initializers - - public init(keywords: [String]) { - self.keywords = keywords - } - - // MARK: - UI - - var body: some View { - HStack(alignment: .center, spacing: 6) { - ForEach(keywords, id: \.self) { title in - hashTag(title: title) - } - } - .frame(maxWidth: .infinity, alignment: .center) - .cornerRadius(40) - } - - func hashTag(title: String) -> some View { - Text("#\(title)") - .font(Font.Body.large) - .foregroundColor(Color.Text.tertiary) - } - -} diff --git a/Projects/Features/MemeDetail/Sources/LikeButton.swift b/Projects/Features/MemeDetail/Sources/LikeButton.swift deleted file mode 100644 index aa2bb75..0000000 --- a/Projects/Features/MemeDetail/Sources/LikeButton.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// LikeButton.swift -// MemeDetail -// -// Created by kimchansoo on 6/29/24. -// - -import SwiftUI - -import ResourceKit - -public struct LikeButton: View { - var body: some View { - HStack(alignment: .center, spacing: 6) { - ResourceKitAsset.Icon.ㅋ.swiftUIImage - ResourceKitAsset.Icon.개웃겨.swiftUIImage - } - .frame(maxWidth: .infinity) - .frame(height: 46, alignment: .center) - .background(Color.Skeleton.primary) - .cornerRadius(10) - } -} diff --git a/Projects/Features/MemeDetail/Sources/MemeDetailCardView.swift b/Projects/Features/MemeDetail/Sources/MemeDetailCardView.swift deleted file mode 100644 index 0be0224..0000000 --- a/Projects/Features/MemeDetail/Sources/MemeDetailCardView.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// MemeDetailCardView.swift -// MemeDetail -// -// Created by kimchansoo on 6/29/24. -// - -import SwiftUI - -import PPACModels -import Kingfisher -import ResourceKit - -struct MemeDetailCardView: View { - - // MARK: - Properties - - let meme: MemeDetail - - // MARK: - UI - - var body: some View { - VStack(alignment: .center, spacing: 0) { - - MemeImageView(imageUrlString: meme.imageUrlString) - .padding(.bottom, 25) - - titleLabel - .padding(.bottom, 5) - - HashTagView(keywords: meme.keywords) - .padding(.bottom, 11) - - subtitleLabel - .padding(.bottom, 20) - - LikeButton() - .padding(.bottom, 20) - } - .padding(10) - .background(.white) - .cornerRadius(20) - .overlay( - RoundedRectangle(cornerRadius: 20) - .inset(by: 1) - .stroke(.black, lineWidth: 2) - ) - .padding(.horizontal, 24) - } - - // MARK: - Methods - - var titleLabel: some View { - Text(meme.title) - .font(Font.Heading.large.weight(.semibold)) - .multilineTextAlignment(.center) - .foregroundColor(Color.Text.primary) - .frame(maxWidth: .infinity, alignment: .center) - } - - var subtitleLabel: some View { - Text("출처: \(self.meme.source)") - .font(Font.Body.xsmall) - .multilineTextAlignment(.center) - .foregroundColor(Color.Icon.assistive) - } -} - -#Preview { - MemeDetailCardView(meme: .mock) -} diff --git a/Projects/Features/MemeDetail/Sources/MemeDetailView.swift b/Projects/Features/MemeDetail/Sources/MemeDetailView.swift deleted file mode 100644 index ba2a1c3..0000000 --- a/Projects/Features/MemeDetail/Sources/MemeDetailView.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// MemeDetailView.swift -// MemeDetail -// -// Created by kimchansoo on 6/28/24. -// - -import SwiftUI - -import PPACModels - -struct MemeDetailView: View { - - // MARK: - Properties - private let meme: MemeDetail - - // MARK: - Initializers - - init(meme: MemeDetail) { - self.meme = meme - } - - // MARK: - UI - - var body: some View { - MemeDetailCardView(meme: meme) - } -} - -#Preview { - MemeDetailView(meme: .mock) -} diff --git a/Projects/Features/MemeDetail/Sources/MemeImageView.swift b/Projects/Features/MemeDetail/Sources/MemeImageView.swift deleted file mode 100644 index 4538f00..0000000 --- a/Projects/Features/MemeDetail/Sources/MemeImageView.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// MemeImageView.swift -// MemeDetail -// -// Created by kimchansoo on 6/29/24. -// - -import SwiftUI - -import Kingfisher - -struct MemeImageView: View { - - // MARK: - Properties - - private let imageUrlString: String - - // MARK: - Initializers - - init(imageUrlString: String) { - self.imageUrlString = imageUrlString - } - - // MARK: - UI - - var body: some View { - KFImage(URL(string: imageUrlString)) - .resizable() - .loadDiskFileSynchronously() - .cacheMemoryOnly() - .fade(duration: 0.25) - .frame(maxWidth: .infinity) - .aspectRatio(0.9375, contentMode: .fit) - .cornerRadius(10) - } -}