Library colour and font size tweaks
This commit is contained in:
@ -25,6 +25,8 @@ public extension Color {
|
||||
// New theme colors
|
||||
static var themeLightGray: Color { Color("_lightGray", bundle: .module) }
|
||||
static var themeMediumGray: Color { Color("_mediumGray", bundle: .module) }
|
||||
static var themeMiddleGray: Color { Color("_middleGray", bundle: .module) }
|
||||
static var themeLightestGray: Color { Color("_lightestGray", bundle: .module) }
|
||||
static var themeDarkGray: Color { Color("_darkGray", bundle: .module) }
|
||||
static var themeGrayBg01: Color { Color("_themeGrayBg01", bundle: .module) }
|
||||
static var themeHighlightColor: Color { Color("_highlightColor", bundle: .module) }
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x89",
|
||||
"green" : "0x89",
|
||||
"red" : "0x89"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x89",
|
||||
"green" : "0x89",
|
||||
"red" : "0x89"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x3C",
|
||||
"green" : "0x3C",
|
||||
"red" : "0x3C"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x3C",
|
||||
"green" : "0x3C",
|
||||
"red" : "0x3C"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@ -121,21 +121,21 @@ public struct LibraryItemCard: View {
|
||||
AnyView(HStack {
|
||||
Text("\(estimatedReadingTime)")
|
||||
.font(Font.system(size: 11, weight: .medium))
|
||||
.foregroundColor(Color.themeMediumGray)
|
||||
.foregroundColor(Color.themeMiddleGray)
|
||||
+
|
||||
Text("\(readingProgress)")
|
||||
.font(Font.system(size: 11, weight: .medium))
|
||||
.foregroundColor(isPartiallyRead ? Color.appGreenSuccess : Color.themeMediumGray)
|
||||
.foregroundColor(isPartiallyRead ? Color.appGreenSuccess : Color.themeMiddleGray)
|
||||
|
||||
+
|
||||
Text("\(highlightsText)")
|
||||
.font(Font.system(size: 11, weight: .medium))
|
||||
.foregroundColor(Color.themeMediumGray)
|
||||
.foregroundColor(Color.themeMiddleGray)
|
||||
|
||||
+
|
||||
Text("\(notesText)")
|
||||
.font(Font.system(size: 11, weight: .medium))
|
||||
.foregroundColor(Color.themeMediumGray)
|
||||
.foregroundColor(Color.themeMiddleGray)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading))
|
||||
}
|
||||
@ -148,13 +148,13 @@ public struct LibraryItemCard: View {
|
||||
image
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 55, height: 73)
|
||||
.cornerRadius(4)
|
||||
.frame(width: 40, height: 40)
|
||||
.cornerRadius(5)
|
||||
.padding(.top, 2)
|
||||
} else {
|
||||
Color.systemBackground
|
||||
.frame(width: 55, height: 73)
|
||||
.cornerRadius(4)
|
||||
.frame(width: 40, height: 40)
|
||||
.cornerRadius(5)
|
||||
.padding(.top, 2)
|
||||
}
|
||||
}
|
||||
@ -172,27 +172,12 @@ public struct LibraryItemCard: View {
|
||||
}
|
||||
|
||||
return ""
|
||||
|
||||
// var str = ""
|
||||
// if let author = item.author {
|
||||
// str += author
|
||||
// }
|
||||
//
|
||||
// if item.author != nil, item.publisherDisplayName != nil {
|
||||
// str += ", "
|
||||
// }
|
||||
//
|
||||
// if let publisherDisplayName = item.publisherDisplayName {
|
||||
// str += publisherDisplayName
|
||||
// }
|
||||
//
|
||||
// return str
|
||||
}
|
||||
|
||||
var byLine: some View {
|
||||
Text(bylineStr)
|
||||
.font(Font.system(size: 15, weight: .regular))
|
||||
.foregroundColor(Color.themeMediumGray)
|
||||
.font(Font.system(size: 11, weight: .regular))
|
||||
.foregroundColor(Color.themeLightestGray)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.lineLimit(1)
|
||||
}
|
||||
@ -202,7 +187,7 @@ public struct LibraryItemCard: View {
|
||||
readInfo
|
||||
|
||||
Text(item.unwrappedTitle)
|
||||
.font(Font.system(size: 18, weight: .semibold))
|
||||
.font(Font.system(size: 14, weight: .semibold))
|
||||
.lineSpacing(1.25)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
Reference in New Issue
Block a user