2014-10-06 08:42:31 +02:00
< head >
< title > MarkCloud< / title >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< / head >
2014-10-04 08:48:44 +02:00
< template name = "layout" >
2014-10-04 10:34:13 +02:00
{{> yield region="outside"}}
2014-10-04 08:48:44 +02:00
< div class = "container" >
< h1 > MarkCloud< / h1 >
< hr >
2014-10-04 17:16:27 +02:00
{{> notifications}}
2014-10-04 08:48:44 +02:00
{{> yield}}
< / div >
< / template >
< template name = "home" >
2014-10-04 17:16:27 +02:00
{{#if currentUser}}< p > Logged in as < b > {{mail}}< / b > < / p > {{/if}}
2014-10-04 08:56:18 +02:00
< p > This is a demo app. Click < a href = "new" > here< / a > to create a new document.< / p >
< p > After submitting the document you will be redirected to its permanent link< / p >
2014-10-04 10:11:08 +02:00
< p > There are < b > {{ndocs}}< / b > documents in the database< / p >
2014-10-04 17:16:27 +02:00
< p > This demo was built by < a href = "http://github.com/fazo96" > Enrico
Fasoli (fazo96)< / a > in 45 minutes, it's now evolving to a full app.< / p >
< p > It's open source, you can find the code
< a href = "http://github.com/fazo96/markcloud" > here< / a > < / p >
2014-10-04 08:48:44 +02:00
< / template >
< template name = "new" >
2014-10-04 08:56:18 +02:00
< p > Write your document in < a href = "https://help.github.com/articles/github-flavored-markdown/" > GitHub Flavored Markdown< / a > then submit it with the button. You will be redirected to its permanent link< / p >
2014-10-04 17:16:27 +02:00
< input type = "text" id = "title" class = "form-control" placeholder = "Title" >
2014-10-06 08:42:31 +02:00
< input type = "checkbox" id = "show-title" checked > Show title in document
< textarea id = "editor" class = "form-control" rows = "10" placeholder = "Write your markdown :)" autofocus > < / textarea >
2014-10-04 10:11:08 +02:00
< button id = "new-btn" class = "btn btn-primary" >
< i class = "fa fa-upload" > < / i > Upload< / button >
2014-10-04 08:48:44 +02:00
< / template >
2014-10-04 08:56:18 +02:00
< template name = "docLayout" >
2014-10-04 10:34:13 +02:00
{{> yield region="outside"}}
2014-10-04 08:56:18 +02:00
< div class = "container" > {{> yield}}< / div >
< / template >
2014-10-04 08:48:44 +02:00
< template name = "doc" >
2014-10-06 08:42:31 +02:00
{{#if showTitle}}< h1 > {{title}}< / h1 > < hr > {{/if}}
2014-10-04 10:40:16 +02:00
{{#if text}}
2014-10-06 10:28:05 +02:00
{{#if source}}
< textarea id = "src" class = "form-control" rows = "{{rows}}" readonly > {{text}}< / textarea >
{{else}}
< div id = "doc" > {{#markdown}}{{text}}{{/markdown}}< / div >
{{/if}}
2014-10-04 10:40:16 +02:00
{{else}}
< div class = "text-center" >
< h1 > Sorry< / h1 >
< p > This document is empty, expired, or never existed.< / p >
< / div >
{{/if}}
2014-10-04 08:56:18 +02:00
< hr >
2014-10-06 08:42:31 +02:00
< div class = "text-center" >
{{#unless currentUser}}
< a href = "/login" > Log in< / a > to edit and delete your documents< br >
{{/unless}}
< div class = "btn-group" id = "tools" >
{{#if currentUser}}
< button id = "edit-doc" class = "btn btn-primary" { { canEdit } } >
2014-10-06 10:28:05 +02:00
< i class = "fa fa-edit" > < / i > Edit< / button >
{{/if}}
{{#if source}}
< button id = "src-doc" class = "btn btn-success" >
< i class = "fa fa-book" > < / i > View Document< / button >
{{else}}
< button id = "src-doc" class = "btn btn-success" >
< i class = "fa fa-code" > < / i > View Source< / button >
2014-10-06 08:42:31 +02:00
{{/if}}
{{#if currentUser}}
< button id = "del-doc" class = "btn btn-danger" >
2014-10-06 10:28:05 +02:00
< i class = "fa fa-trash" > < / i > Delete< / button >
2014-10-06 08:42:31 +02:00
{{/if}}
< / div >
< br > Powered by < a href = "/" > MarkCloud< / a >
< / div >
2014-10-04 10:11:08 +02:00
< / template >
< template name = "loading" >
2014-10-04 10:40:16 +02:00
< div id = "loading" class = "text-center" >
2014-10-04 10:34:13 +02:00
< i class = "fa fa-cog fa-spin fa-3x" > < / i >
< / div >
< / template >
< template name = "spinner" >
< div id = "spinner" >
< i class = "fa fa-2x fa-cog fa-spin" > < / i >
< / div >
2014-10-04 08:48:44 +02:00
< / template >
2014-10-04 17:16:27 +02:00
< template name = "404" >
< div class = "text-center" >
< h1 > 404< / h1 >
< p > This page does not exist.< / p >
< / div >
< / template >
< template name = "notifications" >
{{#if notification}}
< div class = "center-block text-center" >
< div class = "alert alert-{{notification.type}} error" >
< p align = "center" > {{notification.msg}}< / p >
< button type = "button" class = "close close-error" > × < / button >
< / div >
< / div >
{{/if}}
< / template >
< template name = "signup" >
< div id = "signup-container" >
2014-10-06 08:42:31 +02:00
< h2 > Sign Up< a href = "/" > < i class = "fa fa-home pull-right" > < / i > < / a > < / h2 >
2014-10-04 17:16:27 +02:00
< input type = "text" class = "form-control" id = "mail" placeholder = "E-Mail Address" >
< input type = "password" class = "form-control" placeholder = "Password" id = "pw" >
< input type = "password" class = "form-control" placeholder = "Repeat Password" id = "rpw" >
< button class = "btn btn-primary" id = "signup" > Sign Up< / button >
2014-10-06 08:42:31 +02:00
< hr >
< div class = "text-center" > Already have an account? < a href = "/login" > Sign in!< / a > < / div >
2014-10-04 17:16:27 +02:00
< / div >
< / template >
< template name = "signin" >
< div id = "signin-container" >
2014-10-06 08:42:31 +02:00
< h2 > Sign In< a href = "/" > < i class = "fa fa-home pull-right" > < / i > < / a > < / h2 >
2014-10-04 17:16:27 +02:00
< input type = "text" class = "form-control" id = "mail" placeholder = "E-Mail Address" >
< input type = "password" class = "form-control" placeholder = "Password" id = "pw" >
< button class = "btn btn-primary" id = "signin" > Sign In< / button >
2014-10-06 08:42:31 +02:00
< hr >
< div class = "text-center" > Need an account? < a href = "/signup" > Sign Up!< / a > < / div >
2014-10-04 17:16:27 +02:00
< / div >
< / template >