up
This commit is contained in:
parent
2ba9bf7ebc
commit
74c8a857e4
@ -93,12 +93,12 @@ 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,
|
||||||
string description,
|
string description,
|
||||||
list<string> cssStyles)
|
list<string> cssStyles)
|
||||||
{
|
{
|
||||||
string whichLevel = ChooseLevel(level);
|
string whichLevel = ChooseLevel(level);
|
||||||
// ESSENTIAL
|
// ESSENTIAL
|
||||||
@ -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))
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
@ -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",
|
||||||
@ -34,13 +34,13 @@ public:
|
|||||||
outputPath + "about.html",
|
outputPath + "about.html",
|
||||||
outputPath + "contact.html"
|
outputPath + "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:
|
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);
|
||||||
};
|
};
|
||||||
@ -82,71 +82,71 @@ inline list<Node> ThePraDev::NavigationBar(Levels level, DeskOrMob mtype)
|
|||||||
string whichLevel = ChooseLevel(level);
|
string whichLevel = ChooseLevel(level);
|
||||||
switch (mtype)
|
switch (mtype)
|
||||||
{
|
{
|
||||||
case D:
|
case D:
|
||||||
{
|
{
|
||||||
Node elem0 = Node("div#header");
|
Node elem0 = Node("div#header");
|
||||||
Node elem05 = Node("div.navigation_bar");
|
Node elem05 = Node("div.navigation_bar");
|
||||||
Node elem1 = Node("img").SetAttribute(a.src, whichLevel + "icon/up.png").SetAttribute(a.alt, "Upper Decoration").UseClosingTag(false);
|
Node elem1 = Node("img").SetAttribute(a.src, whichLevel + "icon/up.png").SetAttribute(a.alt, "Upper Decoration").UseClosingTag(false);
|
||||||
Node elem2 = Node("ul.bortrr.borbrr");
|
Node elem2 = Node("ul.bortrr.borbrr");
|
||||||
Node elem3 = Node("li.bortrr").AppendChild(Node(a.a, a.Home).SetAttribute(a.href, whichLevel + a.index));
|
Node elem3 = Node("li.bortrr").AppendChild(Node(a.a, a.Home).SetAttribute(a.href, whichLevel + a.index));
|
||||||
Node elem4 = Node(a.li).AppendChild(Node(a.a, a.Code).SetAttribute(a.href, whichLevel + a.code));
|
Node elem4 = Node(a.li).AppendChild(Node(a.a, a.Code).SetAttribute(a.href, whichLevel + a.code));
|
||||||
Node elem5 = Node(a.li).AppendChild(Node(a.a, a.Blog).SetAttribute(a.href, whichLevel + a.blog));
|
Node elem5 = Node(a.li).AppendChild(Node(a.a, a.Blog).SetAttribute(a.href, whichLevel + a.blog));
|
||||||
Node elem6 = Node(a.li).AppendChild(Node(a.a, a.About).SetAttribute(a.href, whichLevel + a.about));
|
Node elem6 = Node(a.li).AppendChild(Node(a.a, a.About).SetAttribute(a.href, whichLevel + a.about));
|
||||||
Node elem7 = Node(a.li).AppendChild(Node(a.a, a.Contact).SetAttribute(a.href, whichLevel + a.contact));
|
Node elem7 = Node(a.li).AppendChild(Node(a.a, a.Contact).SetAttribute(a.href, whichLevel + a.contact));
|
||||||
Node elem8 = Extra(level);
|
Node elem8 = Extra(level);
|
||||||
Node elem9 = Node("img").SetAttribute(a.src, whichLevel + "icon/down.png").SetAttribute(a.alt, "Down Decoration").UseClosingTag(false);
|
Node elem9 = Node("img").SetAttribute(a.src, whichLevel + "icon/down.png").SetAttribute(a.alt, "Down Decoration").UseClosingTag(false);
|
||||||
|
|
||||||
elem05.AppendChild(elem1)
|
elem05.AppendChild(elem1)
|
||||||
.AppendChild(elem2
|
.AppendChild(elem2
|
||||||
.AppendChild(elem3)
|
.AppendChild(elem3)
|
||||||
.AppendChild(elem4)
|
.AppendChild(elem4)
|
||||||
.AppendChild(elem5)
|
.AppendChild(elem5)
|
||||||
.AppendChild(elem6)
|
.AppendChild(elem6)
|
||||||
.AppendChild(elem7)
|
.AppendChild(elem7)
|
||||||
.AppendChild(elem8))
|
.AppendChild(elem8))
|
||||||
.AppendChild(elem9);
|
.AppendChild(elem9);
|
||||||
elem0.AppendChild(elem05);
|
elem0.AppendChild(elem05);
|
||||||
|
|
||||||
return{{elem0}};
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case M:
|
|
||||||
{
|
|
||||||
Node elem0 = Node("div#headerm");
|
|
||||||
Node elem05 = Node("div.navigation_barm");
|
|
||||||
Node elem1 = Node("img.immagini_laterali").SetAttribute(a.src, whichLevel + "icon/left.png").SetAttribute(a.alt, "Upper Left Decoration").UseClosingTag(false);
|
|
||||||
Node elem2 = Node("div.navigation_barminner");
|
|
||||||
|
|
||||||
Node elem3 = Node("nav._nav");
|
return{ {elem0} };
|
||||||
Node elem4 = Node("label.toggle").SetAttribute("for", "drop").SetContent(a.Menu);
|
}
|
||||||
Node elem5 = Node("input#drop").SetAttribute("type", "checkbox").UseClosingTag(false);
|
break;
|
||||||
Node elem6 = Node("ul.menu");
|
case M:
|
||||||
Node elem7 = Node(a.li).AppendChild(Node(a.a, a.Home).SetAttribute(a.href, whichLevel + a.index));
|
{
|
||||||
Node elem8 = Node(a.li).AppendChild(Node(a.a, a.Code).SetAttribute(a.href, whichLevel + a.code));
|
Node elem0 = Node("div#headerm");
|
||||||
Node elem9 = Node(a.li).AppendChild(Node(a.a, a.Blog).SetAttribute(a.href, whichLevel + a.blog));
|
Node elem05 = Node("div.navigation_barm");
|
||||||
Node elem10 = Node(a.li).AppendChild(Node(a.a, a.About).SetAttribute(a.href, whichLevel + a.about));
|
Node elem1 = Node("img.immagini_laterali").SetAttribute(a.src, whichLevel + "icon/left.png").SetAttribute(a.alt, "Upper Left Decoration").UseClosingTag(false);
|
||||||
Node elem11 = Node(a.li).AppendChild(Node(a.a, a.Contact).SetAttribute(a.href, whichLevel + a.contact));
|
Node elem2 = Node("div.navigation_barminner");
|
||||||
|
|
||||||
Node elem12 = Node("img.immagini_laterali").SetAttribute(a.src, whichLevel + "icon/right.png").SetAttribute(a.alt, "Upper Right Decoration").UseClosingTag(false);
|
Node elem3 = Node("nav._nav");
|
||||||
|
Node elem4 = Node("label.toggle").SetAttribute("for", "drop").SetContent(a.Menu);
|
||||||
|
Node elem5 = Node("input#drop").SetAttribute("type", "checkbox").UseClosingTag(false);
|
||||||
|
Node elem6 = Node("ul.menu");
|
||||||
|
Node elem7 = Node(a.li).AppendChild(Node(a.a, a.Home).SetAttribute(a.href, whichLevel + a.index));
|
||||||
|
Node elem8 = Node(a.li).AppendChild(Node(a.a, a.Code).SetAttribute(a.href, whichLevel + a.code));
|
||||||
|
Node elem9 = Node(a.li).AppendChild(Node(a.a, a.Blog).SetAttribute(a.href, whichLevel + a.blog));
|
||||||
|
Node elem10 = Node(a.li).AppendChild(Node(a.a, a.About).SetAttribute(a.href, whichLevel + a.about));
|
||||||
|
Node elem11 = Node(a.li).AppendChild(Node(a.a, a.Contact).SetAttribute(a.href, whichLevel + a.contact));
|
||||||
|
|
||||||
elem05.AppendChild(elem2
|
Node elem12 = Node("img.immagini_laterali").SetAttribute(a.src, whichLevel + "icon/right.png").SetAttribute(a.alt, "Upper Right Decoration").UseClosingTag(false);
|
||||||
.AppendChild(elem3
|
|
||||||
.AppendChild(elem4)
|
|
||||||
.AppendChild(elem5)
|
|
||||||
.AppendChild(elem6
|
|
||||||
.AppendChild(elem7)
|
|
||||||
.AppendChild(elem8)
|
|
||||||
.AppendChild(elem9)
|
|
||||||
.AppendChild(elem10)
|
|
||||||
.AppendChild(elem11))));
|
|
||||||
elem0.AppendChild(elem1).AppendChild(elem05).AppendChild(elem12);
|
|
||||||
//cout << elem0.ToString(Readability::MULTILINE, 5) << endl;
|
|
||||||
|
|
||||||
return{{elem0}};
|
elem05.AppendChild(elem2
|
||||||
}
|
.AppendChild(elem3
|
||||||
break;
|
.AppendChild(elem4)
|
||||||
default: return{{}};
|
.AppendChild(elem5)
|
||||||
break;
|
.AppendChild(elem6
|
||||||
|
.AppendChild(elem7)
|
||||||
|
.AppendChild(elem8)
|
||||||
|
.AppendChild(elem9)
|
||||||
|
.AppendChild(elem10)
|
||||||
|
.AppendChild(elem11))));
|
||||||
|
elem0.AppendChild(elem1).AppendChild(elem05).AppendChild(elem12);
|
||||||
|
//cout << elem0.ToString(Readability::MULTILINE, 5) << endl;
|
||||||
|
|
||||||
|
return{ {elem0} };
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: return{ {} };
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
@ -180,10 +180,10 @@ inline Node ThePraDev::Extra(Levels level)
|
|||||||
Node extra = Node("li.borbrr")
|
Node extra = Node("li.borbrr")
|
||||||
.AppendChild(Node(a.a, "+ Extra +"))
|
.AppendChild(Node(a.a, "+ Extra +"))
|
||||||
.AppendChild(Node("ul.borbrr")
|
.AppendChild(Node("ul.borbrr")
|
||||||
.AppendChild(Node("li.colbk")
|
.AppendChild(Node("li.colbk")
|
||||||
.AppendChild(Node("img.fiximgmenu").SetAttribute(a.src, whichLevel + "icon/signbot.gif").SetAttribute(a.alt, "MotD").UseClosingTag(false)))
|
.AppendChild(Node("img.fiximgmenu").SetAttribute(a.src, whichLevel + "icon/signbot.gif").SetAttribute(a.alt, "MotD").UseClosingTag(false)))
|
||||||
.AppendChild(Node(a.li)
|
.AppendChild(Node(a.li)
|
||||||
.AppendChild(Player(level))));
|
.AppendChild(Player(level))));
|
||||||
return extra;
|
return extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,13 +193,10 @@ inline Node ThePraDev::Player(Levels level)
|
|||||||
string whichLevel = ChooseLevel(level);
|
string whichLevel = ChooseLevel(level);
|
||||||
Node player = Node("div.player")
|
Node player = Node("div.player")
|
||||||
.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.")
|
.SetAttribute(a.src, whichLevel + "videoplayback.ogg")
|
||||||
.AppendChild(Node("source")
|
.SetContent("Your browser does not support the <code>audio</code> element."));
|
||||||
.SetAttribute(a.src, whichLevel + "videoplayback.ogg")
|
return player;
|
||||||
.SetAttribute("type", "audio/ogg")
|
|
||||||
.UseClosingTag(false)));
|
|
||||||
return player;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user