This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add Contact Module */ | |
#add-contact-module { | |
display: inline-block; | |
margin-bottom: 1px; | |
margin-left: 8px; | |
} | |
#add-contact-module #open-add-contact-form-btn { | |
background: #54bb7d; | |
font-size: 1.5em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddressBookCtrl { | |
constructor(addressBookApi) { | |
this.addressBookAPI = addressBookApi; | |
} | |
init() { | |
this.renderContactListModule(); | |
this.renderContactDetailsModule(0); | |
this.addContactModule(); | |
} | |
// ADD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- edit contact module --> | |
<section id="edit-contact-module" > | |
<form> | |
<h2>Edit Contact</h2> | |
first name:<br> | |
<input type='text' data-key='fname' class='edit-contact-input'><br> | |
last name:<br> | |
<input type='text' data-key='lname' class='edit-contact-input'><br> | |
phone:<br> | |
<input type='text' data-key='phone' class='edit-contact-input'><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct userResponseData: Decodable { | |
let token:String? | |
let username:String? | |
} | |
let loginUrlString = "https:yourapiurl" | |
guard let loginUrl = URL(string:loginUrlString) else { return } | |
var request = URLRequest(url:loginUrl) | |
request.httpMethod = "POST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var email = "[email protected]" | |
var password = "pword1" | |
async function createNewAccount() { | |
try { | |
const user = await firebase.auth().createUserWithEmailAndPassword(email, password); | |
console.log(user.uid) | |
} catch (error) { | |
console.log(error.message) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
"use strict"; | |
var removeSpace = function (item) { | |
return item.trim(); | |
} | |
var sortFruits = function (fn, str) { | |
return str.split(",").map(fn).sort(); | |
}; | |
document.getElementById("main_button").addEventListener("click", function (e) { | |
var fruitsString = document.getElementById("input_value").value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Router from 'vue-router' | |
import Login from '@/views/Login' | |
import Register from '@/views/Register' | |
import Admin from '@/views/Admin' | |
import Driver from '@/views/Driver' | |
import Customer from '@/views/Customer' | |
Vue.use(Router) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase from 'firebase'; // Your web app's Firebase configuration | |
var firebaseConfig = { | |
apiKey: "**************", | |
authDomain: "**************", | |
databaseURL: "**************", | |
projectId: "**************", | |
storageBucket: "", | |
messagingSenderId: "**************", | |
appId: "**************", | |
measurementId: "**************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="ui middle aligned center aligned grid"> | |
<div class="column"> | |
<form class="ui large form"> | |
<div class="ui stacked secondary segment"> | |
<div class="field"></div> | |
<div class="field"> | |
<div class="ui left icon input large"> | |
<i class="mail icon"></i> | |
<input type="text" name="email" placeholder="E-mail address" v-model="email" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<section class="ui two column centered grid"> | |
<div class="column"> | |
<form class="ui segment large form"> | |
<div class="field"> | |
<div class="ui right icon input large"> | |
<input | |
type="text" | |
placeholder="Enter your address" | |
v-model="address" |
OlderNewer