-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgetting-started.html
832 lines (756 loc) · 27.4 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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="description" content="Learn how to easily start using Materialize and integrate it into your project." />
<title>Getting started - Materialize</title>
<!-- Favicons-->
<link
rel="apple-touch-icon-precomposed"
href="images/favicon/apple-touch-icon-152x152.png"
/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta
name="msapplication-TileImage"
content="images/favicon/mstile-144x144.png"
/>
<link rel="icon" href="images/favicon/favicon-32x32.png" sizes="32x32" />
<!-- Android 5 Chrome Color-->
<meta name="theme-color" content="#EE6E73" />
<!-- CSS-->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined"
rel="stylesheet"
/>
<script>
const theme = localStorage.getItem("theme");
if (theme) document.documentElement.setAttribute("theme", theme);
</script>
<script type="module" crossorigin src="./assets/main-fcdcb5f2.js"></script>
<link rel="stylesheet" href="./assets/main-ee676d25.css">
</head>
<body>
<header>
<div class="search-results card"></div>
<!-- Top Nav -->
<div class="navbar-fixed">
<nav class="primary">
<div class="nav-wrapper">
<a class="sidenav-trigger" href="#" data-target="nav-mobile"
><i class="material-icons">menu</i></a
>
<ul>
<li>Getting started</li>
</ul>
<ul class="right">
<li>
<a id="theme-switch" href="#"
><i class="material-icons">dark_mode</i></a
>
</li>
<li>
<a
class="ext-link"
href="https://github.com/materializecss/materialize"
target="_blank"
title="Check out our GitHub"
><img src="images/github.svg" style="transform: scale(0.8);"
/></a>
</li>
<li>
<a
class="ext-link"
href="https://opencollective.com/materialize"
target="_blank"
title="Support us via OpenCollective"
><img src="images/opencollective.svg"
/></a>
</li>
</ul>
</div>
</nav>
</div>
<!-- Sidenav -->
<ul class="sidenav sidenav-fixed" id="nav-mobile">
<li class="logo">
<a class="brand-logo" id="logo-container" href="/">
<object
id="front-page-logo"
type="image/svg+xml"
data="images/materialize.svg"
>Your browser does not support SVG</object
>Materialize</a
>
</li>
<li class="search">
<div class="search-wrapper">
<input
class="search-docs"
id="search"
type="search"
placeholder="Search"
autocomplete="off"
autofocus
/><i class="material-icons">search</i>
</div>
</li>
<li class="">
<a href="about.html">
<span class="material-icons">info</span>
About</a>
</li> <li class="active">
<a href="getting-started.html">
<span class="material-icons">apps</span>
Getting started</a>
</li> <li>
<ul class="collapsible collapsible-accordion">
<li class="">
<a class="collapsible-header waves-effect">
<span class="material-icons">palette</span>
Styles
</a>
<div class="collapsible-body">
<ul>
<li class="">
<a href="color.html">
Color</a>
</li><li class="">
<a href="grid.html">
Grid</a>
</li><li class="">
<a href="helpers.html">
Helpers</a>
</li><li class="">
<a href="media-css.html">
Media</a>
</li><li class="">
<a href="pulse.html">
Pulse</a>
</li><li class="">
<a href="sass.html">
Sass</a>
</li><li class="">
<a href="shadow.html">
Shadow</a>
</li><li class="">
<a href="table.html">
Table</a>
</li><li class="">
<a href="css-transitions.html">
Transitions</a>
</li><li class="">
<a href="typography.html">
Typography</a>
</li><li class="">
<a href="themes.html">
Themes</a>
</li><li class="">
<a href="waves.html">
Waves</a>
</li>
</ul>
</div>
</li>
</ul>
</li> <li>
<ul class="collapsible collapsible-accordion">
<li class="">
<a class="collapsible-header waves-effect">
<span class="material-icons">add_circle</span>
Components
</a>
<div class="collapsible-body">
<ul>
<li class="">
<a href="badges.html">
Badges</a>
</li><li class="">
<a href="buttons.html">
Buttons</a>
</li><li class="">
<a href="breadcrumbs.html">
Breadcrumbs</a>
</li><li class="">
<a href="cards.html">
Cards</a>
</li><li class="">
<a href="collections.html">
Collections</a>
</li><li class="">
<a href="floating-action-button.html">
Floating Action Button</a>
</li><li class="">
<a href="footer.html">
Footer</a>
</li><li class="">
<a href="icons.html">
Icons</a>
</li><li class="">
<a href="navbar.html">
Navbar</a>
</li><li class="">
<a href="pagination.html">
Pagination</a>
</li><li class="">
<a href="preloader.html">
Preloader</a>
</li><li class="">
<a href="auto-init.html">
Auto Init</a>
</li><li class="">
<a href="carousel.html">
Carousel</a>
</li><li class="">
<a href="collapsible.html">
Collapsible</a>
</li><li class="">
<a href="dropdown.html">
Dropdown</a>
</li><li class="">
<a href="feature-discovery.html">
Feature Discovery</a>
</li><li class="">
<a href="media-css.html">
Media</a>
</li><li class="">
<a href="modals.html">
Modals</a>
</li><li class="">
<a href="parallax.html">
Parallax</a>
</li><li class="">
<a href="pushpin.html">
Pushpin</a>
</li><li class="">
<a href="scrollspy.html">
Scrollspy</a>
</li><li class="">
<a href="sidenav.html">
Sidenav</a>
</li><li class="">
<a href="tabs.html">
Tabs</a>
</li><li class="">
<a href="toasts.html">
Toasts</a>
</li><li class="">
<a href="tooltips.html">
Tooltips</a>
</li>
</ul>
</div>
</li>
</ul>
</li> <li>
<ul class="collapsible collapsible-accordion">
<li class="">
<a class="collapsible-header waves-effect">
<span class="material-icons">text_fields</span>
Forms
</a>
<div class="collapsible-body">
<ul>
<li class="">
<a href="autocomplete.html">
Autocomplete</a>
</li><li class="">
<a href="checkboxes.html">
Checkboxes</a>
</li><li class="">
<a href="chips.html">
Chips</a>
</li><li class="">
<a href="pickers.html">
Pickers</a>
</li><li class="">
<a href="radio-buttons.html">
Radio Buttons</a>
</li><li class="">
<a href="range.html">
Range</a>
</li><li class="">
<a href="select.html">
Select</a>
</li><li class="">
<a href="switches.html">
Switches</a>
</li><li class="">
<a href="text-inputs.html">
Text Inputs</a>
</li>
</ul>
</div>
</li>
</ul>
</li> <li class="">
<a href="mobile.html">
<span class="material-icons">mobile_friendly</span>
Mobile</a>
</li>
<li class="version">
<a class="dropdown-trigger" href="#" data-target="version-dropdown">
<!-- svg -->
2.0.3-alpha<svg
class="caret"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M7 10l5 5 5-5z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>
</a>
<ul class="dropdown-content" id="version-dropdown">
<li><a>2.0.3-alpha</a></li>
<li>
<a
href="https://materializecss.com/"
target="_blank"
rel="noopener noreferrer"
>1.0.0 (not maintained)</a
>
</li>
</ul>
</li>
<!-- Ad Placements -->
<li
class="surface"
style="height: 100px; width: 100%; left: 0; bottom: 0; position: sticky;"
>
<small>Advertisment</small>
<div style="border: 1px dotted red; height: 90px; width: 100%; "></div>
</li>
</ul>
</header>
<main>
<section
class="section primary-container on-primary-text m-2"
style="border-radius: 24px;"
id="index-banner"
>
<div class="container row py-5 ">
<div class="col s12 m8 offset-m1 xl7 offset-xl1 center-on-small-only">
<h1 class="header" style="font-size: 4.20rem;">Getting started</h1>
<h4 class="light" style="line-height: 1.25;">
Learn how to easily start using Materialize and integrate it into your project.
</h4>
</div>
</div>
</section>
<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 class="page-footer docs-footer">
<div class="container">
<div class="row" style="margin-bottom: 0;">
<div class="s12 m10 offset-m1">
<div class="row" style="gap:2rem;">
<div class="s12 m6 l4">
<h5>Help Materialize Grow</h5>
<p class="grey-text text-darken-2">
We hope you have enjoyed using Materialize and if you feel like it
has helped you out and want to support the team you can help us by
opening issues or contributing on GitHub.
</p>
<a
class="btn waves-effect waves-light"
target="_blank"
href="https://github.com/materializecss/materialize"
>Contribute</a
>
</div>
<div class="s12 m6 l4">
<h5>Join the Discussion</h5>
<p class="grey-text text-darken-2">
We have a Gitter chat room set up where you can talk directly with
us. Come in and discuss new features, future goals, general
problems or questions, or anything else you can think of.
</p>
<a
class="btn waves-effect waves-light"
href="https://gitter.im/materializecss/materialize"
target="_blank"
>Chat</a
>
</div>
<div class="s12 m6 l4" style="overflow: hidden;">
<h5>Star us</h5>
<div>
<iframe
src="https://ghbtns.com/github-btn.html?user=materializecss&repo=materialize&type=watch&count=true&size=large"
allowtransparency="true"
frameborder="0"
scrolling="0"
width="170"
height="30"
></iframe>
</div>
<!-- Ad Placements -->
<div style="width: 100%;">
<small>Advertisment</small>
<div
style="border: 1px dotted red; height: 90px; width: 100%; "
></div>
</div>
</div>
</div>
<div class="footer-copyright">
© 2014-
<noscript>2018</noscript>
<script>
document.write(new Date().getFullYear());
</script>
Materialize, All rights reserved.<a
class="right"
target="_blank"
href="https://github.com/materializecss/materialize/blob/main/LICENSE"
>MIT License</a
>
</div>
</div>
</div>
</div>
</footer>
<script>
document
.querySelectorAll("#download-source, #download-sass")
.forEach((a) => {
a.addEventListener("click", (e) => {
document
.querySelector("#download-thanks")
.classList.remove("is-closed");
});
});
</script>
</body>
</html>