/// The public grading guide: the scale raw books are graded on, reference grades, and the defect checklist every listing answers.
structGradingGuidePage{
// MARK: Properties
letanalytics:Analytics?
letassetVersion:String?
letlocale:Locale
/// The signed-in viewer, or `nil` when signed out.
letviewer:Viewer?
// MARK: Initializers
/// Creates the grading guide.
/// - Parameters:
/// - viewer: the signed-in viewer, or `nil` (the default) when signed out.
/// - assetVersion: the version token appended to the page's asset URLs, or `nil` (the default) to leave them unversioned.
/// - analytics: the analytics tracker embedded in the document head, or `nil` (the default) to omit it.
init(
viewer:Viewer?=nil,
assetVersion:String?=nil,
analytics:Analytics?=nil
){
self.analytics=analytics
self.assetVersion=assetVersion
self.locale=.init(identifier:"en")
self.viewer=viewer
}
}
// MARK: - Page
extensionGradingGuidePage:Page{
// MARK: Constants
/// The path the page is served at.
staticletpath=String.Route.gradingGuide
// MARK: Computed
varcontent:someHTML{
SiteLayout(viewer:viewer){
div(.class("page guide")){
div(.class("guide__head")){
p(.class("type-eyebrow")){
"CCN grading guide · public"
}
h1(.class("type-h1")){
"How CCN sellers grade raw books"
}
p(.class("type-lead")){
"Slabbed books carry the grader's number and a cert you can verify. Raw books are graded by the seller against this scale, and every defect on the checklist below must be declared. A declared defect is never grounds for a dispute; an undeclared one always is."
}
}
ol(
.class("guide__scale"),
.custom(name:"aria-label",value:"The grading scale, best first")