my brain is leaking
This commit is contained in:
parent
ac1cb044c6
commit
87bb15eecf
@ -1,13 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,6 +50,7 @@ h3 {
|
|||||||
|
|
||||||
.foreground-container {
|
.foreground-container {
|
||||||
max-width: 960px;
|
max-width: 960px;
|
||||||
|
min-height: 720px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: rgba(0, 0, 0, 0.85);
|
background-color: rgba(0, 0, 0, 0.85);
|
||||||
box-shadow: 0 0 20px var(--secondary-color);
|
box-shadow: 0 0 20px var(--secondary-color);
|
||||||
@ -96,13 +97,12 @@ nav ul li a:hover {
|
|||||||
color: var(--background-color);
|
color: var(--background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
.footer-container {
|
||||||
max-width: 960px;
|
max-width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: rgba(0, 0, 0, 0.85);
|
background-color: rgba(0, 0, 0, 0.85);
|
||||||
box-shadow: 0 0 20px var(--secondary-color);
|
box-shadow: 0 0 20px var(--secondary-color);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
bottom: 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
border-radius: 2% / 1.5%;
|
border-radius: 2% / 1.5%;
|
||||||
@ -139,6 +139,14 @@ ul {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#docs-list {
|
||||||
|
display: flex;
|
||||||
|
gap: 1em;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
footer a {
|
footer a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
|
|||||||
@ -79,12 +79,8 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section-content {
|
.section-content {
|
||||||
display: none;
|
|
||||||
margin-top: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section.open .section-content {
|
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<link href="../assets/IosevkaSS15-Regular.ttf" rel="stylesheet">
|
<link href="../assets/IosevkaSS15-Regular.ttf" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="../css/sterling.css">
|
<link rel="stylesheet" href="../css/sterling.css">
|
||||||
<link rel="stylesheet" href="../css/global.css">
|
<link rel="stylesheet" href="../css/global.css">
|
||||||
<title>Sterling Documentation</title>
|
|
||||||
<script src="../js/sterling.js"></script>
|
<script src="../js/sterling.js"></script>
|
||||||
|
<title>Sterling Documentation</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="width:100%">
|
<div style="width:100%">
|
||||||
@ -41,36 +41,36 @@
|
|||||||
<li>Header files: <code>.sth</code></li>
|
<li>Header files: <code>.sth</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Function</h2>
|
<h2>Function</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
|
|
||||||
<h3>Qualifiers</h3>
|
<h3>Qualifiers</h3>
|
||||||
<p>Every function must declare its linkage explicitly:</p>
|
<p>Every function must declare its linkage explicitly:</p>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn //globally visible, default linkage
|
//globally visible, default linkage
|
||||||
fn_static //translation unit-local only
|
static //translation unit-local only
|
||||||
fn_inline //inline-only, no symbol emitted
|
inline //inline-only, no symbol emitted
|
||||||
fn_asm //raw assembly function, globally visible
|
asm //raw assembly function, globally visible
|
||||||
fn_static_asm //raw assembly function, TU-local only
|
static_asm //raw assembly function, TU-local only
|
||||||
fn_inline_asm //inline-only asm, no symbol emitted
|
inline_asm //inline-only asm, no symbol emitted
|
||||||
fn_async //for fiber (coroutine) ??
|
async //for fiber (coroutine) ??
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h3>Syntax</h3>
|
<h3>Syntax</h3>
|
||||||
<p>All functions must explicitly declare their return type. The only exception is <code>void</code>, which may be omitted for brevity when no return value is intended.</p>
|
<p>All functions must explicitly declare their return type. The only exception is <code>void</code>, which may be omitted for brevity when no return value is intended.</p>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn u32 add(u32 a, u32 b) {
|
u32 add(u32 a, u32 b) {
|
||||||
return (a + b);
|
return (a + b);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn_inline u32 max(u32 a, u32 b) {
|
inline u32 max(u32 a, u32 b) {
|
||||||
return ((a > b) ? a : b);
|
return ((a > b) ? a : b);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn exit() {
|
exit() {
|
||||||
// equivalent to fn void exit()
|
// equivalent to void exit()
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ fn exit() {
|
|||||||
<p>Write raw x86_64 assembly using <code>fn_asm</code> or <code>fn_static_asm</code>. Symbol, section, and global declaration are implicit.(placeholder)</p>
|
<p>Write raw x86_64 assembly using <code>fn_asm</code> or <code>fn_static_asm</code>. Symbol, section, and global declaration are implicit.(placeholder)</p>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn_asm void* memset(void* dst, u8 value, u64 size) {
|
asm void* memset(void* dst, u8 value, u64 size) {
|
||||||
test rdx, rdx
|
test rdx, rdx
|
||||||
je .done
|
je .done
|
||||||
|
|
||||||
@ -97,11 +97,11 @@ fn_asm void* memset(void* dst, u8 value, u64 size) {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Syscalls</h2>
|
<h2>Syscalls</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p>System calls are allowed via <code>fn_asm</code> or wrapped using concrete ABI-aware interfaces. Example: (placeholder)</p>
|
<p>System calls are allowed via <code>fn_asm</code> or wrapped using concrete ABI-aware interfaces. Example: (placeholder)</p>
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn_asm void exit() {
|
asm void exit() {
|
||||||
mov rax, 60 ; syscall: exit
|
mov rax, 60 ; syscall: exit
|
||||||
mov rdi, 0 ; exit code
|
mov rdi, 0 ; exit code
|
||||||
syscall
|
syscall
|
||||||
@ -112,15 +112,15 @@ fn_asm void exit() {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Register Access</h2>
|
<h2>Register Access</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p>Sterling exposes raw CPU registers as language-level primitives. This is intended for kernel, embedded, and runtime-critical tasks.</p>
|
<p>Sterling exposes raw CPU registers as language-level primitives. This is intended for kernel, embedded, and runtime-critical tasks.</p>
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn u64 get_rbp() {
|
u64 get_rbp() {
|
||||||
return rbp;
|
return rbp;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn void set_rsp(u64 val) {
|
void set_rsp(u64 val) {
|
||||||
rsp = val;
|
rsp = val;
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
@ -129,7 +129,7 @@ fn void set_rsp(u64 val) {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Types</h2>
|
<h2>Types</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
@ -162,7 +162,7 @@ u32 raw_val @raw; // raw_val = ? can be poopoo data
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Memory Model</h2>
|
<h2>Memory Model</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p>Manual memory management by default. Variables are zero-initialized unless marked <code>@raw</code>. All layout is predictable and cache-friendly. Custom allocators are encouraged.</p>
|
<p>Manual memory management by default. Variables are zero-initialized unless marked <code>@raw</code>. All layout is predictable and cache-friendly. Custom allocators are encouraged.</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -186,7 +186,7 @@ typedef struct(bitfield) {
|
|||||||
</section>-->
|
</section>-->
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Control Flow</h2>
|
<h2>Control Flow</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
|
|
||||||
<h3>Loop</h3>
|
<h3>Loop</h3>
|
||||||
@ -226,7 +226,7 @@ for_each (tmp : array(T)) {
|
|||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
|
|
||||||
fn u32 test(u32 x, u32 y) {
|
u32 test(u32 x, u32 y) {
|
||||||
if (x == y) {
|
if (x == y) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ fn u32 test(u32 x, u32 y) {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Dynamic Arrays with Aligned Layout</h2>
|
<h2>Dynamic Arrays with Aligned Layout</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p>Runtime-initialized aligned linear arrays can be used to simulate array-of-array structures, where all memory layout is controlled explicitly with offsets:</p>
|
<p>Runtime-initialized aligned linear arrays can be used to simulate array-of-array structures, where all memory layout is controlled explicitly with offsets:</p>
|
||||||
<pre><code>
|
<pre><code>
|
||||||
@ -280,14 +280,14 @@ struct ArrayView {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Dynamic Linking</h2>
|
<h2>Dynamic Linking</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p>Sterling does not rely on dynamic linking by default. Static linking is favored for OS and runtime simplicity. Dynamic linking may be optionally implemented via host-defined facilities in the future.</p>
|
<p>Sterling does not rely on dynamic linking by default. Static linking is favored for OS and runtime simplicity. Dynamic linking may be optionally implemented via host-defined facilities in the future.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Metaprogramming</h2>
|
<h2>Metaprogramming</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p><em>also i am not thinking of having something as close as what jai have, if you want solid meta programming look out for when jai become open beta</em></p>
|
<p><em>also i am not thinking of having something as close as what jai have, if you want solid meta programming look out for when jai become open beta</em></p>
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ struct ArrayView {
|
|||||||
|
|
||||||
<h3>Example</h3>
|
<h3>Example</h3>
|
||||||
<pre><code>
|
<pre><code>
|
||||||
meta fn print_fields_of(T) {
|
meta print_fields_of(T) {
|
||||||
for (field : fields(T)) {
|
for (field : fields(T)) {
|
||||||
print("Field: ", field.name, " of type ", field.type);
|
print("Field: ", field.name, " of type ", field.type);
|
||||||
}
|
}
|
||||||
@ -341,14 +341,14 @@ meta_codegen(name, ast_block) // gated for advanced use
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">ABI and Interop</h2>
|
<h2>ABI and Interop</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p><em>TODO: Specify ABI model (System V AMD64), calling convention details, struct/pointer representation rules. C interaction, emiting ELF/COFF/Mach-O symbol tables .o</em></p>
|
<p><em>TODO: Specify ABI model (System V AMD64), calling convention details, struct/pointer representation rules. C interaction, emiting ELF/COFF/Mach-O symbol tables .o</em></p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Threading</h2>
|
<h2>Threading</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p><em>TODO: Describe standard threading model, scheduler integration, context switching, green threads API.</em></p>
|
<p><em>TODO: Describe standard threading model, scheduler integration, context switching, green threads API.</em></p>
|
||||||
|
|
||||||
@ -392,9 +392,9 @@ meta_codegen(name, ast_block) // gated for advanced use
|
|||||||
<h4>Thread Primitives</h4>
|
<h4>Thread Primitives</h4>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn thread_spawn(void fn() entry_fn) -> thread_id;
|
thread_spawn(void fn() entry_fn) -> thread_id;
|
||||||
fn thread_join(thread_id tid);
|
thread_join(thread_id tid);
|
||||||
fn thread_exit();
|
thread_exit();
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h4>Fiber Primitives</h4>
|
<h4>Fiber Primitives</h4>
|
||||||
@ -407,47 +407,39 @@ typedef struct fiber {
|
|||||||
u8 flag;
|
u8 flag;
|
||||||
} fiber;
|
} fiber;
|
||||||
|
|
||||||
fn fiber_spawn(void fn() entry_fn) -> fiber_id;
|
fiber_spawn(void fn() entry_fn) -> fiber_id;
|
||||||
fn fiber_yield();
|
fiber_yield();
|
||||||
fn fiber_resume(fiber_id id);
|
fiber_resume(fiber_id id);
|
||||||
fn fiber_self() -> fiber_id;//could also be used instead of fork ex main process fibe_self = 0;
|
fiber_self() -> fiber_id;//could also be used instead of fork ex main process fibe_self = 0;
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h4>Optional stack control:</h4>
|
<h4>Optional stack control:</h4>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
fn fiber_spawn_stack(void fn(), void* stack_ptr, u64 size);
|
fiber_spawn_stack(void fn(), void* stack_ptr, u64 size);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Graphics and Rendering</h2>
|
<h2>Graphics and Rendering</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p><em>TODO: Describe native rendering interface</em>I have been thinking about supporting amd gpu acceleration with very few set of actual call, very fewer than opengl or other, but i will focus only on one hardware at first</p>
|
<p><em>TODO: Describe native rendering interface</em>I have been thinking about supporting amd gpu acceleration with very few set of actual call, very fewer than opengl or other, but i will focus only on one hardware at first</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<h2 onclick="toggleSection(this)">Build and Compilation Model</h2>
|
<h2>Build and Compilation Model</h2>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<p><em>TODO: AOT compilation, linker behavior, multi-file project structure, module system (if any).</em></p>
|
<p><em>TODO: AOT compilation, linker behavior, multi-file project structure, module system (if any).</em></p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<section>
|
<p style="text-align: center;">Copyright @ 2025 <a href="mailto:dev@sleepeesoftware.fr">Sleepee Software</a><br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
||||||
|
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a></p>
|
||||||
<a href="mailto:dev@sleepeesoftware.fr"><h4>email</h4></a>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<a href="https://sleepeesoftware.fr"><h4>website</h4></a>
|
|
||||||
</section>
|
|
||||||
</footer>
|
</footer>
|
||||||
<p style="text-align: center;">Copyright @ 2025 Carle-Margueritte Alexandre<br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
|
||||||
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -150,20 +150,9 @@ revoke_token(token_id)</code></pre>
|
|||||||
<h2>Philosophy</h2>
|
<h2>Philosophy</h2>
|
||||||
<p>This OS is not a POSIX clone. It is a deterministic, capability-secure, user-controlled computing environment built to reject legacy complexity and embrace verifiable simplicity.</p>
|
<p>This OS is not a POSIX clone. It is a deterministic, capability-secure, user-controlled computing environment built to reject legacy complexity and embrace verifiable simplicity.</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<section>
|
<p style="text-align: center;">Copyright @ 2025 <a href="mailto:dev@sleepeesoftware.fr">Sleepee Software</a><br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
||||||
|
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a></p>
|
||||||
<a href="mailto:dev@sleepeesoftware.fr"><h4>email</h4></a>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<a href="https://sleepeesoftware.fr"><h4>website</h4></a>
|
|
||||||
</section>
|
|
||||||
</footer>
|
</footer>
|
||||||
<p style="text-align: center;">Copyright @ 2025 Carle-Margueritte Alexandre<br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
|
||||||
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
26
sleepeesoftware.fr/html/card.html
Normal file
26
sleepeesoftware.fr/html/card.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Sleepee Software</title>
|
||||||
|
<!-- Google Font -->
|
||||||
|
<link href="../assets/IosevkaSS15-Regular.ttf" rel="stylesheet">
|
||||||
|
<!-- style --->
|
||||||
|
<link rel="stylesheet" href="css/global.css">
|
||||||
|
<link rel="stylesheet" href="css/base.css">
|
||||||
|
<!-- icon -->
|
||||||
|
<!--<link rel="icon" type="image/png" href="/assets/favicon-96x96.png" sizes="96x96" />-->
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg" />
|
||||||
|
<link rel="shortcut icon" href="/assets/favicon.ico" />
|
||||||
|
<link rel="manifest" href="/assets/site.webmanifest" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="http://localhost:8080/html/SterlingLang.html" class="card-body">
|
||||||
|
<h2 class="title">COUCOU</h2>
|
||||||
|
<p class="description">
|
||||||
|
test 32332323490838329ew0
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -6,7 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Sleepee Software</title>
|
<title>Sleepee Software</title>
|
||||||
<!-- Google Font -->
|
<!-- Google Font -->
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
|
<link href="../assets/IosevkaSS15-Regular.ttf" rel="stylesheet">
|
||||||
<!-- style --->
|
<!-- style --->
|
||||||
<link rel="stylesheet" href="css/global.css">
|
<link rel="stylesheet" href="css/global.css">
|
||||||
<link rel="stylesheet" href="css/base.css">
|
<link rel="stylesheet" href="css/base.css">
|
||||||
@ -49,15 +49,16 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="project-section" class="hidden">
|
<section id="project-section" class="hidden">
|
||||||
<h2>Documentations</h2>
|
<div id="card-container">
|
||||||
<ul>
|
<h2>Projects</h2>
|
||||||
|
<div id="docs-list">
|
||||||
<li><a href="html/SterlingLang.html">Sterling Lang</a></li>
|
<li><a href="html/SterlingLang.html">Sterling Lang</a></li>
|
||||||
<li><a href="html/SterlingOsDesign.html">Sterling OS</a></li>
|
<li><a href="html/SterlingOsDesign.html">Sterling OS</a></li>
|
||||||
</ul>
|
</div>
|
||||||
<h2>Projects</h2>
|
<div id="repo-list">
|
||||||
<ul id="repo-list">
|
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
</ul>
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- TODO: make login a popop that allow to use irc and blog -->
|
<!-- TODO: make login a popop that allow to use irc and blog -->
|
||||||
@ -87,12 +88,9 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer class="footer-container hidden">
|
||||||
<p>Copyright @ 2025 Sleepee Software<br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
<p style="text-align: center;">Copyright @ 2025 <a href="mailto:dev@sleepeesoftware.fr">Sleepee Software</a><br>Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.<br>
|
||||||
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a>
|
Verbatim copying and redistribution of any of the photos in the photos subdirectory is permitted under the <a href="https://opensource.org/license/mit">MIT License</a></p>
|
||||||
<br>
|
|
||||||
<a href="mailto:dev@sleepeesoftware.fr"><h4>Contact me</h4></a>
|
|
||||||
</p>
|
|
||||||
</footer>
|
</footer>
|
||||||
<script src="js/index.js"></script>
|
<script src="js/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ document.querySelectorAll('nav ul li a').forEach(link => {
|
|||||||
document.querySelectorAll('main section').forEach(sec => sec.classList.add('hidden'));
|
document.querySelectorAll('main section').forEach(sec => sec.classList.add('hidden'));
|
||||||
const section = document.getElementById(target);
|
const section = document.getElementById(target);
|
||||||
if (section) section.classList.remove('hidden');
|
if (section) section.classList.remove('hidden');
|
||||||
|
if (target == 'project-section') load_card();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -15,49 +16,54 @@ document.getElementById('login-form')?.addEventListener('submit', function(e) {
|
|||||||
// TODO: call backend API for authentication
|
// TODO: call backend API for authentication
|
||||||
});
|
});
|
||||||
|
|
||||||
fetch("/gitea-repos/")
|
function load_card() {
|
||||||
.then(res => res.json())
|
|
||||||
.then(repos => {
|
|
||||||
const list = document.getElementById("repo-list");
|
|
||||||
list.innerHTML = ""; // Clear "Loading..."
|
|
||||||
repos.forEach(function(repo) {
|
|
||||||
const item = document.createElement("li");
|
|
||||||
item.innerHTML = `
|
|
||||||
<strong><a href="${repo.html_url}" target="_blank">${repo.name}</a></strong>
|
|
||||||
<p>${repo.description || "No description"}</p>`;
|
|
||||||
list.appendChild(item);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => console.error("Error fetching repos: ", err));
|
|
||||||
|
|
||||||
|
const docslist = document.getElementById("docs-list");
|
||||||
|
docslist.innerHTML = "";
|
||||||
|
const docsitem = document.createElement("div");
|
||||||
|
docsitem.innerHTML = `
|
||||||
|
<a class="card-body" href="html/SterlingLang.html" target="_blank">
|
||||||
|
<h2 class="card-title">Sterling Lang</h2>
|
||||||
|
<p class="card-description">Sterling Programming Langage</p>
|
||||||
|
</a>
|
||||||
|
<a class="card-body" href="html/SterlingOsDesign.html" target="_blank">
|
||||||
|
<h2 class="card-title">SterlingOs</h2>
|
||||||
|
<p class="card-description">Sterling Operating System Design Documents</p>
|
||||||
|
</a>`;
|
||||||
|
docslist.appendChild(docsitem);
|
||||||
|
|
||||||
|
fetch("/gitea-repos/")
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(repos => {
|
||||||
|
const list = document.getElementById("repo-list");
|
||||||
|
list.innerHTML = ""; // Clear "Loading..."
|
||||||
|
repos.forEach(function(repo) {
|
||||||
|
const item = document.createElement("");
|
||||||
|
item.innerHTML = `
|
||||||
|
<strong><a class="card-body" href="${repo.html_url}" target="_blank">
|
||||||
|
<h2 class="card-title">${repo.name}</h2>
|
||||||
|
<p class="card-description">${repo.description || "No description"}</p>
|
||||||
|
</a>`;
|
||||||
|
list.appendChild(item);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => console.error("Error fetching repos: ", err));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
onload
|
onload
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', function() {
|
|
||||||
const loadingScreen = document.getElementById('loading-screen');
|
|
||||||
|
|
||||||
if (loadingScreen) {
|
|
||||||
loadingScreen.addEventListener('click', function() {
|
|
||||||
loadingScreen.style.display = 'none'; // hides the full screen
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const loadingScreen = document.getElementById('loading-screen');
|
const loadingScreen = document.getElementById('loading-screen');
|
||||||
const loadingText = document.querySelector('.loading-text');
|
|
||||||
|
|
||||||
loadingScreen.addEventListener('click', function() {
|
loadingScreen.addEventListener('click', function() {
|
||||||
loadingScreen.style.display = 'none';
|
loadingScreen.style.display = 'none';
|
||||||
document.querySelector('.foreground-container').style.display = 'block';
|
const container = document.querySelector(".foreground-container");
|
||||||
|
container.classList.remove("hidden");
|
||||||
|
container.classList.add("fade-in");
|
||||||
|
const footer = document.querySelector(".footer-container")
|
||||||
|
footer.classList.remove("hidden");
|
||||||
|
footer.classList.add("fade-in");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("loading-screen").addEventListener("click", function() {
|
|
||||||
document.getElementById("loading-screen").style.display = "none";
|
|
||||||
const container = document.querySelector(".foreground-container");
|
|
||||||
container.classList.remove("hidden");
|
|
||||||
container.classList.add("fade-in");
|
|
||||||
});
|
|
||||||
|
|||||||
@ -1,11 +1,3 @@
|
|||||||
function toggleTheme() {
|
|
||||||
//const root = document.documentElement;
|
|
||||||
//const dark = root.style.getPropertyValue('--bg-color') === '#0f1117';
|
|
||||||
//root.style.setProperty('--bg-color', dark ? '#ffffff' : '#0f1117');
|
|
||||||
//root.style.setProperty('--fg-color', dark ? '#000000' : '#f4f4f4');
|
|
||||||
//root.style.setProperty('--code-bg', dark ? '#f0f0f0' : '#1a1c22');
|
|
||||||
}
|
|
||||||
|
|
||||||
function filterContent() {
|
function filterContent() {
|
||||||
const query = document.getElementById('searchInput').value.toLowerCase();
|
const query = document.getElementById('searchInput').value.toLowerCase();
|
||||||
document.querySelectorAll('.section').forEach(section => {
|
document.querySelectorAll('.section').forEach(section => {
|
||||||
@ -22,11 +14,6 @@ function downloadOfflineVersion() {
|
|||||||
a.click();
|
a.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleSection(header) {
|
|
||||||
const section = header.parentElement;
|
|
||||||
section.classList.toggle('open');
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleSearch() {
|
function toggleSearch() {
|
||||||
const dropdown = document.getElementById('searchDropdown');
|
const dropdown = document.getElementById('searchDropdown');
|
||||||
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
|
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user