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

165 lines
5.4 KiB
HTML

<!-- Homework UI Templates -->
<template name="layout">
<div class="container">
<div class="page-header">
<h1 id="title">Homework<br>
<small>management for students</small>
</h1>
</div>
<div class="center-block" id="ui-container">
{{> error}}
{{> yield}}
</div>
<hr>
<div class="center-block" align="center">{{> footer}}</div>
</div>
{{> ribbon}}
</template>
<template name="menu">
<ul class="nav nav-pills nav-justified">
<li class="menu-item {{at_archive}}"><a href="/archive">Archive</a></li>
<li class="menu-item {{at_home}}"><a href="/notes">Home</a></li>
<li class="menu-item {{at_account}}"><a href="/account">Account</a></li>
</ul>
</template>
<template name="notes">
{{> notelist }} <hr> {{> account }}
</template>
<template name="note">
{{> editor }} {{> notelist }} <hr> {{> account }}
</template>
<template name="noteadder">
<div align="center">
<input type="text" id="newNote" class="form-control" placeholder="Add new note">
</div>
</template>
<template name="notelist">
<div class="list-group">
{{#each notes}}
<a href="{{pathFor 'note'}}" class="note list-group-item">
<span class="note-content">
<button type="button" class="edit-note close">
<i class="fa fa-pencil-square-o"></i>
</button>
<b>{{title}}</b> <span class="note-desc">{{content}}</span>
</span>
<button type="button" class="close-note close">&times;</button>
</a>
{{/each}}
</div>
{{#if empty}}
<p align="center">You don't have any notes, try adding a new one</p>
{{/if}}
{{> noteadder }}
</template>
<template name="auth">
<div align="center">
<p>Register a new Account or login</p>
{{#if loggingIn}}
{{> loading}}
{{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 loggingIn}}
<button type="button" id="register" class="btn-auth btn btn-success">Register</button>
<button type="button" id="login" class="btn-auth btn btn-primary">Login</button>
{{/unless}}
</div>
</template>
<template name="account">
{{#if loggingIn}} {{> loading}} {{/if}}
<div align="center">
<p>{{email}}</p>
<button type="button" id="btn-logout" class="btn btn-danger">Logout</button>
</div>
</template>
<template name="verifyEmail">
<div align="center">
<p>Insert the token you received by email at the address {{email}} here, or click the link in the email we sent you.</p>
<input type="text" id="token-field" class="form-control" placeholder="Token">
<div align="center" class="buttons">
<button type="button" class="btn btn-warning btn-ver" id="btn-resend">Resend Email</button>
<button type="button" class="btn btn-success btn-ver" id="btn-verify">Verify Email</button>
<button type="button" class="btn btn-danger btn-ver" id="btn-delete">Delete Account</button>
<br><button type="button" class="btn btn-primary btn-ver" id="btn-logout">Logout</button>
</div>
</div>
</template>
<template name="editor">
<div align="center">{{> error }}</div>
{{#if _id}}
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<div align="center">
<input type="text" class="form-control editor-title" value="{{title}}" placeholder="Title">
<button type="button" class="close close-editor">&times;</button>
</div>
</h3>
</div>
<div align="center" class="panel-body">
<textarea id="area" class="area form-control" rows="3" placeholder="...">{{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="error">
{{#if error}}
<div align="center"><div class="alert alert-{{error.type}} error">
<p align="center">{{error.msg}}</p>
<button type="button" class="close close-error">&times;</button>
</div></div>
{{/if}}
</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>
<template name="loading">
<div align="center" class="spinning-cog">
<i class="fa fa-cog fa-spin fa-3x"></i>
</div>
</template>
<template name="footer">
<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 as a prototype.<br><u>Not ready for daily usage yet!</u></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="404">
<div align="center">
<h2>Acciderbolina!<br><small>Page not found</small></h2>
</div>
</template>