30 lines
910 B
C++
30 lines
910 B
C++
#ifndef ____style_h__
|
|
#define ____style_h__
|
|
|
|
#include "HTTPPage.h"
|
|
|
|
namespace http {
|
|
|
|
class __style : public HTTPPage {
|
|
|
|
int processCommand(std::string request, core::TCPSession *session, HTTPSession *httpSession, HTTPRequest *httpRequest, std::stringstream &data) override {
|
|
|
|
data << "body {background: #006;" << std::endl;
|
|
data << " color: #fff;" << std::endl;
|
|
data << " }" << std::endl;
|
|
|
|
data << ".window {background: #668;" << std::endl;
|
|
data << " color: #fff;" << std::endl;
|
|
data << " border: 1pt solid #f00;" << std::endl;
|
|
data << " width: 400px;" << std::endl;
|
|
data << " padding: 15px;" << std::endl;
|
|
data << " }" << std::endl;
|
|
|
|
httpRequest->response.addHeader("Content-Type", "text/css");
|
|
return true;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|