-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
46 lines (41 loc) · 1.28 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Tag</title>
<link rel="stylesheet" href="./css/style.css">
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
<?php
require 'SimpleTag.php';
$tag = new SimpleTag();
$elems = [
'div' => ['class' => 'bold italic', 'id' => 'app'],
'form' => ['id' => 'student-form', 'method' => 'post', 'action' => 'myweb.com']
];
$content = [
'div' => [
'class' => 'title',
'id' => 'site-title',
'style' => [
'background-color' => 'blue',
]
],
'h1' => ['style' => ['text-decoration' => 'underline']]
];
$button = ['button' => ['type' => 'button', 'class' => 'btn', '@click' => 'greetings']];
$tag->elem($elems)
->in('Hello world!', $content)
->in('Above text written with fully PHP!', 'h2', [
'h2' => ['font-style' => 'italic']
])
->in('Click me!', $button)
->in('{{ note }}', 'h3')
->render();
?>
<script src="./js/app.js"></script>
</body>
</html>