From d0446d5de1f31bd792c58059eef49738bf0fb741 Mon Sep 17 00:00:00 2001 From: Johnny Voruz Date: Sat, 23 Sep 2023 16:48:49 -0500 Subject: [PATCH] Index.html template split up into new widgitized templates found in evennia\web\templates\website\homepage --- .../website/homepage/accounts-widget.html | 14 ++ .../homepage/database-stats-widget.html | 13 ++ .../website/homepage/evennia-widget.html | 12 ++ .../website/homepage/main-content.html | 62 ++++++++ .../homepage/recently-connected-widget.html | 11 ++ evennia/web/templates/website/index.html | 132 +++--------------- 6 files changed, 131 insertions(+), 113 deletions(-) create mode 100644 evennia/web/templates/website/homepage/accounts-widget.html create mode 100644 evennia/web/templates/website/homepage/database-stats-widget.html create mode 100644 evennia/web/templates/website/homepage/evennia-widget.html create mode 100644 evennia/web/templates/website/homepage/main-content.html create mode 100644 evennia/web/templates/website/homepage/recently-connected-widget.html diff --git a/evennia/web/templates/website/homepage/accounts-widget.html b/evennia/web/templates/website/homepage/accounts-widget.html new file mode 100644 index 0000000000..9e6e13ad99 --- /dev/null +++ b/evennia/web/templates/website/homepage/accounts-widget.html @@ -0,0 +1,14 @@ +
+

Accounts

+ +
+

+ There's currently {{num_accounts_connected}} connected out of a total of {{num_accounts_registered}} + account{{num_accounts_registered|pluralize}} registered. +

+

+ Of these, {{num_accounts_registered_recent}} were created this week, and {{num_accounts_connected_recent}} + have connected within the last seven days. +

+
+
\ No newline at end of file diff --git a/evennia/web/templates/website/homepage/database-stats-widget.html b/evennia/web/templates/website/homepage/database-stats-widget.html new file mode 100644 index 0000000000..747bef56d2 --- /dev/null +++ b/evennia/web/templates/website/homepage/database-stats-widget.html @@ -0,0 +1,13 @@ +
+

Database Stats

+ +
+
    +
  • {{num_accounts_registered}} account{{num_accounts_registered|pluralize}} (+ + {{num_characters}} character{{num_characters|pluralize}}) +
  • +
  • {{num_rooms}} room{{num_rooms|pluralize}} (+ {{num_exits}} exits)
  • +
  • {{num_others}} other objects
  • +
+
+
\ No newline at end of file diff --git a/evennia/web/templates/website/homepage/evennia-widget.html b/evennia/web/templates/website/homepage/evennia-widget.html new file mode 100644 index 0000000000..a4772d71bb --- /dev/null +++ b/evennia/web/templates/website/homepage/evennia-widget.html @@ -0,0 +1,12 @@ +
+

Evennia

+ +
+

Evennia is an open-source MUD/MU*-creation framework built in + Python, using + Twisted and + Django.
+ Create the text-based multiplayer-game of your dreams - as + simple or as complex as you like.

+
+
\ No newline at end of file diff --git a/evennia/web/templates/website/homepage/main-content.html b/evennia/web/templates/website/homepage/main-content.html new file mode 100644 index 0000000000..72c9208177 --- /dev/null +++ b/evennia/web/templates/website/homepage/main-content.html @@ -0,0 +1,62 @@ +

Welcome to Evennia!

+ +
+ +

The Python MUD/MU* creation system.

+ +

+ You are looking at the start of your game's website, generated out of + the box by Evennia.
It can be expanded into a full-fledged home for your game. +

+ +{% if webclient_enabled %} + +

Play in the browser!

+ +{% endif %} +{% if telnet_enabled %} +

+ Telnet: {{ server_hostname }}, port + {% for port in telnet_ports %} + {% if not forloop.first and forloop.last %} or + {% elif forloop.counter != 1 %}, + {% endif %} + {{ port }} + {% endfor %} +

+{% endif %} +{% if telnet_ssl_enabled %} +

+ Telnet (SSL): {{ server_hostname }}, port + {% for port in telnet_ssl_ports %} + {% if not forloop.first and forloop.last %} or + {% elif forloop.counter != 1 %}, + {% endif %} + {{ port }} + {% endfor %} +

+{% endif %} +{% if ssh_enabled %} +

+ SSH: {{ server_hostname }}, port + {% for port in ssh_ports %} + {% if not forloop.first and forloop.last %} or + {% elif forloop.counter != 1 %}, + {% endif %} + {{ port }} + {% endfor %} +

+{% endif %} +

+ For more info, see the Evennia homepage or check + out our extensive online documentation. +

+

+ Don't hesitate asking questions to the Evennia community!
Drop a message + in the Evennia forums + or come say hi in the Discord support channel. +

+

+ Evennia is Open source and can be found on GitHub. + If you find bugs, please report them to the Issue tracker. +

\ No newline at end of file diff --git a/evennia/web/templates/website/homepage/recently-connected-widget.html b/evennia/web/templates/website/homepage/recently-connected-widget.html new file mode 100644 index 0000000000..4ee1552bc0 --- /dev/null +++ b/evennia/web/templates/website/homepage/recently-connected-widget.html @@ -0,0 +1,11 @@ +
+

Recently Connected

+ +
+
    + {% for account in accounts_connected_recent %} +
  • {{account.username}}—{{account.last_login|timesince}} ago
  • + {% endfor %} +
+
+
\ No newline at end of file diff --git a/evennia/web/templates/website/index.html b/evennia/web/templates/website/index.html index 365f473a4d..49a9479d62 100644 --- a/evennia/web/templates/website/index.html +++ b/evennia/web/templates/website/index.html @@ -7,138 +7,44 @@ {% block content %}
-
-
-
+
+
+
-

Welcome to Evennia!

+ {% include "website/homepage/main-content.html" %} -
- -

- The Python MUD/MU* creation system. -

-

- You are looking at the start of your game's website, generated out of - the box by Evennia.
It can be expanded into a full-fledged home for your game. -

- {% if webclient_enabled %} -

- Play in the browser! -

- {% endif %} - {% if telnet_enabled %} -

- Telnet: {{ server_hostname }}, port - {% for port in telnet_ports %} - {% if not forloop.first and forloop.last %} or - {% elif forloop.counter != 1 %}, - {% endif %} - {{ port }} - {% endfor %} -

- {% endif %} - {% if telnet_ssl_enabled %} -

- Telnet (SSL): {{ server_hostname }}, port - {% for port in telnet_ssl_ports %} - {% if not forloop.first and forloop.last %} or - {% elif forloop.counter != 1 %}, - {% endif %} - {{ port }} - {% endfor %} -

- {% endif %} - {% if ssh_enabled %} -

- SSH: {{ server_hostname }}, port - {% for port in ssh_ports %} - {% if not forloop.first and forloop.last %} or - {% elif forloop.counter != 1 %}, - {% endif %} - {{ port }} - {% endfor %} -

- {% endif %} -

- For more info, see the Evennia homepage or check - out our extensive online documentation. -

-

- Don't hesitate asking questions to the Evennia community!
Drop a message - in the Evennia forums - or come say hi in the Discord support channel. -

-

- Evennia is Open source and can be found on GitHub. - If you find bugs, please report them to the Issue tracker. -

-
+
+
-
-
+
-
-
-

Accounts

+
+ + {% include "website/homepage/accounts-widget.html" %} -
-

- There's currently {{num_accounts_connected}} connected out of a total of {{num_accounts_registered}} account{{num_accounts_registered|pluralize}} registered. -

-

- Of these, {{num_accounts_registered_recent}} were created this week, and {{num_accounts_connected_recent}} have connected within the last seven days. -

-
-
-
-
-

Recently Connected

+
+ + {% include "website/homepage/recently-connected-widget.html" %} -
-
    - {% for account in accounts_connected_recent %} -
  • {{account.username}}—{{account.last_login|timesince}} ago
  • - {% endfor %} -
-
-
-
-
-

Database Stats

+
+ + {% include "website/homepage/database-stats-widget.html" %} -
-
    -
  • {{num_accounts_registered}} account{{num_accounts_registered|pluralize}} (+ {{num_characters}} character{{num_characters|pluralize}})
  • -
  • {{num_rooms}} room{{num_rooms|pluralize}} (+ {{num_exits}} exits)
  • -
  • {{num_others}} other objects
  • -
-
-
-
-
-

Evennia

+
+ + {% include "website/homepage/evennia-widget.html" %} -
-

Evennia is an open-source MUD/MU*-creation framework built in - Python, using - Twisted and - Django.
- Create the text-based multiplayer-game of your dreams - as - simple or as complex as you like.

-
-
{% endblock %}