Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div class="page" data-name="home">
- <!-- Slider container -->
- <div data-pagination='{"el": ".swiper-pagination"}' class="swiper-container demo-swiper">
- <!-- Slides wrapper -->
- <div class="swiper-wrapper">
- <!-- Slides -->
- <div class="swiper-slide">
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <img class="onboarding-customer-destination-two" src="assets/user/customer-destination-two.png" alt="Customer Destination">
- </center>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <h6 class="order-text josefin-sans-bold-font">ORDER</h6>
- <h6 class="order-desc josefin-sans-light-font">Order for our service from your location with no stress</h6>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <a id="ob-one" href="#" class="getting-started-button josefin-sans-bold-font" @click="slideNext">
- Get Started <i class="oba-icon f7-icons size-18">arrow_right</i>
- </a>
- </center>
- <!-- -->
- </div>
- </div>
- </div>
- </div>
- <div class="swiper-slide">
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <img class="onboarding-customer-destination-two" src="assets/user/bike-two.png" alt="Dispatch Rider">
- </center>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <h6 class="order-text josefin-sans-bold-font">DISPATCH</h6>
- <h6 class="order-desc josefin-sans-light-font">Our dispatch riders will pick up your package and deliver to the specified drop off location</h6>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <a id="ob-two" href="#" class="getting-started-button josefin-sans-bold-font" @click="slideNext">
- Get Started <i class="oba-icon f7-icons size-18">arrow_right</i>
- </a>
- </center>
- </div>
- </div>
- </div>
- </div>
- <div class="swiper-slide">
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <img class="onboarding-customer-destination-two" src="assets/user/map-tracker-two.png" alt="Tracker">
- </center>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <h6 class="order-text josefin-sans-bold-font">TRACK</h6>
- <h6 class="order-desc josefin-sans-light-font">You can track your package while in transit to the drop off loaction in real time</h6>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <a id="ob-three" href="#" class="getting-started-button josefin-sans-bold-font" @click="slideNext">
- Get Started <i class="oba-icon f7-icons size-18">arrow_right</i>
- </a>
- </center>
- </div>
- </div>
- </div>
- </div>
- <div class="swiper-slide">
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <h4 class="text-center josefin-sans-bold-font">Select your profile</h4>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <h6 class="order-desc josefin-sans-light-font go-up-a-bit-20">Which one are you?</h6>
- <h6 class="order-desc josefin-sans-light-font">Please select whether you want to be registered to Gazelle as a user or a dispatch rider</h6>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-50">
- <div class="user-box" @click="userBox">
- <center>
- <img src="assets/user/customer.png" alt="User" class="select-user">
- </center>
- <h3 class="text-center josefin-sans-bold-font">User</h3>
- <input type="hidden" id="user-box-switch" value="0">
- </div>
- </div>
- <div class="col-50">
- <div class="rider-box" @click="riderBox">
- <center>
- <img src="assets/user/rider.png" alt="Rider" class="select-user">
- </center>
- <h3 class="text-center josefin-sans-bold-font">Dispatch Rider</h3>
- <input type="hidden" id="rider-box-switch" value="0">
- </div>
- </div>
- </div>
- </div>
- <div class="block">
- <div class="row resizable">
- <div class="col-100">
- <center>
- <button id="select-profile-next-button" class="col button button-large button-fill select-profile-next-button g-button-disabled sheet-open" @click="nextButton">Next</button>
- <!-- data-sheet=".select-profile-error" -->
- </center>
- <h6 class="order-desc josefin-sans-light-font">Not sure what to select? <a href="#" class="gazelle-blue-text">Read about different profiles</a></h6>
- <!-- SHEET MODAL -->
- <div class="sheet-modal select-profile-error" style="height:auto; --f7-sheet-bg-color: #fff;">
- <div class="sheet-modal-inner">
- <div class="page-content">
- <div class="block-title block-title-large josefin-sans-bold-font text-center red-color-text"><i class="f7-icons size-50">exclamationmark_circle</i> Oops!</div>
- <div class="block">
- <p class="josefin-sans-bold-font text-center"><b>Select either the user or rider box.</b></p>
- </div>
- </div>
- </div>
- </div>
- <!-- /END SHEET MODAL -->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <!--
- <script>
- return {
- mounted(){
- const self = this;
- const app = self.$f7;
- // var $$ = self.$Dom7;
- // self.$ or self.$$ or self.$dom7 (Working code...)
- // $$ = self.$dom7;
- var swiper = app.swiper.create('.swiper-container', {
- speed: 400,
- spaceBetween: 0
- });
- $$("#ob-one").on("click",function(){
- swiper.slideNext();
- });
- $$("#ob-two").on("click",function(){
- swiper.slideNext();
- });
- $$("#ob-three").on("click",function(){
- swiper.slideNext();
- });
- /* USER/RIDER SELECT BOX SWITCH */
- $$(".user-box").on("click",function(){
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- nextButton = $$("#select-profile-next-button");
- // check the current status
- if ( userSwitch.val() == 0 && riderSwitch.val() == 0 ){
- // add the selected class to the user box
- $$(this).addClass("user-box-selected");
- // add 1 value to the hidden input
- userSwitch.val(1);
- // enable active button
- nextButton.removeClass("g-button-disabled");
- }else{
- if ( userSwitch.val() == 1 && riderSwitch.val() == 0 ) {
- // add the selected class to the user box
- $$(this).removeClass("user-box-selected");
- // add 1 value to the hidden input
- userSwitch.val(0);
- // disable active button
- nextButton.addClass("g-button-disabled");
- }
- }
- });
- $$(".rider-box").on("click",function(){
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- nextButton = $$("#select-profile-next-button");
- // check the current status
- if ( riderSwitch.val() == 0 && userSwitch.val() == 0 ){
- // add the selected class to the user box
- $$(this).addClass("rider-box-selected");
- // add 1 value to the hidden input
- riderSwitch.val(1);
- // enable active button
- nextButton.removeClass("g-button-disabled");
- }else{
- if ( riderSwitch.val() == 1 && userSwitch.val() == 0 ) {
- // add the selected class to the user box
- $$(this).removeClass("rider-box-selected");
- // add 1 value to the hidden input
- riderSwitch.val(0);
- // disable active button
- nextButton.addClass("g-button-disabled");
- }
- }
- });
- /* NEXT BUTTON */
- $$("#select-profile-next-button").on("click",function(){
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- // console.log("USER BOX CLICKED:" + userSwitch.val() + " " + "RIDER BOX CLICKED:" + riderSwitch.val() );
- errorSheetModal = app.sheet.create({
- el: '.select-profile-error',
- swipeToClose: true,
- backdrop: true,
- });
- if ( userSwitch.val() == 0 && riderSwitch.val() == 0 ) {
- errorSheetModal.open(true);
- }else{
- if ( userSwitch.val() == 1 || riderSwitch.val() == 1 ) {
- errorSheetModal.close(true);
- // save the value to the local storage.
- localStorage = window.localStorage;
- localStorage.setItem('onboarding-completed', 'true');
- if ( userSwitch.val() == 1 ) {
- localStorage.setItem('user-type', 'user');
- // redirect to user sign up
- view.router.navigate('/user-signup/');
- }
- if ( riderSwitch.val() == 1 ) {
- localStorage.setItem('user-type', 'rider');
- // redirect to rider sign up
- view.router.navigate('/rider-signup/');
- }
- }
- }
- });
- },
- methods:{
- obOne: function () {
- var self = this;
- self.$app.dialog.alert('Hello World');
- },
- }
- };
- </script>
- -->
- <!--
- <script>
- return {
- // Component Data
- data: function () {
- // Must return an object
- return {
- name: 'Jimmy',
- age: 25,
- like: ['Tennis', 'Chess', 'Football'],
- }
- },
- // Component Methods
- methods: {
- openAlert: function () {
- var self = this;
- self.$app.dialog.alert('Hello World');
- },
- },
- on: {
- pageInit: function (page) {
- const self = this;
- $$ = self.$dom7;
- dom7 = this.$$;
- var swiper = app.swiper.create('.swiper-container', {
- speed: 400,
- spaceBetween: 0
- });
- }
- },
- mounted(){
- const self = this;
- const app = self.$f7;
- app.on('click', function (formEl, data, xhr) {
- // do something with response data
- if( formEl.id == 'ob-one' ){
- console.log( data );
- }
- });
- },
- }
- </script>
- -->
- <!--
- <script>
- return {
- mounted(){
- const self = this;
- const app = self.$f7;
- var $$ = self.$$;
- // self.$ or self.$$ or self.$dom7 (Working code...)
- var swiper = app.swiper.create('.swiper-container', {
- speed: 400,
- spaceBetween: 0
- });
- // this.$el.find('p').addClass('red')
- // this.$$('p').text('hello world')
- this.$$("#ob-one").on("click",function(){
- console.log("Testing Click 1,2");
- swiper.slideNext();
- });
- },
- // Component Methods
- methods: {
- openAlert: function () {
- var self = this;
- self.$app.dialog.alert('Hello World');
- },
- },
- };
- </script>
- -->
- <!--
- <script type="text/javascript">
- const self = this;
- const app = self.$f7;
- var $$ = self.$dom7;
- $$("#ob-one").on("click",function(){
- alert();
- console.log("Testing Click 1,2");
- swiper.slideNext();
- });
- </script>
- -->
- <script>
- // script must return component object
- return {
- mounted() {
- this.swiper = this.$f7.swiper.create('.swiper-container', {
- speed: 400,
- spaceBetween: 0
- });
- },
- data: function () {
- return {
- title: 'Component Page',
- names: ['John', 'Vladimir', 'Timo'],
- }
- },
- methods: {
- openAlert: function () {
- var self = this.$app.dialog.alert('Hello world!');
- },
- slideNext() {
- this.swiper.slideNext();
- },
- obOne: function(){
- var self = this;
- const app = self.$f7;
- swiper = app.swiper.get('.swiper-container');
- // console.log(swiper);
- swiper.slideNext();
- },
- obTwo: function(){
- swiper = this.$app.swiper.get('.swiper-container');
- swiper.slideNext();
- },
- obThree: function(){
- swiper = this.$app.swiper.get('.swiper-container');
- swiper.slideNext();
- },
- userBox: function(){
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- nextButton = $$("#select-profile-next-button");
- // check the current status
- if ( userSwitch.val() == 0 && riderSwitch.val() == 0 ){
- // add the selected class to the user box
- $$(this).addClass("user-box-selected");
- // add 1 value to the hidden input
- userSwitch.val(1);
- // enable active button
- nextButton.removeClass("g-button-disabled");
- }else{
- if ( userSwitch.val() == 1 && riderSwitch.val() == 0 ) {
- // add the selected class to the user box
- $$(this).removeClass("user-box-selected");
- // add 1 value to the hidden input
- userSwitch.val(0);
- // disable active button
- nextButton.addClass("g-button-disabled");
- }
- }
- },
- riderBox: function(){
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- nextButton = $$("#select-profile-next-button");
- // check the current status
- if ( riderSwitch.val() == 0 && userSwitch.val() == 0 ){
- // add the selected class to the user box
- $$(this).addClass("rider-box-selected");
- // add 1 value to the hidden input
- riderSwitch.val(1);
- // enable active button
- nextButton.removeClass("g-button-disabled");
- }else{
- if ( riderSwitch.val() == 1 && userSwitch.val() == 0 ) {
- // add the selected class to the user box
- $$(this).removeClass("rider-box-selected");
- // add 1 value to the hidden input
- riderSwitch.val(0);
- // disable active button
- nextButton.addClass("g-button-disabled");
- }
- }
- },
- nextButton: function () {
- userSwitch = $$("#user-box-switch");
- riderSwitch = $$("#rider-box-switch");
- // console.log("USER BOX CLICKED:" + userSwitch.val() + " " + "RIDER BOX CLICKED:" + riderSwitch.val() );
- errorSheetModal = app.sheet.create({
- el: '.select-profile-error',
- swipeToClose: true,
- backdrop: true,
- });
- if ( userSwitch.val() == 0 && riderSwitch.val() == 0 ) {
- errorSheetModal.open(true);
- }else{
- if ( userSwitch.val() == 1 || riderSwitch.val() == 1 ) {
- errorSheetModal.close(true);
- // save the value to the local storage.
- localStorage = window.localStorage;
- localStorage.setItem('onboarding-completed', 'true');
- if ( userSwitch.val() == 1 ) {
- localStorage.setItem('user-type', 'user');
- // redirect to user sign up
- view.router.navigate('/user-signup/');
- }
- if ( riderSwitch.val() == 1 ) {
- localStorage.setItem('user-type', 'rider');
- // redirect to rider sign up
- view.router.navigate('/rider-signup/');
- }
- }
- }
- }
- },
- on: {
- pageInit: function () {
- // do something on page init
- var self = this;
- const app = self.$f7;
- var $$ = self.$dom7;
- // self.openAlert();
- /*var swiper = app.swiper.create('.swiper-container', {
- speed: 400,
- spaceBetween: 0
- });
- self.swiper;*/
- },
- pageAfterOut: function () {
- // page has left the view
- },
- }
- }
- </script>
Add Comment
Please, Sign In to add comment