-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Copy pathtoc.ejs
42 lines (42 loc) · 1.5 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
38
39
40
41
42
<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>Essentials</h3></li>
<% } %>
<% if (fileName === 'components-registration') { %>
<li><h3>Components In-Depth</h3></li>
<% } %>
<% if (fileName === 'transitions') { %>
<li><h3>Transitions & Animation</h3></li>
<% } %>
<% if (fileName === 'mixins') { %>
<li><h3>Reusability & Composition</h3></li>
<% } %>
<% if (fileName === 'single-file-components') { %>
<li><h3>Tooling</h3></li>
<% } %>
<% if (fileName === 'routing') { %>
<li><h3>Scaling Up</h3></li>
<% } %>
<% if (fileName === 'reactivity') { %>
<li><h3>Internals</h3></li>
<% } %>
<% if (fileName === 'migration') { %>
<li><h3>Migrating</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>
<% }) %>
<% if (type === 'guide') { %>
<li>
<a href="https://vuejs.org/about/team.html" class="sidebar-link" target="_blank" rel="noopener">Meet the Team</a>
</li>
<% } %>
</ul>