1
0
mirror of https://github.com/fazo96/homework.git synced 2025-01-24 14:24:20 +01:00
homework/index.html
2014-05-26 19:36:59 +02:00

82 lines
2.6 KiB
HTML

<head>
<title>Homework</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body>
<div class="container">
<div class="page-header">
<h1 id="title">Homework<br>
<small id="small">management for students</small>
</h1>
</div>
<div class="center-block" id="quicknotes">
{{#if currentUser}}
{{> editor}} {{> notes}} {{> userInfo}}
{{else}}
{{> auth}}
{{/if}}
</div>
</div>
</body>
<template name="notes">
<ul class="list-group">
{{#each notes}}
<li class="note list-group-item">
<button type="button" class="edit-note close"><i class="fa fa-pencil-square-o"></i></button>
<b>{{title}}</b> <span class="subtitle">{{content}}</span>
<button type="button" class="close-note close">&times;</button>
</li>
{{/each}}
</ul>
</template>
<template name="auth">
<div align="center">
<p>Register a new Account or login</p>
{{> notifications }}
<input type="text" id="mail" class="form-control login" placeholder="Email">
<input type="password" id="pass" class="form-control login" placeholder="Password">
<br>
<p>Password must be at least 8 characters. Email must be a valid email</p>
<button type="button" id="register" class="btn-auth btn btn-info">Register</button>
<button type="button" id="login" class="btn-auth btn btn-info">Login</button>
</div>
</template>
<template name="userInfo">
<div align="center">
<input type="text" id="newNote" class="form-control" placeholder="Add new note">
<p>Logged in as {{in}}</p>
<button type="button" id="logout" class="btn btn-danger">Logout</button>
</div>
</template>
<template name="editor">
{{> notifications }}
{{#if note}}
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<div align="center">
<input type="text" class="form-control title" value="{{note.title}}" placeholder="Title"></div>
<button type="button" class="close close-editor">&times;</button>
</h3>
</div>
<div align="center" class="panel-body">
<textarea class="area form-control" rows="3" placeholder="">{{note.content}}</textarea>
<button type="button" class="btn btn-info save-editor">Save</button>
</div>
</div>
{{/if}}
</template>
<template name="notifications">
{{#each notification}}
<div class="alert alert-{{type}}">
<p align="center">{{msg}}</p>
<button type="button" class="close close-notification">&times;</button>
</div>
{{/each}}
</template>