diff options
Diffstat (limited to 'pastepy/templates/paste.html')
-rw-r--r-- | pastepy/templates/paste.html | 82 |
1 files changed, 53 insertions, 29 deletions
diff --git a/pastepy/templates/paste.html b/pastepy/templates/paste.html index ddb321e..6504e9e 100644 --- a/pastepy/templates/paste.html +++ b/pastepy/templates/paste.html @@ -1,34 +1,58 @@ {% extends "base.html" %} {% block head %} - <script src="{{ url_for('static', filename='edit.js') }}" type="text/javascript"></script> + <script src="{{ url_for('static', filename='js/edit.js') }}" type="text/javascript"></script> +{% endblock %} +{% block nav %} +<ul class="navbar-nav mr-auto"> + <li class="nav-item active"><a href="{{ url_for('.paste') }}" class="nav-link">{{ title }}</a></li> +</ul> {% endblock %} {% block content %} - <form action="/paste" method="post" id="pasteform"> - <ul> - <li id="syntaxli"> - <select name="syntax" id="syntax"> - {% for cat, ls in config.LEXERS %} - <optgroup label="{{ cat }}"> - {% for k, v in ls %} - <option value="{{ v }}"{% if v == (session.syntax or config.DEFAULT_SYNTAX) %} selected="selected"{% endif %}>{{ k }}</option> - {% endfor %} - </optgroup> - {% endfor %} - </select> - <input type="checkbox" name="remember_syntax" id="remember_syntax"{% if session.syntax %} checked{% endif %}> - <label for="remember_syntax">Remember syntax</label> - </li> - <li> - <input type="text" name="nick" id="nick" value="{{ session.nick or 'Anonymous' }}"> - <input type="checkbox" name="remember_me" id="remember_me"{% if session.nick %} checked{% endif %}> - <label for="remember_me">Remember me</label> - </li> - <li><input type="text" name="title" id="title" value="Untitled"></li> - <li><textarea rows="15" cols="80" name="text" id="text"></textarea></li> - <li> - <input type="submit" id="pastesubmit" name="type" value="Paste"> - <input type="submit" id="pastesubmit2" name="type" value="Preview"> - </li> - </ul> - </form> +<h1>New paste</h1> +<form action="/paste" method="post" id="pasteform"> + <div class="form-row mb-3"> + <div class="col-auto"> + <select name="syntax" id="syntax" class="custom-select"> + {% for cat, ls in config.LEXERS %} + <optgroup label="{{ cat }}"> + {% for k, v in ls %} + <option value="{{ v }}"{% if v == (session.syntax or config.DEFAULT_SYNTAX) %} selected="selected"{% endif %}>{{ k }}</option> + {% endfor %} + </optgroup> + {% endfor %} + </select> + </div> + <div class="col-auto"> + <div class="custom-control custom-checkbox"> + <input type="checkbox" name="remember_syntax" id="remember_syntax"{% if session.syntax %} checked{% endif %} class="custom-control-input"> + <label for="remember_syntax" class="custom-control-label">Remember syntax</label> + </div> + </div> + </div> + <div class="form-row mb-3"> + <div class="col-auto"> + <input type="text" name="nick" id="nick" value="{{ session.nick }}" class="form-control" placeholder="Name"> + </div> + <div class="col-auto"> + <div class="custom-control custom-checkbox"> + <input type="checkbox" name="remember_me" id="remember_me"{% if session.nick %} checked{% endif %} class="custom-control-input"> + <label for="remember_me" class="custom-control-label">Remember me</label> + </div> + </div> + </div> + <div class="form-row mb-3"> + <div class="col-auto"> + <input type="text" name="title" id="title" class="form-control" placeholder="Title"> + </div> + </div> + <div class="form-row mb-3"> + <div class="col"> + <textarea rows="15" name="text" id="text" class="form-control text-monospace"></textarea> + </div> + </div> + <div class="form-row mb-3"> + <button type="submit" id="pastesubmit" name="type" class="btn btn-primary" value="Paste">Paste</button> + <button type="submit" id="pastesubmit2" name="type" class="btn btn-secondary" value="Preview">Preview</button> + </div> +</form> {% endblock %} |