forked from vuejs-fr/v2.vuejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoc.ejs
37 lines (37 loc) · 1.32 KB
/
toc.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<ul class="menu-root">
<% ['api', 'style-guide'].indexOf(type) === -1 && site.pages.find({type: type}).sort('order').each(function (p) { %>
<% var fileName = p.path.replace(/^.+?\/([\w-]+)\.html/, '$1') %>
<% if (type === 'guide') { %>
<% if (fileName === 'installation') { %>
<li><h3>Essentiel</h3></li>
<% } %>
<% if (fileName === 'components-registration') { %>
<li><h3>Composants en détail</h3></li>
<% } %>
<% if (fileName === 'transitions') { %>
<li><h3>Transitions & animation</h3></li>
<% } %>
<% if (fileName === 'mixins') { %>
<li><h3>Réutilisabilité & composition</h3></li>
<% } %>
<% if (fileName === 'deployment') { %>
<li><h3>Outils</h3></li>
<% } %>
<% if (fileName === 'routing') { %>
<li><h3>Évolutions</h3></li>
<% } %>
<% if (fileName === 'reactivity') { %>
<li><h3>Mécanismes</h3></li>
<% } %>
<% if (fileName === 'migration') { %>
<li><h3>Migration</h3></li>
<% } %>
<% if (fileName === 'comparison') { %>
<li><h3>Meta</h3></li>
<% } %>
<% } %>
<li>
<a href="<%- url_for(p.path) %>" class="sidebar-link<%- page.title === p.title ? ' current' : '' %><%- p.is_new ? ' new' : '' %>"><%- p.title %></a>
</li>
<% }) %>
</ul>