@@ -2,26 +2,6 @@ import Foundation
22import UIKit
33
44
5- // TODO:
6- // - Nukes Color Dependencies
7- // - Unit Tests
8-
9- let subjectTextColor = UIColor . black
10- let subjectNoticonColor = UIColor . black
11- let subjectBlockquotedColor = UIColor . black
12- let snippetColor = UIColor . black
13-
14- let headerItalicsColor = UIColor . gray
15-
16- let bodyNoticonFont = UIFont . body
17- let bodyTextColor = UIColor . black
18- let bodyBlockquotedColor = UIColor . black
19- let bodyLinkColor = UIColor . black
20- let bodyNoticonColor = UIColor . black
21-
22- let footerTextColor = UIColor . black
23-
24-
255/// StringStyles: Defines a collection of Text Attributes
266///
277struct StringStyles {
@@ -80,11 +60,11 @@ extension StringStyles {
8060 /// Styles: Notifications List / Subject Block
8161 ///
8262 static let subject : StringStyles = {
83- let regular : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline, . foregroundColor: subjectTextColor]
63+ let regular : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline, . foregroundColor: NukeMe . subjectTextColor]
8464 let bold : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline. bold]
85- let blockquote : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline. italics, . foregroundColor: subjectBlockquotedColor]
65+ let blockquote : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline. italics, . foregroundColor: NukeMe . subjectBlockquotedColor]
8666 let italics : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline. italics]
87- let noticon : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: bodyNoticonFont, . foregroundColor: subjectNoticonColor]
67+ let noticon : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: NukeMe . bodyNoticonFont, . foregroundColor: NukeMe . subjectNoticonColor]
8868
8969 return StringStyles ( regular: regular, bold: bold, blockquote: blockquote, italics: italics, match: nil , noticon: noticon)
9070 } ( )
@@ -93,7 +73,7 @@ extension StringStyles {
9373 /// Styles: Notifications List / Snippet Block
9474 ///
9575 static let snippet : StringStyles = {
96- let regular : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline, . foregroundColor: snippetColor]
76+ let regular : Style = [ . paragraphStyle: NSParagraphStyle . subheadline, . font: UIFont . subheadline, . foregroundColor: NukeMe . snippetColor]
9777
9878 return StringStyles ( regular: regular)
9979 } ( )
@@ -102,9 +82,9 @@ extension StringStyles {
10282 /// Styles: Notification Defailts / Header Block
10383 ///
10484 static let header : StringStyles = {
105- let regular : Style = [ . font: UIFont . body, . foregroundColor: bodyTextColor]
106- let bold : Style = [ . font: UIFont . body. bold, . foregroundColor: bodyTextColor]
107- let italics : Style = [ . font: UIFont . body. italics, . foregroundColor: headerItalicsColor]
85+ let regular : Style = [ . font: UIFont . body, . foregroundColor: NukeMe . bodyTextColor]
86+ let bold : Style = [ . font: UIFont . body. bold, . foregroundColor: NukeMe . bodyTextColor]
87+ let italics : Style = [ . font: UIFont . body. italics, . foregroundColor: NukeMe . headerItalicsColor]
10888
10989 return StringStyles ( regular: regular, bold: bold, italics: italics)
11090 } ( )
@@ -113,7 +93,7 @@ extension StringStyles {
11393 /// Styles: Notification Defailts / Footer Block
11494 ///
11595 static let footer : StringStyles = {
116- let regular : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body, . foregroundColor: footerTextColor]
96+ let regular : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body, . foregroundColor: NukeMe . footerTextColor]
11797
11898 return StringStyles ( regular: regular, noticon: body. noticon)
11999 } ( )
@@ -122,13 +102,13 @@ extension StringStyles {
122102 /// Styles: Notification Defailts / Body Blocks
123103 ///
124104 static let body : StringStyles = {
125- let regular : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body, . foregroundColor: bodyTextColor]
126- let bold : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. bold, . foregroundColor: bodyTextColor]
127- let blockquote : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. italics, . foregroundColor: bodyBlockquotedColor]
128- let match : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. bold, . foregroundColor: bodyLinkColor]
129- let noticon : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: bodyNoticonFont, . foregroundColor: bodyNoticonColor]
130- let italic : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. italics, . foregroundColor: bodyTextColor]
131- let link : Style = [ . foregroundColor: bodyLinkColor]
105+ let regular : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body, . foregroundColor: NukeMe . bodyTextColor]
106+ let bold : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. bold, . foregroundColor: NukeMe . bodyTextColor]
107+ let blockquote : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. italics, . foregroundColor: NukeMe . bodyBlockquotedColor]
108+ let match : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. bold, . foregroundColor: NukeMe . bodyLinkColor]
109+ let noticon : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: NukeMe . bodyNoticonFont, . foregroundColor: NukeMe . bodyNoticonColor]
110+ let italic : Style = [ . paragraphStyle: NSParagraphStyle . body, . font: UIFont . body. italics, . foregroundColor: NukeMe . bodyTextColor]
111+ let link : Style = [ . foregroundColor: NukeMe . bodyLinkColor]
132112
133113 return StringStyles ( regular: regular, bold: bold, blockquote: blockquote, match: match, noticon: noticon, link: link)
134114 } ( )
@@ -137,8 +117,28 @@ extension StringStyles {
137117 /// Styles: Notification Defailts / Badge Blocks
138118 ///
139119 static let badge : StringStyles = {
140- let regular : Style = [ . font: UIFont . body, . foregroundColor: bodyTextColor, . paragraphStyle: NSParagraphStyle . badge]
120+ let regular : Style = [ . font: UIFont . body, . foregroundColor: NukeMe . bodyTextColor, . paragraphStyle: NSParagraphStyle . badge]
141121
142122 return StringStyles ( regular: regular, bold: body. bold, blockquote: body. blockquote, italics: body. italics, link: body. link)
143123 } ( )
144124}
125+
126+
127+ // MARK: - TODO: Nuke this. Map the Colors, as required, from the StyleManager
128+ //
129+ private struct NukeMe {
130+ static let subjectTextColor = UIColor . black
131+ static let subjectNoticonColor = UIColor . black
132+ static let subjectBlockquotedColor = UIColor . black
133+ static let snippetColor = UIColor . black
134+
135+ static let headerItalicsColor = UIColor . gray
136+
137+ static let bodyNoticonFont = UIFont . body
138+ static let bodyTextColor = UIColor . black
139+ static let bodyBlockquotedColor = UIColor . black
140+ static let bodyLinkColor = UIColor . black
141+ static let bodyNoticonColor = UIColor . black
142+
143+ static let footerTextColor = UIColor . black
144+ }
0 commit comments