Skip to content

Instantly share code, notes, and snippets.

@edwardlorilla
edwardlorilla / handling-different-currencies-with-the-payment-request-api.markdown
Created May 3, 2021 15:28
Handling Different Currencies with the Payment Request API
@edwardlorilla
edwardlorilla / index.html
Created May 3, 2021 15:27
【VUE.JS】validate an email address
<div id="app">
email: <input type="text" v-model="emailaddress">
<button @click="submitEmail" :disabled="!validated">submit</button>
</div>
@edwardlorilla
edwardlorilla / index.html
Created May 2, 2021 16:17
【JAVASCRIPT】 change order payment request api
<div class="container">
<div class="products"></div>
<div class="shopping-cart">
<div class="shopping-cart-head">
<span class="product-quantity">0</span>
</div>
<ul class="shopping-cart-list">
@edwardlorilla
edwardlorilla / index.html
Created May 2, 2021 11:44
【JAVASCRIPT】picture comparison
<div class="div">
<div class="img1" style="background-image: url(https://picsum.photos/200/300);">
<div class="bar" data-flag="0"></div>
</div>
<div class="img2" style="background-image: url(https://picsum.photos/200/300);"></div>
</div>
@edwardlorilla
edwardlorilla / index.html
Created May 2, 2021 11:38
JavaScript uses canvas to draw coordinates and lines
<canvas id="cvs" width="500" height="500"></canvas>
@edwardlorilla
edwardlorilla / index.html
Created May 2, 2021 11:34
JS native 2048 mini game source code sharing
<h1>2 0 4 8</h1>
<!-- Display score and new game button -->
<div id="box">
Score: <span id="span">0</span>
<input id="but" type="button" value="New game" />
</div>
<!-- Show random number -->
<div id="random"></div>
<!-- The main layout of the game -->
<table border="3px">
@edwardlorilla
edwardlorilla / index.html
Created May 1, 2021 15:57
Simple Check out
<h1>Cart</h1>
<img src="https://craftypixels.com/placeholder-image/200x200/c21807/fff&text=Chillis"/>
<h3 class="product">Product:<span>Bag of red chillis</span></h3>
<h3 class="price">Price:<span>$4.99</span></h3>
<label for="amount">Quantity</label>
<input id="amount" type="number" value="0" min="0">
<h3 class="price">SubTotal:</h3>
<h3><div class="currency">$</div><div id="subTotalText">0.00</div></h3>
<button class="pay-button">Buy Chillis</button>
@edwardlorilla
edwardlorilla / index.html
Created April 30, 2021 15:06
【VUE JS】Checking out with payment request API
<div id="app" class="container">
<h2>Cookies - fresh from our oven!</h2>
<h3>All just 75¢ each</h3>
<div class="text-right"><span class="cartcount">{{cartItems.length}} item(s) in your basket</span></div>
<div class="container">
<div class="row">
<div class="col-xs-3 text-center" v-for="item in items">
<div class="img"><img class="img-responsive" :src="item.image" alt=""></div>
<h5>{{ item.title }}</h5>
@edwardlorilla
edwardlorilla / index.html
Created April 30, 2021 15:06
【VUE JS】Checking out with payment request API
<div id="app" class="container">
<h2>Cookies - fresh from our oven!</h2>
<h3>All just 75¢ each</h3>
<div class="text-right"><span class="cartcount">{{cartItems.length}} item(s) in your basket</span></div>
<div class="container">
<div class="row">
<div class="col-xs-3 text-center" v-for="item in items">
<div class="img"><img class="img-responsive" :src="item.image" alt=""></div>
<h5>{{ item.title }}</h5>