Skip to main content

UCHTML

UCHTML renders HTML and Jinja2 templates into native client UI elements. It is a framework many clients load; the in-game wiki is a client built on it, not part of it. For why it exists and how it works, read UCHTML in Foundations.

Pages​

PageWhat it covers
Grid systemBlock, flex and relative layout, and sizing
Jinja2 templatingTemplate syntax and a worked page
Template contextfun, bonus, and how a host adds names
Reactive zonesRebuilding part of a page when a variable changes
Compiled templatesDebug and production rendering
Common attributesAttributes every tag takes, and display flex
Layout tagsdiv, main, table, accordion, boards
Filter groupsButtons, lists and tabs that set a variable
Text and linksHeadings, text, colors, hyperlinks
Widget tagsImages, buttons, slots, progress, model

Glossary​

TermMeaning
Metin2 mainline engineThe Metin2 client and server Universal Core started from.
HostThe window or module that creates an HTMLLayoutLoader, gives it a template and supplies the variables.
PackAn archive the client reads files from before it looks in the client folder.
Client folderThe client's directory on disk.
LocaleA language folder under locale/; templates live in one.
UIElementThe loader's own tree node for one tag; leaves become real native widgets.
Reactive zoneA div that rebuilds its children when a watched variable changes.
ENABLE_WIKI_DEVThe client flag that turns on template source validation.