@@ -75,12 +75,12 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
75
75
).map(dottyRes)
76
76
77
77
78
- val earlyMemberResources : Seq [Resource ] =
78
+ val earlyCommonResources : Seq [Resource ] =
79
79
List (
80
80
" scripts/theme.js"
81
81
).map(dottyRes)
82
82
83
- val memberResources : Seq [Resource ] =
83
+ val commonResources : Seq [Resource ] = {
84
84
val fromResources = List (
85
85
" styles/nord-light.css" ,
86
86
" styles/scalastyle.css" ,
@@ -116,13 +116,24 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
116
116
" https://scastie.scala-lang.org/embedded.js"
117
117
).map(Resource .URL .apply)
118
118
119
-
120
119
fromResources ++ urls ++ projectLogo ++ Seq (scaladocVersionFile, dynamicJsData)
120
+ }
121
+
122
+ val apiOnlyResources = List (
123
+ " styles/apistyles.css"
124
+ ).map(dottyRes)
125
+
126
+ val staticSiteOnlyResources = List (
127
+ " styles/staticsitestyles.css"
128
+ ).map(dottyRes)
121
129
122
130
val searchDataPath = " scripts/searchData.js"
123
131
val scastieConfigurationPath = " scripts/scastieConfiguration.js"
124
- val memberResourcesPaths = Seq (searchDataPath) ++ Seq (scastieConfigurationPath) ++ memberResources.map(_.path)
125
- val earlyMemberResourcePaths = earlyMemberResources.map(_.path)
132
+ val commonResourcesPaths = Seq (searchDataPath) ++ Seq (scastieConfigurationPath) ++ commonResources.map(_.path)
133
+ val earlyCommonResourcePaths = earlyCommonResources.map(_.path)
134
+
135
+ val apiOnlyResourcesPaths : Seq [String ] = apiOnlyResources.map(_.path)
136
+ val staticSiteOnlyResourcesPaths : Seq [String ] = staticSiteOnlyResources.map(_.path)
126
137
127
138
def searchData (pages : Seq [Page ]) =
128
139
def flattenToText (signature : Signature ): String =
@@ -168,37 +179,42 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
168
179
}" """ )
169
180
170
181
171
- def allResources (pages : Seq [Page ]): Seq [Resource ] = earlyMemberResources ++ memberResources ++ Seq (
172
- dottyRes(" favicon.ico" ),
173
- dottyRes(" fonts/dotty-icons.woff" ),
174
- dottyRes(" fonts/dotty-icons.ttf" ),
175
- dottyRes(" images/scaladoc_logo.svg" ),
176
- dottyRes(" images/scaladoc_logo_dark.svg" ),
177
- dottyRes(" images/class.svg" ),
178
- dottyRes(" images/class_comp.svg" ),
179
- dottyRes(" images/object.svg" ),
180
- dottyRes(" images/object_comp.svg" ),
181
- dottyRes(" images/trait.svg" ),
182
- dottyRes(" images/trait_comp.svg" ),
183
- dottyRes(" images/enum.svg" ),
184
- dottyRes(" images/enum_comp.svg" ),
185
- dottyRes(" images/given.svg" ),
186
- dottyRes(" images/method.svg" ),
187
- dottyRes(" images/type.svg" ),
188
- dottyRes(" images/val.svg" ),
189
- dottyRes(" images/package.svg" ),
190
- dottyRes(" images/static.svg" ),
191
- dottyRes(" images/github-icon-black.png" ),
192
- dottyRes(" images/github-icon-white.png" ),
193
- dottyRes(" images/discord-icon-black.png" ),
194
- dottyRes(" images/discord-icon-white.png" ),
195
- dottyRes(" images/twitter-icon-black.png" ),
196
- dottyRes(" images/twitter-icon-white.png" ),
197
- dottyRes(" images/gitter-icon-black.png" ),
198
- dottyRes(" images/gitter-icon-white.png" ),
199
- searchData(pages),
200
- scastieConfiguration(),
201
- )
182
+ def allResources (pages : Seq [Page ]): Seq [Resource ] =
183
+ earlyCommonResources ++
184
+ commonResources ++
185
+ apiOnlyResources ++
186
+ staticSiteOnlyResources ++
187
+ Seq (
188
+ dottyRes(" favicon.ico" ),
189
+ dottyRes(" fonts/dotty-icons.woff" ),
190
+ dottyRes(" fonts/dotty-icons.ttf" ),
191
+ dottyRes(" images/scaladoc_logo.svg" ),
192
+ dottyRes(" images/scaladoc_logo_dark.svg" ),
193
+ dottyRes(" images/class.svg" ),
194
+ dottyRes(" images/class_comp.svg" ),
195
+ dottyRes(" images/object.svg" ),
196
+ dottyRes(" images/object_comp.svg" ),
197
+ dottyRes(" images/trait.svg" ),
198
+ dottyRes(" images/trait_comp.svg" ),
199
+ dottyRes(" images/enum.svg" ),
200
+ dottyRes(" images/enum_comp.svg" ),
201
+ dottyRes(" images/given.svg" ),
202
+ dottyRes(" images/method.svg" ),
203
+ dottyRes(" images/type.svg" ),
204
+ dottyRes(" images/val.svg" ),
205
+ dottyRes(" images/package.svg" ),
206
+ dottyRes(" images/static.svg" ),
207
+ dottyRes(" images/github-icon-black.png" ),
208
+ dottyRes(" images/github-icon-white.png" ),
209
+ dottyRes(" images/discord-icon-black.png" ),
210
+ dottyRes(" images/discord-icon-white.png" ),
211
+ dottyRes(" images/twitter-icon-black.png" ),
212
+ dottyRes(" images/twitter-icon-white.png" ),
213
+ dottyRes(" images/gitter-icon-black.png" ),
214
+ dottyRes(" images/gitter-icon-white.png" ),
215
+ searchData(pages),
216
+ scastieConfiguration(),
217
+ )
202
218
203
219
def renderResource (resource : Resource ): Seq [String ] =
204
220
val normalizedPath = resource.path.replace('\\ ' , '/' )
0 commit comments