-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (38 loc) · 1.56 KB
/
index.html
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>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Readability Web Component - Test Client</title>
<style>
*, *::before, *::after {
box-sizing: border-box;
}
read-ability {
/* Allow customization of some of the Web components styling via
CSS properties */
--readability-margin: 0 0 16px 0;
--readability-font-size: 0.8em;
--readability-font-weight: lighter;
--readability-opacity: 0.8;
--readability-spacer-margin: 0 6px;
--readability-justify-content: center;
}
</style>
<!-- Include script on your page -->
<!-- You'd probably want to use a specific version in production -->
<script defer src="https://cdn.jsdelivr.net/npm/readability-component@1.0.10/dist/readability.min.js"></script>
<!-- Used for Local Testing -->
<!-- Include script on your page -->
<!-- You'd probably want the minified version in production -->
<!-- <script defer src="dist/readability.js"></script> -->
</head>
<body>
<read-ability>
<!-- This can be anything, this is your content -->
<!-- Make sure to add slot="readable-text" attribute to your content if you also want it to be rendered -->
<!-- If you neglect to add the slot, then the readability of any text contained by the component is computed, without displaying it -->
<div contenteditable slot="readable-text">You can edit me to whatever you want. The readability will be updated to reflect whatever content you add.</div>
</read-ability>
</body>
</html>