Files: 07f9b60d2c393384f378ed29c5016d4dea460402 / tmpl / tabs.part.js
1606 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/index.html', 'Apps')} |
12 | ${item(c, 'more', '/more/protocols/secure-scuttlebutt.html', 'More')} |
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/update-your-profile.html', 'Social')} |
18 | ${item(c, 'docs-advanced', '/docs/advanced/links.html', 'Advanced')} |
19 | ${item(c, 'docs-message-types', '/docs/message-types/post.html', 'Message Types')} |
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/pull-stream.html', 'Pull Stream')} |
27 | ${item(c, 'apis-community', '/apis/community/ssbify.html', 'Community')} |
28 | </div>` |
29 | |
30 | module.exports.more = (c) => `<div class="tabs small"> |
31 | ${item(c, 'more-protocols', '/more/protocols/secure-scuttlebutt.html', 'Protocols')} |
32 | ${item(c, 'more-articles', '/more/articles/design-challenge-avoid-centralization-and-singletons.html', 'Articles')} |
33 | </div>` |
Built with git-ssb-web