Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md

This file was deleted.

48 changes: 48 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TypeScript Tutorial</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<div class="wrapper">
<h1>Finance Logger</h1>

<!-- output list -->
<ul class="item-list">

</ul>
</div>

<footer>
<form class="new-item-form">
<div class="field">
<label>Type:</label>
<select id="type">
<option value="invoice">Invoice</option>
<option value="payment">Payment</option>
</select>
</div>
<div class="field">
<label>To / From:</label>
<input type="text" id="tofrom">
</div>
<div class="field">
<label>Details:</label>
<input type="text" id="details">
</div>
<div class="field">
<label>Amount (£):</label>
<input type="number" id="amount">
</div>
<button>Add</button>
</form>

<a href="https://www.thenetninja.co.uk">The Net Ninja</a>
</footer>

<script src='sandbox.js'></script>
</body>
</html>
6 changes: 6 additions & 0 deletions sandbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var character = 'mario';
console.log(character);
var inputs = document.querySelectorAll('input');
inputs.forEach(function (input) {
console.log(input);
});
9 changes: 9 additions & 0 deletions sandbox.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const character = 'mario';

console.log(character);

const inputs = document.querySelectorAll('input');

inputs.forEach(input => {
console.log(input);
});
72 changes: 72 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
body{
margin: 0;
font-family: Roboto;
}
.wrapper{
max-width: 960px;
margin: 0 auto;
}
h1{
margin: 40px auto;
color: #ff0aa7;
text-align: center;
}
ul{
padding: 0;
list-style-type: none;
}
li{
padding: 6px 10px;
border: 1px solid #eee;
margin: 10px auto;
}
li h4{
color: #ff0aa7;
margin: 0;
text-transform: capitalize;
}
li p{
color: #333;
margin: 8px 0 0;
}
footer{
background: #eee;
padding: 60px;
margin-top: 60px;
}
form{
max-width: 960px;
margin: 0 auto;
text-align: center;
}
label{
display: block;
font-weight: bold;
font-size: 0.8em;
color: #333;
margin: 16px 0 6px;
}
input, select{
padding: 6px;
border: 1px solid #e1e1e1;
border-radius: 4px;
}
.field{
display: inline-block;
margin: 0 10px;
}
button{
color: white;
border: 0;
background: #ff0aa7;
padding: 6px;
min-width: 80px;
border-radius: 4px;
}
footer a{
text-align: center;
display: block;
color: #999;
margin-top: 40px;
font-size: 0.7em;
}