-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
getting-started.html
364 lines (349 loc) · 13.9 KB
/
getting-started.html
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="en">
<head>
{{> head }}
</head>
<body>
{{> navbar }}
<main>
{{> intro}}
<div class="container">
<!-- Outer row -->
<div class="row">
<div class="section col s12 m8 offset-m1 xl7 offset-xl1">
<div id="download" class="section scrollspy">
<div class="row">
<div class="col s12">
<h3 class="header">Download</h3>
<p class="caption ">
Materialize comes in two different forms. You can select
which version you want depending on your preference and
expertise. To start using Materialize, all you have to do is
download one of the options below.
</p>
</div>
<div class="col s12 m6">
<h5>Materialize</h5>
<p>
This is the standard version that comes with both the
minified and unminified CSS and JavaScript files. This
option requires little to no setup. Use this if you are
unfamiliar with Sass.
</p>
<a
id="download-source"
class="btn waves-effect waves-light icon-right"
href="https://github.com/materializecss/materialize/releases/download/2.0.3-alpha/materialize-v2.0.3-alpha.zip"
>
Materialize<i class="material-icons">file_download</i>
</a>
</div>
<div class="col s12 m6">
<h5>Sass</h5>
<p>
This version contains the source SCSS files. By choosing
this version you have more control over which components to
include. You will need a Sass compiler if you choose this
option.
</p>
<a
id="download-sass"
class="btn waves-effect waves-light icon-right"
href="https://github.com/materializecss/materialize/releases/download/2.0.3-alpha/materialize-src-v2.0.3-alpha.zip"
>
Source<i class="material-icons right">file_download</i>
</a>
</div>
</div>
<div class="row card is-closed" id="download-thanks">
<div class="s12">
<h3 class="header">Thank you for downloading!</h3>
<p class="caption">
We hope you find Materialize useful in your next project. We
would appreciate if you help us spread the word about
Materialize by giving us a star or support our work.
</p>
</div>
<iframe
style="align-self: center;"
src="https://ghbtns.com/github-btn.html?user=materializecss&repo=materialize&type=star&count=true&size=large"
allowtransparency="true"
frameborder="0"
scrolling="0"
width="170"
height="30"
></iframe>
<a
href="https://opencollective.com/materialize"
target="_blank"
class="btn z-depth-0"
>OpenCollective</a
>
</div>
<div class="row">
<div class="col s12">
<h5>CDN</h5>
<p>
You can find all the versions of the CDN at
<a
href="https://www.jsdelivr.com/package/npm/@materializecss/materialize"
>jsDelivr</a
>.
</p>
<pre style="padding-top: 0px;">
<span class="copyMessage">Copied!</span>
<i class="material-icons copyButton">content_copy</i>
<code class="language-markup copiedText">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.3-alpha/dist/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.3-alpha/dist/js/materialize.min.js"></script>
</code></pre>
</div>
<div class="col s12">
<h5>NPM</h5>
<p>
You can also get the latest release using NPM. This release
contains source files as well as the compiled CSS and
JavaScript files.
</p>
<pre><code class="language-bash">
npm install @materializecss/materialize
</code></pre>
</div>
<div class="col s12">
<h5>Yarn</h5>
<p>
Since
<strong
><a
href="https://bower.io/blog/2017/how-to-migrate-away-from-bower/"
>Bower is deprecated</a
></strong
>, you can get the latest release using yarn as your
favorite package manager.
</p>
<pre><code class="language-bash">
yarn add @materializecss/materialize
</code></pre>
</div>
</div>
</div>
<div id="setup" class="row scrollspy">
<div class="col s12">
<h3 class="header">Setup</h3>
<h5>Project Structure</h5>
<p>
After downloading, extract the files into the directory where
your website is located. Your directory will look something
like this.
</p>
<p>
You'll notice that there are two sets of the files. The
<code class="language-markup">min</code> means that the file
is "compressed" to reduce load times. These minified files are
usually used in production while it is better to use the
unminified files during development.
</p>
<pre><code class="language-markup directory-markup">
MyWebsite/
|--css/
| |--materialize.css
|
|--fonts/
| |--roboto/
|
|--js/
| |--materialize.js
|
|--index.html
</code></pre>
</div>
<div class="col s12">
<h5>HTML Setup</h5>
<p>
Next you just have to make sure you link the files properly in
your webpage. Generally it is wise to import javascript files
at the end of the body to reduce page load time. Follow the
example below on how to import Materialize into your webpage.
</p>
<pre style="padding-top: 0px;">
<span class="copyMessage">Copied!</span>
<i class="material-icons copyButton">content_copy</i>
<code class="language-markup copiedText">
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!--JavaScript at end of body for optimized loading-->
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>
</code>
</pre>
</div>
</div>
<!-- Templates -->
<div id="templates" class="scrollspy">
<div class="row">
<div class="col s12">
<h3 class="header">Templates</h3>
<p class="caption">
We have created some starter templates so you can easily
start designing your website with minimal setup up time.
Browse through our collection and download your best fit.
</p>
</div>
<div class="col s12 m6">
<h5>Starter Template</h5>
<a href="templates/starter-template/preview.html">
<img
class="z-depth-1"
style="width: 100%;"
src="images/starter-template.gif"
/>
</a>
<p>
This is the simplest starter page with a Header,
Call-to-Action, and Icon Features.
</p>
<a
class="btn waves-effect waves-light icon-right"
style="margin-top: 8px;"
href="templates/starter-template/preview.html"
>
Demo <i class="material-icons">search</i>
</a>
<a
class="btn waves-effect waves-light icon-right"
style="margin-top: 8px;"
href="templates/starter-template.zip"
>
Download<i class="material-icons">file_download</i>
</a>
</div>
<div class="col s12 m6">
<h5>Parallax Template</h5>
<a href="templates/parallax-template/preview.html">
<img
class="z-depth-1"
style="width: 100%;"
src="images/parallax-template.jpg"
/>
</a>
<p>
This is the simplest starter page with a Header,
Call-to-Action, and Icon Features.
</p>
<a
class="btn waves-effect waves-light icon-right"
style="margin-top: 8px;"
href="templates/parallax-template/preview.html"
>
Demo<i class="material-icons">search</i>
</a>
<a
class="btn waves-effect waves-light icon-right"
style="margin-top: 8px;"
href="templates/parallax-template.zip"
>
Download<i class="material-icons">file_download</i>
</a>
</div>
</div>
</div>
<!-- Third Party Options -->
<div id="third-party-options" class="row scrollspy">
<div class="col s12">
<h3 class="header">Third-party Options</h3>
<p class="caption">
There are a few community-made options for you to easily
include Materialize in your project. Keep in mind these are
untested and may be out-of-date.
</p>
<h5>Ruby Gem</h5>
<p>
See
<a href="https://github.com/mkhairi/materialize-sass">here</a>
for documentation on this gem.
</p>
<pre><code class="language-bash">
gem 'materialize-sass'
</code></pre>
</div>
</div>
<div id="sass" class="row scrollspy">
<div class="col s12">
<h3 class="header">Sass Setup</h3>
<p class="caption">
This section is only relevant if you chose to download the
Sass version of Materialize.
</p>
<h5>Compiling Sass</h5>
<p>
Instead of having a css folder, you will find that the
download instead contains many .scss files which contain the
styles of individual components. Unfortunately, the browser
cannot interpret Sass, so you must have your Sass compiler
compile the scss/materialize.scss into a regular CSS file. At
this point you can link this newly outputted file in your HTML
page.
</p>
<pre><code class="language-markup directory-markup">
MyWebsite/
|--css/
| |--materialize.css <-- compiled from scss/materialize.scss
|
|--js/
| |--materialize.js
|
|--scss/
| |--materialize.scss
| |--components/
|
|--index.html
</code></pre>
</div>
</div>
</div>
<!-- Table of contents -->
<div class="col hide-on-small-only m3 xl3">
<div class="toc-wrapper">
<div style="height: 1px;">
<ul class="table-of-contents">
<li><a href="#download">Download</a></li>
<li><a href="#setup">Setup</a></li>
<li><a href="#templates">Templates</a></li>
<li>
<a href="#third-party-options">Third-party Options</a>
</li>
<li><a href="#sass">Sass</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</main>
{{> footer }}
<script type="module" src="/src/main.ts"></script>
<script>
document
.querySelectorAll("#download-source, #download-sass")
.forEach((a) => {
a.addEventListener("click", (e) => {
document
.querySelector("#download-thanks")
.classList.remove("is-closed");
});
});
</script>
</body>
</html>