123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <template id="main">
  <v-ons-navigator swipeable
    :page-stack="pageStack"
    @push-page="pageStack.push($event)"
  ></v-ons-navigator>
</template>
<template id="home-tpl">
    <v-ons-page >
       <section align="center">
         		<div style="width:90%">
               <div style="margin-bottom:4px">
                <v-ons-button ripple modifier="large" @click="push" style="margin: 6px 0">Signin</v-ons-button>  
              </div>
              <div style="margin-bottom:4px">
                <v-ons-button ripple modifier="large" @click="push2" style="margin: 6px 0">Signup</v-ons-button>  
              </div>
              <div style="margin-bottom:4px">
                <v-ons-button ripple modifier="large" style="margin: 6px 0" @click="gotoSearch">Start Searching Now</v-ons-button>  
              </div>
            </div>
       </section>
    </v-ons-page>
</template>

<template id="signinForm-tpl">
  <v-ons-page>
    <v-ons-toolbar>
      <div class="left">
        <v-ons-back-button>Home</v-ons-back-button>
      </div>
      <div class="center">Signin</div>
    </v-ons-toolbar>
    <div style="padding:32px;">
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" placeholder="Username" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" type="password" placeholder="Password" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom: 32px;width:100%">
        <v-ons-button ripple modifier="large">Sign in</v-ons-button>  
       </div>
       <p class="center" style="text-align:center;margin-bottom:8px">Signin With</p>
       <div style="margin-bottom:4px">
          <v-ons-button ripple modifier="large" style="margin: 6px 0">Signin via Facebook</v-ons-button>  
        </div>
        <div style="margin-bottom:4px">
          <v-ons-button ripple modifier="large" style="margin: 6px 0">Signin via Google</v-ons-button>  
        </div>
    </div>
  </v-ons-page>
</template>

<template id="signupForm-tpl">
  <v-ons-page>
    <v-ons-toolbar>
      <div class="left">
        <v-ons-back-button>Home</v-ons-back-button>
      </div>
      <div class="center">Signup</div>
    </v-ons-toolbar>
    <div style="padding:32px;">
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" name="firstname" placeholder="First Name" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" name="lastname" placeholder="Last Name" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" type="email" name="email" placeholder="Email" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" type="password" name="password" placeholder="Password" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" name="mobilephone" placeholder="Mobile Phone" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom:32px;width:100%">
        <v-ons-input style="width:100%" name="homephone" placeholder="Home Phone" float></v-ons-input>
      </div>
      <div class="center" style="margin-bottom: 32px;width:100%">
        <v-ons-button ripple modifier="large">Sign up</v-ons-button>  
       </div>
       <p class="center" style="text-align:center;margin-bottom:8px">Signup With</p>
        <ons-row>
          <ons-col width="50%">
          <div style="margin-bottom:4px;padding-right:5px;">
            <v-ons-button ripple modifier="large" style="margin: 6px 0">Facebook</v-ons-button>  
          </div>
          </ons-col>
          <ons-col width="50%">
          <div style="margin-bottom:4px;padding-left:5px;">
            <v-ons-button ripple modifier="large" style="margin: 6px 0">Google</v-ons-button>  
          </div>
          </ons-col>
        </ons-row>
    </div>
  </v-ons-page>
</template>

<template id="appHome-tpl.html">
 <v-ons-splitter>
    <v-ons-splitter-side
      swipeable width="150px" collapse="" side="left"
      :open.sync="openSide"
    >
      <v-ons-page>
        <v-ons-list>
          <v-ons-list-item v-for="page in pages"
            tappable modifier="chevron"
            @click="currentPage = page; openSide = false"
          >
            <div class="center">{{ page }}</div>
          </v-ons-list-item>
        </v-ons-list>
      </v-ons-page>
    </v-ons-splitter-side>

    <v-ons-splitter-content>
      <component :is="currentPage" :toggle-menu="() => openSide = !openSide"></component>
    </v-ons-splitter-content>
  </v-ons-splitter>

</template>

<template id="home">
  <v-ons-page>
    <custom-toolbar title="Home" :action="toggleMenu"></custom-toolbar>
    <p style="text-align: center">
      Welcome home.
    </p>
  </v-ons-page>
</template>
<div id="app"></div>

            
          
!
            
              // -----------------------
const customToolbar = {
  template: '#toolbar',
  props: ['title', 'action']
};

const homePage = {
  template: '#home',
  props: ['toggleMenu'],
  components: { customToolbar }
};

const appHome_tpl = {
	key : 'appHome_tpl',
	template : '#appHome-tpl',
	data(){
		return {
			currentPage : 'home',
			openSide : false,
			pages: ['home'],
		}
	},
	components: {
	    home: homePage
	}
}

// -- end app home tpl pages

const signup_tpl = {
  key: 'signup_tpl',
  template: '#signupForm-tpl'
};

const signin_tpl = {
  key: 'signin_tpl',
  template: '#signinForm-tpl'
};

const home_tpl = {
  key: 'home_tpl',
  template: '#home-tpl',
  methods: {
    push() {
      this.$emit('push-page', signin_tpl);
    },
    push2() {
      this.$emit('push-page', signup_tpl);
    },
    gotoSearch(){
    	var myNavigator = document.querySelector('ons-navigator');
		myNavigator.pushPage('appHome-tpl.html');
    }
  }
};

new Vue({
  el: '#app',
  template: '#main',
  data() {
    return {
      pageStack: [home_tpl],
    };
  }
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console