v0.2.1 release
This commit is contained in:
446
docs/index.html
446
docs/index.html
@@ -1,152 +1,237 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>FlexLöve Documentation</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown.min.css">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown.min.css"
|
||||
/>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
||||
background-color: #0d1117;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
padding: 3rem 0;
|
||||
border-bottom: 1px solid #30363d;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 3rem;
|
||||
margin: 0;
|
||||
background: linear-gradient(45deg, #58a6ff, #79c0ff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
.header p {
|
||||
font-size: 1.2rem;
|
||||
color: #8b949e;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.nav a {
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: #21262d;
|
||||
color: #c9d1d9;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #30363d;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.nav a:hover {
|
||||
background-color: #30363d;
|
||||
border-color: #58a6ff;
|
||||
}
|
||||
.markdown-body {
|
||||
background-color: #0d1117;
|
||||
padding: 2rem;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.section {
|
||||
margin: 3rem 0;
|
||||
}
|
||||
.features {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin: 3rem 0;
|
||||
}
|
||||
.feature-card {
|
||||
background-color: #161b22;
|
||||
padding: 2rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #30363d;
|
||||
}
|
||||
.feature-card h3 {
|
||||
color: #58a6ff;
|
||||
margin-top: 0;
|
||||
}
|
||||
code {
|
||||
background-color: #161b22;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
}
|
||||
pre {
|
||||
background-color: #161b22;
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 3rem 0;
|
||||
border-top: 1px solid #30363d;
|
||||
margin-top: 4rem;
|
||||
color: #8b949e;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
|
||||
Helvetica, Arial, sans-serif;
|
||||
background-color: #0d1117;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
padding: 3rem 0;
|
||||
border-bottom: 1px solid #30363d;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 3rem;
|
||||
margin: 0;
|
||||
background: linear-gradient(45deg, #58a6ff, #79c0ff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
.header p {
|
||||
font-size: 1.2rem;
|
||||
color: #8b949e;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.nav a {
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: #21262d;
|
||||
color: #c9d1d9;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #30363d;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.nav a:hover {
|
||||
background-color: #30363d;
|
||||
border-color: #58a6ff;
|
||||
}
|
||||
.markdown-body {
|
||||
background-color: #0d1117;
|
||||
padding: 2rem;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.section {
|
||||
margin: 3rem 0;
|
||||
}
|
||||
.features {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin: 3rem 0;
|
||||
}
|
||||
.feature-card {
|
||||
background-color: #161b22;
|
||||
padding: 2rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #30363d;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
color: inherit;
|
||||
}
|
||||
.feature-card:hover {
|
||||
background-color: #1c2128;
|
||||
border-color: #58a6ff;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
|
||||
}
|
||||
.feature-card h3 {
|
||||
color: #58a6ff;
|
||||
margin-top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.feature-card h3::after {
|
||||
content: "→";
|
||||
font-size: 1.5rem;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.feature-card:hover h3::after {
|
||||
opacity: 1;
|
||||
}
|
||||
.feature-card p {
|
||||
color: #8b949e;
|
||||
margin: 0.5rem 0 0 0;
|
||||
}
|
||||
code {
|
||||
background-color: #161b22;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
|
||||
monospace;
|
||||
}
|
||||
pre {
|
||||
background-color: #161b22;
|
||||
padding: 1rem;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
position: relative;
|
||||
}
|
||||
.copy-button {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
background-color: #21262d;
|
||||
color: #8b949e;
|
||||
border: 1px solid #30363d;
|
||||
border-radius: 6px;
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: all 0.2s;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
pre:hover .copy-button {
|
||||
opacity: 1;
|
||||
}
|
||||
.copy-button:hover {
|
||||
background-color: #30363d;
|
||||
border-color: #58a6ff;
|
||||
color: #c9d1d9;
|
||||
}
|
||||
.copy-button:active {
|
||||
background-color: #238636;
|
||||
border-color: #238636;
|
||||
color: #ffffff;
|
||||
}
|
||||
.copy-button.copied {
|
||||
background-color: #238636;
|
||||
border-color: #238636;
|
||||
color: #ffffff;
|
||||
}
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 3rem 0;
|
||||
border-top: 1px solid #30363d;
|
||||
margin-top: 4rem;
|
||||
color: #8b949e;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>FlexLöve</h1>
|
||||
<p>A comprehensive UI library for LÖVE Framework based on flexbox</p>
|
||||
</div>
|
||||
<div class="header">
|
||||
<h1>FlexLöve</h1>
|
||||
<p>A comprehensive UI library for LÖVE Framework based on flexbox</p>
|
||||
</div>
|
||||
|
||||
<div class="nav">
|
||||
<a href="https://github.com/mikefreno/FlexLove">GitHub</a>
|
||||
<a href="#getting-started">Getting Started</a>
|
||||
<a href="doc.md">API Reference (Markdown)</a>
|
||||
<a href="doc.json">API Reference (JSON)</a>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<a href="https://github.com/mikefreno/FlexLove">GitHub</a>
|
||||
<a href="#getting-started">Getting Started</a>
|
||||
<a href="examples.html">Examples</a>
|
||||
<a href="api.html">API Reference</a>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="features">
|
||||
<div class="feature-card">
|
||||
<h3>🎨 Flexbox & Grid Layouts</h3>
|
||||
<p>Modern CSS-like layout system with full flexbox and grid support for building responsive UIs.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>🎭 Theme System</h3>
|
||||
<p>9-patch NinePatch theming with state support (normal, hover, pressed, disabled).</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>✨ Animations</h3>
|
||||
<p>Built-in animation support for smooth transitions and effects with easing functions.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>📱 Responsive Design</h3>
|
||||
<p>Viewport units (vw, vh, %) for automatic resizing and responsive layouts.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>⚡ Immediate Mode</h3>
|
||||
<p>Optional immediate mode support alongside traditional retained mode rendering.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>🎯 Event System</h3>
|
||||
<p>Rich event handling with callbacks, focus management, and input fields.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2 style="text-align: center; margin-bottom: 2rem">✨ Features</h2>
|
||||
<div class="features">
|
||||
<a href="examples.html#layout" class="feature-card">
|
||||
<h3>🎨 Flexbox & Grid Layouts</h3>
|
||||
<p>
|
||||
Modern CSS-like layout system with full flexbox and grid support
|
||||
for building responsive UIs.
|
||||
</p>
|
||||
</a>
|
||||
<a href="examples.html#theme" class="feature-card">
|
||||
<h3>🎭 Theme System</h3>
|
||||
<p>
|
||||
9-patch NinePatch theming with state support (normal, hover,
|
||||
pressed, disabled).
|
||||
</p>
|
||||
</a>
|
||||
<a href="examples.html#state" class="feature-card">
|
||||
<h3>✨ State Management</h3>
|
||||
<p>
|
||||
Interactive components with state tracking, counters, toggles, and
|
||||
dynamic updates.
|
||||
</p>
|
||||
</a>
|
||||
<a href="examples.html#scroll" class="feature-card">
|
||||
<h3>📜 Scrollable Content</h3>
|
||||
<p>
|
||||
Smooth scrolling containers with backdrop blur effects and
|
||||
overflow handling for long content lists.
|
||||
</p>
|
||||
</a>
|
||||
<a href="examples.html#slider" class="feature-card">
|
||||
<h3>🎚️ Sliders & Controls</h3>
|
||||
<p>
|
||||
Draggable sliders with value tracking, perfect for settings menus
|
||||
and adjustable parameters.
|
||||
</p>
|
||||
</a>
|
||||
<a href="examples.html#input" class="feature-card">
|
||||
<h3>⌨️ Input & Events</h3>
|
||||
<p>
|
||||
Rich event handling with mouse, keyboard, and touch support. Focus
|
||||
management and input fields.
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section markdown-body" id="getting-started">
|
||||
<h2>Quick Start</h2>
|
||||
<pre><code class="language-lua">local FlexLove = require("FlexLove")
|
||||
<div class="section" id="getting-started">
|
||||
<h2>Quick Start</h2>
|
||||
<pre><code class="language-lua">local FlexLove = require("FlexLove")
|
||||
|
||||
-- Initialize with base scaling and theme
|
||||
FlexLove.init({
|
||||
@@ -174,29 +259,70 @@ end
|
||||
function love.draw()
|
||||
FlexLove.draw()
|
||||
end</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Documentation</h2>
|
||||
<p>The API reference is available in two formats:</p>
|
||||
<ul>
|
||||
<li><a href="doc.md">Markdown format</a> - Easy to read in browser or convert to HTML</li>
|
||||
<li><a href="doc.json">JSON format</a> - For programmatic access and tooling</li>
|
||||
</ul>
|
||||
<p>These docs are auto-generated from LuaLS annotations using the Lua Language Server.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Installation</h2>
|
||||
<p>Add the <code>modules</code> directory and <code>FlexLove.lua</code> into your LÖVE project.</p>
|
||||
<pre><code>git clone https://github.com/mikefreno/FlexLove.git
|
||||
<div class="section">
|
||||
<h2>Installation</h2>
|
||||
<p>
|
||||
Add the <code>modules</code> directory and
|
||||
<code>FlexLove.lua</code> into your LÖVE project.
|
||||
</p>
|
||||
<pre><code>git clone https://github.com/mikefreno/FlexLove.git
|
||||
cp -r FlexLove/modules your-project/
|
||||
cp FlexLove/FlexLove.lua your-project/</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>FlexLöve v0.2.0 | MIT License | <a href="https://github.com/mikefreno/FlexLove" style="color: #58a6ff;">GitHub Repository</a></p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>
|
||||
FlexLöve v0.2.0 | MIT License |
|
||||
<a href="https://github.com/mikefreno/FlexLove" style="color: #58a6ff"
|
||||
>GitHub Repository</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
hljs.highlightAll();
|
||||
|
||||
document.querySelectorAll('a[href^="#"]').forEach((anchor) => {
|
||||
anchor.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
const target = document.querySelector(this.getAttribute("href"));
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Add copy buttons to code blocks
|
||||
document.querySelectorAll("pre code").forEach((codeBlock) => {
|
||||
const pre = codeBlock.parentElement;
|
||||
const button = document.createElement("button");
|
||||
button.className = "copy-button";
|
||||
button.textContent = "Copy";
|
||||
button.title = "Copy to clipboard";
|
||||
|
||||
button.addEventListener("click", async () => {
|
||||
const code = codeBlock.textContent;
|
||||
try {
|
||||
await navigator.clipboard.writeText(code);
|
||||
button.textContent = "Copied!";
|
||||
button.classList.add("copied");
|
||||
setTimeout(() => {
|
||||
button.textContent = "Copy";
|
||||
button.classList.remove("copied");
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error("Failed to copy:", err);
|
||||
button.textContent = "Failed";
|
||||
setTimeout(() => {
|
||||
button.textContent = "Copy";
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
|
||||
pre.appendChild(button);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user