inital commit

This commit is contained in:
Jorijn van der Graaf 2025-11-12 20:58:07 +01:00
commit cef5a32041
10 changed files with 171 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/*
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.
*/
export module Catcrafts:Blog;
import Crafter.CppDOM;
import std;
using namespace Crafter;
export namespace Catcrafts {
struct BlogPost {
std::string name;
std::string date;
std::string content;
};
std::vector<BlogPost>* posts = new std::vector<BlogPost>{
{
"First post!",
"2025-11-12",
"Welcome to catcrafts.net!"
}
};
std::string RenderBlog();
}

View file

@ -0,0 +1,16 @@
/*
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.
*/
export module Catcrafts:Component;
using namespace Crafter;
export namespace Catcrafts {
class Component {
std::string render();
};
}

View file

@ -0,0 +1,16 @@
/*
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.
*/
export module Catcrafts:Views;
import Crafter.CppDOM;
using namespace Crafter;
export namespace Catcrafts {
HtmlElementView* body = new HtmlElementView("body");
HtmlElementView* head = new HtmlElementView("head");
}

11
interfaces/Catcrafts.cppm Normal file
View file

@ -0,0 +1,11 @@
/*
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.
*/
export module Catcrafts;
export import :Views;
export import :Blog;