|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en"> |
| 3 | + |
3 | 4 | <head> |
4 | 5 | <meta charset="UTF-8"> |
5 | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 7 | <title>Advanced Whiteboard</title> |
7 | 8 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" /> |
8 | 9 | <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet"> |
9 | 10 | <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet"> |
| 11 | + <link rel="stylesheet" href="style.css"> |
10 | 12 | <style> |
11 | | - body { |
12 | | - font-family: 'Poppins', sans-serif; |
13 | | - margin: 0; |
14 | | - padding: 0; |
15 | | - background: #f9f9f9; |
16 | | - } |
17 | | - |
18 | | - nav.navbar { |
19 | | - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); |
20 | | - } |
21 | | - |
22 | | - #side-menu { |
23 | | - background-color: #ffffff; |
24 | | - width: 100px; |
25 | | - box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); |
26 | | - padding: 20px 10px; |
27 | | - } |
28 | | - |
29 | | - #side-menu button { |
30 | | - display: block; |
31 | | - width: 60%; |
32 | | - margin: 10px auto; |
33 | | - padding: 12px 15px; |
34 | | - border: 1px solid #ddd; |
35 | | - background: #f8f9fa; |
36 | | - border-radius: 5px; |
37 | | - text-align: left; |
38 | | - font-size: 16px; |
39 | | - cursor: pointer; |
40 | | - transition: all 0.3s ease; |
41 | | - } |
42 | | - |
43 | | - #side-menu button:hover { |
44 | | - background-color: #e7eaf3; |
45 | | - } |
46 | | - |
47 | | - #side-menu button.active { |
48 | | - background-color: #0d6efd; |
49 | | - color: #fff; |
50 | | - } |
51 | | - |
52 | | - .tool-options { |
53 | | - display: none; |
54 | | - margin: 10px; |
55 | | - } |
56 | | - |
57 | | - .tool-options.active { |
58 | | - display: block; |
59 | | - } |
60 | | - |
61 | | - #whiteboard { |
62 | | - border: 2px solid #e9ecef; |
63 | | - border-radius: 10px; |
64 | | - background: #ffffff; |
65 | | - max-width: 100%; |
66 | | - max-height: 100%; |
67 | | - cursor: crosshair; |
68 | | - } |
69 | | - |
70 | | - footer { |
71 | | - background-color: #0d6efd; |
72 | | - color: white; |
73 | | - text-align: center; |
74 | | - padding: 10px 0; |
75 | | - } |
76 | | - |
77 | | - /* Responsive Design */ |
78 | | - @media (max-width: 768px) { |
79 | | - #side-menu { |
80 | | - width: 100px; |
81 | | - } |
82 | | - |
83 | | - #side-menu button { |
84 | | - font-size: 12px; |
85 | | - padding: 8px 10px; |
86 | | - } |
87 | | - } |
| 13 | + /* Add your CSS from above */ |
88 | 14 | </style> |
89 | 15 | </head> |
| 16 | + |
90 | 17 | <body> |
91 | | - <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> |
| 18 | + <!-- Navbar --> |
| 19 | + <nav class="navbar navbar-expand-lg"> |
92 | 20 | <div class="container-fluid"> |
93 | 21 | <a class="navbar-brand" href="#">Whiteboard</a> |
94 | 22 | </div> |
95 | 23 | </nav> |
96 | 24 |
|
| 25 | + <!-- Layout --> |
97 | 26 | <div class="d-flex vh-100"> |
98 | 27 | <!-- Sidebar --> |
99 | | - <div id="side-menu"> |
100 | | - <button id="pointer-tool" class="active" data-tool="pointer" title="Pointer Tool" onclick="setTool('pointer')"> |
| 28 | + <aside id="side-menu"> |
| 29 | + <button id="pointer-tool" class="active" data-tool="pointer" aria-label="Pointer Tool" onclick="setTool('pointer')"> |
101 | 30 | <i class="fas fa-mouse-pointer"></i> |
102 | 31 | </button> |
103 | | - <button id="pen-tool" data-tool="pen" title="Pen Tool" onclick="setTool('pen')"> |
| 32 | + <button id="pen-tool" data-tool="pen" aria-label="Pen Tool" onclick="setTool('pen')"> |
104 | 33 | <i class="fas fa-pen"></i> |
105 | 34 | </button> |
106 | | - <button id="eraser-tool" data-tool="eraser" title="Eraser Tool" onclick="setTool('eraser')"> |
| 35 | + <button id="eraser-tool" data-tool="eraser" aria-label="Eraser Tool" onclick="setTool('eraser')"> |
107 | 36 | <i class="fas fa-eraser"></i> |
108 | 37 | </button> |
109 | | - <button id="text-tool" data-tool="text" title="Add Text" onclick="setTool('text')"> |
| 38 | + <button id="text-tool" data-tool="text" aria-label="Text Tool" onclick="setTool('text')"> |
110 | 39 | <i class="fas fa-font"></i> |
111 | 40 | </button> |
112 | | - <button id="line-tool" data-tool="line" title="Draw Line" onclick="setTool('line')"> |
| 41 | + <button id="line-tool" data-tool="line" aria-label="Line Tool" onclick="setTool('line')"> |
113 | 42 | <i class="fas fa-minus"></i> |
114 | 43 | </button> |
115 | | - <button id="rectangle-tool" data-tool="rectangle" title="Draw Rectangle" onclick="setTool('rectangle')"> |
| 44 | + <button id="rectangle-tool" data-tool="rectangle" aria-label="Rectangle Tool" onclick="setTool('rectangle')"> |
116 | 45 | <i class="far fa-square"></i> |
117 | 46 | </button> |
118 | | - <button id="circle-tool" data-tool="circle" title="Draw Circle" onclick="setTool('circle')"> |
| 47 | + <button id="circle-tool" data-tool="circle" aria-label="Circle Tool" onclick="setTool('circle')"> |
119 | 48 | <i class="far fa-circle"></i> |
120 | 49 | </button> |
121 | | - <button id="save-button" title="Save Your Work" onclick="saveWork()"> |
| 50 | + <button id="save-button" aria-label="Save Work" onclick="saveWork()"> |
122 | 51 | <i class="fas fa-save"></i> |
123 | 52 | </button> |
124 | | - <button id="upload-button" title="Upload Image" onclick="uploadImage()"> |
| 53 | + <button id="upload-button" aria-label="Upload Image" onclick="uploadImage()"> |
125 | 54 | <i class="fas fa-upload"></i> |
126 | 55 | </button> |
127 | | - <button id="fullscreen-button" title="Toggle Fullscreen" onclick="toggleFullscreen()"> |
| 56 | + <button id="fullscreen-button" aria-label="Toggle Fullscreen" onclick="toggleFullscreen()"> |
128 | 57 | <i class="fas fa-expand"></i> |
129 | 58 | </button> |
130 | | - |
131 | | - </div> |
| 59 | + </aside> |
132 | 60 |
|
133 | 61 | <!-- Main Content --> |
134 | | - <div class="flex-grow-1 d-flex flex-column"> |
135 | | - <!-- Dynamic Options --> |
136 | | - <div id="tool-options-container" class="p-3 bg-light"> |
| 62 | + <main class="flex-grow-1 d-flex flex-column"> |
| 63 | + <!-- Dynamic Tool Options --> |
| 64 | + <section id="tool-options-container" class="p-3 bg-light"> |
137 | 65 | <div id="pen-options" class="tool-options active"> |
138 | | - <label>Pen Size: <input type="range" id="pen-size" min="2" max="50" value="10"></label> |
139 | | - <label>Pen Color: <input type="color" id="pen-color" value="#000000"></label> |
| 66 | + <label for="pen-size">Pen Size:</label> |
| 67 | + <input type="range" id="pen-size" min="2" max="50" value="10"> |
| 68 | + <label for="pen-color">Pen Color:</label> |
| 69 | + <input type="color" id="pen-color" value="#000000"> |
140 | 70 | </div> |
141 | 71 |
|
142 | 72 | <div id="eraser-options" class="tool-options"> |
143 | | - <label>Eraser Size: <input type="range" id="eraser-size" min="2" max="50" value="20"></label> |
| 73 | + <label for="eraser-size">Eraser Size:</label> |
| 74 | + <input type="range" id="eraser-size" min="2" max="50" value="20"> |
144 | 75 | </div> |
145 | 76 |
|
146 | 77 | <div id="text-options" class="tool-options"> |
147 | | - <label>Font Size: <input type="number" id="font-size" value="20" min="10" max="100"></label> |
| 78 | + <label for="font-size">Font Size:</label> |
| 79 | + <input type="number" id="font-size" value="20" min="10" max="100"> |
148 | 80 | </div> |
149 | | - </div> |
| 81 | + </section> |
150 | 82 |
|
151 | 83 | <!-- Whiteboard Canvas --> |
152 | | - <div class="flex-grow-1 d-flex justify-content-center align-items-center"> |
| 84 | + <section class="flex-grow-1 d-flex justify-content-center align-items-center"> |
153 | 85 | <canvas id="whiteboard"></canvas> |
154 | | - </div> |
155 | | - </div> |
| 86 | + </section> |
| 87 | + </main> |
156 | 88 | </div> |
157 | 89 |
|
158 | | - <footer> |
159 | | - <h6>Whiteboard | Made with ❤️ by <a href="https://github.com/skvprogrammer" style="color:black!important;">SKV</a></h6> |
| 90 | + <!-- Footer --> |
| 91 | + <footer class="mt-auto"> |
| 92 | + <div class="container text-center py-2"> |
| 93 | + <h6>Whiteboard | Made with ❤️ by <a href="https://github.com/skvprogrammer" class="text-light">SKV</a></h6> |
| 94 | + </div> |
160 | 95 | </footer> |
161 | 96 |
|
162 | 97 | <script src="script.js"></script> |
163 | 98 | </body> |
| 99 | + |
164 | 100 | </html> |
0 commit comments