2022-02-04 18:38:18 +01:00
|
|
|
#ifndef STATIC_PAGE_H
|
|
|
|
#define STATIC_PAGE_H
|
|
|
|
|
|
|
|
#include "core/string.h"
|
|
|
|
|
2022-02-05 15:30:48 +01:00
|
|
|
#include "web/http/web_node.h"
|
2022-02-04 18:38:18 +01:00
|
|
|
|
|
|
|
class StaticPage : public WebNode {
|
|
|
|
RCPP_OBJECT(StaticPage, WebNode);
|
|
|
|
|
|
|
|
public:
|
2022-02-06 13:44:30 +01:00
|
|
|
void _handle_request_main(Request *request);
|
|
|
|
|
|
|
|
void load_file(const String &path);
|
|
|
|
void load_and_process_file(const String &path);
|
|
|
|
void load_md_file(const String &path);
|
|
|
|
|
|
|
|
void set_data_md(const String &d);
|
|
|
|
void set_data(const String &d);
|
2022-02-04 18:38:18 +01:00
|
|
|
|
2022-02-06 13:44:30 +01:00
|
|
|
String data;
|
|
|
|
bool should_render_menu;
|
2022-02-04 18:38:18 +01:00
|
|
|
|
|
|
|
StaticPage();
|
|
|
|
~StaticPage();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|