diff --git a/controllers/views.cc b/controllers/views.cc index 56b3f45..81d34a1 100644 --- a/controllers/views.cc +++ b/controllers/views.cc @@ -55,6 +55,7 @@ std::string htmlEsc(const std::string& src) { case '>': fres << ">"; break; case '&': fres << "&"; break; case '"': fres << """; break; + case '\n': fres << "
"; break; default: fres << character; } } diff --git a/views/authsuccess.csp b/views/authsuccess.csp index 37420bc..aa67b73 100644 --- a/views/authsuccess.csp +++ b/views/authsuccess.csp @@ -1,20 +1,9 @@ <%c++ auto fullname = @@.get("fullname");%> +<%layout global_layout%> + +Authentication success - DFB - - - - - - - - Authentication success - DFB - - - -
-

Authenticated as: {%fullname%}

-
- - - +
+

Authenticated as: {%fullname%}

+
diff --git a/views/botdetail.csp b/views/botdetail.csp index fc0d3a0..cfa7cac 100644 --- a/views/botdetail.csp +++ b/views/botdetail.csp @@ -4,67 +4,58 @@ <%c++ auto canVote = @@.get("canVote");%> <%c++ auto owner = @@.get("owner");%> <%c++ auto modView = @@.get("modView");%> +<%layout global_layout%> + + +{%bot.name%} - DFB - - +
+

+
- - - - - {%bot.name%} - DFB - - - -
-

-
- - -
- {%bot.name%} -
- <%c++ if (owner or modView) {%> -
- Edit - Delete -
- <%c++ if (modView) {%> - - <%c++ }%> - <%c++ }%> + +
+ {%bot.name%} +
+ <%c++ if (owner or modView) {%> -
-
-
-
- {%bot.long_description%} -
- -
-
-

Overview

- - - - - - - - - -
Prefix{%bot.prefix%}
Owner{%bot.owner%}
-
- Support Server + <%c++ if (modView) {%> + + <%c++ }%> + <%c++ }%> +
- +
+
+
+ {%bot.long_description%} +
+ +
+
+

Overview

+ + + + + + + + + +
Prefix{%bot.prefix%}
Owner{%bot.owner%}
+
+ Support Server +
+
- diff --git a/views/botlist.csp b/views/botlist.csp index 3ee9ab7..6431261 100644 --- a/views/botlist.csp +++ b/views/botlist.csp @@ -1,50 +1,43 @@ <%inc#include "controllers/views.h" %> <%c++ auto modView = @@.get("modView");%> <%c++ auto justMine = @@.get("justMine");%> +<%layout global_layout%> - - - - - - DFB - - -
- -

Discordlist for Bots

-

Find a lot of bots that will be useful to your server

- <%c++ if (@@.get("authed")) {%> - <%c++ if (justMine) {%> - All bots - <%c++ } else {%> - My bots - <%c++ }%> - Register bot - Logout - <%c++ } else {%> - Login +DFB + + diff --git a/views/botregister.csp b/views/botregister.csp index 4e943ea..0496c02 100644 --- a/views/botregister.csp +++ b/views/botregister.csp @@ -1,31 +1,20 @@ <%c++ auto owner = @@.get("owner");%> <%c++ auto error = @@.get("error");%> +<%layout global_layout%> +Registering a bot - DFB - - - - - - - Registering a bot - DFB - - - -
-
-

Registering a bot

- {%error%} -

Client ID

-

Short description

-

Long description

-

Prefix

-

Permanent support server invite code

-

Owner

-


- -
-
- - - +
+
+

Registering a bot

+ {%error%} +

Client ID

+

Short description

+

Long description

+

Prefix

+

Permanent support server invite code

+

Owner

+


+ +
+
diff --git a/views/exception.csp b/views/exception.csp index 3265764..174ec3f 100644 --- a/views/exception.csp +++ b/views/exception.csp @@ -6,15 +6,12 @@ - Exception - DFB -
-

An exception has occured

-

{%message%}

-
+

An exception has occured

+

{%message%}

diff --git a/views/global_layout.csp b/views/global_layout.csp new file mode 100644 index 0000000..449acf5 --- /dev/null +++ b/views/global_layout.csp @@ -0,0 +1,13 @@ + + + + + + + + + + [[]] + + +