diff options
author | sudan <sudan@douban.com> | 2016-01-20 19:11:15 +0800 |
---|---|---|
committer | sudan <sudan@douban.com> | 2016-01-20 19:11:15 +0800 |
commit | 084442616ffcceb309c71a62b123f7a11606576a (patch) | |
tree | 3ee7c3b2b7b9a454b8f1b3e8309c3edf25611541 /templates | |
parent | some change (diff) | |
parent | misc updates (diff) | |
download | stackbin-084442616ffcceb309c71a62b123f7a11606576a.tar.gz stackbin-084442616ffcceb309c71a62b123f7a11606576a.tar.bz2 stackbin-084442616ffcceb309c71a62b123f7a11606576a.zip |
merge from jiawei
Diffstat (limited to 'templates')
-rw-r--r-- | templates/delete_paste.html | 11 | ||||
-rw-r--r-- | templates/layout.html | 16 | ||||
-rw-r--r-- | templates/my_pastes.html | 13 | ||||
-rw-r--r-- | templates/new_paste.html | 2 | ||||
-rw-r--r-- | templates/show_paste.html | 3 |
5 files changed, 12 insertions, 33 deletions
diff --git a/templates/delete_paste.html b/templates/delete_paste.html deleted file mode 100644 index e258dae..0000000 --- a/templates/delete_paste.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "layout.html" %} -{% block title %}Delete Paste #{{ paste.id }}{% endblock %} -{% block body %} - <h2>Delete Paste #{{ paste.id }}</h2> - <form action="" method=post> - <p>Are you sure you want to delete the paste? You cannot undo this. - <p> - <input type=submit name=yes value=Yes> - <input type=submit name=no value=No> - </form> -{% endblock %} diff --git a/templates/layout.html b/templates/layout.html index 206f750..64298f2 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,25 +1,31 @@ <!doctype html> <title>{% block title %}{% endblock %} | Flask Pastebin</title> +<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" /> +<meta name="apple-mobile-web-app-capable" content="yes"> +<meta name="apple-mobile-web-app-status-bar-style" content="black"> +<meta name="format-detection" content="telephone=no"> <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}"> -<script type=text/javascript src="{{ config.JUGGERNAUT_DRIVER }}"></script> -<script type=text/javascript src="{{ url_for('static', filename='jquery.js') }}"></script> +<link rel="stylesheet" media="screen and (max-width: 800px)" +href="{{ url_for('static', filename='small.css') }}" /> + +{#<script type=text/javascript src="{{ url_for('static', filename='jquery.js') }}"></script> <script type=text/javascript src="{{ url_for('static', filename='pastebin.js') }}"></script> <script type=text/javascript> pastebin.urlRoot = {{ request.url_root|tojson|safe }}; -{%- if g.user %} - pastebin.subscribeUser({{ g.user.id }}); -{%- endif %} </script> +#} <div class=page> <h1>Flask Pastebin</h1> <ul class=nav> <li><a href="{{ url_for('new_paste') }}">New Paste</a> + {# {% if g.user %} <li><a href="{{ url_for('my_pastes') }}">My Pastes</a> <li><a href="{{ url_for('logout') }}">Sign out ({{ g.user.display_name }})</a> {% else %} <li><a href="{{ url_for('login') }}">Sign in with Facebook</a> {% endif %} + #} </ul> {% for message in get_flashed_messages() %} <p class=flash>{{ message }} diff --git a/templates/my_pastes.html b/templates/my_pastes.html deleted file mode 100644 index 64967ad..0000000 --- a/templates/my_pastes.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "layout.html" %} -{% block title %}My Pastes{% endblock %} -{% from '_pagination.html' import render_pagination %} -{% block body %} - <h2>My Pastes</h2> - <ul> - {% for paste in pagination.items %} - <li><a href="{{ url_for('show_paste', paste_id=paste.id) }}">#{{ paste.id }}</a> - from {{ paste.pub_date.strftime('%Y-%m-%d @ %H:%M') }} - {% endfor %} - </ul> - {{ render_pagination(pagination) }} -{% endblock %} diff --git a/templates/new_paste.html b/templates/new_paste.html index 31bf41a..658acfb 100644 --- a/templates/new_paste.html +++ b/templates/new_paste.html @@ -3,7 +3,7 @@ {% block body %} <h2>New Paste</h2> <form action="" method=post> - <div class=code><textarea name=code cols=60 rows=18>{{ parent.code }}</textarea></div> + <div class=code><textarea name=code cols=60 rows=12>{{ parent.code }}</textarea></div> <p><input type=submit value="New Paste"> </form> {% endblock %} diff --git a/templates/show_paste.html b/templates/show_paste.html index 7eeaa4b..1c42e99 100644 --- a/templates/show_paste.html +++ b/templates/show_paste.html @@ -29,7 +29,4 @@ {% endif %} </dl> <div class=code><pre>{{ paste.code }}</pre></div> - <script type=text/javascript> - pastebin.subscribePaste({{ paste.id }}); - </script> {% endblock %} |