Refacted, new look and raw download feature

This commit is contained in:
James Mills
2017-07-09 01:57:21 -07:00
parent 47ef82966c
commit 3e081f0aa0
8 changed files with 202 additions and 50 deletions

22
templates/base.html Normal file
View File

@@ -0,0 +1,22 @@
{{define "base"}}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/css/spectre-icons.min.css">
<link rel="stylesheet" href="/css/spectre.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Pastebin</title>
</head>
<body>
<section class="container grid-960 mt-10">
<header class="navbar">
<section class="navbar-section">
<a href="/" class="navbar-brand mr-10">Paste</a>
</section>
<section class="navbar-section"></section>
</header>
{{template "content" .}}
</section>
</body>
</html>
{{end}}

View File

@@ -1,14 +1,17 @@
<html>
<head>
<title>pastebin</title>
</head>
<body>
<p>Enter your text here:</p>
<form method="POST" action="">
<textarea name="blob" cols=80 rows=24></textarea>
<input type="submit">
</form>
</body>
</html>
{{define "content"}}
<section class="container">
<div class="columns">
<div class="column">
<form action="" method="POST">
<div class="form-group">
<label class="form-label" for="input-blob"></label>
<textarea class="form-input" id="input-blob" name="blob" placeholder="Enter content here..." rows="24"></textarea>
</div>
<div class="form-group">
<button class="btn btn-sm btn-primary" type="submit">Paste</button>
</div>
</form>
</div>
</div>
</section>
{{end}}

View File

@@ -1,10 +1,30 @@
<html>
<head>
<title>pastebin</title>
</head>
<body>
<pre>{{.Blob}}</pre>
</body>
</html>
{{define "content"}}
<pre class="code">
<code>{{.Blob}}</code>
</pre>
<section class="container">
<div class="columns">
<div class="column col-3">
<div class="dropdown">
<div class="btn-group">
<a class="btn btn-sm btn-primary" href="/download/{{.UUID}}">
<i class="icon icon-download"></i>
Download
</a>
<a class="btn btn-sm btn-primary dropdown-toggle" tabindex="0">
<i class="icon icon-caret"></i>
</a>
<ul class="menu">
<li class="menu-item">
<a href="#dropdowns">
<i class="icon icon-delete"></i>
Delete
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
{{end}}