[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH]: add section links (was: new website & IRC bot)

From: Martin Furter <mf_at_rola.ch>
Date: Tue, 9 Feb 2010 19:35:46 +0100 (CET)

On Tue, 9 Feb 2010, Julian Foad wrote:

> Alan Barrett wrote:
>> On Tue, 09 Feb 2010, Julian Foad wrote:
>>> * A very neat solution: a little "link to this section" symbol after
>>> each heading. I saw a web site that provided links to the individual
>>> section headings by popping up a little symbol (the paragraph marker
>>> symbol which looks like a P with a double-stroked vertical line) just at
>>> the end of the section heading text, only when the mouse hovered over
>>> the heading text. The symbol was a link to the full URL of that section,
>>> so it could be copied, plus a "title" attribute of some kind.
>
>
>> Here's an attempt at an implementation.
>>
>> /* CSS */
>>
>> /*
>> * Hide class="sectionlink", except when an enclosing heading
>> * has the :hover property.
>> */
>> .sectionlink { display: none; }
>> .heading:hover .sectionlink { display: inline; }
>
> Thanks, Alan. For our purposes, where headings come in various classes:
> [[[
> Index: style/site.css
> ===================================================================
> --- style/site.css (revision 904498)
> +++ style/site.css (working copy)
> @@ -135,6 +135,10 @@
> .h3 {
> margin-left: 2em;
> }
> +/* Hide class="sectionlink", except when an enclosing heading has the :hover
> + * property. */
> +.sectionlink { display: none; }
> +:hover > .sectionlink { display: inline; }
>
> /*
> ** Other Customizations
> ]]]
>
> That matches anything with class "sectionlink" that is a direct child of
> what you're hovering over.
>
> Then we can modify our headings like this:
> [[[
> -<div class="h2" id="news" title="news">
> -<h2>News</h2>
> +<div class="h2" id="news">
> +<h2>NewsΒΆ</h2>
> ]]]
>
> How's that?

I've created a copy and applied that patch-template:
http://svn-test.borg.ch/

Mmm, nice :)

Here's an attempt at a patch...

I've no idea what happened to the .ja and .zh pages. Unfortunately my
browser is not able to display those characters.

[[[
Replace title attributes by section links which show up when hovering
over the enclosing header.

* style/site.css
   (.sectionlink): New class.

* contributing.html,
* docs/community-guide/building.part.html,
* docs/community-guide/conventions.part.html,
* docs/community-guide/debugging.part.html,
* docs/community-guide/general.part.html,
* docs/community-guide/index.html,
* docs/community-guide/issues.part.html,
* docs/community-guide/l10n.part.html,
* docs/community-guide/mailing-lists.part.html,
* docs/community-guide/releasing.part.html,
* docs/community-guide/roles.part.html,
* docs/index.html,
* docs/release-notes/1.2.html,
* docs/release-notes/1.3.html,
* docs/release-notes/1.4.html,
* docs/release-notes/1.5.html,
* docs/release-notes/1.6.html,
* docs/release-notes/1.6.zh.html,
* faq.html,
* faq.ja.html,
* faq.zh.html,
* index.html,
* issue-tracker.html,
* mailing-lists.html,
* news.html,
* packages.html,
* roadmap.html,
* source-code.html
   Remove title attributes and add section links to headers.
]]]

Thanks,
Martin

Received on 2010-02-09 19:37:02 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.