Text
"dependencies": {
"nativescript-vue": "^2.2.0",
"tns-core-modules": "^5.2.2",
"vue": "^2.6.10",
"vue-router": "^3.0.2",
"vuex": "^3.1.0"
},
import Vue from 'vue';
import App from '~/App.vue';
import router from './router';
import store from './store';
Vue.config.productionTip = false;
new Vue({
router,
store,
render: (h) => h(App)
}).$mount('#app');
import Vue from 'nativescript-vue';
import App from './App.vue';
import store from './store';
Vue.config.silent = false;
new Vue({
store,
render: (h) => h('frame', [h(App)])
}).$start();
<template web>
<div class="w-page">
<nav>
<ul class="w-navbar">
<li class="w-title">{{navbarTitle}}</li>
</ul>
</nav>
<div class="w-container">
<router-link tag="button" class="w-button" id="homeButton" to="/">Home</router-link>
<button class="w-button" id="aboutButton" v-on:click="goToAboutPage">About</button>
<router-view/>
</div>
</div>
</template>
<template native>
<Page>
<ActionBar :title="navbarTitle"/>
<GridLayout rows="auto, auto">
<Button text="Home" @tap="goToHomePage" row="0"/>
<Button text="About" @tap="goToAboutPage" row="1"/>
</GridLayout>
</Page>
</template>
ActionBar
color #42b983
.w-navbar
color #42b983
position fixed
z-index 10000
height 3em
width 100%
top 0px
left 0px
margin auto
list-style none
display flex
align-items center
padding 0 10px
-webkit-box-shadow -8px 8px 6px -7px #999
-moz-box-shadow -8px 8px 6px -7px #999
box-shadow -8px 8px 6px -7px #999
"dependencies": {
"nativescript-vue": "^2.2.0",
"firebase": "^5.9.0",
"nativescript-plugin-firebase": "^8.0.1",
"nativescript-vue-multi-drawer": "0.0.2",
"nativescript-paint": "^1.0.0",
"tns-core-modules": "^5.2.2",
"nativescript-color-picker": "^1.5.0",
"vuetify": "^1.5.7",
"vue": "^2.6.10",
"vue-router": "^3.0.2",
"vuex": "^3.1.0"
},
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import Vuetify from 'vuetify';
import 'vuetify/src/stylus/app.styl';
import firebase from 'firebase/app';
// Setup Firebase
...
firebase.initializeApp(config);
...
Vue.use(Vuetify, {
// Setup theme
});
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app');
import Vue from 'nativescript-vue';
import App from './App.vue';
import firebase from 'nativescript-plugin-firebase';
import MultiDrawer from 'nativescript-vue-multi-drawer';
import store from './store';
firebase
.init({
//initialization routines here
);
...
Vue.use(MultiDrawer);
Vue.registerElement('PaintPad', () =>
require('nativescript-paint').PaintPad);
new Vue({
store,
render: h => h('frame', [h(App)]),
}).$start();
<template web>
<v-app dark class="primary">
...
<v-content class="bg">
<router-view/>
</v-content>
</v-app>
</template>
<template native>
<Page actionBarHidden="true">
<Home/>
</Page>
</template>
...
<style web lang="stylus">
@import '~styles/style-one';
</style>
<style native lang="stylus">
@import '~styles/style-two';
</style>
<template>
<v-card>
<v-card-text>
<h1 align="center">
Build your personal mandala
</h1>
</v-card-text>
<img src="~/assets/logo_lg.png" class="my-3" contain>
<v-card-text title>
<v-btn href="#/build" color="primary" dark large>
Get Started
</v-btn>
</v-card-text>
</v-card>
</template>
<template>
<MultiDrawer>
<StackLayout slot="left">
<Image
:src="paintingImage"
width="50%"
:visibility="paintingImage ? 'visible' : 'collapsed'"
stretch="aspectFit"
/>
...
<StackLayout>
...
</StackLayout>
</MultiDrawer>
</template>
<script>
import { PaintPad } from "nativescript-paint";
import { ColorPicker } from "nativescript-color-picker";
import * as platformModule from "tns-core-modules/platform";
import * as fs from "file-system";
import * as imageSource from "image-source";
...