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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link | |
rel="stylesheet" | |
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" | |
/> | |
<link rel="stylesheet" href="style.css" /> |
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
const btns=document.querySelectorAll('button'); | |
const form=document.querySelector('form'); | |
const formAct=document.querySelector('form span'); | |
const input=document.querySelector('input'); | |
const error=document.querySelector('error'); | |
var activity='cycling'; | |
btns.forEach(btn=>{ | |
btn.addEventListener('click',e=>{ |
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
const margin = { | |
top: 40, | |
right: 20, | |
bottom: 50, | |
left: 100, | |
}; | |
const graphWidth=560 - margin.left-margin.right | |
const graphHeight= 400-margin.top-margin.bottom | |
const svg=d3.select('.canvas') | |
.append('svg') |
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
nav{ | |
background:#333 | |
} | |
button{ | |
background:#333 !important; | |
margin-bottom:20px; | |
width:100%; | |
padding:16px; | |
font-size:1.6em; | |
color:#fff; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Compiled and minified CSS --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<title>Ninja Wonga</title> | |
<style> | |
h2, p{ |
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
const dims = { height: 300, width: 300, radius: 150 }; | |
const cent = { x: dims.width / 2 + 5, y: dims.height / 2 + 5 }; | |
const svg = d3 | |
.select(".canvas") | |
.append("svg") | |
.attr("width", dims.width + 150) | |
.attr("height", dims.height + 150); | |
const graph=svg.append('g') |
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
const form=document.querySelector('form'); | |
const name=document.querySelector('#name'); | |
const cost=document.querySelector('#cost'); | |
const error=document.querySelector('#error'); | |
form.addEventListener('submit',(e)=>{ | |
e.preventDefault() | |
if(name.value && cost.value){ | |
const item={ | |
name:name.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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<!--Import Google Icon Font--> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<!-- Compiled and minified CSS --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css"> | |
<link rel="stylesheet" href="styles.css"> |
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
const modal = document.querySelector('.modal'); | |
M.Modal.init(modal); | |
const form = document.querySelector('form'); | |
const name = document.querySelector('#name'); | |
const parent = document.querySelector('#parent'); | |
const department = document.querySelector('#department'); | |
form.addEventListener('submit', e => { | |
e.preventDefault(); |
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
const dims = { height: 500, width: 1100 }; | |
const svg = d3.select('.canvas') | |
.append('svg') | |
.attr('width', dims.width + 100) | |
.attr('height', dims.height + 100); | |
const graph = svg.append('g') | |
.attr('transform', 'translate(50, 50)'); |
OlderNewer