forked from nativescript-vue/nativescript-vue.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.ejs
114 lines (103 loc) · 5.33 KB
/
docs.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!doctype html>
<html lang="<%= current.locale || 'en' %>">
<head>
<%- include('_partials/meta') %>
<title><%= current.title %> - <%= meta.sitename %></title>
</head>
<body>
<div class="font-sans leading-normal" :class="{'max-h-screen': modalVisible, 'overflow-hidden': modalVisible}">
<!--<QuickStart />-->
<%- include('_partials/header') %>
<div class="bg-grey-lighter md:hidden">
<div class="container mx-auto p-4">
<select onchange="window.location = this.options[this.selectedIndex].value" class="w-full p-2" title="Navigation">
<%- include('_partials/categories_select', { entry: { children: meta.docs_categories } }) %>
</select>
</div>
</div>
<% if(meta.currentVersion.branch !== 'master') { %>
<a href="//nativescript-vue.org/"
class="block bg-orange-dark p-2 text-center no-underline text-white">
You are reading docs for <span class="bg-orange-lightest text-orange-dark rounded-sm px-2 py-1"><%= meta.currentVersion.name %></span>, click here for the latest version.
</a>
<% } %>
<div class="md:bg-docs-gradient min-h-screen">
<div class="container mx-auto flex">
<div class="hidden md:w-1/4 md:block border-r-4 min-h-full">
<div class="pl-4 md:pl-0 py-4 md:py-8">
<ul id="docs-toc" class="list-reset">
<%- include('_partials/categories', { entry: { children: meta.docs_categories } }) %>
</ul>
</div>
</div>
<div class="w-full md:w-3/4 bg-white min-h-screen docSearch-content">
<div class="p-4 md:pl-8">
<% if (current.title) { %>
<div class="text-blue-dark text-4xl mt-4 relative docSearch-lvl1">
<%= current.title %>
</div>
<hr class="border-t-2 border-blue-lighter w-24 mx-0 mb-2">
<% } %>
<% if (current.apiRef && current.title) { %>
<div class="bg-grey-lighter border-l-8 border-blue-dark
text-blue-dark p-4 my-8">
<p>
This is an overview of the most common usage of <%= current.title %>.
<% if (current.docRef) { %>
See <a href="<%= current.docRef %>"
target="_blank"
rel="noopener"
class="no-underline text-green hover:text-blue-dark">
the NativeScript docs
</a> for more information about <%= current.title %>.
<% } %>
For more information about the available properties, methods, or events, head over
to <a href="<%= current.apiRef %>"
target="_blank"
rel="noopener"
class="no-underline text-green hover:text-blue-dark">
the complete API documentation for <%= current.title %>.
</a>
</p>
</div>
<% } %>
<% if (current.outdated) { %>
<div class="bg-orange-lightest border-l-8 border-orange-dark
text-orange-dark p-4 my-8">
<p>
This page contains outdated information. We are trying out best to update it to reflect
the most recent changes, and we are also really happy to accept contributions.
</p>
</div>
<% } %>
<% if(current.authors) { %>
<div class="text-blue-light mb-8">
<%= meta.moment(date).format('MMMM DD, YYYY') %>
by <%- current.authors.map(author => `<a href="https://github.com/${author}" target="_blank" rel="noopener" class="no-underline text-green hover:text-blue-dark">${author}</a>`).join(', ') %>
</div>
<% } %>
<div class="markdown-body">
<%- current.contents %>
</div>
<% if(current.next) { %>
<%- include('_partials/next', { next }) %>
<% } %>
<% if (current.contributors) { %>
<%- include('_partials/contributors', { contributors: current.contributors }) %>
<% } %>
<div class="flex justify-center">
<a href="https://github.com/nativescript-vue/nativescript-vue.org/tree/<%= meta.currentVersion.branch %>/content/<%= current.filePath %>"
target="_blank"
rel="noopener"
class="border border-green px-4 py-2 no-underline text-green hover:border-blue-dark hover:text-blue-dark my-8">
Improve this document
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<%- include('_partials/footer') %>
</body>
</html>