Skip to content

Commit acff90a

Browse files
committed
Add css for search page
1 parent 7adbdc3 commit acff90a

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

doc-tool/resources/_layouts/search.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
---
22
layout: main
3+
extraCSS:
4+
- css/toolbar.css
5+
- css/search.css
36
---
47

8+
{% include "toolbar" %}
9+
510
<h1 id="searching-for"></h1>
611

712
<script>

doc-tool/resources/css/search.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1#searching-for {
2+
margin-top: 95px;
3+
}

doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ case class Site(
134134
// Copy statics included in resources
135135
Map(
136136
"css/toolbar.css" -> "/css/toolbar.css",
137+
"css/search.css" -> "/css/search.css",
137138
"css/sidebar.css" -> "/css/sidebar.css",
138139
"css/api-page.css" -> "/css/api-page.css",
139140
"css/dottydoc.css" -> "/css/dottydoc.css",
@@ -209,7 +210,7 @@ case class Site(
209210

210211
// generate search page:
211212
val target = mkdirs(fs.getPath(outDir.getAbsolutePath + "/api/search.html"))
212-
val searchPageParams = defaultParams(target.toFile).withPosts(blogInfo).toMap
213+
val searchPageParams = defaultParams(target.toFile, -1).withPosts(blogInfo).toMap
213214
val searchPage = new HtmlPage("_layouts/search.html", layouts("search").content, searchPageParams, includes)
214215
render(searchPage).foreach { rendered =>
215216
Files.copy(

doc-tool/test/dotty/tools/dottydoc/staticsite/SiteTests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class SiteTests extends DottyDocTest with SourceFileOps {
8484
val expectedAssets = Set(
8585
"css/toolbar.css",
8686
"css/sidebar.css",
87+
"css/search.css",
8788
"css/api-page.css",
8889
"css/dottydoc.css",
8990
"css/color-brewer.css",

0 commit comments

Comments
 (0)