Skip to content

Commit 09d16cd

Browse files
author
Lenin
committed
Refactor code structure for improved readability and maintainability
1 parent 34edb40 commit 09d16cd

7 files changed

Lines changed: 1618 additions & 60 deletions

File tree

docs/assets/favicon.ico

47.1 KB
Binary file not shown.

docs/assets/logo.png

115 KB
Loading

docs/assets/psych.js

Lines changed: 1456 additions & 47 deletions
Large diffs are not rendered by default.

docs/assets/site.css

Lines changed: 149 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
--font-heading: "Space Grotesk", "Segoe UI", sans-serif;
55
--font-body: "Manrope", "Segoe UI", sans-serif;
66

7-
--md-primary: #006686;
7+
--md-primary: #9c27b0;
88
--md-on-primary: #ffffff;
9-
--md-primary-container: #bfe9ff;
10-
--md-on-primary-container: #001f2a;
9+
--md-primary-container: #f3e5f5;
10+
--md-on-primary-container: #4a0072;
1111

12-
--md-secondary: #4f616d;
12+
--md-secondary: #625b71;
1313
--md-surface: #f7f9fc;
1414
--md-surface-variant: #dde4eb;
1515
--md-on-surface: #161c22;
@@ -23,12 +23,12 @@
2323
}
2424

2525
html[data-theme="dark"] {
26-
--md-primary: #74d1ff;
27-
--md-on-primary: #003548;
28-
--md-primary-container: #004d69;
29-
--md-on-primary-container: #bfe9ff;
26+
--md-primary: #e1bee7;
27+
--md-on-primary: #3e0051;
28+
--md-primary-container: #6a0080;
29+
--md-on-primary-container: #f3e5f5;
3030

31-
--md-secondary: #b5c9d7;
31+
--md-secondary: #c8b6db;
3232
--md-surface: #0f151b;
3333
--md-surface-variant: #26313a;
3434
--md-on-surface: #e9f1f8;
@@ -83,12 +83,22 @@ a {
8383
}
8484

8585
.brand {
86+
display: flex;
87+
align-items: center;
88+
gap: 0.6rem;
8689
text-decoration: none;
8790
font-family: var(--font-heading);
8891
font-size: 1.05rem;
8992
color: var(--md-on-surface);
9093
}
9194

95+
.brand-logo {
96+
height: 40px;
97+
width: auto;
98+
max-width: 180px;
99+
display: block;
100+
}
101+
92102
.top-actions {
93103
display: flex;
94104
align-items: center;
@@ -341,6 +351,136 @@ a {
341351
margin-bottom: 0.7rem;
342352
}
343353

354+
.function-list {
355+
display: flex;
356+
flex-direction: column;
357+
gap: 1rem;
358+
margin-top: 0.8rem;
359+
}
360+
361+
.function-item {
362+
padding: 0.8rem;
363+
border-left: 3px solid var(--md-primary);
364+
border-radius: 0 var(--md-radius-md) var(--md-radius-md) 0;
365+
background: color-mix(in oklab, var(--md-surface) 85%, transparent);
366+
}
367+
368+
.function-item h4 {
369+
margin: 0 0 0.4rem 0;
370+
font-size: 0.95rem;
371+
color: var(--md-on-surface);
372+
font-weight: 600;
373+
letter-spacing: -0.01em;
374+
}
375+
376+
.function-item h2 {
377+
margin: 0 0 0.5rem 0;
378+
font-size: 1.3rem;
379+
color: var(--md-on-surface);
380+
font-weight: 700;
381+
letter-spacing: -0.01em;
382+
}
383+
384+
.function-sig {
385+
margin: 0.3rem 0;
386+
padding: 0.5rem 0.8rem;
387+
background: color-mix(in oklab, var(--md-primary) 12%, transparent);
388+
border-radius: var(--md-radius-md);
389+
font-size: 0.95rem;
390+
line-height: 1.6;
391+
overflow-x: auto;
392+
}
393+
394+
.function-sig code {
395+
color: var(--md-primary);
396+
font-family: 'Courier New', monospace;
397+
font-size: 1em;
398+
}
399+
400+
.function-params {
401+
margin: 0.6rem 0 0 0;
402+
padding: 0.6rem 0 0 0;
403+
border-top: 1px solid color-mix(in oklab, var(--md-outline) 20%, transparent);
404+
list-style: none;
405+
}
406+
407+
.function-params li {
408+
margin: 0.4rem 0;
409+
padding: 0.4rem 0.6rem;
410+
background: color-mix(in oklab, var(--md-surface-variant) 30%, transparent);
411+
border-radius: var(--md-radius-md);
412+
font-size: 0.9rem;
413+
line-height: 1.5;
414+
}
415+
416+
.function-params strong {
417+
color: var(--md-primary);
418+
font-weight: 600;
419+
}
420+
421+
.function-params em {
422+
color: var(--md-secondary);
423+
font-style: normal;
424+
font-size: 0.85em;
425+
}
426+
427+
.function-desc {
428+
margin: 0.4rem 0;
429+
color: var(--md-on-surface);
430+
font-size: 0.9rem;
431+
line-height: 1.5;
432+
}
433+
434+
.function-examples {
435+
margin: 0.5rem 0 0 0;
436+
padding: 0.8rem;
437+
background: color-mix(in oklab, var(--md-secondary) 10%, transparent);
438+
border-radius: var(--md-radius-md);
439+
font-size: 0.95rem;
440+
}
441+
442+
.function-examples strong {
443+
color: var(--md-on-surface);
444+
font-weight: 600;
445+
display: block;
446+
margin-bottom: 0.5rem;
447+
}
448+
449+
.function-examples code {
450+
display: block;
451+
padding: 0.5rem 0.7rem;
452+
margin: 0.3rem 0;
453+
background: color-mix(in oklab, var(--md-surface-variant) 50%, transparent);
454+
border-radius: 4px;
455+
color: var(--md-secondary);
456+
font-family: 'Courier New', monospace;
457+
font-size: 0.95em;
458+
line-height: 1.5;
459+
}
460+
461+
.example-item {
462+
margin: 0.5rem 0;
463+
}
464+
465+
.example-item code {
466+
display: block;
467+
padding: 0.5rem 0.7rem;
468+
background: color-mix(in oklab, var(--md-surface-variant) 50%, transparent);
469+
border-radius: 4px;
470+
color: var(--md-secondary);
471+
font-family: 'Courier New', monospace;
472+
font-size: 0.95em;
473+
margin-bottom: 0.3rem;
474+
}
475+
476+
.example-item p {
477+
margin: 0;
478+
padding: 0.3rem 0.7rem;
479+
color: var(--md-on-surface-variant);
480+
font-size: 0.88rem;
481+
font-style: italic;
482+
}
483+
344484
.function-tags {
345485
display: flex;
346486
flex-wrap: wrap;

docs/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap"
1515
rel="stylesheet"
1616
/>
17+
<link rel="icon" href="assets/favicon.ico" />
1718
<link rel="stylesheet" href="assets/site.css" />
1819
<script defer src="assets/site.js"></script>
1920
</head>
@@ -22,7 +23,9 @@
2223
<div class="ambient ambient-b"></div>
2324

2425
<header class="topbar">
25-
<a class="brand" href="index.html">Lua API Hub</a>
26+
<a class="brand" href="index.html">
27+
<img src="assets/logo.png" alt="Psych Engine" class="brand-logo" />
28+
</a>
2629
<button id="themeToggle" class="icon-btn" type="button" aria-label="Toggle theme">
2730
Theme
2831
</button>

docs/plus.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap"
1111
rel="stylesheet"
1212
/>
13+
<link rel="icon" href="assets/favicon.ico" />
1314
<link rel="stylesheet" href="assets/site.css" />
1415
<script defer src="assets/site.js"></script>
1516
</head>
1617
<body>
1718
<header class="topbar">
18-
<a class="brand" href="index.html">Lua API Hub</a>
19+
<a class="brand" href="index.html">
20+
<img src="assets/logo.png" alt="Psych Engine" class="brand-logo" />
21+
</a>
1922
<nav class="top-actions">
2023
<a class="text-link" href="psych.html">Psych</a>
2124
<button id="themeToggle" class="icon-btn" type="button" aria-label="Toggle theme">

docs/psych.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@
1414
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap"
1515
rel="stylesheet"
1616
/>
17+
<link rel="icon" href="assets/favicon.ico" />
1718
<link rel="stylesheet" href="assets/site.css" />
1819
<script defer src="assets/site.js"></script>
1920
<script defer src="assets/psych.js"></script>
2021
</head>
2122
<body class="docs-body">
2223
<header class="topbar">
23-
<a class="brand" href="index.html">Lua API Hub</a>
24+
<a class="brand" href="index.html">
25+
<img src="assets/logo.png" alt="Psych Engine" class="brand-logo" />
26+
</a>
2427
<nav class="top-actions">
2528
<a class="text-link" href="index.html">Home</a>
2629
<a class="text-link" href="plus.html">Plus</a>
@@ -45,7 +48,7 @@ <h2>Search Functions</h2>
4548
<h1>Lua Script API</h1>
4649
<p>
4750
This interface is a Material Design 3 styled rebuild inspired by
48-
<a href="https://github.com/ShadowMario/psychengine.lua" target="_blank" rel="noreferrer">the original documentation</a>.
51+
<a href="https://shadowmario.github.io/psychengine.lua/" target="_blank" rel="noreferrer">the original documentation</a>.
4952
</p>
5053
<p>
5154
Original notes kept for context: intended for Psych Engine 1.0+, support for older versions is abandoned.

0 commit comments

Comments
 (0)