This commit is contained in:
thepra 2017-05-25 22:35:59 +02:00
parent 2ba9bf7ebc
commit 74c8a857e4
3 changed files with 83 additions and 85 deletions

View File

@ -93,7 +93,7 @@ void GeneralBuilder::BuildThePraSite(Sites site)
} }
} }
void GeneralBuilder::Head(Document &file, void GeneralBuilder::Head( Document &file,
string canonicalURL, string canonicalURL,
string title, string title,
Levels level, Levels level,
@ -164,6 +164,7 @@ void GeneralBuilder::Body(Document &file, string cPath, Sites site, Col color, P
void GeneralBuilder::WriteToFile(Document doc, string p) void GeneralBuilder::WriteToFile(Document doc, string p)
{ {
//cout << doc.ToString(Readability::MULTILINE) << endl;
path PathToCheck = path(p); path PathToCheck = path(p);
if (exists(PathToCheck)) if (exists(PathToCheck))
{ {

View File

@ -16,7 +16,7 @@ using namespace CTML;
int main() int main()
{ {
GeneralBuilder dev; GeneralBuilder dev;
dev.BuildThePraSite(Utilities::ART); dev.BuildThePraSite(Utilities::DEV);
cout << "DONE"; cout << "DONE";
getchar(); getchar();
return 0; return 0;

View File

@ -26,7 +26,7 @@ public:
contentFolder + "about.txt", contentFolder + "about.txt",
contentFolder + "contact.txt" contentFolder + "contact.txt"
}; };
string outputPath{current_path().append("output_thepradev\\").string()}; string outputPath{ current_path().append("output_thepradev\\").string() };
string outputLinks[5]{ string outputLinks[5]{
outputPath + "index.html", outputPath + "index.html",
outputPath + "code.html", outputPath + "code.html",
@ -40,7 +40,7 @@ public:
private: private:
static list<Node> NavigationBar(Levels level, DeskOrMob mtype); 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 Extra(Levels level);
static Node Player(Levels level); static Node Player(Levels level);
}; };
@ -107,7 +107,7 @@ inline list<Node> ThePraDev::NavigationBar(Levels level, DeskOrMob mtype)
.AppendChild(elem9); .AppendChild(elem9);
elem0.AppendChild(elem05); elem0.AppendChild(elem05);
return{{elem0}}; return{ {elem0} };
} }
break; break;
case M: case M:
@ -142,10 +142,10 @@ inline list<Node> ThePraDev::NavigationBar(Levels level, DeskOrMob mtype)
elem0.AppendChild(elem1).AppendChild(elem05).AppendChild(elem12); elem0.AppendChild(elem1).AppendChild(elem05).AppendChild(elem12);
//cout << elem0.ToString(Readability::MULTILINE, 5) << endl; //cout << elem0.ToString(Readability::MULTILINE, 5) << endl;
return{{elem0}}; return{ {elem0} };
} }
break; break;
default: return{{}}; default: return{ {} };
break; break;
} }
@ -155,7 +155,7 @@ inline list<Node> ThePraDev::SingleMainContent(Levels level, string cPath, DeskO
{ {
ThePraDev a; ThePraDev a;
string whichLevel = ChooseLevel(level); string whichLevel = ChooseLevel(level);
Node mainC = Node("div#main"); Node mainC = Node("div.main");
Node mainMC = mainC; Node mainMC = mainC;
string STRING; string STRING;
string contentDesktop = ""; string contentDesktop = "";
@ -170,8 +170,8 @@ inline list<Node> ThePraDev::SingleMainContent(Levels level, string cPath, DeskO
mainC.SetContent(item+"\n"); mainC.SetContent(item+"\n");
}*/ }*/
if (mtype == D) if (mtype == D)
return{mainC}; return{ mainC };
else return{mainMC}; else return{ mainMC };
} }
inline Node ThePraDev::Extra(Levels level) inline Node ThePraDev::Extra(Levels level)
{ {
@ -195,11 +195,8 @@ inline Node ThePraDev::Player(Levels level)
.AppendChild(Node("audio") .AppendChild(Node("audio")
.SetAttribute("controls", "controls") .SetAttribute("controls", "controls")
.SetAttribute("preload", "auto") .SetAttribute("preload", "auto")
.SetContent("Your browser does not support the audio element.")
.AppendChild(Node("source")
.SetAttribute(a.src, whichLevel + "videoplayback.ogg") .SetAttribute(a.src, whichLevel + "videoplayback.ogg")
.SetAttribute("type", "audio/ogg") .SetContent("Your browser does not support the <code>audio</code> element."));
.UseClosingTag(false)));
return player; return player;
} }