-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathNYPLConfiguration.swift
More file actions
106 lines (81 loc) · 2.38 KB
/
NYPLConfiguration.swift
File metadata and controls
106 lines (81 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//
// NYPLConfiguration.swift
// Simplified
//
// Created by Ettore Pasquini on 6/3/22.
// Copyright © 2022 NYPL. All rights reserved.
//
import UIKit
class NYPLConfiguration: NSObject {
private override init() {
super.init()
}
// MARK: - Objects
static var mainFeedURL: URL? {
if let customURL = NYPLSettings.shared.customMainFeedURL {
return customURL
}
return NYPLSettings.shared.accountMainFeedURL
}
// MARK: - Colors
@objc static var accentColor: UIColor {
return UIColor(red: 0.0/255.0, green: 144/255.0, blue: 196/255.0, alpha:1.0)
}
@objc static var blueBackgroundColor: UIColor {
return UIColor(red: 20/255.0, green: 54/255.0, blue: 97/255.0, alpha:1.0)
}
@objc static var readerBackgroundColor: UIColor {
return UIColor(white: 250/255.0, alpha:1.0)
}
// OK to leave as static color because it's reader-only
@objc static var readerBackgroundDarkColor: UIColor {
return UIColor(white: 5/255.0, alpha:1.0)
}
// OK to leave as static color because it's reader-only
@objc static var readerBackgroundSepiaColor: UIColor {
return UIColor(red: 250/255.0, green: 244/255.0, blue: 232/255.0, alpha: 1.0)
}
// OK to leave as static color because it's reader-only
@objc static var backgroundMediaOverlayHighlightColor: UIColor {
return .yellow
}
// OK to leave as static color because it's reader-only
@objc static var backgroundMediaOverlayHighlightDarkColor: UIColor {
return .orange
}
// OK to leave as static color because it's reader-only
@objc static var backgroundMediaOverlayHighlightSepiaColor: UIColor {
return .yellow
}
// MARK: - Fonts
// Set for the whole app via UIView+NYPLFontAdditions.
@objc static var systemFontName: String {
return "AvenirNext-Medium"
}
// Set for the whole app via UIView+NYPLFontAdditions.
static var boldSystemFontName: String {
return "AvenirNext-Bold"
}
@objc static var systemFontFamilyName: String {
return "Avenir Next"
}
//MARK: - Dimensions
static var defaultTOCRowHeight: CGFloat {
return 56
}
static var defaultBookmarkRowHeight: CGFloat {
return 100
}
static var cornerRadius: CGFloat {
return 5
}
static var shadowRadius: CGFloat {
return 2
}
static var shadowOpacity: Float {
return 0.9
}
static var shadowOffset: CGSize {
return CGSize(width: 0, height: 1)
}
}