Skip to content

Commit

Permalink
feat(client): intro styling
Browse files Browse the repository at this point in the history
  • Loading branch information
st-vi committed Dec 12, 2023
1 parent 0047259 commit e35f209
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WebSocketClient/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<h1>UVL Playground</h1>
<h2 id="connection" style="color: red;"></h2>
</div>
<button id="tutorialButton">Give me a quick tutorial!</button>
<button class="tutorial-button" id="tutorialButton">?</button>
<div>
<dialog id="dialog">
<div>
Expand Down
3 changes: 3 additions & 0 deletions WebSocketClient/src/intro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export const initIntroJS = () => {
});

button?.addEventListener("click", () => {
intro.setOption("exitOnOverlayClick", false);
intro.setOption("overlayOpacity", 0);
intro.setOption("disableInteraction", true);
intro.start();
});

Expand Down
21 changes: 20 additions & 1 deletion WebSocketClient/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,23 @@ a:active {
color: #ff4040;
text-decoration: none;
font-weight: normal;
}
}

.tutorial-button {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #bdc3c7; /* Light gray color for dark mode */
color: #34495e; /* Dark text color for dark mode */
border: none;
border-radius: 50%;
padding: 15px;
font-size: 24px;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}

.tutorial-button:hover {
background-color: #95a5a6; /* Darker gray on hover for dark mode */
}

0 comments on commit e35f209

Please sign in to comment.