1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/templates/index.tmpl
Zack Scholl 0dfa6f388f Better textarea sizing
Former-commit-id: b95674262c650244b0f3b5fd1f8fa068a3a077b2 [formerly db0f23ffd78991ea70d40cc2b5461ae60781fb20] [formerly d42da1260349e8f1d28410055f51209982ae741d [formerly 9a6960a2cba5417bf1da5e2690bda3138bd954a0 [formerly 8d8472029d]]]
Former-commit-id: 146f6397367a9068498fb358f4c1ea5ad6425524 [formerly bc6267772c95b5820ab234ac5f8b4cd1aa525358]
Former-commit-id: b756d6b503d6e0e77a6b6ea5c1cd606489169b28
Former-commit-id: 2ef00a010f
2016-02-08 08:42:19 -05:00

93 lines
2.3 KiB
Cheetah

<!DOCTYPE html>
<html>
<head>
<title>{{ .Title }}</title>
{{ template "header" }}
<script src="/static/js/jquery.autogrowtextarea.min.js"></script>
<script src="/static/js/cowyo.js"></script>
<script>
external_ip = '{{ .ExternalIP }}'
title_name = '{{ .Title }}'
</script>
<style type="text/css">
textarea {
width: 100%;
margin: 5px 0;
padding: 3px;
border: none;
overflow: auto;
outline: none;
font-size: large;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
font-family: Tahoma, sans-serif;
}
body {
margin: 0;
padding: 0.4em 1em 6em;
background: #fff;
max-width: 650px;
margin: 0 auto;
}
</style>
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Cowyo</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="/{{ .Title }}">Edit</a></li>
<li><a href="/{{ .Title }}/view">View</a></li>
<li><a href="/{{ .Title }}/list">List</a></li>
<li><a href="/about/view">About</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<form action='#' id="emit" method="post" name="emit">
<div>
<textarea autofocus rows={{ .NumRows }} class='auto_submit_item' id="emit_data" name="emit_data" placeholder="Start typing, it will save automatically.
Go to cowyo.com/{{ .Title }} to reload this page.
Do not post anything private.
Anyone with the URL can access this note.">{{ .CurrentText }}</textarea>
</div>
</form>
<script>
$(document).ready(function() {
$("#emit_data").autoGrow();
});
</script>
</body>
</html>