Files: a738ecf91d844ee886e94857a82177ab446113f1 / tmpl / tabs.part.js
2190 bytesRaw
1 | function item (current, name, path, label) { |
2 | var cls = '' |
3 | if (current == name) |
4 | cls = 'class="current"' |
5 | return `<div ${cls}><a href="${path}" title="${label}">${label}</a></div>` |
6 | } |
7 | |
8 | module.exports.sections = (c) => `<div class="tabs big"> |
9 | ${item(c, 'docs', '/docs/basics/install-the-database.html', 'Docs')} |
10 | ${item(c, 'apis', '/apis/scuttlebot/ssb.html', 'APIs')} |
11 | ${item(c, 'apps', '/apps/patchwork.html', 'Apps')} |
12 | ${item(c, 'guides', '/guides/what-can-you-build-with-sbot/intro.html', 'Guides')} |
13 | </div>` |
14 | |
15 | module.exports.docs = (c) => `<div class="tabs small"> |
16 | ${item(c, 'docs-basics', '/docs/basics/install-the-database.html', 'Basics')} |
17 | ${item(c, 'docs-social', '/docs/social/follow-users.html', 'Social')} |
18 | ${item(c, 'docs-message-types', '/docs/message-types/post.html', 'Message Types')} |
19 | ${item(c, 'docs-advanced', '/docs/advanced/advanced-queries.html', 'Advanced')} |
20 | ${item(c, 'docs-config', '/docs/config/configure-scuttlebot.html', 'Config')} |
21 | </div>` |
22 | |
23 | module.exports.apis = (c) => `<div class="tabs small"> |
24 | ${item(c, 'apis-scuttlebot', '/apis/scuttlebot/ssb.html', 'Scuttlebot')} |
25 | ${item(c, 'apis-modules', '/apis/modules/ssb-client.html', 'Modules')} |
26 | ${item(c, 'apis-pull-stream', '/apis/pull-stream/ssb-client.html', 'Pull Stream')} |
27 | ${item(c, 'apis-community', '/apis/community/ssbify.html', 'Community')} |
28 | </div>` |
29 | |
30 | module.exports.apps = (c) => `<div class="tabs small"> |
31 | ${item(c, 'basics', '/basics/install-the-database.html', 'Basics')} |
32 | ${item(c, 'social', '/social/social-network.html', 'Social')} |
33 | ${item(c, 'messages', '/messages/post.html', 'Message Types')} |
34 | ${item(c, 'advanced', '/advanced/writing-applications.html', 'Advanced')} |
35 | ${item(c, 'protocols', '/protocols/secure-scuttlebutt.html', 'Protocols')} |
36 | </div>` |
37 | |
38 | module.exports.guides = (c) => `<div class="tabs small"> |
39 | ${item(c, 'basics', '/basics/install-the-database.html', 'Basics')} |
40 | ${item(c, 'social', '/social/social-network.html', 'Social')} |
41 | ${item(c, 'messages', '/messages/post.html', 'Message Types')} |
42 | ${item(c, 'advanced', '/advanced/writing-applications.html', 'Advanced')} |
43 | ${item(c, 'protocols', '/protocols/secure-scuttlebutt.html', 'Protocols')} |
44 | </div>` |
Built with git-ssb-web