Skip to content

Commit

Permalink
Deploying to gh-pages from @ ad5d0fc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt committed Jun 4, 2024
1 parent 03e1290 commit 2ab53c8
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 0 deletions.
46 changes: 46 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>KoAP - Online CoAP decoder</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="webapp.js"></script>
<link rel="stylesheet" href="styles.css">
</head>

<body>
<div>
<span id="instructions">
Type or paste the hex encoded CoAP message to decode.
See <a href="docs/index.html">KoAP reference documentation</a> for details on supported CoAP features.
</span>
</div>

<textarea id="input" rows="8" placeholder="42 01 FE ED CA FE B5 ..."></textarea>

<div>
<div id="output"></div>
</div>

<a href="https://github.com/JuulLabs/koap">
<img
style="position: absolute; top: 0; right: 0; border: 0;"
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_gray_6d6d6d.png?resize=149%2C149"
alt="Fork me on GitHub"
/>
</a>

<script type="text/javascript">
var previous = "";
$('#input').on('change keyup paste', function() {
var current = $(this).val();
if (current == previous) return; // prevent multiple simultaneous triggers
previous = current;

webapp.com.juul.koap.decode(current).then((output) => {
$('#output').html("<pre>" + output + "</pre>");
});
});
</script>
</body>
</html>
63 changes: 63 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
body {
background-color: #eee;
margin: 2em;
font-family: monospace;
font-size: 16pt;
text-align: center;
}

#instructions {
display: inline-block;
max-width: 750px;
margin-bottom: 25px;
font-size: 14pt;
}

#input {
font-size: 18pt;
width: 100%;
max-width: 800px;
}

#output {
display: inline-block;
text-align: left;
}

h1 {
font-size: 22pt;
margin-bottom: 0;
}

/*
* "Fork me on GitHub" ribbon
* https://www.kirilv.com/fork-ribbon-css-builder/
*/
.ribbon {
/* positioning */
position: fixed;
padding: 5px 45px;
width: 128px;
/* top right of the page */
top: 50px;
right: -50px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
/* effects with some shadow */
box-shadow: 0 0 0 3px #f6c304, 0 0 20px -3px rgba(0, 0, 0, 0.5);
text-shadow: 0 0 0 #ffffff, 0 0 5px rgba(0, 0, 0, 0.3);
/* looks */
background-color: #f6c304;
color: #ffffff;
font-size: 13px;
font-family: sans-serif;
text-decoration: none;
font-weight: bold;
/* ribbon effects */
border: 2px dotted #ffffff;
/* webkit antialias fix */
-webkit-backface-visibility: hidden;
letter-spacing: .5px;
}
3 changes: 3 additions & 0 deletions webapp.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions webapp.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
1 change: 1 addition & 0 deletions webapp.js.map

Large diffs are not rendered by default.

0 comments on commit 2ab53c8

Please sign in to comment.