2020-11-04 00:08:56 +01:00
|
|
|
//
|
|
|
|
// ArticleTextSize.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 11/3/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
enum ArticleTextSize: Int, CaseIterable, Identifiable {
|
|
|
|
case small = 1
|
|
|
|
case medium = 2
|
|
|
|
case large = 3
|
|
|
|
case xlarge = 4
|
|
|
|
case xxlarge = 5
|
|
|
|
|
2020-12-09 02:00:56 +01:00
|
|
|
var id: String { description() }
|
|
|
|
|
|
|
|
var cssClass: String {
|
2020-11-04 00:08:56 +01:00
|
|
|
switch self {
|
|
|
|
case .small:
|
2020-12-09 02:00:56 +01:00
|
|
|
return "smallText"
|
2020-11-04 00:08:56 +01:00
|
|
|
case .medium:
|
2020-12-09 02:00:56 +01:00
|
|
|
return "mediumText"
|
2020-11-04 00:08:56 +01:00
|
|
|
case .large:
|
2020-12-09 02:00:56 +01:00
|
|
|
return "largeText"
|
2020-11-04 00:08:56 +01:00
|
|
|
case .xlarge:
|
2020-12-09 02:00:56 +01:00
|
|
|
return "xLargeText"
|
2020-11-04 00:08:56 +01:00
|
|
|
case .xxlarge:
|
2020-12-09 02:00:56 +01:00
|
|
|
return "xxLargeText"
|
2020-11-04 00:08:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func description() -> String {
|
|
|
|
switch self {
|
|
|
|
case .small:
|
|
|
|
return NSLocalizedString("Small", comment: "Small")
|
|
|
|
case .medium:
|
|
|
|
return NSLocalizedString("Medium", comment: "Medium")
|
|
|
|
case .large:
|
|
|
|
return NSLocalizedString("Large", comment: "Large")
|
|
|
|
case .xlarge:
|
2020-12-19 04:36:55 +01:00
|
|
|
return NSLocalizedString("Extra Large", comment: "X-Large")
|
2020-11-04 00:08:56 +01:00
|
|
|
case .xxlarge:
|
2020-12-19 04:36:55 +01:00
|
|
|
return NSLocalizedString("Extra Extra Large", comment: "XX-Large")
|
2020-11-04 00:08:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|