mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-08-26 10:10:24 +01:00
feat: http theme for webconsole
This commit is contained in:
parent
f38612b8e9
commit
d148dd0b5e
2 changed files with 17 additions and 0 deletions
|
@ -167,6 +167,11 @@ namespace http {
|
|||
{
|
||||
std::string webroot; i2p::config::GetOption("http.webroot", webroot);
|
||||
|
||||
std::string theme; i2p::config::GetOption("http.theme", theme);
|
||||
if(theme != "light" && theme != "black" ) theme = "light";
|
||||
|
||||
|
||||
|
||||
// Page language
|
||||
std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage(); // get current used language
|
||||
auto it = i2p::i18n::languages.find(currLang);
|
||||
|
@ -184,6 +189,17 @@ namespace http {
|
|||
" <link rel=\"shortcut icon\" href=\"" << itoopieFavicon << "\">\r\n"
|
||||
" <title>" << tr(/* tr: Webconsole page title */ "Purple I2P Webconsole") << "</title>\r\n";
|
||||
GetStyles(s);
|
||||
if (theme == "black")
|
||||
{
|
||||
s <<
|
||||
"<style>:root {\r\n"
|
||||
"--main-bg-color: #242424;\r\n"
|
||||
"--main-text-color: #17ab5c;\r\n"
|
||||
"--main-link-color: #bf64b7;\r\n"
|
||||
"--main-link-hover-color: #000000;\r\n"
|
||||
"}\r\n</style>";
|
||||
|
||||
}
|
||||
s <<
|
||||
"</head>\r\n"
|
||||
"<body>\r\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue