Skip to content

Commit 19374e7

Browse files
authored
Update README.md
1 parent 20c560f commit 19374e7

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,42 @@ The Calculator have features are as follows:
2828
# Usage
2929
Compile and run it
3030
<br>
31-
========> javac Calculator.java
31+
<!-- GitHub-style code block with Copy button -->
32+
<div style="
33+
position: relative;
34+
background-color: #1e1e1e;
35+
border-radius: 8px;
36+
padding: 1rem 1.2rem;
37+
font-family: 'Courier New', monospace;
38+
color: #e6edf3;
39+
line-height: 1.5;
40+
overflow-x: auto;
41+
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
42+
">
43+
<button
44+
onclick="navigator.clipboard.writeText('javac Calculator.java\njava Calculator')"
45+
style="
46+
position: absolute;
47+
top: 8px;
48+
right: 8px;
49+
background: #2d2d2d;
50+
color: #e6edf3;
51+
border: 1px solid #444c56;
52+
border-radius: 6px;
53+
padding: 4px 8px;
54+
font-size: 12px;
55+
cursor: pointer;
56+
transition: background 0.2s;
57+
"
58+
onmouseover="this.style.background='#3a3a3a'"
59+
onmouseout="this.style.background='#2d2d2d'"
60+
>
61+
Copy code
62+
</button>
63+
64+
<pre style="margin: 0;"><code style="color: #79c0ff;">javac</code> Calculator.java
65+
<code style="color: #79c0ff;">java</code> Calculator</pre>
66+
</div>
3267
<br>
3368
Follow the menu options in the calculator.
3469

0 commit comments

Comments
 (0)