-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58813c5
commit 48b4e43
Showing
29 changed files
with
341 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using namespace std; | ||
|
||
auto web_backgrounds_jump = [](client_conn conn, http_request request, param argv) { | ||
string header = readFile("./web/html/components/header.html"); | ||
string body = readFile("./web/html/pages/jump.html"); | ||
auto cookie = cookieParam(request); | ||
argvar argList = merge(transfer(appConfig), transfer(i18n[cookie["lang"] == "" ? appConfig["language.default"].asString() : cookie["lang"]], "language.")); | ||
|
||
// TODO: add the argList here | ||
argList["page.title"] = argList["language.jumpTitle"] + " | " + appConfig["server.title"].asString(); | ||
argList["html.navbar"] = fetchNavBar("{{language.jumpTitle}}").output(); | ||
argList["pages.current"] = to_string(atoi(argv[0].c_str()) + 1); | ||
argList["url.base"] = "/backgrounds/list?" + getStringfy(getParam(request)); | ||
|
||
header = str_replace(header, argList); | ||
body = str_replace(body, argList); | ||
H root = H(true, "html"); | ||
root.append(header); | ||
root.append(body); | ||
putRequest(conn, 200, __default_response); | ||
send(conn, root.output()); | ||
exitRequest(conn); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using namespace std; | ||
|
||
auto web_effects_jump = [](client_conn conn, http_request request, param argv) { | ||
string header = readFile("./web/html/components/header.html"); | ||
string body = readFile("./web/html/pages/jump.html"); | ||
auto cookie = cookieParam(request); | ||
argvar argList = merge(transfer(appConfig), transfer(i18n[cookie["lang"] == "" ? appConfig["language.default"].asString() : cookie["lang"]], "language.")); | ||
|
||
// TODO: add the argList here | ||
argList["page.title"] = argList["language.jumpTitle"] + " | " + appConfig["server.title"].asString(); | ||
argList["html.navbar"] = fetchNavBar("{{language.jumpTitle}}").output(); | ||
argList["pages.current"] = to_string(atoi(argv[0].c_str()) + 1); | ||
argList["url.base"] = "/effects/list?" + getStringfy(getParam(request)); | ||
|
||
header = str_replace(header, argList); | ||
body = str_replace(body, argList); | ||
H root = H(true, "html"); | ||
root.append(header); | ||
root.append(body); | ||
putRequest(conn, 200, __default_response); | ||
send(conn, root.output()); | ||
exitRequest(conn); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using namespace std; | ||
|
||
auto web_engines_jump = [](client_conn conn, http_request request, param argv) { | ||
string header = readFile("./web/html/components/header.html"); | ||
string body = readFile("./web/html/pages/jump.html"); | ||
auto cookie = cookieParam(request); | ||
argvar argList = merge(transfer(appConfig), transfer(i18n[cookie["lang"] == "" ? appConfig["language.default"].asString() : cookie["lang"]], "language.")); | ||
|
||
// TODO: add the argList here | ||
argList["page.title"] = argList["language.jumpTitle"] + " | " + appConfig["server.title"].asString(); | ||
argList["html.navbar"] = fetchNavBar("{{language.jumpTitle}}").output(); | ||
argList["pages.current"] = to_string(atoi(argv[0].c_str()) + 1); | ||
argList["url.base"] = "/engines/list?" + getStringfy(getParam(request)); | ||
|
||
header = str_replace(header, argList); | ||
body = str_replace(body, argList); | ||
H root = H(true, "html"); | ||
root.append(header); | ||
root.append(body); | ||
putRequest(conn, 200, __default_response); | ||
send(conn, root.output()); | ||
exitRequest(conn); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.