summaryrefslogtreecommitdiff
path: root/DayByDay/SeasonsView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'DayByDay/SeasonsView.swift')
-rw-r--r--DayByDay/SeasonsView.swift30
1 files changed, 30 insertions, 0 deletions
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()
+}