Skip to content

Commit 98bead0

Browse files
committed
Fix resources
1 parent c4191e1 commit 98bead0

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

scaladoc-js/main/src/searchbar/SearchbarComponent.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class SearchbarComponent(engine: PageSearchEngine, inkuireEngine: InkuireJSSearc
104104
if result.isEmpty then
105105
val noResultsDiv = div(id := "no-results-container")(
106106
// TODO fix path to the element
107-
img(src := "./icons/no-results.svg", alt := "Sick face"),
107+
img(src := "../images/no-results-icon.svg", alt := "Sick face"),
108108
h2(cls := "h200 no-result-header")("No results match your filter criteria."),
109109
p(cls := "body-small no-result-content")("Try adjusting or clearing your filters", p("to display better result")),
110110
button(id := "searchbar-clear-button", cls := "clearButton label-only-button")("Clear all filters").tap(_.addEventListener("click", _ => {

scaladoc/resources/dotty_res/scripts/components/FilterBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class FilterBar extends Component {
9090
emptySpace.insertAdjacentHTML(
9191
"beforeend",
9292
`<div id='no-results-container'>
93-
<img src="./icons/no-results.svg" alt="Sick face" >
93+
<img src="../images/no-results-icon.svg" alt="Sick face" >
9494
<h2 class='h200 no-result-header'>No results match your filter criteria</h2>
9595
<p class='no-result-content'>Try adjusting or clearing your filters<br>to display better result</p>
9696
<button class='clearButton label-only-button'>Clear all filters</button>

scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
3232

3333
private def scaladocVersionFile = Resource.Text("scaladoc.version", BuildInfo.version)
3434

35-
lazy val noResultsIcon = {
36-
val path = Paths.get("docs/_assets/images/no-results-icon.svg")
37-
Resource.File("icons/no-results.svg", path)
38-
}
39-
4035
lazy val projectLogo = ctx.args.projectLogo.map { p =>
4136
val path = Paths.get(p)
4237
Resource.File(s"project-logo/${path.getFileName()}", path)
@@ -138,7 +133,7 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
138133
"https://scastie.scala-lang.org/embedded.js"
139134
).map(Resource.URL.apply)
140135

141-
fromResources ++ urls ++ projectLogo ++ darkProjectLogo ++ Seq(noResultsIcon, scaladocVersionFile, dynamicJsData)
136+
fromResources ++ urls ++ projectLogo ++ darkProjectLogo ++ Seq(scaladocVersionFile, dynamicJsData)
142137
}
143138

144139
val apiOnlyResources = List(
@@ -274,6 +269,7 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
274269
dottyRes("images/class.svg"),
275270
dottyRes("images/class_comp.svg"),
276271
dottyRes("images/class-dark.svg"),
272+
dottyRes("images/no-results-icon.svg"),
277273
dottyRes("images/object.svg"),
278274
dottyRes("images/object_comp.svg"),
279275
dottyRes("images/object-dark.svg"),

0 commit comments

Comments
 (0)