changed some stuf around lol

wow i didnt know that kate had extended git message.
this is rlly cool rlly
This commit is contained in:
kin fuyuki 2026-03-11 02:25:52 -03:00
commit 1df1cef78f
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
33 changed files with 659 additions and 900 deletions

View file

@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.20)
set(CMAKE_CXX_FLAGS "-std=c++26 -Wno-error -Oz -w -g -mavx2")
file(GLOB_RECURSE kstralight_SOURCES CONFIGURE_DEPENDS "src/*.cpp")
add_executable(kstralight ${kstralight_SOURCES})
if(NOT DEFINED ${ARCH})
set(ARCH "linux-64")
endif(NOT DEFINED ${ARCH})
set_target_properties(kstralight PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/built/kstralight/${PLATFORM_DIR}/bin"
)
target_link_directories(
kstralight PUBLIC
"${CMAKE_SOURCE_DIR}/link")
target_link_libraries(kstralight PRIVATE
enginend
raylib
)
target_include_directories(kstralight PUBLIC
${CMAKE_SOURCE_DIR}/include
)

View file

@ -0,0 +1,37 @@
" font eagle.ttf
{ text
f r 255
f g 255
f b 255
f a 255
}
{ link
" font dos.ttf
{ normal
}
{ hover
}
{ click
}
}
{ button
{ normal
}
{ hover
}
{ click
}
{ disabled
}
}

View file

@ -0,0 +1,80 @@
{ style main
" path index.tsf.tdf
{ sub
{ col header
b rel T
f x 0
f y 0
f w 1
f h 0.2
f r 0.25
f g 0
f b 0
f a 1
{ sub
{ text welcome
b rel T
f x 0
f y 0
f w 1
f h 0.75
S txt
welcome to tiny web ^^
\
}
{ text message
b rel T
f x 0
f y 0.75
f w 1
f h 0.25
S txt
here you will learn the basics of how to create a tiny webpage
\
}
}
}
# header end
{ col body
b rel T
f x 0.2
f y 0
f w 1
f h 5.0
f r 0.125
f g 0.125
f b 0.125
f a 1
{ sub
{ text message
b rel T
f x 0.1
f y 0.1
f w 0.9
f h 0.2
S txt
first of all, sorry to tell you but you will have to create these tiny files that.. are not the most readable
so until i can create an editor, i deeply recommend you to keep your pages very simple in styling.
but i do plan to create a proper IDE for TDF and TMK where you will not have to worry about the code at all...
just have to place nodes and blocks and pointers and u can be happy heh.
\
}
{ link repo
b rel T
f x 0.3
f y 0.1
f w 0.9
f h 0.02
S txt
look at my other projects!
\
" path https://github.com/kin-fuyuki
}
}
}
# body end
}
# end of the style sub-elements
}

View file

@ -0,0 +1 @@
#include "config.h"

View file

@ -0,0 +1,5 @@
#pragma once
class config {
};

View file

@ -0,0 +1 @@
#include "session.h"

View file

@ -0,0 +1,5 @@
#pragma once
class session {
};

View file

@ -0,0 +1,20 @@
#include "formats.h"
std::map<std::string,datagroup> cookie{
};
std::map<std::string,datagroup> tinywebformat{
{"point",datagroup({TWFPOINT})},
{"rect",datagroup({TWFRECT})},
{"text",datagroup({TWFTEXT})},
{"img",datagroup({TWFIMG})},
{"link",datagroup({TWFLINK})},
{"col",datagroup({TWFCOL})},
};
std::map<std::string,datagroup> tinywebstyle{
};

View file

@ -0,0 +1,24 @@
#pragma once
#include <map>
#include <tiny/tdf.h>
struct datagroup {
std::map<std::string, tiny::TDF_Type> data;
datagroup(std::map<std::string, tiny::TDF_Type> data):data(data){}
};
extern std::map<std::string,datagroup> cookie;
#define TWFELEMENT {"sub",tiny::TDF_CLASS},
#define TWFSTYLE TWFELEMENT {"path",tiny::TDF_STR},
#define TWFSTYLED {"style",tiny::TDF_CLASS},
#define TWFPOINT TWFELEMENT {"x",tiny::TDF_FLOAT},{"y",tiny::TDF_FLOAT},{"rel",tiny::TDF_BOOL},
#define TWFRECT TWFPOINT {"w",tiny::TDF_FLOAT},{"h",tiny::TDF_FLOAT},
#define TWFCOL TWFRECT {"r",tiny::TDF_FLOAT},{"g",tiny::TDF_FLOAT},{"b",tiny::TDF_FLOAT},{"a",tiny::TDF_FLOAT},
#define TWFTEXT TWFRECT TWFSTYLED {"txt",tiny::TDF_BLOCK},
#define TWFLINK TWFTEXT {"path",tiny::TDF_STR},
#define TWFBUTTON TWFLINK {"disabled",tiny::TDF_BOOL},
#define TWFIMG TWFRECT {"path",tiny::TDF_STR},
extern std::map<std::string,datagroup> tinywebformat;
extern std::map<std::string,datagroup> tinywebstyle;

View file

@ -0,0 +1 @@
#include "cookies.h"

View file

@ -0,0 +1,5 @@
#pragma once
class cookies {
};

View file

@ -0,0 +1 @@
#include "browser.h"

View file

@ -0,0 +1,22 @@
#pragma once
#include <enginend/engine.h>
class basic : public enginend::program{
public:
basic();
void boot() override;
void draw() override;
void tick() override;
void exit() override;
~basic();
};
class browser: public basic {
public:
browser();
void boot() final;
void draw() final;
void tick() final;
void exit() final;
~browser();
};

View file

@ -0,0 +1 @@
#include "gui/browser.h"