Skip to content

Commit 0b1a5db

Browse files
committed
Footer adjustments. Refactor Gitter button on static site so that it doesn't overlap footer.
1 parent e4c4264 commit 0b1a5db

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
@@ -260,6 +260,20 @@ aside.success {
260260
}
261261
}
262262

263+
.gitter-open-chat-button {
264+
writing-mode: vertical-lr;
265+
text-orientation: upright;
266+
right: 0px;
267+
bottom: 100px;
268+
padding: 0.5em 0.25em 0.5em 0.25em;
269+
border-bottom-left-radius: .5em;
270+
border-top-right-radius: 0em;
271+
}
272+
273+
.gitter-open-chat-button.is-collapsed {
274+
transform: translateX(120%);
275+
}
276+
263277
header {
264278
position: static !important;
265279
width: 100% !important;

scaladoc/resources/dotty_res/styles/scalastyle.css

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ Same solution is already used in Dokka.
436436
/* Footer */
437437
footer {
438438
display: flex;
439+
flex-wrap: wrap;
440+
justify-content: space-around;
439441
bottom: 0px;
440442
align-items: center;
441443
position: fixed;
@@ -448,17 +450,7 @@ footer {
448450
footer span.go-to-top-icon {
449451
background-color: white;
450452
}
451-
footer > span:first-child {
452-
margin-left: 24px;
453-
padding-left: 0;
454-
}
455-
footer > span:last-child {
456-
margin-right: 24px;
457-
padding-right: 0;
458-
}
459-
footer > span {
460-
padding: 0 16px;
461-
}
453+
462454
footer .padded-icon {
463455
padding-left: 0.5em;
464456
}
@@ -682,8 +674,6 @@ footer {
682674
}
683675

684676
footer .socials {
685-
margin-left: 10px;
686-
margin-right: 10px;
687677
display: flex;
688678
align-items: center;
689679
}
@@ -699,7 +689,6 @@ footer .socials {
699689
}
700690

701691
#generated-by {
702-
margin-right: 20px;
703692
display: flex;
704693
align-items: center;
705694
}
@@ -734,6 +723,14 @@ footer .socials {
734723
footer > span:last-child {
735724
margin-right: 12px;
736725
}
726+
727+
footer {
728+
position: unset;
729+
}
730+
731+
.footer-text {
732+
display: none;
733+
}
737734
}
738735
/* Portrait phones */
739736
@media(max-width: 576px) {
@@ -790,3 +787,9 @@ footer .socials {
790787
footer {
791788
background-color: white;
792789
}
790+
791+
@media(max-height:640px) {
792+
footer {
793+
position: unset;
794+
}
795+
}

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

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

209209
def textFooter: String | AppliedTag =
210210
args.projectFooter.fold("") { f =>
211-
div(id := "footer-text")(
211+
span(id := "footer-text")(
212212
raw(f)
213213
)
214214
}
@@ -247,15 +247,15 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
247247
span(cls := "go-to-top-icon")(
248248
a(href := "#container")(
249249
span(cls:="icon-vertical_align_top"),
250-
raw(" Back to top")
250+
span(cls :="footer-text")(raw("Back to top"))
251251
)
252252
),
253253
div(cls := "socials")(
254-
if hasSocialLinks then Seq(raw("Social links ")) else Nil,
254+
span(cls := "footer-text")(if hasSocialLinks then Seq(raw("Social links")) else Nil),
255255
socialLinks(whiteIcon = false)
256256
),
257257
div(id := "generated-by")(
258-
raw("Generated by "),
258+
span(cls := "footer-text")(raw("Generated by")),
259259
a(href := "https://github.com/lampepfl/dotty/tree/master/scaladoc")(
260260
img(
261261
src := resolveRoot(link.dri, "images/scaladoc_logo.svg"),

0 commit comments

Comments
 (0)