extends Node const MAIN_COLOR = Color(27/255.0, 27/255.0, 27/255.0, 1) const SECONDARY_COLOR = Color(43/255.0, 43/255.0, 43/255.0, 1) const HOVER_COLOR = Color(0, 0, 0, 1) const DEFAULT_CSS = """ body { text-base text-[#000000] text-left bg-white } h1 { text-5xl font-bold } h2 { text-4xl font-bold } h3 { text-3xl font-bold } h4 { text-2xl font-bold } h5 { text-xl font-bold } b { font-bold } i { font-italic } u { underline } small { text-xl } mark { bg-[#FFFF00] } code { text-xl font-mono } a { text-[#1a0dab] } pre { text-xl font-mono } button { text-[16px] bg-[#1b1b1b] rounded-md text-white hover:bg-[#2a2a2a] active:bg-[#101010] } button[disabled] { bg-[#666666] text-[#999999] cursor-not-allowed } """ var HTML_CONTENT2 = """
1,240
$9,842
3,590
Name: Jane Doe
Email: jane@example.com
Status: Active
Plan: Pro
Projects: 8
Tasks: 42
This paragraph should be red and bold (h1 + p)
This paragraph should be blue (h1 ~ p)
This paragraph should be purple and bold (div p and .outer-div > p)
This paragraph should be purple but not bold (div p only)
Regular paragraph in container
Keep track of your to-do list
This page demonstrates the GURT Lua API in action.
Click the button
Move your mouse
Move mouse over Button
Type something
Use the buttons below to add or remove items from the list:
Note: This demo showcases the Lua Tween API for smooth animations. Each box demonstrates different animation properties and easing functions.
Test
""".to_utf8_buffer() var HTML_CONTENTc = """Waiting for events...
Signal API Usage Example:
local mySignal = Signal.new()
mySignal:connect(function(arg1, arg2) print("Event fired with: ", arg1, arg2) end)
mySignal:fire("Hello", 123)
connection:disconnect()
Loading status...
Initializing...
โ Target button is currently ENABLED. Click it to see the counter increase!
Button clicked 0 times!
Loading status...
setAttribute('disabled', '') to remove the disabled attributesetAttribute('disabled', 'true') to add the disabled attributegetAttribute('disabled') to check current state, then toggles itgetAttribute() to read multiple attributes and displays themlocal socket = WebSocket:new(url)
socket:on('open', function() ... end)
socket:on('message', function(event) print(event.data) end)
socket:send('Hello Server!')
socket:close()
Initializing...
Network: fetch(url, {method: "POST", headers: {...}, body: "..."})
JSON: JSON.stringify(data) and JSON.parse(jsonString)
Initializing...
Intervals: gurt.setInterval(callback, delay) and gurt.clearInterval(id)
Network Images: fetch() with binary data and dynamic <img> creation
Click "Load Random Image" to test binary data fetching
Initializing...
object-none: Godot's STRETCH_KEEP - Image keeps original dimensions
object-fill: Godot's STRETCH_SCALE - Image stretches to fill container
object-contain: Godot's STRETCH_KEEP_ASPECT - Image fits inside with preserved aspect ratio
object-cover: Godot's STRETCH_KEEP_ASPECT_COVERED - Image covers container with preserved aspect ratio
Scale utilities: scale-{value}, scale-x-{value}, scale-y-{value}
Named values: 0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200
Custom values: scale-[{number}] where number is percentage (100 = 1.0)
Rotation utilities: rotate-{degrees}, rotate-x-{degrees}, rotate-y-{degrees}
Named degrees: 0, 1, 2, 3, 6, 12, 45, 90, 180, 270
Custom rotations: rotate-[{value}deg], rotate-[{value}rad], rotate-[{value}turn]
Don't have an account? Register here