summaryrefslogtreecommitdiff
path: root/share/templates
diff options
context:
space:
mode:
Diffstat (limited to 'share/templates')
-rw-r--r--share/templates/401.html19
-rw-r--r--share/templates/403.html6
-rw-r--r--share/templates/404.html6
-rw-r--r--share/templates/405.html19
-rw-r--r--share/templates/denied.html2
-rw-r--r--share/templates/listing.html53
-rw-r--r--share/templates/receive.html28
-rw-r--r--share/templates/receive_noscript_xss.html35
-rw-r--r--share/templates/send.html41
-rw-r--r--share/templates/thankyou.html8
10 files changed, 134 insertions, 83 deletions
diff --git a/share/templates/401.html b/share/templates/401.html
new file mode 100644
index 00000000..dc50f534
--- /dev/null
+++ b/share/templates/401.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>OnionShare: 401 Unauthorized Access</title>
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
+</head>
+
+<body>
+ <div class="info-wrapper">
+ <div class="info">
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
+ <p class="info-header">401 Unauthorized Access</p>
+ </div>
+ </div>
+</body>
+
+</html>
diff --git a/share/templates/403.html b/share/templates/403.html
index f3ea4e0e..2ebab09a 100644
--- a/share/templates/403.html
+++ b/share/templates/403.html
@@ -3,14 +3,14 @@
<head>
<title>OnionShare: 403 Forbidden</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<div class="info-wrapper">
<div class="info">
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">You are not allowed to perform that action at this time.</p>
</div>
</div>
diff --git a/share/templates/404.html b/share/templates/404.html
index 1c5d7d2d..375c125d 100644
--- a/share/templates/404.html
+++ b/share/templates/404.html
@@ -3,14 +3,14 @@
<head>
<title>OnionShare: 404 Not Found</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon">
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<div class="info-wrapper">
<div class="info">
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">404 Not Found</p>
</div>
</div>
diff --git a/share/templates/405.html b/share/templates/405.html
new file mode 100644
index 00000000..55493ae7
--- /dev/null
+++ b/share/templates/405.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>OnionShare: 405 Method Not Allowed</title>
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
+</head>
+
+<body>
+ <div class="info-wrapper">
+ <div class="info">
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
+ <p class="info-header">405 Method Not Allowed</p>
+ </div>
+ </div>
+</body>
+
+</html>
diff --git a/share/templates/denied.html b/share/templates/denied.html
index 94fb379b..ad4d0b21 100644
--- a/share/templates/denied.html
+++ b/share/templates/denied.html
@@ -3,7 +3,7 @@
<head>
<title>OnionShare</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
diff --git a/share/templates/listing.html b/share/templates/listing.html
new file mode 100644
index 00000000..2f70dbf0
--- /dev/null
+++ b/share/templates/listing.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>OnionShare</title>
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
+ <link href="{{ static_url_path }}/css/style.css" rel="stylesheet" type="text/css" />
+ </head>
+ <body>
+
+ <header class="clearfix">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
+ <h1>OnionShare</h1>
+ </header>
+
+ {% if breadcrumbs %}
+ <ul class="breadcrumbs">
+ {% for breadcrumb in breadcrumbs %}<li><a href="{{ breadcrumb[1] }}">{{ breadcrumb[0] }}</a> <span class="sep">&#8227;</span></li>{% endfor %}<li>{{ breadcrumbs_leaf }}</li>
+ </ul>
+ {% endif %}
+
+ <table class="file-list" id="file-list">
+ <tr>
+ <th id="filename-header">Filename</th>
+ <th id="size-header">Size</th>
+ <th></th>
+ </tr>
+
+ {% for info in dirs %}
+ <tr>
+ <td>
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ </td>
+ <td>&mdash;</td>
+ </tr>
+ {% endfor %}
+
+ {% for info in files %}
+ <tr>
+ <td>
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ </td>
+ <td>{{ info.size_human }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+ </body>
+</html>
diff --git a/share/templates/receive.html b/share/templates/receive.html
index 4f207a03..59a3ebe4 100644
--- a/share/templates/receive.html
+++ b/share/templates/receive.html
@@ -2,31 +2,18 @@
<html>
<head>
<title>OnionShare</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon">
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
<div class="upload-wrapper">
- <!--
- We are not using a <noscript> tag because it only works when the security slider is set to
- Safest, not Safer: https://trac.torproject.org/projects/tor/ticket/29506
- -->
- <div id="noscript">
- <p>
- <img src="/static/img/warning.png" title="Warning" /><strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, uploads
- sometimes never finish. To upload reliably, either set your Tor Browser
- <a rel="noreferrer" target="_blank" href="https://tb-manual.torproject.org/en-US/security-slider/">security slider</a>
- to Standard or
- <a target="_blank" href="/noscript-xss-instructions">turn off your Tor Browser's NoScript XSS setting</a>.</p>
- </div>
-
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="upload-header">Send Files</p>
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
@@ -45,14 +32,13 @@
</ul>
</div>
- <form id="send" method="post" enctype="multipart/form-data" action="{{ upload_action }}">
+ <form id="send" method="post" enctype="multipart/form-data" action="/upload">
<p><input type="file" id="file-select" name="file[]" multiple /></p>
<p><button type="submit" id="send-button" class="button">Send Files</button></p>
</form>
</div>
- <script src="/static/js/receive-noscript.js"></script>
- <script src="/static/js/jquery-3.4.0.min.js"></script>
- <script async src="/static/js/receive.js"></script>
+ <script src="{{ static_url_path }}/js/jquery-3.4.0.min.js"></script>
+ <script async src="{{ static_url_path }}/js/receive.js"></script>
</body>
</html>
diff --git a/share/templates/receive_noscript_xss.html b/share/templates/receive_noscript_xss.html
deleted file mode 100644
index bce78524..00000000
--- a/share/templates/receive_noscript_xss.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>OnionShare</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon">
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
- </head>
- <body>
-
- <header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
- <h1>OnionShare</h1>
- </header>
-
- <div class="disable-noscript-xss-wrapper">
- <h3>Disable your Tor Browser's NoScript XSS setting</h3>
-
- <p>If your security slider is set to Safest, JavaScript is disabled so XSS vulnerabilities won't affect you,
- which makes it safe to disable NoScript's XSS protections.</p>
-
- <p>Here is how to disable this setting:</p>
-
- <ol>
- <li>Click the menu icon in the top-right of Tor Browser and open "Add-ons"</li>
- <li>Next to the NoScript add-on, click the "Preferences" button</li>
- <li>Switch to the "Advanced" tab</li>
- <li>Uncheck "Sanitize cross-site suspicious requests"</li>
- </ol>
-
- <p>If you'd like to learn technical details about this issue, check
- <a rel="noreferrer" href="https://github.com/micahflee/onionshare/issues/899">this issue</a>
- on GitHub.</p>
- </div>
- </body>
-</html>
diff --git a/share/templates/send.html b/share/templates/send.html
index 2a56829a..941c4130 100644
--- a/share/templates/send.html
+++ b/share/templates/send.html
@@ -3,8 +3,8 @@
<head>
<title>OnionShare</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon">
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
<meta name="onionshare-filename" content="{{ filename }}">
<meta name="onionshare-filesize" content="{{ filesize }}">
</head>
@@ -15,45 +15,54 @@
<div class="right">
<ul>
<li>Total size: <strong>{{ filesize_human }}</strong> {% if is_zipped %} (compressed){% endif %}</li>
- {% if slug %}
- <li><a class="button" href='/{{ slug }}/download'>Download Files</a></li>
- {% else %}
<li><a class="button" href='/download'>Download Files</a></li>
- {% endif %}
</ul>
</div>
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
+ {% if breadcrumbs %}
+ <ul class="breadcrumbs">
+ {% for breadcrumb in breadcrumbs %}<li><a href="{{ breadcrumb[1] }}">{{ breadcrumb[0] }}</a> <span class="sep">&#8227;</span></li>{% endfor %}<li>{{ breadcrumbs_leaf }}</li>
+ </ul>
+ {% endif %}
+
<table class="file-list" id="file-list">
<tr>
<th id="filename-header">Filename</th>
<th id="size-header">Size</th>
<th></th>
</tr>
- {% for info in file_info.dirs %}
+ {% for info in dirs %}
<tr>
<td>
- <img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" />
- {{ info.basename }}
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
</td>
- <td>{{ info.size_human }}</td>
- <td></td>
+ <td>&mdash;</td>
</tr>
{% endfor %}
- {% for info in file_info.files %}
+
+ {% for info in files %}
<tr>
<td>
- <img width="30" height="30" title="" alt="" src="/static/img/web_file.png" />
+ <img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
+ {% if download_individual_files %}
+ <a href="{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ {% else %}
{{ info.basename }}
+ {% endif %}
</td>
<td>{{ info.size_human }}</td>
- <td></td>
</tr>
{% endfor %}
</table>
- <script async src="/static/js/send.js" charset="utf-8"></script>
+ <script async src="{{ static_url_path }}/js/send.js" charset="utf-8"></script>
</body>
</html>
diff --git a/share/templates/thankyou.html b/share/templates/thankyou.html
index c4b39cde..b7e2b97c 100644
--- a/share/templates/thankyou.html
+++ b/share/templates/thankyou.html
@@ -3,19 +3,19 @@
<head>
<title>OnionShare is closed</title>
- <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon">
- <link rel="stylesheet" rel="subresource" type="text/css" href="/static/css/style.css" media="all">
+ <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
+ <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head>
<body>
<header class="clearfix">
- <img class="logo" src="/static/img/logo.png" title="OnionShare">
+ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
<div class="info-wrapper">
<div class="info">
- <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
+ <p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
<p class="info-header">Thank you for using OnionShare</p>
<p class="info-description">You may now close this window.</p>
</div>