-
Notifications
You must be signed in to change notification settings - Fork 340
/
index.mustache
245 lines (214 loc) · 9.28 KB
/
index.mustache
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>docxtemplater</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="docx templating, generate docx from the browser and nodejs">
<meta name="description" content="docxtemplater makes it very easy to generate docx without writing lots of code">
<meta name="author" content="Edgar Hipp">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link href="style.css" rel="stylesheet">
</head>
<body>
<!--header-->
<header>
<div class="container">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="index.html"><img src="../logo-tiny.png" alt="logo"></a> </div> -->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="http://javascript-ninja.fr/docxtemplater/v1/examples/demo.html">DEMO</a></li>
<li><a href="#install">INSTALL</a></li>
<li><a href="https://docxtemplater.readthedocs.io/en/latest/">DOCS</a></li>
<li><a href="#support">SUPPORT</a></li>
<li><a href="https://modules.docxtemplater.com">PRO MODULES</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
</div>
</div>
</div>
<div class="label-info">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-5 text-center">
{{{mainlogo}}}
</div>
<div class="col-xs-12 col-sm-8 col-md-7">
<h1>docxtemplater</h1>
<h2>Generate docx and pptx with ease</h2>
<p><a type="button" class="btn btn-primary" href="#install">INSTALL NOW v{{version}}</a>
<a href="https://github.com/open-xml-templating/docxtemplater" class="btn btn-success">VIEW ON Github</a></p>
</div>
</div>
</div>
</div>
</header>
<!--body-->
<section>
<div class="container help-block">
<h1 class="text-center">Why use docxtemplater?</h1>
<div class="row">
<div class="col-sm-2 col-md-2 text-center">
{{{features.easy}}}
</div>
<div class="col-sm-10 col-md-8">
<h2>Super easy to install and set up</h2>
<p>
In less than five minutes you can install docxtemplater, create your first template and generate some docx from javascript objects or JSON
</p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center label-warning">
{{{features.everywhere}}}
</div>
<div class="col-sm-10 col-md-8 col-md-offset-2 lead">
<h2>Works everywhere</h2>
<p>docxtemplater works with nodejs version 0.10+, and in most modern browsers (Chrome,Firefox,Safari,IE9+). It also has a command line. If you like to be on edge and use io.js, docxtemplater works with it too</p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center">
{{{features.fulldocumentation}}}
</div>
<div class="col-sm-10 col-md-8">
<h2>Full Documentation</h2>
<p>docxtemplater has extensive documentation available at <a href="https://docxtemplater.readthedocs.io/en/latest/">https://docxtemplater.readthedocs.io/en/latest/</a>.</p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center label-warning">
{{{features.manytags}}}
</div>
<div class="col-sm-10 col-md-8 col-md-offset-2 lead">
<h2>Features many different types of tags</h2>
<p>With docxtemplater, you can insert text, but also have loops and conditions : {#tag} {/tag}, the possibility to add custom xml {@xml} , loop over table rows, or insert images {!image} </p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center">
{{{features.openextension}}}
</div>
<div class="col-sm-10 col-md-8">
<h2>Open for extension</h2>
<p>docxtemplater is open for extension with its module system (image replacing is a module). You can also define a custom parser to process the tags the way you want.</p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center label-warning">
{{{features.freebeer}}}
</div>
<div class="col-sm-10 col-md-8 col-md-offset-2 lead">
<h2>Free as in beer</h2>
<p>docxtemplater is and will always be licensed under the permissive MIT license.</p>
</div>
</div>
<div class="row">
<div class="col-sm-2 col-md-2 text-center">
{{{features.fullytested}}}
</div>
<div class="col-sm-10 col-md-8">
<h2>Fully tested</h2>
<p>docxtemplater has automated tests that run locally and at each git push, covering a huge amount of possible inputs and verifying that the output is correct.</p>
</div>
</div>
</div>
</section>
<section>
<!-- Install Modal -->
<div id="install">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Install & Run</h4>
</div>
<div class="modal-body">
<p>The best way to get docxtemplater is via npm</p>
<pre><code>npm install docxtemplater --save</code></pre>
<p><b>jszip version 2 is important !**, it won't work with version 3</b></p>
<pre><code>npm install jszip@2 --save</code></pre>
<p>Then create "input.docx" file containing "Hello {firstname} {lastname} !"</p>
<p>And create the following index.js file:</p>
<pre><code>var fs = require('fs');
var Docxtemplater = require('docxtemplater');
var JSZip = require('jszip');
var content = fs
.readFileSync(__dirname+"/input.docx","binary");
var zip = new JSZip(content);
var doc = new Docxtemplater().loadZip(zip);
doc.setData({
"firstname":"John",
"lastname":"Doe"
});
doc.render();
var buf = doc.getZip()
.generate({type:"nodebuffer"});
fs.writeFileSync(__dirname+"/output.docx",buf);
</code></pre>
<p>And that's it! docxtemplater will replace all keys passed to setData inside the input docx</p>
<p>To get started in the browser, view the <a href="https://github.com/open-xml-templating/docxtemplater#quickstart-in-the-browser">quickstart in the browser</a></p>
</div>
<div class="modal-footer">
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</section>
<section id="support" class="label-primary">
<div class="container help-block">
<div class="row">
<div class="col-xs-12">
<h1 class="text-center">Support</h1>
<p class="text-center">docxtemplater has comprehensive documentation available at <a href="https://docxtemplater.readthedocs.io/en/latest/">https://docxtemplater.readthedocs.io/en/latest/</a></p>
<p class="text-center">If you have some general questions / bugs to report, please use <a href="https://github.com/open-xml-templating/docxtemplater/issues/">the github issue tracker.</a></p>
<p class="text-center">I also provide professional support for companies with an SLA (My email address can be found on this site: https://github.com/edi9999)</p>
<p class="text-center">You can also find ready-made pro modules at : <a href="https://modules.docxtemplater.com">https://modules.docxtemplater.com</a></p>
</div>
</div>
</div>
</section>
<section>
<div class="container help-block">
<div class="row">
<div class="col-sm-2 col-sm-offset-1 col-md-2 col-md-offset-2 text-center"><img src="https://avatars3.githubusercontent.com/u/2071336?v=3&s=130" alt=""></div>
<div class="col-sm-9 col-md-8">
<h1>Edgar Hipp</h1>
<h3>Hi, I'm the lead developer of docxtemplater and it has been more than two years that I started creating this project, still maintaining and developping it actively now.
</h3>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6"><p><a href="https://twitter.com/EdgarHipp" class="twitter-follow-button" data-show-count="false">Follow @EdgarHipp</a></p></div>
<div class="col-xs-12 col-sm-6 col-md-6"><p><strong><a href="http://javascript-ninja.fr" target="_blank">http://javascript-ninja.fr</a></strong></p></div>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
<p>Icons made by <a title="Freepik" href="http://www.freepik.com">Freepik</a> from <a title="Flaticon" href="http://www.flaticon.com">www.flaticon.com</a> </p>
<p>Icons made by <a href="http://www.flaticon.com/authors/google" title="Google">Google</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></p>
<p>The site design is highly inspired by <a href="https://phinx.org" title="Phinx">phinx.org</a> with permission</p>
<p>Copyright © 2015 - docxtemplater is open-source software.</p>
</div>
</div>
</div>
</footer>
</body>
</html>