From 1637e9dfcf9e7d27e6c327fae5018ec0bbf1d953 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Wed, 11 Sep 2024 05:39:13 +0200 Subject: [PATCH] feat: redesign index, tests and licenses pages --- templates/index.ejs | 10 +-- templates/layout.ejs | 123 ++++++++++++++++++++++++++++------- templates/licenseElement.ejs | 8 +-- templates/licenses.ejs | 2 +- templates/tests.ejs | 14 ++-- 5 files changed, 116 insertions(+), 41 deletions(-) diff --git a/templates/index.ejs b/templates/index.ejs index 1e1adef..4424cdf 100644 --- a/templates/index.ejs +++ b/templates/index.ejs @@ -1,18 +1,18 @@

Welcome to <%= name %> <%= version %>

<% if (version.indexOf("Nightly-") == 0) { %> -
+
WARNING!
This version is only for test purposes and may be unstable.

<% } %>
- +

If you see this page that means that the server is working properly. You can further configure the server and replace index.html and tests.html pages with custom ones.

Default config.json looks like this:

- -
{
+    
+      
{
   "users": [],
   "port": 80,
   "pubport": 80,
@@ -77,7 +77,7 @@
 }

Changes:

-
    +
      <% changes.forEach((change) => {%>
    • <%= change %>
    • <% }); %> diff --git a/templates/layout.ejs b/templates/layout.ejs index 70f2b21..203af50 100644 --- a/templates/layout.ejs +++ b/templates/layout.ejs @@ -6,22 +6,18 @@ diff --git a/templates/licenseElement.ejs b/templates/licenseElement.ejs index 2aa41ae..28a330f 100644 --- a/templates/licenseElement.ejs +++ b/templates/licenseElement.ejs @@ -1,9 +1,9 @@ -
      -
      License: <%= license ? license : "Unknown" %>
      -
      +
      +
      License: <%= license ? license : "Unknown" %>
      +
      <%= moduleName %><% if (author) { %> (by <%= author %>)<% } %>
      -
      +
      <%= description %><% if (required) { %>
      Required by <%= name %>.<% } %>
      diff --git a/templates/licenses.ejs b/templates/licenses.ejs index d82befb..069bfa9 100644 --- a/templates/licenses.ejs +++ b/templates/licenses.ejs @@ -1,6 +1,6 @@

      <%= name %> <%= version %> Licenses

      <%= name %> <%= version %>

      -
      +
      MIT License

      Copyright (c) 2018-2024 SVR.JS
      diff --git a/templates/tests.ejs b/templates/tests.ejs index 304c825..83d6f7d 100644 --- a/templates/tests.ejs +++ b/templates/tests.ejs @@ -1,18 +1,18 @@

      <%= name %> <%= version %> Tests

      Directory (without trailing slash)

      - +

      Directory (with query)

      - +

      Directory (personalized)

      - +

      404 Error

      - +

      Server Side Javascript

      - +

      Proxy test

      - +

      URL rewriting test (/testdir_rewritten => /testdir)

      - +