-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.templ
110 lines (108 loc) · 3.71 KB
/
index.templ
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package main
import (
"fmt"
"github.com/axzilla/templui/pkg/components"
"github.com/axzilla/templui/pkg/helpers"
"sort"
)
templ Index() {
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="/favicon.png"/>
<meta name="viewport" content="width=device-width"/>
<title>AnyABI - The easiest way to fetch an ABI</title>
<meta name="twitter:title" content="AnyABI - The easiest way to fetch an ABI"/>
<meta name="description" content="Quickly grab the ABI for ANY EVM smart contract on ANY EVM chain."/>
<meta name="twitter:description" content="Quickly grab the ABI for ANY EVM smart contract on ANY EVM chain."/>
<meta name="twitter:image" content="https://anyabi.xyz/thumbnail.png"/>
<meta property="og:image" content="https://anyabi.xyz/thumbnail.png"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta http-equiv="content-security-policy" content=""/>
<link href="/css/styles.css" rel="stylesheet"/>
@helpers.AlpineJS()
@helpers.ComponentScripts()
</head>
<body>
<main class="container">
<h1><img src="/logo.png" width="48"/>AnyABI </h1>
<article>The easiest way to fetch an ABI.</article>
<section>
<div class="w-full">
@components.Card(components.CardProps{Class: "w-full"}) {
@components.CardHeader() {
@components.CardTitle() {
Search
}
@components.CardDescription() {
Search for a smart contract ABI
}
}
@components.CardContent() {
@components.FormItem(components.FormItemProps{}) {
@components.FormLabel(components.FormLabelProps{
Text: "Network",
For: "network",
})
@components.Select(components.SelectProps{
ID: "network",
Placeholder: "Select a network",
Options: func() []components.SelectOption {
options := make([]components.SelectOption, 0, len(ChainIDs))
for name, id := range ChainIDs {
options = append(options, components.SelectOption{
Label: name,
Value: fmt.Sprintf("%d", id),
})
}
sort.Slice(options, func(i, j int) bool {
return options[i].Label < options[j].Label
})
return options
}(),
})
@components.FormDescription(components.FormDescriptionProps{}) {
Select an EVM network
}
}
@components.FormItem(components.FormItemProps{}) {
@components.FormLabel(components.FormLabelProps{
Text: "Address", For: "address"})
@components.Input(components.InputProps{
ID: "address",
Type: "text",
Placeholder: "0x...",
})
@components.FormDescription(components.FormDescriptionProps{}) {
Enter an address
}
@components.FormMessage(components.FormMessageProps{
Message: "Please enter a valid EVM address",
Type: "error",
})
}
}
@components.CardFooter() {
@components.Button(components.ButtonProps{Text: "Search"})
}
<div class="w-full rounded-lg p-5">
@components.Code(components.CodeProps{
Language: "go",
ShowCopyButton: true,
}) {
{ `fmt.Println("Hello, World!")` }
}
</div>
}
</div>
</section>
</main>
<!-- 100% privacy friendly analytics -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript>
<img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade"/>
</noscript>
</body>
</html>
}