Prechádzať zdrojové kódy

move asset files to separate directories and add shortcuts to manifests

Daniel Sheffield 1 rok pred
rodič
commit
b07d9a9af7
47 zmenil súbory, kde vykonal 407 pridanie a 115 odobranie
  1. 4 4
      rest/pyapi.py
  2. BIN
      rest/static/clip-favicon_48.png
  3. 0 0
      rest/static/clip/144.png
  4. 0 0
      rest/static/clip/192.png
  5. 0 0
      rest/static/clip/48.png
  6. 0 0
      rest/static/clip/512.png
  7. 0 0
      rest/static/clip/72.png
  8. 0 0
      rest/static/clip/96.png
  9. 0 0
      rest/static/clip/clip-favicon.svg
  10. 0 0
      rest/static/clip/clip-favicon_square.svg
  11. 19 9
      rest/static/clip/manifest.json
  12. 0 0
      rest/static/clip/qr.svg
  13. 0 8
      rest/static/goto-favicon.svg
  14. BIN
      rest/static/goto-favicon_48.png
  15. 0 68
      rest/static/goto-favicon_square.svg
  16. 0 0
      rest/static/goto/144.png
  17. 0 0
      rest/static/goto/192.png
  18. 0 0
      rest/static/goto/48.png
  19. 0 0
      rest/static/goto/512.png
  20. 0 0
      rest/static/goto/72.png
  21. 0 0
      rest/static/goto/96.png
  22. 69 0
      rest/static/goto/chain-link-3-2.svg
  23. 49 0
      rest/static/goto/chain-link-cut-away.svg
  24. 50 0
      rest/static/goto/chain-link.svg
  25. 62 0
      rest/static/goto/chain-link2-3-2.svg
  26. 51 0
      rest/static/goto/chain-link2-cut-away.svg
  27. 51 0
      rest/static/goto/chain-link2.svg
  28. 4 1
      rest/static/goto/chain-link2fr-3-2.svg
  29. 4 1
      rest/static/goto/chain-link2r-3-2.svg
  30. 19 9
      rest/static/goto/manifest.json
  31. 0 0
      rest/static/goto/qr.svg
  32. BIN
      rest/static/upload-favicon_48.png
  33. 0 0
      rest/static/upload/144.png
  34. 0 0
      rest/static/upload/192.png
  35. 0 0
      rest/static/upload/48.png
  36. 0 0
      rest/static/upload/512.png
  37. 0 0
      rest/static/upload/72.png
  38. 0 0
      rest/static/upload/96.png
  39. 17 7
      rest/static/upload/manifest.json
  40. 0 0
      rest/static/upload/qr.svg
  41. 0 0
      rest/static/upload/upload-favicon.svg
  42. 0 0
      rest/static/upload/upload-favicon_maskable.svg
  43. 0 0
      rest/static/upload/upload-favicon_square.svg
  44. 2 2
      rest/templates/form-open.tpl
  45. 2 2
      rest/templates/goto.tpl
  46. 2 2
      rest/templates/paste.tpl
  47. 2 2
      rest/templates/upload.tpl

+ 4 - 4
rest/pyapi.py

@@ -51,7 +51,7 @@ def clip():
         return template(
             'paste',
             form=form,
-            qr=f'{LOCATION}/clip/{_hash}.qr' if content else f'{LOCATION}/static/clip-qr.svg',
+            qr=f'{LOCATION}/clip/{_hash}.qr' if content else f'{LOCATION}/static/clip/qr.svg',
             link=link,
             disabled=True if content else False,
             download=f'/clip/{_hash}' if content else None
@@ -75,7 +75,7 @@ def clip():
         return template(
             'paste',
             form=form,
-            qr=f'{LOCATION}/static/clip-qr.svg',
+            qr=f'{LOCATION}/static/clip/qr.svg',
             link=link,
             disabled=False,
             download=None
@@ -132,7 +132,7 @@ def upload():
         return template(
             'upload',
             form=form,
-            qr=f'{LOCATION}/upload/{_hash}.qr' if _hash else f'{LOCATION}/static/upload-qr.svg',
+            qr=f'{LOCATION}/upload/{_hash}.qr' if _hash else f'{LOCATION}/static/upload/qr.svg',
             link=link,
             mimetype=mimetype,
             disabled=disabled
@@ -211,7 +211,7 @@ def goto():
         return template(
             'goto',
             form=form,
-            qr=f'{LOCATION}/goto/{_hash}.qr' if content else f'{LOCATION}/static/goto-qr.svg',
+            qr=f'{LOCATION}/goto/{_hash}.qr' if content else f'{LOCATION}/static/goto/qr.svg',
             link=link,
             disabled=disabled,
             preview=preview,

BIN
rest/static/clip-favicon_48.png


+ 0 - 0
rest/static/clip-favicon_144.png → rest/static/clip/144.png


+ 0 - 0
rest/static/clip-favicon_192.png → rest/static/clip/192.png


+ 0 - 0
rest/static/clip-favicon.png → rest/static/clip/48.png


+ 0 - 0
rest/static/clip-favicon_512.png → rest/static/clip/512.png


+ 0 - 0
rest/static/clip-favicon_72.png → rest/static/clip/72.png


+ 0 - 0
rest/static/clip-favicon_96.png → rest/static/clip/96.png


+ 0 - 0
rest/static/clip-favicon.svg → rest/static/clip/clip-favicon.svg


+ 0 - 0
rest/static/clip-favicon_square.svg → rest/static/clip/clip-favicon_square.svg


+ 19 - 9
rest/static/clip-manifest.json → rest/static/clip/manifest.json

@@ -1,46 +1,56 @@
 {
   "id": "/clip",
-  "name": "Clipboard Web Application",
-  "short_name": "Paste",
-  "description": "Save snippets of text for sharing via a short URL",
+  "name": "Paste & Clip",
+  "short_name": "Clip",
+  "description": "Save snippets of text to a virtual clipboard to share via a short URL",
   "start_url": "/clip",
+  "shortcuts": [
+    {
+      "name": "Open",
+      "url": "/clip/open"
+    },
+    {
+      "name": "New",
+      "url": "/clip"
+    }
+  ],
   "scope": "/clip",
   "theme_color": "#4f8f4f",
   "background_color": "black",
   "display": "standalone",
   "icons": [
     {
-      "src": "/static/clip-favicon_512.png",
+      "src": "/static/clip/512.png",
       "sizes": "512x512",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/clip-favicon_192.png",
+      "src": "/static/clip/192.png",
       "sizes": "192x192",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/clip-favicon_144.png",
+      "src": "/static/clip/144.png",
       "sizes": "144x144",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/clip-favicon_96.png",
+      "src": "/static/clip/96.png",
       "sizes": "96x96",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/clip-favicon_72.png",
+      "src": "/static/clip/72.png",
       "sizes": "72x72",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/clip-favicon_48.png",
+      "src": "/static/clip/48.png",
       "sizes": "48x48",
       "type": "image/png",
       "purpose": "any"

+ 0 - 0
rest/static/clip-qr.svg → rest/static/clip/qr.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 8
rest/static/goto-favicon.svg


BIN
rest/static/goto-favicon_48.png


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 68
rest/static/goto-favicon_square.svg


+ 0 - 0
rest/static/goto-favicon_144.png → rest/static/goto/144.png


+ 0 - 0
rest/static/goto-favicon_192.png → rest/static/goto/192.png


+ 0 - 0
rest/static/goto-favicon.png → rest/static/goto/48.png


+ 0 - 0
rest/static/goto-favicon_512.png → rest/static/goto/512.png


+ 0 - 0
rest/static/goto-favicon_72.png → rest/static/goto/72.png


+ 0 - 0
rest/static/goto-favicon_96.png → rest/static/goto/96.png


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 69 - 0
rest/static/goto/chain-link-3-2.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 49 - 0
rest/static/goto/chain-link-cut-away.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 50 - 0
rest/static/goto/chain-link.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 62 - 0
rest/static/goto/chain-link2-3-2.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 51 - 0
rest/static/goto/chain-link2-cut-away.svg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 51 - 0
rest/static/goto/chain-link2.svg


+ 4 - 1
rest/static/chain-link2fr-3-2.svg → rest/static/goto/chain-link2fr-3-2.svg

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
-
+<!--
+    Copyright (c) Daniel Sheffield 2023.
+    All rights reserved.
+-->
 <svg
    width="197.11458mm"
    height="197.11458mm"

+ 4 - 1
rest/static/chain-link2r-3-2.svg → rest/static/goto/chain-link2r-3-2.svg

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
-
+<!--
+    Copyright (c) Daniel Sheffield 2023.
+    All rights reserved.
+-->
 <svg
    width="197.11458mm"
    height="197.11458mm"

+ 19 - 9
rest/static/goto-manifest.json → rest/static/goto/manifest.json

@@ -1,46 +1,56 @@
 {
   "id": "/goto",
-  "name": "GoTo... Tiny URL Web Application",
-  "short_name": "GoTo..",
-  "description": "Share links via short URL that can be easily typed or verbalised",
+  "name": "GoTo... Tiny URL",
+  "short_name": "GoTo",
+  "description": "Share links by generating a short URL that can be easily typed or verbalised",
   "start_url": "/goto",
+  "shortcuts": [
+    {
+      "name": "Open",
+      "url": "/goto/open"
+    },
+    {
+      "name": "New",
+      "url": "/goto"
+    }
+  ],
   "scope": "/goto",
   "theme_color": "#8f4f4f",
   "background_color": "black",
   "display": "standalone",
   "icons": [
     {
-      "src": "/static/goto-favicon_512.png",
+      "src": "/static/goto/512.png",
       "sizes": "512x512",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/goto-favicon_192.png",
+      "src": "/static/goto/192.png",
       "sizes": "192x192",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/goto-favicon_144.png",
+      "src": "/static/goto/144.png",
       "sizes": "144x144",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/goto-favicon_96.png",
+      "src": "/static/goto/96.png",
       "sizes": "96x96",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/goto-favicon_72.png",
+      "src": "/static/goto/72.png",
       "sizes": "72x72",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/goto-favicon_48.png",
+      "src": "/static/goto/48.png",
       "sizes": "48x48",
       "type": "image/png",
       "purpose": "any"

+ 0 - 0
rest/static/goto-qr.svg → rest/static/goto/qr.svg


BIN
rest/static/upload-favicon_48.png


+ 0 - 0
rest/static/upload-favicon_144.png → rest/static/upload/144.png


+ 0 - 0
rest/static/upload-favicon_192.png → rest/static/upload/192.png


+ 0 - 0
rest/static/upload-favicon.png → rest/static/upload/48.png


+ 0 - 0
rest/static/upload-favicon_512.png → rest/static/upload/512.png


+ 0 - 0
rest/static/upload-favicon_72.png → rest/static/upload/72.png


+ 0 - 0
rest/static/upload-favicon_96.png → rest/static/upload/96.png


+ 17 - 7
rest/static/upload-manifest.json → rest/static/upload/manifest.json

@@ -1,46 +1,56 @@
 {
   "id": "/upload",
-  "name": "File Share Web Application",
+  "name": "Upload Files",
   "short_name": "Upload",
   "description": "Upload a file for sharing via a short URL",
   "start_url": "/upload",
+  "shortcuts": [
+    {
+      "name": "Open",
+      "url": "/upload/open"
+    },
+    {
+      "name": "New",
+      "url": "/upload"
+    }
+  ],
   "scope": "/upload",
   "theme_color": "#afaf0f",
   "background_color": "black",
   "display": "standalone",
   "icons": [
     {
-      "src": "/static/upload-favicon_512.png",
+      "src": "/static/upload/512.png",
       "sizes": "512x512",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/upload-favicon_192.png",
+      "src": "/static/upload/192.png",
       "sizes": "192x192",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/upload-favicon_144.png",
+      "src": "/static/upload/144.png",
       "sizes": "144x144",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/upload-favicon_96.png",
+      "src": "/static/upload/96.png",
       "sizes": "96x96",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/upload-favicon_72.png",
+      "src": "/static/upload/72.png",
       "sizes": "72x72",
       "type": "image/png",
       "purpose": "any"
     },
     {
-      "src": "/static/upload-favicon_48.png",
+      "src": "/static/upload/48.png",
       "sizes": "48x48",
       "type": "image/png",
       "purpose": "any"

+ 0 - 0
rest/static/upload-qr.svg → rest/static/upload/qr.svg


+ 0 - 0
rest/static/upload-favicon.svg → rest/static/upload/upload-favicon.svg


+ 0 - 0
rest/static/upload-favicon_maskable.svg → rest/static/upload/upload-favicon_maskable.svg


+ 0 - 0
rest/static/upload-favicon_square.svg → rest/static/upload/upload-favicon_square.svg


+ 2 - 2
rest/templates/form-open.tpl

@@ -34,8 +34,8 @@ form {
 }
     </style>
     <title>{{tool.title()}}</title>
-    <link rel="manifest" href="/static/{{tool}}-manifest.json"/>
-    <link rel="icon" href="/static/{{tool}}-favicon.png" />
+    <link rel="manifest" href="/static/{{tool}}/manifest.json"/>
+    <link rel="icon" href="/static/{{tool}}/48.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
     <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>

+ 2 - 2
rest/templates/goto.tpl

@@ -22,8 +22,8 @@ img {
 }
     </style>
     <title>GoTo...</title>
-    <link rel="manifest" href="/static/goto-manifest.json"/>
-    <link rel="icon" href="/static/goto-favicon.png" />
+    <link rel="manifest" href="/static/goto/manifest.json"/>
+    <link rel="icon" href="/static/goto/48.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
     <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>

+ 2 - 2
rest/templates/paste.tpl

@@ -23,8 +23,8 @@ img {
 }
     </style>
     <title>Paste</title>
-    <link rel="manifest" href="/static/clip-manifest.json"/>
-    <link rel="icon" href="/static/clip-favicon.png" />
+    <link rel="manifest" href="/static/clip/manifest.json"/>
+    <link rel="icon" href="/static/clip/48.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
     <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>

+ 2 - 2
rest/templates/upload.tpl

@@ -36,9 +36,9 @@ object.text {
 }
     </style>
     <title>Upload</title>
-    <link rel="manifest" href="/static/upload-manifest.json"/>
+    <link rel="manifest" href="/static/upload/manifest.json"/>
+    <link rel="icon" href="/static/upload/48.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1"/>
-    <link rel="icon" href="/static/upload-favicon.png" />
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
     <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>
     <link rel="stylesheet" href="https://shandan.one/css/responsive-visibility-collapse.css"/>

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov