diff options
Diffstat (limited to 'Map/Presentation/Theme')
| -rw-r--r-- | Map/Presentation/Theme/Color+theme.swift | 17 | ||||
| -rw-r--r-- | Map/Presentation/Theme/Dimensions.swift | 46 | ||||
| -rw-r--r-- | Map/Presentation/Theme/Font+theme.swift | 41 | ||||
| -rw-r--r-- | Map/Presentation/Theme/LibertinusSerif-Regular.otf | bin | 0 -> 337132 bytes | |||
| -rw-r--r-- | Map/Presentation/Theme/Ronzino-Medium.otf | bin | 0 -> 61604 bytes | |||
| -rw-r--r-- | Map/Presentation/Theme/Ronzino-Regular.otf | bin | 0 -> 59968 bytes |
6 files changed, 94 insertions, 10 deletions
diff --git a/Map/Presentation/Theme/Color+theme.swift b/Map/Presentation/Theme/Color+theme.swift index feac76a..ee80e82 100644 --- a/Map/Presentation/Theme/Color+theme.swift +++ b/Map/Presentation/Theme/Color+theme.swift @@ -16,6 +16,9 @@ import SwiftUI extension Color { struct Theme { + + // MARK: - Base Palette + static let darkSlate = Color("Dark Slate") static let jasperRed = Color("Jasper Red") static let olympicBlue = Color("Olympic Blue") @@ -28,6 +31,15 @@ extension Color { static let darkerNeutralGray = Color("Darker Neutral Gray") } + // MARK: - General + + struct UI { + static let foreground = Color("Foreground") + static let background = Color("Background") + } + + // MARK: - The Map + struct Map { static let labelColor = Color.Theme.darkSlate static let axisColor = Color.Theme.darkSlate @@ -44,9 +56,4 @@ extension Color { Color.Theme.hermosaPink, ] } - - struct UI { - static let foreground = Color("Foreground") - static let background = Color("Background") - } } diff --git a/Map/Presentation/Theme/Dimensions.swift b/Map/Presentation/Theme/Dimensions.swift index 99a6207..2e1fd69 100644 --- a/Map/Presentation/Theme/Dimensions.swift +++ b/Map/Presentation/Theme/Dimensions.swift @@ -15,6 +15,48 @@ import Foundation struct Dimensions { - static let mapSize = CGSize(width: 1300.0, height: 1000.0) - static let mapPadding: CGFloat = 42.0 + + // MARK: - Fonts + + struct FontSize { + static let body: CGFloat = 16 + static let title: CGFloat = 32 + static let caption: CGFloat = 14 + static let smallControl: CGFloat = 9 + + struct Map { + static let note: CGFloat = 12 + static let axisLabel: CGFloat = 14 + static let vertexLabel: CGFloat = 12 + } + } + + struct LineHeight { + static let body: CGFloat = 18 + static let title: CGFloat = 38 + static let caption: CGFloat = 18 + static let smallControl: CGFloat = 18 + + struct Map { + static let note: CGFloat = 18 + static let axisLabel: CGFloat = 18 + static let vertexLabel: CGFloat = 18 + } + } + + // MARK: - Spacing + + struct Spacing { + static let coziest: CGFloat = 3.0 + static let cozy: CGFloat = 5.0 + static let regular: CGFloat = 8.0 + static let loose: CGFloat = 12.0 + static let indulgent: CGFloat = 16.0 + } + + // MARK: - The Map + struct Map { + static let size = CGSize(width: 1300.0, height: 1000.0) + static let padding: CGFloat = 42.0 + } } diff --git a/Map/Presentation/Theme/Font+theme.swift b/Map/Presentation/Theme/Font+theme.swift index 1a9abb8..2fb56f7 100644 --- a/Map/Presentation/Theme/Font+theme.swift +++ b/Map/Presentation/Theme/Font+theme.swift @@ -15,6 +15,19 @@ import SwiftUI extension Font { + + static func libertinus(size: CGFloat) -> Font { + return .custom("Libertinus Serif", size: size) + } + + static func ronzino(size: CGFloat) -> Font { + return .custom("Ronzino", size: size) + } + + static func ronzinoMedium(size: CGFloat) -> Font { + return .custom("RonzinoMedium", size: size) + } + public struct Theme { // Map @@ -22,8 +35,30 @@ extension Font { static let axisLabel = Font.system(size: 14, design: .serif) static let vertexLabel = Font.system(size: 12, design: .serif) - // UI - static let smallControl = Font.system(size: 9) - static let body = Font.system(size: 13) + struct Body { + static let regular = Font.ronzino(size: Dimensions.FontSize.body).weight(.regular) + static let emphasized = Font.ronzino(size: Dimensions.FontSize.body).weight(.medium) + } + + struct Title { + static let emphasized = Font.libertinus(size: Dimensions.FontSize.title).weight(.medium) + } + + struct Caption { + static let regular = Font.ronzino(size: Dimensions.FontSize.caption).weight(.regular) + static let emphasized = Font.ronzino(size: Dimensions.FontSize.caption).weight(.medium) + } + + struct SmallControl { + static let regular = Font.ronzino(size: Dimensions.FontSize.smallControl).weight(.regular) + } + + struct Map { + static let note = Font.libertinus(size: Dimensions.FontSize.Map.note).weight(.regular) + static let axisLabel = Font.libertinus(size: Dimensions.FontSize.Map.axisLabel).weight( + .regular) + static let vertexLabel = Font.libertinus(size: Dimensions.FontSize.Map.vertexLabel).weight( + .regular) + } } } diff --git a/Map/Presentation/Theme/LibertinusSerif-Regular.otf b/Map/Presentation/Theme/LibertinusSerif-Regular.otf Binary files differnew file mode 100644 index 0000000..508f3c0 --- /dev/null +++ b/Map/Presentation/Theme/LibertinusSerif-Regular.otf diff --git a/Map/Presentation/Theme/Ronzino-Medium.otf b/Map/Presentation/Theme/Ronzino-Medium.otf Binary files differnew file mode 100644 index 0000000..0be8dd5 --- /dev/null +++ b/Map/Presentation/Theme/Ronzino-Medium.otf diff --git a/Map/Presentation/Theme/Ronzino-Regular.otf b/Map/Presentation/Theme/Ronzino-Regular.otf Binary files differnew file mode 100644 index 0000000..8b70471 --- /dev/null +++ b/Map/Presentation/Theme/Ronzino-Regular.otf |