Add proper elements <element name="head"> will now be treated as <head>. WARNING: I WAS A STUPID NINCOMPOOP AND BROKE NESTING ELEMENTS!!!
This commit is contained in:
parent
cb7a238c80
commit
89fff8112f
8 changed files with 111 additions and 26 deletions
6
examples/header.hy
Normal file
6
examples/header.hy
Normal file
|
@ -0,0 +1,6 @@
|
|||
<hylia>
|
||||
<element name="header">
|
||||
<h1> Welcome to Hylia! </h1>
|
||||
<p>This is a reusable header component.</p>
|
||||
</element>
|
||||
</hylia>
|
10
examples/main.hy
Normal file
10
examples/main.hy
Normal file
|
@ -0,0 +1,10 @@
|
|||
<hylia>
|
||||
<import file="header.hy"></import>
|
||||
<element name="head">
|
||||
<title>Hello Hylia!</title>
|
||||
</element>
|
||||
<element name="body">
|
||||
<header />
|
||||
<p>This is the main content.</p>
|
||||
</element>
|
||||
</hylia>
|
18
examples/output.html
Normal file
18
examples/output.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Hello Hylia!</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header />
|
||||
<p>This is the main content.</p>
|
||||
|
||||
</body>
|
||||
|
||||
<h1> Welcome to Hylia! </h1>
|
||||
<p>This is a reusable header component.</p>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue