From 83479f9840f230c0c0dbee083b75735090ae9322 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 9 Mar 2026 20:30:56 -0500 Subject: initial 1.0 release --- DayByDay/SeasonsView.swift | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 DayByDay/SeasonsView.swift (limited to 'DayByDay/SeasonsView.swift') diff --git a/DayByDay/SeasonsView.swift b/DayByDay/SeasonsView.swift new file mode 100644 index 0000000..848bb13 --- /dev/null +++ b/DayByDay/SeasonsView.swift @@ -0,0 +1,30 @@ +// +// SeasonsView.swift +// DayByDay +// + +import SwiftUI + +/// Displays all four seasons as large, tappable cards in a scrollable grid. +/// Adapts between 1 and 2 columns depending on available width. +struct SeasonsView: View { + private let columns = [ + GridItem(.adaptive(minimum: 300, maximum: 500), spacing: 24) + ] + + var body: some View { + ScrollView { + LazyVGrid(columns: columns, spacing: 24) { + ForEach(Season.allCases) { season in + SeasonCard(season: season, isHighlighted: season == .current) + .frame(height: 200) + } + } + .padding(32) + } + } +} + +#Preview { + SeasonsView() +} -- cgit v1.2.3