Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
crismancich committed Apr 25, 2024
0 parents commit d1f9250
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
27 changes: 27 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Connection Guide</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="guide">
<h1>Guide to Connecting the Revolution Pi with Cumulocity</h1>
<h2>Table of Contents</h2>
<!-- List other sections similarly -->

<h3>1. Introduction</h3>
<p>This guide provides comprehensive instructions for connecting...</p>

<div class="code-block">
<pre><code>ssh pi@revpi1234.local</code></pre>
<button class="copy-btn">Copy</button>
</div>
<!-- Repeat for other sections -->
</div>

<script src="script.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// script.js
document.querySelectorAll('.copy-btn').forEach(button => {
button.addEventListener('click', function() {
const code = this.previousElementSibling.textContent;
navigator.clipboard.writeText(code).then(() => {
button.textContent = 'Copied!';
setTimeout(() => {
button.textContent = 'Copy';
}, 2000);
});
});
});
37 changes: 37 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* styles.css */
body {
font-family: Arial, sans-serif;
}

h1, h2, h3 {
color: #333;
}

.code-block {
position: relative;
background-color: #333;
color: #fff;
padding: 10px;
border-radius: 5px;
margin: 10px 0;
}

code {
font-family: monospace;
}

.copy-btn {
position: absolute;
right: 10px;
top: 10px;
padding: 5px 10px;
border: none;
border-radius: 5px;
cursor: pointer;
color: #333;
background-color: #fff;
}

.copy-btn:hover {
background-color: #eee;
}

0 comments on commit d1f9250

Please sign in to comment.