2014-05-25 15:38:34 +02:00
< head >
< title > Homework< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" >
< / head >
2014-05-25 12:01:38 +02:00
< body >
2014-05-27 15:33:50 +02:00
{{> ribbon}}
2014-05-25 12:01:38 +02:00
< div class = "container" >
< div class = "page-header" >
2014-05-25 15:39:45 +02:00
< h1 id = "title" > Homework< br >
2014-05-25 15:38:34 +02:00
< small id = "small" > management for students< / small >
< / h1 >
2014-05-25 12:01:38 +02:00
< / div >
2014-05-27 15:33:50 +02:00
< div class = "center-block" id = "ui-container" >
2014-05-26 16:07:48 +02:00
{{#if currentUser}}
{{> editor}} {{> notes}} {{> userInfo}}
{{else}}
{{> auth}}
2014-05-25 19:49:32 +02:00
{{/if}}
2014-05-25 12:01:38 +02:00
< / div >
2014-05-27 15:33:50 +02:00
< div class = "center-block" align = "center" > {{> footer}}< / div >
2014-05-25 12:01:38 +02:00
< / div >
< / body >
< template name = "notes" >
< ul class = "list-group" >
{{#each notes}}
2014-05-25 19:49:32 +02:00
< li class = "note list-group-item" >
2014-05-26 16:07:48 +02:00
< button type = "button" class = "edit-note close" > < i class = "fa fa-pencil-square-o" > < / i > < / button >
2014-05-27 08:54:18 +02:00
< b > {{title}}< / b > < span class = "subtitle" > {{truncateNoteDesc content}}< / span >
2014-05-26 16:07:48 +02:00
< button type = "button" class = "close-note close" > × < / button >
2014-05-25 12:01:38 +02:00
< / li >
{{/each}}
< / ul >
2014-05-27 15:33:50 +02:00
< div align = "center" >
< input type = "text" id = "newNote" class = "form-control" placeholder = "Add new note" >
< / div >
2014-05-25 12:01:38 +02:00
< / template >
2014-05-25 14:17:55 +02:00
< template name = "auth" >
2014-05-26 16:07:48 +02:00
< div align = "center" >
< p > Register a new Account or login< / p >
{{> notifications }}
2014-05-27 12:46:51 +02:00
{{#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}}
2014-05-26 16:07:48 +02:00
< p > Password must be at least 8 characters. Email must be a valid email< / p >
2014-05-27 12:46:51 +02:00
{{#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}}
2014-05-26 16:07:48 +02:00
< / div >
2014-05-25 14:17:55 +02:00
< / template >
2014-05-27 15:33:50 +02:00
< template name = "userInfo" > < hr >
2014-05-26 16:07:48 +02:00
< div align = "center" >
2014-05-27 15:33:50 +02:00
< p > {{in}}< / p >
2014-05-26 16:07:48 +02:00
< button type = "button" id = "logout" class = "btn btn-danger" > Logout< / button >
< / div >
2014-05-25 14:17:55 +02:00
< / template >
2014-05-26 12:08:14 +02:00
2014-05-26 16:07:48 +02:00
< template name = "editor" >
{{> notifications }}
2014-05-26 12:08:14 +02:00
{{#if note}}
< div class = "panel panel-info" >
< div class = "panel-heading" >
< h3 class = "panel-title" >
2014-05-26 19:36:59 +02:00
< div align = "center" >
< input type = "text" class = "form-control title" value = "{{note.title}}" placeholder = "Title" > < / div >
2014-05-26 16:07:48 +02:00
< button type = "button" class = "close close-editor" > × < / button >
2014-05-26 12:08:14 +02:00
< / h3 >
< / div >
2014-05-26 19:36:59 +02:00
< 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 >
2014-05-26 12:08:14 +02:00
< / div >
< / div >
{{/if}}
< / template >
2014-05-26 16:07:48 +02:00
< template name = "notifications" >
{{#each notification}}
2014-05-27 12:46:51 +02:00
< div class = "alert alert-{{type}} notification" >
2014-05-26 16:07:48 +02:00
< p align = "center" > {{msg}}< / p >
< button type = "button" class = "close close-notification" > × < / button >
< / div >
{{/each}}
< / template >
2014-05-27 15:33:50 +02:00
< 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 >