parent
7ded496d28
commit
29c9f65c9d
@ -1,20 +0,0 @@
|
|||||||
//
|
|
||||||
// AvatarView.swift
|
|
||||||
// WtaTennis
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 14/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct AvatarView: View {
|
|
||||||
var body: some View {
|
|
||||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct AvatarView_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
AvatarView()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
//
|
|
||||||
// InfoDetailView.swift
|
|
||||||
// WtaTennis
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 14/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct InfoDetailView: View {
|
|
||||||
var body: some View {
|
|
||||||
ZStack {
|
|
||||||
Color.purple.edgesIgnoringSafeArea(.all)
|
|
||||||
VStack(alignment: .leading, spacing: 20) {
|
|
||||||
Text("Iga Swiatek")
|
|
||||||
.font(.largeTitle)
|
|
||||||
.fontWeight(.bold)
|
|
||||||
.foregroundColor(.white)
|
|
||||||
|
|
||||||
HStack {
|
|
||||||
Image(systemName: "flag.fill")
|
|
||||||
.foregroundColor(.white)
|
|
||||||
Text("POLAND")
|
|
||||||
.foregroundColor(.white)
|
|
||||||
}
|
|
||||||
|
|
||||||
InfoTextView(title: "Height", value: "5' 9\"")
|
|
||||||
InfoTextView(title: "Age", value: "22")
|
|
||||||
InfoTextView(title: "Plays", value: "Right-Handed")
|
|
||||||
InfoTextView(title: "Birthplace", value: "Warsaw, Poland")
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct InfoDetailView_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
InfoDetailView()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
//
|
|
||||||
// PlayerListView.swift
|
|
||||||
// WtaTennis
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 14/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct PlayerListView: View {
|
|
||||||
@ObservedObject var viewModel: PlayerViewModel
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
NavigationStack {
|
|
||||||
List(viewModel.players, id: \.id) { player in
|
|
||||||
PlayerProfileView(player: player)
|
|
||||||
.padding(.vertical, 5)
|
|
||||||
}
|
|
||||||
.navigationTitle("Top Players")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct PlayerListView_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
PlayerListView(viewModel: PlayerViewModel())
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
//
|
|
||||||
// ItemCollectionPlayer.swift
|
|
||||||
// WtaTennis
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 14/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct PlayerProfileView: View {
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
HStack(spacing: 15) {
|
|
||||||
Text("1") // \(player.rank)
|
|
||||||
.font(.largeTitle)
|
|
||||||
.fontWeight(.bold)
|
|
||||||
.foregroundColor(.purple)
|
|
||||||
|
|
||||||
Image("Image")
|
|
||||||
.resizable()
|
|
||||||
.aspectRatio(contentMode: .fill)
|
|
||||||
.frame(width: 50, height: 50)
|
|
||||||
.clipShape(Circle())
|
|
||||||
|
|
||||||
Text("Iga Swiatek")
|
|
||||||
.font(.title2)
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
Label(" France ", systemImage: "flag.fill")
|
|
||||||
.labelStyle(.titleAndIcon)
|
|
||||||
.foregroundColor(.red)
|
|
||||||
}
|
|
||||||
.padding(.horizontal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct PlayerProfileView_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
PlayerProfileView()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
//
|
|
||||||
// RankingView.swift
|
|
||||||
// WtaTennis
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 14/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct RankingView: View {
|
|
||||||
|
|
||||||
var body : some View {
|
|
||||||
ZStack()
|
|
||||||
{
|
|
||||||
Rectangle()
|
|
||||||
.fill(Color.purple) // Rectangle violet
|
|
||||||
.frame(height: 200) // Ajustez la hauteur du rectangle comme nécessaire
|
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 20) {
|
|
||||||
Text("RANKING") // TODO : penser à créer un style pour les textes
|
|
||||||
.font(.title)
|
|
||||||
.foregroundColor(.white)
|
|
||||||
Text("1")
|
|
||||||
.font(.largeTitle)
|
|
||||||
.fontWeight(.bold)
|
|
||||||
.foregroundColor(.white)
|
|
||||||
Text("Singles")
|
|
||||||
.font(.title2)
|
|
||||||
.foregroundColor(.white)
|
|
||||||
}
|
|
||||||
.padding() // Ajoutez un padding pour éloigner le texte des bords du rectangle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct RankingView_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
RankingView()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
/
|
|
||||||
// Picker.swift
|
|
||||||
// ArkitDoushiQi
|
|
||||||
//
|
|
||||||
// Created by Johan LACHENAL on 21/05/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct Picker: View {
|
|
||||||
var body: some View {
|
|
||||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Picker_Previews: PreviewProvider {
|
|
||||||
static var previews: some View {
|
|
||||||
Picker()
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue