Skip to content

Commit d8b6fcf

Browse files
created banners and added correct icons to resources
1 parent 4893f43 commit d8b6fcf

File tree

8 files changed

+82
-0
lines changed

8 files changed

+82
-0
lines changed

docs/_layouts/static-site-main.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
<div id="site-header"></div>
77
{% if page.nightlyOf %}
88
<aside class="warning">
9+
<div class='icon'></div>
10+
<div class='content'>
911
This is a nightly documentation. The content of this page may not be
1012
consistent with the current stable version of language. Click
1113
<a href="{{ page.nightlyOf }}">here</a> to find the stable version of this
1214
page.
15+
</div>
1316
</aside>
1417
{% endif %} {{ content }}
1518
<div class="divider" />
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
aside {
2+
padding: calc(2* var(--base-spacing));
3+
font-weight: 400;
4+
font-size: 13px;
5+
line-height: 16px;
6+
margin-bottom: calc(6* var(--base-spacing));
7+
border-radius: 4px;
8+
display: flex;
9+
align-items: center;
10+
}
11+
12+
aside > .icon {
13+
width: 16px;
14+
height: 16px;
15+
content: url("../../../images/banner-icons/warning.svg");
16+
padding-right: var(--base-spacing);
17+
}
18+
19+
.warning {
20+
background-color: var(--semantic-background-yellow);
21+
}
22+
23+
.warning > .icon {
24+
content: url("../../../images/banner-icons/warning.svg");
25+
}
26+
27+
.success {
28+
background-color: var(--semantic-background-grass);
29+
}
30+
31+
.success > .icon {
32+
content: url("../../../images/banner-icons/success.svg");
33+
}
34+
35+
.neutral {
36+
background-color: var(--semantic-background-grey);
37+
}
38+
39+
.neutral > .icon {
40+
content: url("../../../images/banner-icons/neutral.svg");
41+
}
42+
43+
.info {
44+
background-color: var(--semantic-background-sky);
45+
}
46+
47+
.info > .icon {
48+
content: url("../../../images/banner-icons/info.svg");
49+
}
50+
51+
.error {
52+
background-color: var(--semantic-background-red);
53+
}
54+
55+
.error > .icon {
56+
content: url("../../../images/banner-icons/error.svg");
57+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
534534
dottyRes("images/package-big.svg"),
535535
dottyRes("images/thick.svg"),
536536
dottyRes("images/thick-dark.svg"),
537+
dottyRes("images/banner-icons/error.svg"),
538+
dottyRes("images/banner-icons/info.svg"),
539+
dottyRes("images/banner-icons/neutral.svg"),
540+
dottyRes("images/banner-icons/success.svg"),
541+
dottyRes("images/banner-icons/warning.svg"),
537542
searchData(pages),
538543
scastieConfiguration(),
539544
)

0 commit comments

Comments
 (0)