-
-
Notifications
You must be signed in to change notification settings - Fork 378
Change named headers into subtle links to themselves #497
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
Fixed issue where |
@@ -156,6 +156,24 @@ a:visited | |||
color: #606; | |||
} | |||
|
|||
a.anchor | |||
{ | |||
color: rgb(102, 51, 51); |
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.
Why changing the color?
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.
Regular links should be left unchanged, but these anchor links should look like regular headers unless hovered. It's common practice for this kind of feature. Leaving it as the default link color would not only change the colour design of the site, but headers with and without anchor names would have different colouring (which looks rather arbitrary).
I'll add a comment.
Nice, I hope that the increased visibility of anchors will help to add more of them. |
Commented the style. Please have a look and see if you agree with those decisions. |
The regular header color with a ¶ is pretty common. See Python's docs. Looks like Node.js uses a |
Looking at the Python docs, it looks like they use JavaScript to trigger the visibility of the pilcrow instead of As for Node.js' permanently visible links; it would probably look a little weird on dlang.org since it's kind of arbitrary which headers have anchors. Or maybe that would be a good thing? ;) |
@9rnsr, what do you think about this? |
The idea is definitely good. For style issue, I have no opinion. On the other hand, I have one logical issue - each current anchors are not considered to be displayed (they are internal links just for cross reference). So their name styles are random. For example: Hyphenate vs underbar: Singular vs plural: Section anchor conflicts with the grammar which has same name: So we need to unify the name styles before publishing them by this change. |
You think it's OK to change them one last time? I personally agree we should do that, but I wouldn't be surprised if some people didn't... link breakage is serious, but these links were nigh unobtainable in the first place. I think I'll raise the issue on the NewsGroup. edit: http://forum.dlang.org/post/srqvufwxkqguaijwgnuo@forum.dlang.org |
Is it possible to set up automatic redirects? E.g. If the answer is yes this would also help out in factoring out the changelog into multiple pages without breaking existing links. |
ready to merge? |
guess I just will |
Change named headers into subtle links to themselves
No, this was in fact not ready to merge:
I was still working on that (actually working on trying to rebase your giant DDoc PR before adding yet more points of breakage). |
I'll open this again after unifying the anchor names. |
Many sections in the language reference have page anchors, but to know the anchor name one has to look in the source code, effectively rendering them useless.
This change makes these headers links to themselves, so people can easily share links to specific parts of a page.
The links have subtle styling. When not hovering over one, it looks like any other header. Hover over it, and it gets an underline and a pilcrow/paragraph symbol after it.