|
|
@@ -6,22 +6,25 @@
|
|
|
import Cocoa
|
|
|
|
|
|
final class DashboardView: NSView {
|
|
|
+ /// Indeed.com-inspired neutrals and brand blue (white surfaces, `#2557a7` accent, `#2d2d2d` / `#767676` text, `#d4d2d0` borders).
|
|
|
private enum Theme {
|
|
|
- static let pageBackground = NSColor(calibratedWhite: 0.02, alpha: 1)
|
|
|
- static let chromeBackground = NSColor(calibratedWhite: 0.04, alpha: 1)
|
|
|
- static let sidebarBackground = NSColor(calibratedWhite: 0.07, alpha: 1)
|
|
|
- static let mainHostBackground = NSColor(calibratedWhite: 0.06, alpha: 1)
|
|
|
- static let selectionFill = NSColor(calibratedWhite: 1, alpha: 0.1)
|
|
|
- static let cardBackground = NSColor(calibratedWhite: 0.11, alpha: 1)
|
|
|
- static let toggleBackground = NSColor(calibratedWhite: 0.16, alpha: 1)
|
|
|
- static let primaryText = NSColor(calibratedWhite: 0.96, alpha: 1)
|
|
|
- static let secondaryText = NSColor(calibratedWhite: 0.62, alpha: 1)
|
|
|
- static let tertiaryText = NSColor(calibratedWhite: 0.48, alpha: 1)
|
|
|
- static let proCardFill = NSColor(calibratedRed: 0.1, green: 0.09, blue: 0.12, alpha: 1)
|
|
|
- static let proCardBorder = NSColor(calibratedWhite: 1, alpha: 0.09)
|
|
|
- static let proAccent = NSColor(calibratedRed: 0.98, green: 0.82, blue: 0.38, alpha: 1)
|
|
|
- static let proCTABackground = NSColor(calibratedWhite: 0.97, alpha: 1)
|
|
|
- static let proCTAText = NSColor(calibratedWhite: 0.05, alpha: 1)
|
|
|
+ static let brandBlue = NSColor(srgbRed: 37 / 255, green: 87 / 255, blue: 167 / 255, alpha: 1)
|
|
|
+ static let pageBackground = NSColor(srgbRed: 1, green: 1, blue: 1, alpha: 1)
|
|
|
+ static let chromeBackground = NSColor(srgbRed: 247 / 255, green: 247 / 255, blue: 247 / 255, alpha: 1)
|
|
|
+ static let sidebarBackground = NSColor(srgbRed: 1, green: 1, blue: 1, alpha: 1)
|
|
|
+ static let mainHostBackground = NSColor(srgbRed: 1, green: 1, blue: 1, alpha: 1)
|
|
|
+ static let selectionFill = NSColor(srgbRed: 37 / 255, green: 87 / 255, blue: 167 / 255, alpha: 0.12)
|
|
|
+ static let cardBackground = NSColor(srgbRed: 1, green: 1, blue: 1, alpha: 1)
|
|
|
+ static let toggleBackground = NSColor(srgbRed: 232 / 255, green: 232 / 255, blue: 232 / 255, alpha: 1)
|
|
|
+ static let primaryText = NSColor(srgbRed: 45 / 255, green: 45 / 255, blue: 45 / 255, alpha: 1)
|
|
|
+ static let secondaryText = NSColor(srgbRed: 118 / 255, green: 118 / 255, blue: 118 / 255, alpha: 1)
|
|
|
+ static let tertiaryText = NSColor(srgbRed: 118 / 255, green: 118 / 255, blue: 118 / 255, alpha: 1)
|
|
|
+ static let border = NSColor(srgbRed: 212 / 255, green: 210 / 255, blue: 208 / 255, alpha: 1)
|
|
|
+ static let proCardFill = NSColor(srgbRed: 239 / 255, green: 244 / 255, blue: 252 / 255, alpha: 1)
|
|
|
+ static let proCardBorder = NSColor(srgbRed: 212 / 255, green: 210 / 255, blue: 208 / 255, alpha: 1)
|
|
|
+ static let proAccent = NSColor(srgbRed: 37 / 255, green: 87 / 255, blue: 167 / 255, alpha: 1)
|
|
|
+ static let proCTABackground = NSColor(srgbRed: 37 / 255, green: 87 / 255, blue: 167 / 255, alpha: 1)
|
|
|
+ static let proCTAText = NSColor(srgbRed: 1, green: 1, blue: 1, alpha: 1)
|
|
|
}
|
|
|
|
|
|
private let contentStack = NSStackView()
|
|
|
@@ -197,7 +200,7 @@ final class DashboardView: NSView {
|
|
|
searchCard.layer?.backgroundColor = Theme.cardBackground.cgColor
|
|
|
searchCard.layer?.cornerRadius = 14
|
|
|
searchCard.layer?.borderWidth = 1
|
|
|
- searchCard.layer?.borderColor = NSColor(calibratedWhite: 1, alpha: 0.06).cgColor
|
|
|
+ searchCard.layer?.borderColor = Theme.border.cgColor
|
|
|
searchCard.translatesAutoresizingMaskIntoConstraints = false
|
|
|
searchCard.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
|
|
|
|
|
@@ -255,7 +258,7 @@ final class DashboardView: NSView {
|
|
|
|
|
|
let brand = NSTextField(labelWithString: "Indeed AI\nJob Finder")
|
|
|
brand.font = .systemFont(ofSize: 18, weight: .bold)
|
|
|
- brand.textColor = Theme.primaryText
|
|
|
+ brand.textColor = Theme.brandBlue
|
|
|
brand.alignment = .left
|
|
|
sidebar.addArrangedSubview(brand)
|
|
|
|
|
|
@@ -289,11 +292,11 @@ final class DashboardView: NSView {
|
|
|
let icon = NSImageView()
|
|
|
icon.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 13, weight: .medium)
|
|
|
icon.image = NSImage(systemSymbolName: item.systemImage, accessibilityDescription: item.title)
|
|
|
- icon.contentTintColor = isSelected ? Theme.primaryText : Theme.secondaryText
|
|
|
+ icon.contentTintColor = isSelected ? Theme.brandBlue : Theme.secondaryText
|
|
|
|
|
|
let text = NSTextField(labelWithString: item.title)
|
|
|
text.font = .systemFont(ofSize: 14, weight: .medium)
|
|
|
- text.textColor = isSelected ? Theme.primaryText : Theme.secondaryText
|
|
|
+ text.textColor = isSelected ? Theme.brandBlue : Theme.secondaryText
|
|
|
text.refusesFirstResponder = true
|
|
|
|
|
|
row.addArrangedSubview(icon)
|