Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#19 writing view tca #21

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added Icon
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "사진 추가 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "싫어요 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "좋아요 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "음악 링크 연결 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "플레이 리스트 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "image 2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "image 3.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "뒤로 가기 아이콘.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions Targets/Plda/Sources/Shared/DesignSystem/ButtonStyle.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// ButtonStyle.swift
// Plda
//
// Created by 김채빈 on 2023/08/30.
// Copyright © 2023 alom.com. All rights reserved.
//

import SwiftUI

struct roundedRectangleBorder: ButtonStyle {
var backgroundColor: Color = .lightGreen
var foregroundColor: Color = .white

func makeBody(configuration: Configuration) -> some View {
configuration.label
.frame(width: 350, height: 38)
.background(backgroundColor)
.cornerRadius(12)
.font(.bold16)
.foregroundColor(foregroundColor)
}
}

struct roundedRectangleBorder_Previews: PreviewProvider {
static var previews: some View {
Button("Hello"){}
.buttonStyle(roundedRectangleBorder())
}
}
12 changes: 6 additions & 6 deletions Targets/Plda/Sources/Shared/Managers/FontManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import SwiftUI

extension Font {
// ExtraBold
static let extraBold: Font = .custom("Pretendard-ExtraBold", size: 36)
static let extraBold: Font = PldaFontFamily.Pretendard.extraBold.swiftUIFont(size: 36)

// Bold
static let bold24: Font = .custom("Pretendard-Bold", size: 24)
static let bold16: Font = .custom("Pretendard-Bold", size: 16)
static let bold24: Font = PldaFontFamily.Pretendard.bold.swiftUIFont(size: 24)
static let bold16: Font = PldaFontFamily.Pretendard.bold.swiftUIFont(size: 16)

// SemiBold
static let semiBold: Font = .custom("Pretendard-SemiBold", size: 20)
static let semiBold: Font = PldaFontFamily.Pretendard.semiBold.swiftUIFont(size: 20)

// Medium
static let medium16: Font = .custom("Pretendard-Medium", size: 16)
static let medium12: Font = .custom("Pretendard-Medium", size: 12)
static let medium16: Font = PldaFontFamily.Pretendard.medium.swiftUIFont(size: 16)
static let medium12: Font = PldaFontFamily.Pretendard.medium.swiftUIFont(size: 12)

}
144 changes: 144 additions & 0 deletions Targets/Plda/Sources/Views/DiaryDetailView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
//
// SwiftUIView.swift
// Plda
//
// Created by 김채빈 on 2023/08/17.
// Copyright © 2023 alom.com. All rights reserved.
//

import SwiftUI

struct RecommendSheetView: View {
@Binding var albumCover: String
@Binding var albumTitle: String
@Binding var albumSubTitle: String

var body: some View {
ZStack{
RoundedRectangle(cornerRadius: 40)
.fill(Color.darkGreen)
.ignoresSafeArea()
.offset(y:56)

RoundedRectangle(cornerRadius: 40)
.fill(.white)
.ignoresSafeArea()
.offset(y:110)

VStack {
Image(albumCover)
.frame(width:208, height:208)
.cornerRadius(4)
.padding(.bottom, 10)
HStack {
Button(action: {

}, label: {
PldaAsset.PreviewAssets.likeIcon.swiftUIImage
})

VStack {
Text(albumTitle)
.font(.semiBold)
Text(albumSubTitle)
.font(.medium12)
}
.padding(.horizontal, 21)

Button(action: {

}, label: {
PldaAsset.PreviewAssets.dislikeIcon.swiftUIImage
})
}

Button(action: {

}, label: {
PldaAsset.PreviewAssets.linkIcon.swiftUIImage
})
.padding(.top, 19)

Button("playlist 확인하러 가기") {}
.padding(.top, 19)
.buttonStyle(roundedRectangleBorder())
}
.offset(y:-22)
}
}
}

struct DiaryDetailView: View {
@State var title : String = ""
@State var tag : String = ""
@State var content : String = ""
@State var diaryimage: UIImage? = nil
@State var showsheet : Bool = true
@State var albumCover: String
@State var albumTitle: String
@State var albumSubTitle: String

var body: some View {
VStack() {
WritingNavgionBar()

HStack{
Text(title)
.padding(.horizontal, 32)
.font(.bold24)
Spacer()
}
HStack{
Text(tag)
.padding(.leading, 30)
.font(.medium12)
Spacer()
Text("20230727")
.font(.medium12)
.padding(.trailing, 30)
}
.font(.medium12)
.opacity(0.8)
Divider()
.frame(height: 1)
.background(.black)
.padding(.horizontal, 20)
if let image = diaryimage {
Image(uiImage: image)
.resizable()
.frame(minWidth: 0, maxWidth: 326)
.frame(width: 326.0, height: 342.0)
.cornerRadius(5)
}
Text(content)
.padding(.horizontal, 30)
.scrollContentBackground(.hidden)
.font(.medium12)
Spacer()
Button("일기 수정하기"){}
.buttonStyle(roundedRectangleBorder())
.padding(.bottom, 13)
Button("노래 추천 다시 받기"){}
.buttonStyle(roundedRectangleBorder())
.padding(.bottom, 100)
}
.background(PldaAsset.PreviewAssets.background.swiftUIImage
.frame(width: .infinity, height: .infinity)
.ignoresSafeArea()
)



.sheet(isPresented: $showsheet) {
RecommendSheetView(albumCover: $albumCover, albumTitle: $albumTitle, albumSubTitle: $albumSubTitle)
.presentationDetents([.medium])
.presentationBackground(.clear)
}
}
}

struct DiaryDetailView_Previews: PreviewProvider {
static var previews: some View {
DiaryDetailView(title: "쌀국수", tag: "#dkjflsf", content: "동네에 쌀국수 맛집을 찾았다. 좀 더 많은 메뉴가 있었으면 더 좋았을 거 같다. 그래도 너무너무 맛있어서 행복했다. 양도 많고 재료도 풍부하고 아주 굿. 다음 번엔 매운 차돌박이 쌀국수를 먹어봐야겠다. 맛있는 하루를 보내 기분이 좋았으나 저녁 때 사건이 발생했다. \n(어쩌고 저쩌고) \n어떻게 해야 좋은 대처였을지 잘 모르겠다. 내일 다시 생각해 봐야겠다.", diaryimage: UIImage(named: PldaAsset.PreviewAssets.image2.name), albumCover: PldaAsset.PreviewAssets.image3.name, albumTitle: "Ice Cream Cake", albumSubTitle: "Red Velvet (레드벨벳)")
}
}
Loading