-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add configurable social links to scala3doc #11273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think having them in the sidebar is fine. Not quite sure about having them at the bottom. If they appear on the main page I'd more expect them at the very top. |
I often find social links at the bottom (e.g. on scala-lang.org) so it looks good to me. |
OK, so maybe I will leave it as it is and wait for community opinion. We can always change this in future. |
6191324
to
ca9f3ee
Compare
val socialLinks: Setting[List[String]] = | ||
MultiStringSetting("-social-links", "social-links", | ||
"Links to social sites. '[github|twitter|gitter|discord]::link' syntax is used. " + | ||
"'custom::link::icon_name' is also allowed, in this case icon must be present in 'images/'' directory.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is incorrect, since we need 2 icons (white and black)
object SocialLinks: | ||
def parse(s: String): Either[String, SocialLinks] = | ||
val splitted = s.split("::") | ||
if splitted.size < 2 then Left(s"Social links arg $s is invalid.") else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add more meaning full error messages? e.g. when custom
is provided then we should say that there is incorrect number of arguments. We should also check in e.g. github
is provided that there are no additional arguments
src := resolveRoot(link.dri, "images/scaladoc_logo.svg"), | ||
alt := "scaladoc", | ||
cls := "scaladoc_logo" | ||
div(id := "footer-socials")( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe instead of ids we can use jus a class and then based on parent class style it in css?
so instead of #footer-socials
we are using .footer .socials
ca9f3ee
to
1598da1
Compare
closes #11092
@TheElectronWill @Katrix Below I've pasted current appearance of social links. What do you think about it? If not, maybe you have some ideas on how to improve it