-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (59 loc) · 1.92 KB
/
index.html
File metadata and controls
61 lines (59 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<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" />
<title>Typescript Drag and Drop demo</title>
<link rel="stylesheet" href="app.css" />
<script type="module" src="dist/bundle.js"></script>
</head>
<body>
<template id="project-input">
<form>
<div class="form-control">
<label for="title">Title</label>
<input type="text" id="title" />
</div>
<div class="form-control">
<label for="description">Description</label>
<textarea id="description" rows="3"></textarea>
</div>
<div class="form-control">
<label for="people">People</label>
<input type="number" id="people" step="1" min="0" max="10" />
</div>
<button type="submit">ADD PROJECT</button>
</form>
</template>
<template id="single-project">
<ul>
<!-- Tells the browser that the element is draggable. -->
<li draggable="true">
<h2></h2>
<h3></h3>
<p></p>
</li>
</ul>
</template>
<template id="project-list">
<section class="projects">
<header>
<h2></h2>
</header>
<ul></ul>
</section>
</template>
<div id="app"></div>
</body>
</html>
<!-- Template tags: They allow us to specify some HTML code which is not loaded immediately.
They are used to control when we want to render the content with js/ts.
The typescript code will be responsible to:
- Renders the form in "project-input"
- Fetches what the user enters.
- Validates what the user enters.
- Listens to the submission of the form.
- Creates a new project (js object) which will be stored in an object array.
- Renders this array to a list in "project-list" by adding it to the DOM.
-->