diff --git a/TestWebGen/GeneralBuilder.cpp b/TestWebGen/GeneralBuilder.cpp index 0a6a221..269ae60 100644 --- a/TestWebGen/GeneralBuilder.cpp +++ b/TestWebGen/GeneralBuilder.cpp @@ -171,7 +171,7 @@ void GeneralBuilder::BuildHTMLFiles(Sites site, list rootFiles, list()}; - 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::const_iterator iterator = entries.begin(), end = entries.end(); iterator != end; ++iterator) + for (list::iterator iterator = entries.begin(), end = entries.end(); iterator != end; ++iterator) { - cout << *iterator; + directory_entry a{*iterator}; + + cout << a.path().filename() << " *" << endl; } diff --git a/TestWebGen/ThePraDev.h b/TestWebGen/ThePraDev.h index 77a2e99..1912a2e 100644 --- a/TestWebGen/ThePraDev.h +++ b/TestWebGen/ThePraDev.h @@ -33,18 +33,25 @@ public: "about.html", "contact.html" }; + static tuple 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 NavigationBar(Levels level, DeskOrMob mtype); - static list SingleMainContent(Levels level,string cPath, DeskOrMob mtype, list content = {""}); + static list SingleMainContent(Levels level, string cPath, DeskOrMob mtype, list 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 navBar = NavigationBar(level, D); list 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); @@ -142,12 +148,12 @@ inline list ThePraDev::NavigationBar(Levels level, DeskOrMob mtype) } break; default: return{{}}; - break; + break; } } -inline list ThePraDev::SingleMainContent(Levels level,string cPath, DeskOrMob mtype, list content) +inline list ThePraDev::SingleMainContent(Levels level, string cPath, DeskOrMob mtype, list content) { ThePraDev a; string whichLevel = ChooseLevel(level);