silverstrap 

silverstrap Commit Details

Date:2013-06-13 19:02:57 (6 years 6 days ago)
Author:Nicola Fontana
Branch:bootstrap2, dev, master, master-1.0, ss3
Commit:0086fc46868f2c7465ca9aeee1bb0d8b3946561b
Parents: 71fe1aa943934c31a014b862bb1159e232363c87
Message:Added scrollspy support

Using data-target in links because SilverStripe rewrites the hash
(otherwise they will be referenced to the <base> href).
Changes:
Mtemplates/Includes/AutotocContent.ss (1 diff)
Mtemplates/Page.ss (1 diff)

File differences

templates/Includes/AutotocContent.ss
1
1
22
33
44
5
5
66
77
88
<aside class="span3">
<aside class="span3 toc">
<ul class="nav nav-list affix">
<li class="nav-header"><%t Silverstrap.TOC %></li>
<%-- Include only the first level of the TOC --%><% loop $Autotoc.Children %>
<li><a href="#$Id.ATT">$Title</a></li><% end_loop %>
<li><a href="#$Id.ATT" data-target="#$Id.ATT">$Title</a></li><% end_loop %>
</ul>
</aside>
<div class="span9">
templates/Page.ss
88
99
1010
11
11
1212
1313
1414
<% include Head %>
</head>
<body>
<body data-spy="scroll" data-target=".toc">
<% include Incipit %>
<% include Navbar %>
$Layout

Archive Download the corresponding diff file