parent
92c80b9e24
commit
ca0935e6e6
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x2A",
|
||||||
|
"green" : "0x2A",
|
||||||
|
"red" : "0x2A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x2A",
|
||||||
|
"green" : "0x2A",
|
||||||
|
"red" : "0x2A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x89",
|
||||||
|
"green" : "0x2A",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x89",
|
||||||
|
"green" : "0x2A",
|
||||||
|
"red" : "0xFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Mask group.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Mask group-2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 950 B |
After Width: | Height: | Size: 345 B |
@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// Extensions.swift
|
||||||
|
// AllIn
|
||||||
|
//
|
||||||
|
// Created by étudiant on 20/09/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
// Extension for rounded Double to 0 decimals
|
||||||
|
extension Double {
|
||||||
|
func roundDouble() -> String {
|
||||||
|
return String(format: "%.0f", self)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Extension for adding rounded corners to specific corners
|
||||||
|
extension View {
|
||||||
|
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
|
||||||
|
clipShape(RoundedCorner(radius: radius, corners: corners) )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom RoundedCorner shape used for cornerRadius extension above
|
||||||
|
struct RoundedCorner: Shape {
|
||||||
|
var radius: CGFloat = .infinity
|
||||||
|
var corners: UIRectCorner = .allCorners
|
||||||
|
|
||||||
|
func path(in rect: CGRect) -> Path {
|
||||||
|
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
|
||||||
|
return Path(path.cgPath)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// Colors.swift
|
||||||
|
// AllIn
|
||||||
|
//
|
||||||
|
// Created by étudiant on 21/09/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct AllinColor {
|
||||||
|
static let darkGray = Color("DarkGray")
|
||||||
|
static let darkerGray = Color("DarkerGray")
|
||||||
|
static let pinkAccentText = Color("PinkAccentText")
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
//
|
||||||
|
// TrendingBetCard.swift
|
||||||
|
// AllIn
|
||||||
|
//
|
||||||
|
// Created by étudiant on 21/09/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct TrendingBetCard: View {
|
||||||
|
var body: some View {
|
||||||
|
VStack(alignment: .leading){
|
||||||
|
HStack{
|
||||||
|
Image("Trending")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 15, height: 15, alignment: .leading)
|
||||||
|
Text("Populaire")
|
||||||
|
.fontWeight(.medium)
|
||||||
|
.foregroundColor(AllinColor.pinkAccentText)
|
||||||
|
}.padding([.leading,.top],10)
|
||||||
|
Text("Emre va réussir son TP de CI/CD mercredi?")
|
||||||
|
.frame(height: 47)
|
||||||
|
.fontWeight(.heavy)
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
.multilineTextAlignment(.leading)
|
||||||
|
.padding([.leading,.trailing],33)
|
||||||
|
.font(.system(size: 17))
|
||||||
|
Spacer()
|
||||||
|
GeometryReader { geometry in HStack(alignment: .center,spacing: 0){
|
||||||
|
Text("12")
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(AllinColor.pinkAccentText)
|
||||||
|
.font(.system(size: 14))
|
||||||
|
Text("joueurs")
|
||||||
|
.fontWeight(.regular)
|
||||||
|
.foregroundColor(Color.white).padding([.leading],2)
|
||||||
|
.font(.system(size: 14))
|
||||||
|
Text("2.35k")
|
||||||
|
.fontWeight(.bold)
|
||||||
|
.foregroundColor(AllinColor.pinkAccentText)
|
||||||
|
.padding([.leading],10)
|
||||||
|
.font(.system(size: 14))
|
||||||
|
Text("points misés")
|
||||||
|
.fontWeight(.regular)
|
||||||
|
.foregroundColor(Color.white).padding([.leading],2)
|
||||||
|
.font(.system(size: 14))
|
||||||
|
}.padding([.leading,.bottom,.trailing],5).frame( width: geometry.size.width,height:geometry.size.height, alignment: .bottom)}
|
||||||
|
|
||||||
|
|
||||||
|
}.frame(width: 344, height: 127, alignment: .topLeading).background(AllinColor.darkerGray)
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 17, style: .continuous))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct TrendingBetCard_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
TrendingBetCard()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue