// // Home.swift // XuXuCheck // // Created by henseycai on 2025/6/18. // import Foundation import SwiftUI struct ScrollPreferenceKey: PreferenceKey { static var defaultValue: CGFloat = 0 static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { value = nextValue() } } struct BlockItem: Identifiable { let id = UUID() var title: String var subtitle: String var text: String var image: String var background: String var logo: String var link: String? } var homeFuncblocks = [ BlockItem(title: localizeString("Introduction"), subtitle: "-", text: "What's XuXuCheck", image: "home_intro", background: "Background 5", logo: "Logo 2",link: API.webProductIntroductionUrl + GetGeneralRequestParams()), BlockItem(title: localizeString("Manual"), subtitle: "-", text: "How to use XuXuCheck", image: "home_tutorial", background: "Background 4", logo: "Logo 4",link: API.webCourseUrl + GetGeneralRequestParams()), BlockItem(title: localizeString("ColorCard"), subtitle: "-", text: "Dry chemical Test strip's color card", image: "home_chart", background: "Background 1", logo: "Logo 1",link: API.webColorimetricCardUrl + GetGeneralRequestParams()), BlockItem(title: localizeString("Records"), subtitle: "-", text: "test records", image: "home_records", background: "Background 2", logo: "Logo 3",link: API.webrecordUrl + GetGeneralRequestParams()) ]