| 46 | namespace http { |
| 47 | |
| 48 | static void LoadExtCSS (std::string fileName = "style") |
| 49 | { |
| 50 | std::stringstream s; |
| 51 | std::string styleFile = i2p::fs::DataDirPath ("webconsole/"+fileName+".css"); |
| 52 | if (i2p::fs::Exists(styleFile)) { |
| 53 | std::ifstream f(styleFile, std::ifstream::binary); |
| 54 | s << f.rdbuf(); |
| 55 | externalCSS = s.str(); |
| 56 | } else if (externalCSS.length() != 0) { // clean up external style if file was removed |
| 57 | externalCSS = ""; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | static void GetStyles (std::stringstream& s) |
| 62 | { |
no test coverage detected