Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit babe8fa

Browse files
committed
Merge branch 'master' into dev
2 parents a4c147a + bd6ec82 commit babe8fa

File tree

15 files changed

+1112
-296
lines changed

15 files changed

+1112
-296
lines changed

generator/index.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
const defaults = {
2+
preset: 'configure',
3+
replaceComponents: true,
4+
useTheme: false,
5+
useCustomProperties: false,
6+
iconFont: 'md',
7+
installFonts: false,
8+
useAlaCarte: true,
9+
usePolyfill: true,
10+
locale: 'en'
11+
}
12+
113
module.exports = (api, opts, rootOpts) => {
214
const alaCarte = require('./tools/alaCarte')
315
const fonts = require('./tools/fonts')
416
const polyfill = require('./tools/polyfill')
517
const vuetify = require('./tools/vuetify')
618

19+
opts = opts.preset === 'default'
20+
? defaults
21+
: opts
22+
723
vuetify.addDependencies(api)
824
opts.useAlaCarte && alaCarte.addDependencies(api)
925
opts.usePolyfill && polyfill.addDependencies(api)
@@ -17,7 +33,6 @@ module.exports = (api, opts, rootOpts) => {
1733
opts.usePolyfill && polyfill.updateBabelConfig(api)
1834
opts.usePolyfill && polyfill.updateBrowsersList(api)
1935
opts.usePolyfill && polyfill.addImports(api)
20-
opts.useAlaCarte && alaCarte.updateBabelConfig(api)
2136
!opts.installFonts && fonts.addLinks(api, opts.iconFont)
2237
vuetify.setHtmlLang(api, opts.locale)
2338
})

generator/templates/default/src/App.vue

Lines changed: 14 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,28 @@
11
<template>
22
<v-app>
3-
<v-navigation-drawer
4-
persistent
5-
:mini-variant="miniVariant"
6-
:clipped="clipped"
7-
v-model="drawer"
8-
enable-resize-watcher
9-
fixed
10-
app
11-
>
12-
<v-list>
13-
<v-list-tile
14-
value="true"
15-
v-for="(item, i) in items"
16-
:key="i"
17-
>
18-
<v-list-tile-action>
19-
<v-icon v-html="item.icon"></v-icon>
20-
</v-list-tile-action>
21-
<v-list-tile-content>
22-
<v-list-tile-title v-text="item.title"></v-list-tile-title>
23-
</v-list-tile-content>
24-
</v-list-tile>
25-
</v-list>
26-
</v-navigation-drawer>
27-
<v-toolbar
28-
app
29-
:clipped-left="clipped"
30-
>
31-
<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
32-
<v-btn icon @click.stop="miniVariant = !miniVariant">
33-
<%_ if (options.iconFont === 'md') { _%>
34-
<v-icon v-html="miniVariant ? 'chevron_right' : 'chevron_left'"></v-icon>
35-
<%_ } else if (options.iconFont === 'mdi') { _%>
36-
<v-icon v-html="miniVariant ? 'mdi-chevron-right' : 'mdi-chevron-left'"></v-icon>
37-
<%_ } else if (options.iconFont === 'fa') { _%>
38-
<v-icon v-html="miniVariant ? 'fas fa-chevron-right' : 'fas fa-chevron-left'"></v-icon>
39-
<%_ } else if (options.iconFont === 'fa4') { _%>
40-
<v-icon v-html="miniVariant ? 'fa-chevron-right' : 'fa-chevron-left'"></v-icon>
41-
<%_ } _%>
42-
</v-btn>
43-
<v-btn icon @click.stop="clipped = !clipped">
44-
<%_ if (options.iconFont === 'md') { _%>
45-
<v-icon>web</v-icon>
46-
<%_ } else if (options.iconFont === 'mdi') { _%>
47-
<v-icon>mdi-web</v-icon>
48-
<%_ } else if (options.iconFont === 'fa') { _%>
49-
<v-icon>fas fa-globe</v-icon>
50-
<%_ } else if (options.iconFont === 'fa4') { _%>
51-
<v-icon>fa-globe</v-icon>
52-
<%_ } _%>
53-
</v-btn>
54-
<v-btn icon @click.stop="fixed = !fixed">
55-
<%_ if (options.iconFont === 'md') { _%>
56-
<v-icon>web</v-icon>
57-
<%_ } else if (options.iconFont === 'mdi') { _%>
58-
<v-icon>mdi-minus</v-icon>
59-
<%_ } else if (options.iconFont === 'fa') { _%>
60-
<v-icon>fas fa-minus</v-icon>
61-
<%_ } else if (options.iconFont === 'fa4') { _%>
62-
<v-icon>fa-minus</v-icon>
63-
<%_ } _%>
64-
</v-btn>
65-
<v-toolbar-title v-text="title"></v-toolbar-title>
3+
<v-toolbar app>
4+
<v-toolbar-title class="headline text-uppercase">
5+
<span>Vuetify</span>
6+
<span class="font-weight-light">MATERIAL DESIGN</span>
7+
</v-toolbar-title>
668
<v-spacer></v-spacer>
67-
<v-btn icon @click.stop="rightDrawer = !rightDrawer">
68-
<%_ if (options.iconFont === 'md') { _%>
69-
<v-icon>menu</v-icon>
70-
<%_ } else if (options.iconFont === 'mdi') { _%>
71-
<v-icon>mdi-menu</v-icon>
72-
<%_ } else if (options.iconFont === 'fa') { _%>
73-
<v-icon>fas fa-bars</v-icon>
74-
<%_ } else if (options.iconFont === 'fa4') { _%>
75-
<v-icon>fa-bars</v-icon>
76-
<%_ } _%>
9+
<v-btn
10+
flat
11+
href="https://github.com/vuetifyjs/vuetify/releases/latest"
12+
target="_blank"
13+
>
14+
<span class="mr-2">Latest Release</span>
15+
<v-icon>open_in_new</v-icon>
7716
</v-btn>
7817
</v-toolbar>
18+
7919
<v-content>
8020
<%_ if (options.router) { _%>
8121
<router-view/>
8222
<%_ } else { _%>
8323
<HelloWorld/>
8424
<%_ } _%>
8525
</v-content>
86-
<v-navigation-drawer
87-
temporary
88-
:right="right"
89-
v-model="rightDrawer"
90-
fixed
91-
app
92-
>
93-
<v-list>
94-
<v-list-tile @click="right = !right">
95-
<v-list-tile-action>
96-
<%_ if (options.iconFont === 'md') { _%>
97-
<v-icon>compare_arrows</v-icon>
98-
<%_ } else if (options.iconFont === 'mdi') { _%>
99-
<v-icon>mdi-arrows-left-right-bold-outline</v-icon>
100-
<%_ } else if (options.iconFont === 'fa') { _%>
101-
<v-icon>fas fa-exchange-alt</v-icon>
102-
<%_ } else if (options.iconFont === 'fa4') { _%>
103-
<v-icon>fa-exchange</v-icon>
104-
<%_ } _%>
105-
</v-list-tile-action>
106-
<v-list-tile-title>Switch drawer (click me)</v-list-tile-title>
107-
</v-list-tile>
108-
</v-list>
109-
</v-navigation-drawer>
110-
<v-footer :fixed="fixed" app>
111-
<span>&copy; 2017</span>
112-
</v-footer>
11326
</v-app>
11427
</template>
11528

@@ -127,25 +40,7 @@ export default {
12740
<%_ } _%>
12841
data () {
12942
return {
130-
clipped: false,
131-
drawer: true,
132-
fixed: false,
133-
items: [{
134-
<%_ if (options.iconFont === 'md') { _%>
135-
icon: 'bubble_chart',
136-
<%_ } else if (options.iconFont === 'mdi') { _%>
137-
icon: 'mdi-chart-bubble',
138-
<%_ } else if (options.iconFont === 'fa') { _%>
139-
icon: 'fas fa-shapes',
140-
<%_ } else if (options.iconFont === 'fa4') { _%>
141-
icon: 'fa-bullseye',
142-
<%_ } _%>
143-
title: 'Inspire'
144-
}],
145-
miniVariant: false,
146-
right: true,
147-
rightDrawer: false,
148-
title: 'Vuetify.js'
43+
//
14944
}
15045
}
15146
}
-5.54 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 142 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,147 @@
11
<template>
2-
<v-container fluid>
3-
<v-slide-y-transition mode="out-in">
4-
<v-layout column align-center>
5-
<img src="@/assets/logo.png" alt="Vuetify.js" class="mb-5">
6-
<blockquote>
7-
&#8220;First, solve the problem. Then, write the code.&#8221;
8-
<footer>
9-
<small>
10-
<em>&mdash;John Johnson</em>
11-
</small>
12-
</footer>
13-
</blockquote>
14-
</v-layout>
15-
</v-slide-y-transition>
2+
<v-container>
3+
<v-layout
4+
text-xs-center
5+
wrap
6+
>
7+
<v-flex xs12>
8+
<v-img
9+
:src="require('../assets/logo.svg')"
10+
class="my-3"
11+
contain
12+
height="200"
13+
></v-img>
14+
</v-flex>
15+
16+
<v-flex mb-4>
17+
<h1 class="display-2 font-weight-bold mb-3">
18+
Welcome to Vuetify
19+
</h1>
20+
<p class="subheading font-weight-regular">
21+
For help and collaboration with other Vuetify developers,
22+
<br>please join our online
23+
<a href="https://community.vuetifyjs.com" target="_blank">Discord Community</a>
24+
</p>
25+
</v-flex>
26+
27+
<v-flex
28+
mb-5
29+
xs12
30+
>
31+
<h2 class="headline font-weight-bold mb-3">What's next?</h2>
32+
33+
<v-layout justify-center>
34+
<a
35+
v-for="(next, i) in whatsNext"
36+
:key="i"
37+
:href="next.href"
38+
class="subheading mx-3"
39+
target="_blank"
40+
>
41+
{{ next.text }}
42+
</a>
43+
</v-layout>
44+
</v-flex>
45+
46+
<v-flex
47+
xs12
48+
mb-5
49+
>
50+
<h2 class="headline font-weight-bold mb-3">Important Links</h2>
51+
52+
<v-layout justify-center>
53+
<a
54+
v-for="(link, i) in importantLinks"
55+
:key="i"
56+
:href="link.href"
57+
class="subheading mx-3"
58+
target="_blank"
59+
>
60+
{{ link.text }}
61+
</a>
62+
</v-layout>
63+
</v-flex>
64+
65+
<v-flex
66+
xs12
67+
mb-5
68+
>
69+
<h2 class="headline font-weight-bold mb-3">Ecosystem</h2>
70+
71+
<v-layout justify-center>
72+
<a
73+
v-for="(eco, i) in ecosystem"
74+
:key="i"
75+
:href="eco.href"
76+
class="subheading mx-3"
77+
target="_blank"
78+
>
79+
{{ eco.text }}
80+
</a>
81+
</v-layout>
82+
</v-flex>
83+
</v-layout>
1684
</v-container>
1785
</template>
1886

19-
<!-- Add "scoped" attribute to limit CSS to this component only -->
20-
<style scoped>
21-
h1, h2 {
22-
font-weight: normal;
23-
}
24-
ul {
25-
list-style-type: none;
26-
padding: 0;
27-
}
28-
li {
29-
display: inline-block;
30-
margin: 0 10px;
31-
}
32-
a {
33-
color: #42b983;
34-
}
87+
<script>
88+
export default {
89+
data: () => ({
90+
ecosystem: [
91+
{
92+
text: 'vuetify-loader',
93+
href: 'https://github.com/vuetifyjs/vuetify-loader'
94+
},
95+
{
96+
text: 'github',
97+
href: 'https://github.com/vuetifyjs/vuetify'
98+
},
99+
{
100+
text: 'awesome-vuetify',
101+
href: 'https://github.com/vuetifyjs/awesome-vuetify'
102+
}
103+
],
104+
importantLinks: [
105+
{
106+
text: 'Documentation',
107+
href: 'https://vuetifyjs.com'
108+
},
109+
{
110+
text: 'Chat',
111+
href: 'https://community.vuetifyjs.com'
112+
},
113+
{
114+
text: 'Made with Vuetify',
115+
href: 'https://madewithvuetifyjs.com'
116+
},
117+
{
118+
text: 'Twitter',
119+
href: 'https://twitter.com/vuetifyjs'
120+
},
121+
{
122+
text: 'Articles',
123+
href: 'https://medium.com/vuetify'
124+
}
125+
],
126+
whatsNext: [
127+
{
128+
text: 'Explore components',
129+
href: 'https://vuetifyjs.com/components/api-explorer'
130+
},
131+
{
132+
text: 'Select a layout',
133+
href: 'https://vuetifyjs.com/layout/pre-defined'
134+
},
135+
{
136+
text: 'Frequently Asked Questions',
137+
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions'
138+
}
139+
140+
]
141+
})
142+
}
143+
</script>
144+
145+
<style>
146+
35147
</style>

0 commit comments

Comments
 (0)