Update README.md
This commit is contained in:
42
README.md
42
README.md
@@ -64,8 +64,33 @@ There are quill functions for every HTML style attribute. If they have units, th
|
|||||||
|
|
||||||
### Real Home Shadow Example:
|
### Real Home Shadow Example:
|
||||||
|
|
||||||
When starting, it is typical to make a "Home" shadow. This is a good example.
|
First, you need your index.html. Here is one:
|
||||||
|
|
||||||
|
```
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" class="public">
|
||||||
|
<head>
|
||||||
|
<title>Parchment</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="icon" href="/_/icons/quill.svg">
|
||||||
|
<link rel="stylesheet" href="/_/code/shared.css">
|
||||||
|
<script src="/_/code/quill.js"></script>
|
||||||
|
<script type="module" src="75820185/index.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
When starting, it is typical to make a "Home" shadow and import it in index.js. Here is an example:
|
||||||
|
|
||||||
|
index.js:
|
||||||
|
```
|
||||||
|
import "./Home.js"
|
||||||
|
Home()
|
||||||
|
```
|
||||||
|
|
||||||
|
Home.js:
|
||||||
```
|
```
|
||||||
import "../components/NavBar.js"
|
import "../components/NavBar.js"
|
||||||
import "./HomeContent.js"
|
import "./HomeContent.js"
|
||||||
@@ -120,4 +145,19 @@ class Home extends Shadow {
|
|||||||
|
|
||||||
register(Home)
|
register(Home)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Success.js:
|
||||||
|
|
||||||
|
```
|
||||||
|
class Success extends Shadow {
|
||||||
|
render() {
|
||||||
|
p("Thanks for your purchase! You will receive a confirmation email shortly. <br><br> <b>Keep that email; it will be checked at the door.</b>")
|
||||||
|
.x(50, vw).y(50, vh)
|
||||||
|
.center()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
register(Success)
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user