83 lines
2.4 KiB
Swift
83 lines
2.4 KiB
Swift
//
|
|
// HomeView.swift
|
|
// FitnessApp
|
|
//
|
|
// Created by Matt Bruce on 12/20/24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct HomeView: View {
|
|
@State var calories: Int = 123
|
|
@State var active: Int = 205
|
|
@State var stand: Int = 80
|
|
|
|
var body: some View {
|
|
ScrollView(showsIndicators: false) {
|
|
VStack {
|
|
Text("Wecome")
|
|
.font(.largeTitle)
|
|
.padding()
|
|
|
|
HStack {
|
|
|
|
Spacer()
|
|
|
|
VStack {
|
|
|
|
VStack {
|
|
Text("Calories")
|
|
.font(.callout)
|
|
.bold()
|
|
.foregroundColor(.red)
|
|
|
|
Text("123 kcal")
|
|
.bold()
|
|
}.padding(.bottom)
|
|
|
|
VStack {
|
|
Text("Active")
|
|
.font(.callout)
|
|
.bold()
|
|
.foregroundColor(.green)
|
|
|
|
Text("52 mins")
|
|
.bold()
|
|
}.padding(.bottom)
|
|
|
|
|
|
VStack {
|
|
Text("Stand")
|
|
.font(.callout)
|
|
.bold()
|
|
.foregroundColor(.blue)
|
|
|
|
Text("8 hrs")
|
|
.bold()
|
|
}
|
|
|
|
}
|
|
|
|
Spacer()
|
|
|
|
ZStack {
|
|
Spacer()
|
|
ProgressCircleView(progress: $calories, goal: 600, color: .red)
|
|
ProgressCircleView(progress: $active, goal: 600, color: .green).padding(.all, 20)
|
|
ProgressCircleView(progress: $stand, goal: 600, color: .blue).padding(.all, 40)
|
|
}
|
|
.padding(.horizontal)
|
|
|
|
Spacer()
|
|
}
|
|
.padding()
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
HomeView()
|
|
}
|