Skip to content

Commit 7b5a9cb

Browse files
Samuell1marcosmoura
authored andcommitted
docs: add note for themes, example with CDNs (vuematerial#1225)
* docs: add getting started example with CDNs * docs: add note about using SCSS/SASS * docs: improve theme disclaimer about sass support
1 parent 0686e8a commit 7b5a9cb

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

docs/app/pages/GettingStarted.vue

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,35 @@
4747
<p>It's optional, but to have the best experience possible, use Roboto and Google Icons from Google CDN:</p>
4848

4949
<code-example title="Roboto Font and Icons" label="HTML" lang="html">
50-
&lt;link rel=&quot;stylesheet&quot; href=&quot;//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic&quot;&gt;
51-
&lt;link rel=&quot;stylesheet&quot; href=&quot;//fonts.googleapis.com/icon?family=Material+Icons&quot;&gt;
50+
&lt;link rel=&quot;stylesheet&quot; href=&quot;//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic|Material+Icons&quot;&gt;
51+
</code-example>
52+
53+
<p>For fast prototyping without installing templates from <strong>vue-cli</strong> use CDNs:</p>
54+
55+
<code-example title="CDN" label="HTML" lang="html">
56+
&#x3C;!doctype html&#x3E;
57+
&#x3C;html&#x3E;
58+
&#x3C;head&#x3E;
59+
&#x3C;meta charset=&#x22;utf-8&#x22;&#x3E;
60+
&#x3C;link rel=&#x22;stylesheet&#x22; href=&#x22;//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic|Material+Icons&#x22;&#x3E;
61+
&#x9;&#x3C;link type=&#x22;text/css&#x22; rel=&#x22;stylesheet&#x22; href=&#x22;https://unpkg.com/vue-material@beta/dist/vue-material.min.css&#x22;&#x3E;
62+
&#x3C;meta content=&#x22;width=device-width,initial-scale=1,minimal-ui&#x22; name=&#x22;viewport&#x22;&#x3E;
63+
&#x3C;/head&#x3E;
64+
&#x3C;body&#x3E;
65+
&#x3C;div id=&#x22;app&#x22;&#x3E;
66+
&#x3C;!-- Your code here --&#x3E;
67+
&#x3C;/div&#x3E;
68+
&#x3C;script type=&#x22;text/javascript&#x22; src=&#x22;https://unpkg.com/vue&#x22;&#x3E;&#x3C;/script&#x3E;
69+
&#x3C;script type=&#x22;text/javascript&#x22; src=&#x22;https://unpkg.com/vue-material@beta&#x22;&#x3E;&#x3C;/script&#x3E;
70+
&#x3C;script&#x3E;
71+
Vue.use(VueMaterial.default);
72+
73+
new Vue({
74+
el: &#x27;#app&#x27;
75+
});
76+
&#x3C;/script&#x3E;
77+
&#x3C;/body&#x3E;
78+
&#x3C;/html&#x3E;
5279
</code-example>
5380
</div>
5481
</page-container>

docs/app/pages/Themes/Configuration.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<h2 class="md-headline">Creating themes</h2>
55

66
<p>The simplest markup to create a theme in Vue Material is:</p>
7+
8+
<note-block warning>
9+
To use themes you'll need SCSS/SASS support in your project. Read more about <a href="https://vue-loader.vuejs.org/en/configurations/pre-processors.html">Pre-Processors</a>. In the near future you'll be able to use themes with Plain CSS and Stylus too.
10+
</note-block>
11+
712
<code-example label="SCSS" lang="scss">
813
@import "~vue-material/dist/theme/engine"; // Import the theme engine
914

0 commit comments

Comments
 (0)