diff options
author | ZeroDot1 <zerodot1@bk.ru> | 2019-02-23 19:37:56 +0100 |
---|---|---|
committer | ZeroDot1 <zerodot1@bk.ru> | 2019-02-23 19:37:56 +0100 |
commit | 06d50df10e450af47210422b2d2b5058827cc791 (patch) | |
tree | 66f7c131f036c3b1114e6003a933bcfe518fc09e /share | |
parent | 3af05dcc2041026380a71b8aed1af9af849416a5 (diff) | |
download | onionshare-06d50df10e450af47210422b2d2b5058827cc791.tar.gz onionshare-06d50df10e450af47210422b2d2b5058827cc791.zip |
Add asynchronous functions to the templates to reduce page load times.
Asynchronous functions for CSS and JS.
Diffstat (limited to 'share')
-rw-r--r-- | share/templates/403.html | 29 | ||||
-rw-r--r-- | share/templates/404.html | 29 | ||||
-rw-r--r-- | share/templates/denied.html | 17 | ||||
-rw-r--r-- | share/templates/receive.html | 10 | ||||
-rw-r--r-- | share/templates/receive_noscript_xss.html | 4 | ||||
-rw-r--r-- | share/templates/send.html | 105 | ||||
-rw-r--r-- | share/templates/thankyou.html | 39 |
7 files changed, 124 insertions, 109 deletions
diff --git a/share/templates/403.html b/share/templates/403.html index df81f3e7..a084ef48 100644 --- a/share/templates/403.html +++ b/share/templates/403.html @@ -1,16 +1,19 @@ <!DOCTYPE html> <html> - <head> - <title>OnionShare: 403 Forbidden</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> - </head> - <body> - <div class="info-wrapper"> - <div class="info"> - <p><img class="logo" src="/static/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> - </body> + +<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="none" onload="if(media!='all')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 class="info-header">You are not allowed to perform that action at this time.</p> + </div> + </div> +</body> + </html> diff --git a/share/templates/404.html b/share/templates/404.html index 264ca517..ad46e28c 100644 --- a/share/templates/404.html +++ b/share/templates/404.html @@ -1,16 +1,19 @@ <!DOCTYPE html> <html> - <head> - <title>OnionShare: 404 Not Found</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> - </head> - <body> - <div class="info-wrapper"> - <div class="info"> - <p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p> - <p class="info-header">404 Not Found</p> - </div> - </div> - </body> + +<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="none" onload="if(media!='all')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 class="info-header">404 Not Found</p> + </div> + </div> +</body> + </html> diff --git a/share/templates/denied.html b/share/templates/denied.html index 5d411d62..94fb379b 100644 --- a/share/templates/denied.html +++ b/share/templates/denied.html @@ -1,10 +1,13 @@ <!DOCTYPE html> <html> - <head> - <title>OnionShare</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - </head> - <body> - <p>OnionShare download in progress</p> - </body> + +<head> + <title>OnionShare</title> + <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> +</head> + +<body> + <p>OnionShare download in progress</p> +</body> + </html> diff --git a/share/templates/receive.html b/share/templates/receive.html index a557a967..a114e0b1 100644 --- a/share/templates/receive.html +++ b/share/templates/receive.html @@ -2,8 +2,8 @@ <html> <head> <title>OnionShare</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> + <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="none" onload="if(media!='all')media='all'"> </head> <body> @@ -49,10 +49,10 @@ to Standard or <a target="_blank" href="/noscript-xss-instructions">turn off your Tor Browser's NoScript XSS setting</a>.</p> </div> - <script src="/static/js/receive-noscript.js"></script> + <script async src="/static/js/receive-noscript.js" charset="utf-8"></script> </div> - <script src="/static/js/jquery-3.3.1.min.js"></script> - <script src="/static/js/receive.js"></script> + <script src="/static/js/jquery-3.3.1.min.js" charset="utf-8"></script> + <script async src="/static/js/receive.js" charset="utf-8"></script> </body> </html> diff --git a/share/templates/receive_noscript_xss.html b/share/templates/receive_noscript_xss.html index bf846b03..f6a959c8 100644 --- a/share/templates/receive_noscript_xss.html +++ b/share/templates/receive_noscript_xss.html @@ -2,8 +2,8 @@ <html> <head> <title>OnionShare</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> + <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="none" onload="if(media!='all')media='all'"> </head> <body> diff --git a/share/templates/send.html b/share/templates/send.html index e7e1fde0..72342224 100644 --- a/share/templates/send.html +++ b/share/templates/send.html @@ -1,56 +1,59 @@ <!DOCTYPE html> <html> - <head> - <title>OnionShare</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> - <meta name="onionshare-filename" content="{{ filename }}"> - <meta name="onionshare-filesize" content="{{ filesize }}"> - </head> - <body> - <header class="clearfix"> - <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"> - <h1>OnionShare</h1> - </header> +<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="none" onload="if(media!='all')media='all'"> + <meta name="onionshare-filename" content="{{ filename }}"> + <meta name="onionshare-filesize" content="{{ filesize }}"> +</head> + +<body> + + <header class="clearfix"> + <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"> + <h1>OnionShare</h1> + </header> + + <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 %} + <tr> + <td> + <img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" /> + {{ info.basename }} + </td> + <td>{{ info.size_human }}</td> + <td></td> + </tr> + {% endfor %} + {% for info in file_info.files %} + <tr> + <td> + <img width="30" height="30" title="" alt="" src="/static/img/web_file.png" /> + {{ info.basename }} + </td> + <td>{{ info.size_human }}</td> + <td></td> + </tr> + {% endfor %} + </table> + <script async src="/static/js/send.js" charset="utf-8"></script> +</body> - <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 %} - <tr> - <td> - <img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" /> - {{ info.basename }} - </td> - <td>{{ info.size_human }}</td> - <td></td> - </tr> - {% endfor %} - {% for info in file_info.files %} - <tr> - <td> - <img width="30" height="30" title="" alt="" src="/static/img/web_file.png" /> - {{ info.basename }} - </td> - <td>{{ info.size_human }}</td> - <td></td> - </tr> - {% endfor %} - </table> - <script src="/static/js/send.js"></script> - </body> </html> diff --git a/share/templates/thankyou.html b/share/templates/thankyou.html index 64c8b369..e1a94784 100644 --- a/share/templates/thankyou.html +++ b/share/templates/thankyou.html @@ -1,22 +1,25 @@ <!DOCTYPE html> <html> - <head> - <title>OnionShare is closed</title> - <link href="/static/img/favicon.ico" rel="icon" type="image/x-icon" /> - <link href="/static/css/style.css" rel="stylesheet" type="text/css" /> - </head> - <body> - <header class="clearfix"> - <img class="logo" src="/static/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 class="info-header">Thank you for using OnionShare</p> - <p class="info-description">You may now close this window.</p> - </div> - </div> - </body> +<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="none" onload="if(media!='all')media='all'"> +</head> + +<body> + <header class="clearfix"> + <img class="logo" src="/static/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 class="info-header">Thank you for using OnionShare</p> + <p class="info-description">You may now close this window.</p> + </div> + </div> +</body> + </html> |