Skip to content

Commit 9a20975

Browse files
committed
Footer adjustments. Refactor Gitter button on static site so that it doesn't overlap footer.
1 parent 3b9dbbb commit 9a20975

File tree

3 files changed

+35
-18
lines changed

3 files changed

+35
-18
lines changed

docs/css/dottydoc.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,20 @@ aside.success {
248248
}
249249
}
250250

251+
.gitter-open-chat-button {
252+
writing-mode: vertical-lr;
253+
text-orientation: upright;
254+
right: 0px;
255+
bottom: 100px;
256+
padding: 0.5em 0.25em 0.5em 0.25em;
257+
border-bottom-left-radius: .5em;
258+
border-top-right-radius: 0em;
259+
}
260+
261+
.gitter-open-chat-button.is-collapsed {
262+
transform: translateX(120%);
263+
}
264+
251265
header {
252266
position: static !important;
253267
width: 100% !important;

scaladoc/resources/dotty_res/styles/scalastyle.css

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ footer {
547547
background: var(--footer-bg);
548548
color: var(--footer-fg);
549549
display: flex;
550+
flex-wrap: wrap;
551+
justify-content: space-around;
550552
bottom: 0px;
551553
align-items: center;
552554
position: fixed;
@@ -563,17 +565,7 @@ footer {
563565
*/
564566
filter: invert(100%) hue-rotate(180deg);
565567
}
566-
footer > span:first-child {
567-
margin-left: 24px;
568-
padding-left: 0;
569-
}
570-
footer > span:last-child {
571-
margin-right: 24px;
572-
padding-right: 0;
573-
}
574-
footer > span {
575-
padding: 0 16px;
576-
}
568+
577569
footer .padded-icon {
578570
padding-left: 0.5em;
579571
}
@@ -882,8 +874,6 @@ footer .pull-right {
882874
}
883875

884876
footer .socials {
885-
margin-left: 10px;
886-
margin-right: 10px;
887877
display: flex;
888878
align-items: center;
889879
}
@@ -899,7 +889,6 @@ footer .socials {
899889
}
900890

901891
#generated-by {
902-
margin-right: 20px;
903892
display: flex;
904893
align-items: center;
905894
}
@@ -934,6 +923,14 @@ footer .socials {
934923
footer > span:last-child {
935924
margin-right: 12px;
936925
}
926+
927+
footer {
928+
position: unset;
929+
}
930+
931+
.footer-text {
932+
display: none;
933+
}
937934
}
938935
/* Portrait phones */
939936
@media(max-width: 576px) {
@@ -1052,3 +1049,9 @@ footer .socials {
10521049
.dropdown-content a.filtered {
10531050
display: none;
10541051
}
1052+
1053+
@media(max-height:640px) {
1054+
footer {
1055+
position: unset;
1056+
}
1057+
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
216216

217217
def textFooter: String | AppliedTag =
218218
args.projectFooter.fold("") { f =>
219-
div(id := "footer-text")(
219+
span(id := "footer-text")(
220220
raw(f)
221221
)
222222
}
@@ -262,19 +262,19 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
262262
span(cls := "go-to-top-icon")(
263263
a(href := "#container")(
264264
span(cls:="icon-vertical_align_top"),
265-
raw(" Back to top")
265+
span(cls :="footer-text")(raw("Back to top"))
266266
)
267267
),
268268
label(id := "theme-toggle", cls := "switch")(
269269
input(`type` := "checkbox"),
270270
span(cls := "slider")
271271
),
272272
div(cls := "socials")(
273-
if hasSocialLinks then Seq(raw("Social links ")) else Nil,
273+
span(cls := "footer-text")(if hasSocialLinks then Seq(raw("Social links")) else Nil),
274274
socialLinks(whiteIcon = false)
275275
),
276276
div(id := "generated-by")(
277-
raw("Generated by "),
277+
span(cls := "footer-text")(raw("Generated by")),
278278
a(href := "https://github.com/lampepfl/dotty/tree/master/scaladoc")(
279279
img(
280280
src := resolveRoot(link.dri, "images/scaladoc_logo.svg"),

0 commit comments

Comments
 (0)