-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
124 lines (110 loc) · 3.71 KB
/
index.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WarsawJs Workshop #2 Blog</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="./styles/main.css" rel="stylesheet">
<script src="./scripts/libs/routie.js"></script>
<script src="https://unpkg.com/mustache"></script>
</head>
<body>
<nav>
<div class="nav-wrapper container">
<a href="#" class="brand-logo">WarsawJs Workshop #2</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="#">home</a></li>
<li><a href="#about">about</a></li>
<li><a href="#write">+ add new post</a></li>
</ul>
</div>
</nav>
<div id="page" class="container"></div>
<!-- POST LIST -->
<script id="template-post-list" type="text/html" class="container">
<ul class="collection with-header">
<li class="collection-header"><h4>Recent posts</h4></li>
{{#posts}}
<li class="collection-item avatar">
<a href="#post/{{id}}">
<i class="material-icons circle green">insert_chart</i>
<span class="title">{{title}}</span>
</a>
<a href="#!" class="secondary-content"><i class="material-icons">grade</i></a>
</li>
{{/posts}}
</ul>
</script>
<!-- POST DETAILS-->
<script id="template-post" type="text/html" class="container">
<article class="card-panel">
<h5>
<a href="#">
{{post.title}}
</a>
<a href="#delete/{{post.id}}">
<i class="right material-icons">delete</i>
</a>
</h5>
<p>{{post.text}}</p>
</article>
</script>
<!-- POST FORM -->
<script id="template-post-form" type="text/html" class="container">
<section class="card-panel">
<h1>Dodaj post</h1>
<form>
<div class="input-field">
<i class="material-icons prefix">label_outline</i>
<input
id="post-title"
type="text"
placeholder="Tytuł"
name="title"
required
/>
</div>
<div class="input-field">
<i class="material-icons prefix">comment</i>
<textarea
id="post-body"
class="materialize-textarea"
placeholder="Treść"
name="text"
required
></textarea>
</div>
<input
class="btn waves-effect waves-light"
type="submit"
value="Dodaj nowy post">
</form>
</section>
</script>
<script id="template-about" type="text/html" class="container">
<ul class="collection with-header">
<li class="collection-header"><h4>About</h4></li>
<li class="collection-item avatar">
<i class="material-icons circle">grade</i>
<span class="title">Hi, my name is Robert Obręczarek</span>
<p>Welcome to my blog <br>
Here you will know how to do the JavaScript the easy way :)
</p>
</li>
</ul>
</script>
</body>
</html>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.41/system.js"></script>
<script>
SystemJS.config({
baseURL: 'scripts'
});
SystemJS.import('main.js');
</script>