mirror of
https://github.com/fazo96/markcloud.git
synced 2025-01-26 13:34:19 +01:00
135 lines
4.4 KiB
HTML
135 lines
4.4 KiB
HTML
<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>
|
|
|
|
<template name="layout">
|
|
{{> yield region="outside"}}
|
|
<div class="container">
|
|
<h1>MarkCloud</h1>
|
|
<hr>
|
|
{{> notifications}}
|
|
{{> yield}}
|
|
</div>
|
|
</template>
|
|
|
|
<template name="home">
|
|
{{#if currentUser}}<p>Logged in as <b>{{mail}}</b></p>{{/if}}
|
|
<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>
|
|
<p>There are <b>{{ndocs}}</b> documents in the database</p>
|
|
<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>
|
|
</template>
|
|
|
|
<template name="new">
|
|
<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>
|
|
<input type="text" id="title" class="form-control" placeholder="Title">
|
|
<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>
|
|
<button id="new-btn" class="btn btn-primary">
|
|
<i class="fa fa-upload"></i> Upload</button>
|
|
</template>
|
|
|
|
<template name="docLayout">
|
|
{{> yield region="outside"}}
|
|
<div class="container">{{> yield}}</div>
|
|
</template>
|
|
|
|
<template name="doc">
|
|
{{#if showTitle}}<h1>{{title}}</h1><hr>{{/if}}
|
|
{{#if text}}
|
|
{{#if source}}
|
|
<textarea id="src" class="form-control" rows="{{rows}}" readonly>{{text}}</textarea>
|
|
{{else}}
|
|
<div id="doc">{{#markdown}}{{text}}{{/markdown}}</div>
|
|
{{/if}}
|
|
{{else}}
|
|
<div class="text-center">
|
|
<h1>Sorry</h1>
|
|
<p>This document is empty, expired, or never existed.</p>
|
|
</div>
|
|
{{/if}}
|
|
<hr>
|
|
<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}}>
|
|
<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>
|
|
{{/if}}
|
|
{{#if currentUser}}
|
|
<button id="del-doc" class="btn btn-danger">
|
|
<i class="fa fa-trash"></i> Delete</button>
|
|
{{/if}}
|
|
</div>
|
|
<br>Powered by <a href="/">MarkCloud</a>
|
|
</div>
|
|
</template>
|
|
|
|
<template name="loading">
|
|
<div id="loading" class="text-center">
|
|
<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>
|
|
</template>
|
|
|
|
<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">
|
|
<h2>Sign Up<a href="/"><i class="fa fa-home pull-right"></i></a></h2>
|
|
<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>
|
|
<hr>
|
|
<div class="text-center">Already have an account? <a href="/login">Sign in!</a></div>
|
|
</div>
|
|
</template>
|
|
|
|
<template name="signin">
|
|
<div id="signin-container">
|
|
<h2>Sign In<a href="/"><i class="fa fa-home pull-right"></i></a></h2>
|
|
<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>
|
|
<hr>
|
|
<div class="text-center">Need an account? <a href="/signup">Sign Up!</a></div>
|
|
</div>
|
|
</template>
|