30 lines
No EOL
698 B
C++
30 lines
No EOL
698 B
C++
/*
|
|
catcrafts.net
|
|
Copyright (C) 2025 Catcrafts
|
|
|
|
The source code of this website is made available for viewing purposes only.
|
|
No permission is granted to copy, modify, distribute, or create derivative works.
|
|
*/
|
|
|
|
import Catcrafts;
|
|
import Crafter.CppDOM;
|
|
import std;
|
|
using namespace Catcrafts;
|
|
using namespace Crafter;
|
|
using namespace Crafter::CppDOMBindings;
|
|
|
|
HtmlElementView* blogButton;
|
|
|
|
int main() {
|
|
AddPopStateListener([]() {
|
|
RenderRoot(GetPathNameString());
|
|
});
|
|
|
|
blogButton = new HtmlElementView("blog-nav-button");
|
|
blogButton->AddClickListener([](Crafter::MouseEvent e) {
|
|
PushState("{}", "", "/blog");
|
|
RenderRoot("/blog");
|
|
});
|
|
|
|
RenderRoot("/");
|
|
} |