1
0
mirror of https://github.com/fazo96/homework.git synced 2025-01-26 14:44:20 +01:00
homework/client/index.html

111 lines
3.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>
{{> ribbon}}
<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="ui-container">
{{#if currentUser}}
{{> editor}} {{> notes}} {{> userInfo}}
{{else}}
{{> auth}}
{{/if}}
</div>
<div class="center-block" align="center">{{> footer}}</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">{{truncateNoteDesc content}}</span>
<button type="button" class="close-note close">&times;</button>
</li>
{{/each}}
</ul>
<div align="center">
<input type="text" id="newNote" class="form-control" placeholder="Add new note">
</div>
</template>
<template name="auth">
<div align="center">
<p>Register a new Account or login</p>
{{> notifications }}
{{#if working}}
<div align="center" class="spinning-cog">
<i class="fa fa-cog fa-spin fa-3x"></i>
</div>
{{else}}
<input type="text" id="mail" class="form-control login" placeholder="Email">
<input type="password" id="pass" class="form-control login" placeholder="Password">
<br>
{{/if}}
<p>Password must be at least 8 characters. Email must be a valid email</p>
{{#unless working}}
<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>
{{/unless}}
</div>
</template>
<template name="userInfo"><hr>
<div align="center">
<p>{{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}} notification">
<p align="center">{{msg}}</p>
<button type="button" class="close close-notification">&times;</button>
</div>
{{/each}}
</template>
<template name="footer">
<hr>
<p>This app is <a href="https://en.wikipedia.org/wiki/Free_software">Free Software</a>, under the <a href="http://opensource.org/licenses/MIT">MIT License</a></p>
<p>Built by Enrico Fasoli</p>
<a class="custom-link" href="http://www.linkedin.com/profile/view?id=292450419"><i class="fa fa-linkedin fa-2x"></i></a>
<a href="http://twitter.com/fazo96"><i class="fa fa-twitter fa-2x footer-center-icon"></i></a>
<a class="custom-link" href="http://github.com/fazo96"><i class="fa fa-github fa-2x"></i></a>
</template>
<template name="ribbon">
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
<a href="http://github.com/fazo96/homework">Fork me on GitHub</a>
</div>
</div>
</template>