-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
89 lines (79 loc) · 2.19 KB
/
index.html
File metadata and controls
89 lines (79 loc) · 2.19 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"
/>
<title>http-cat Demo</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,700"
rel="stylesheet"
type="text/css"
/>
<link
rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/ink/3.0.2/css/ink.min.css"
/>
<style>
body {
font-weight: 300;
}
.code {
background-color: #eee;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
}
img {
width: 500px;
}
</style>
<script type="module" src="http-cat.js"></script>
</head>
<body>
<div class="ink-grid">
<header class="vertical-space">
<h1><code>http-cat</code> web component</h1>
</header>
<div class="content">
<p>
This is how you embed an HTTP Cat using
<a href="http://webcomponents.org/">web components</a>.
</p>
<div class="top-space bottom-space">
<span class="code">
<code><http-cat status="404"></http-cat></code>
</span>
</div>
<p class="vertical-space">And it looks like this:</p>
<http-cat status="404" alt="404 Cat Not Found"></http-cat>
<div class="vertical-space">
<h3>API</h3>
<h4>Available attributes</h4>
<ul>
<li>
<code>status</code> - The HTTP status code to show the related cat
image
</li>
</ul>
<p>
This component is just an img tag so it supports all standard
<code>img</code> element attributes (don't forget
<code>alt</code>!).
</p>
</div>
</div>
<footer class="vertical-space">
<p>
Check out the source code at
<a href="http://github.com/httpcats/http-cat-element"
>http://github.com/httpcats/http-cat-element</a
>
</p>
</footer>
</div>
</body>
</html>