This commit is contained in:
thepra 2017-04-09 18:38:01 +02:00
parent 68d4127a19
commit 64d592f02b
3 changed files with 22 additions and 17 deletions

View File

@ -18,23 +18,22 @@ using namespace CTML;
int main()
{
ThePraDev n{ThePraDev()};
string cDevOutputPath{Utilities::GetCurrentPath()+ "\\output_thepradev\\"};
string postcDevOutputPath{cDevOutputPath + "postsContent\\"};
path dir = canonical(".");
cout << dir.append("thepradev").append("a")<<endl;
path dir{current_path()};
cout << dir << endl;
auto entries{list<directory_entry>()};
for (auto& p : directory_iterator(dir))
for (auto p : directory_iterator(dir))
{
if (is_regular_file(p))
{
entries.push_front(p);
cout << p.path() << endl;
entries.push_back(p);
cout << p.path().string() << endl;
}
}
for (list<directory_entry>::const_iterator iterator = entries.begin(), end = entries.end(); iterator != end; ++iterator)
for (list<directory_entry>::iterator iterator = entries.begin(), end = entries.end(); iterator != end; ++iterator)
{
cout << *iterator;
directory_entry a{*iterator};
cout << a.path().filename() << " *" << endl;
}

View File

@ -33,18 +33,25 @@ public:
"about.html",
"contact.html"
};
static tuple<string, string, string> links[5]{
{"index","index.txt","index.html"},
{"code","code.txt","code.html"},
{"blog","blog.txt","blog.html"},
{"about","about.txt","about.html"},
{"contact","contact.txt","contact.html"}
};
static void BuildBody(Document &file,string cPath, Levels level, PageType ptype = NORMAL);
static void BuildBody(Document &file, string cPath, Levels level, PageType ptype = NORMAL);
private:
static list<Node> NavigationBar(Levels level, DeskOrMob mtype);
static list<Node> SingleMainContent(Levels level,string cPath, DeskOrMob mtype, list<string> content = {""});
static list<Node> SingleMainContent(Levels level, string cPath, DeskOrMob mtype, list<string> content = {""});
static Node Extra(Levels level);
static Node Player(Levels level);
};
inline void ThePraDev::BuildBody(Document &file,string cPath, Levels level, PageType ptype)
inline void ThePraDev::BuildBody(Document &file, string cPath, Levels level, PageType ptype)
{
list<Node> navBar = NavigationBar(level, D);
list<Node> navBarM = NavigationBar(level, M);
@ -53,7 +60,6 @@ inline void ThePraDev::BuildBody(Document &file,string cPath, Levels level, Page
Node desktop = Node("section#desktop");
Node mobile = Node("section#mobile");
for each (Node item in navBar)
{
desktop.AppendChild(item);
@ -147,7 +153,7 @@ inline list<Node> ThePraDev::NavigationBar(Levels level, DeskOrMob mtype)
}
inline list<Node> ThePraDev::SingleMainContent(Levels level,string cPath, DeskOrMob mtype, list<string> content)
inline list<Node> ThePraDev::SingleMainContent(Levels level, string cPath, DeskOrMob mtype, list<string> content)
{
ThePraDev a;
string whichLevel = ChooseLevel(level);