my eye

Demote license and entry points on project index

Committed 68ef5c

--- a/webint_code/templates/project/index.html
+++ b/webint_code/templates/project/index.html

                 ,
         </small>
     </p>
-    $ license = py_project.pop("license")
-    $ licenses = {"0BSD": "BSD Zero Clause License",
-    $             "BSD-2-Clause": 'BSD 2-Clause "Simplified" License',
-    $             "BSD-3-Clause": 'BSD 3-Clause "Modified" License',
-    $             "AGPL-3.0-or-later": "GNU Affero General Public License v3.0 or later"}
-    <p><small><strong>Licensed:</strong> <a href=https://spdx.org/licenses/$(license).html><code>$licenses[license]</code></a></small></p>
-    $ plugins = py_project.pop("plugins", None)
-    $ scripts = py_project.pop("scripts", None)
-    $if plugins or scripts:
-        <p><small><strong>Provides:</strong></small>
-    $if plugins:
-        $if webapps := plugins.pop("webapps", None):
-            webapps (
-            $for webapp, webapp_callable in webapps.items():
-                $ webapp_path = webapp_callable.replace(".", "/").replace(":", "#")
-                <a href="/projects/$project/api/$webapp_path">$webapp</a>\
-                $if not loop.last:
-                    , \
-             )
-        $if websites := plugins.pop("websites", None):
-            websites (
-            $for webapp, webapp_callable in websites.items():
-                $ webapp_path = webapp_callable.replace(".", "/").replace(":", "#")
-                <a href="/projects/$project/api/$webapp_path">$webapp</a>\
-                $if not loop.last:
-                    , \
-             )
-    $if scripts:
-        scripts (
-        $for script, script_callable in scripts.items():
-            $ script_path = script_callable.replace(".", "/").replace(":", "#")
-            <a href="/projects/$project/api/$script_path">$script</a>\
-            $if not loop.last:
-                , \
-         )
-    $if plugins or scripts:
-        </p>
 
 $if "errors" in test_results:
     <p>
         $if source["name"] == "main":
             <code>@<a href="$source['url']">$source["url"]</a></code>
     </small></p>
+
     $if py_deps := py_project.pop("dependencies", None):
         <p><small><strong>Requires:</strong>
         <code>python&thinsp;$py_deps.pop("python")</code>,
             $if not loop.last:
                 ,
         </small></p>
+
+    $ plugins = py_project.pop("plugins", None)
+    $ scripts = py_project.pop("scripts", None)
+    $if plugins or scripts:
+        <p><small><strong>Provides:</strong></small>
+    $if plugins:
+        $if webapps := plugins.pop("webapps", None):
+            webapps (
+            $for webapp, webapp_callable in webapps.items():
+                $ webapp_path = webapp_callable.replace(".", "/").replace(":", "#")
+                <a href="/projects/$project/api/$webapp_path">$webapp</a>
+                <form method=post action=$tx.origin/sites/machines>
+                    <input type=hidden name=package value=$py_project["name"]>
+                    <input type=hidden name=app value=$webapp_callable>
+                    <button>Spawn</button>
+                </form>
+                $if not loop.last:
+                    , \
+             )
+        $if websites := plugins.pop("websites", None):
+            websites (
+            $for webapp, webapp_callable in websites.items():
+                $ webapp_path = webapp_callable.replace(".", "/").replace(":", "#")
+                <a href="/projects/$project/api/$webapp_path">$webapp</a>\
+                $if not loop.last:
+                    , \
+             )
+    $if scripts:
+        scripts (
+        $for script, script_callable in scripts.items():
+            $ script_path = script_callable.replace(".", "/").replace(":", "#")
+            <a href="/projects/$project/api/$script_path">$script</a>\
+            $if not loop.last:
+                , \
+         )
+    $if plugins or scripts:
+        </p>
+
+    $ license = py_project.pop("license")
+    $ licenses = {"0BSD": "BSD Zero Clause License",
+    $             "BSD-2-Clause": 'BSD 2-Clause "Simplified" License',
+    $             "BSD-3-Clause": 'BSD 3-Clause "Modified" License',
+    $             "AGPL-3.0-or-later": "GNU Affero General Public License v3.0 or later"}
+    <p><small><strong>Licensed:</strong> <a href=https://spdx.org/licenses/$(license).html><code>$licenses[license]</code></a></small></p>
+    <hr>
+
+$if package_releases:
     <h2>Releases</h2>
     <ul class=h-feed>
     $for release in list(reversed(sorted(package_releases, key=semver.parse_version_info)))[:1]:
         <li class=h-entry><a href=/projects/$project/releases/$release>$release</a></li>
     </ul>
-    <hr>
-
-$ git_clone = f"git clone {tx.origin}/code/projects/{project}.git"
-<script>
-copyText = () => {
-  navigator.clipboard.writeText('$git_clone')
-}
-</script>
-$ ignorable_files = (
-$   ".github",
-$   ".gitignore",
-$   "README",
-$   "README.md",
-$   "pyproject.toml",
-$   "pyrightconfig.json",
-$   "package.json",
-$   "tsconfig.json",
-$   "webpack.config.js",
-$ )
 
 $if repo.exists():
-    <div>
+    $ git_clone = f"git clone {tx.origin}/code/projects/{project}.git"
+    <script>
+    copyText = () => {
+      navigator.clipboard.writeText('$git_clone')
+    }
+    </script>
     <pre><small><button onclick=copyText()>📋</button> \
     $git_clone</small></pre>
+
     <h2>Commit Log</h2>
     <ul class="commits h-feed">
     $for commit in list(repo.log.values())[:1]:
         </small></small>
         </li>
     </ul>
+
+    $ ignorable_files = (
+    $   ".github",
+    $   ".gitignore",
+    $   "README",
+    $   "README.md",
+    $   "pyproject.toml",
+    $   "pyrightconfig.json",
+    $   "package.json",
+    $   "tsconfig.json",
+    $   "webpack.config.js",
+    $ )
     <h2>Files</h2>
     $ files = sorted(repo.files)
     $ prev_file = None