From 017ba1c32a8f5f43dcf769692ad2ffea497aee5e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:08:10 +0200 Subject: Made WebAdmin design more modern --- MCServer/webadmin/template.lua | 63 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'MCServer/webadmin/template.lua') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index a7480f83e..84a50b055 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -70,25 +70,33 @@ function ShowPage(WebAdmin, TemplateRequest) PageContent, SubTitle = GetDefaultPage() end + local reqParamsClass = "" + + for key,value in pairs(TemplateRequest.Request.Params) do + reqParamsClass = reqParamsClass .. " param-" .. string.lower(string.gsub(key, "[^a-zA-Z0-9]+", "-") .. "-" .. string.gsub(value, "[^a-zA-Z0-9]+", "-")) + end + + if (string.gsub(reqParamsClass, "%s", "") == "") then + reqParamsClass = " no-param" + end + Output([[ ]] .. Title .. [[ - + + - -
- -

- MCServer -

-
-
-
- + +
- ]]) +]]) return table.concat(SiteContent) end -- cgit v1.2.3