Changeset 3274842
- Timestamp:
- 04/16/2025 02:16:29 PM (10 months ago)
- Location:
- codeart-units-converter
- Files:
-
- 8 deleted
- 4 edited
- 17 copied
-
tags/2.4.0 (copied) (copied from codeart-units-converter/trunk)
-
tags/2.4.0/admin/admin.php (deleted)
-
tags/2.4.0/admin/include (deleted)
-
tags/2.4.0/codeart-units-converter.php (copied) (copied from codeart-units-converter/trunk/codeart-units-converter.php) (2 diffs)
-
tags/2.4.0/include/activate.php (deleted)
-
tags/2.4.0/include/ajax.php (deleted)
-
tags/2.4.0/include/calc (deleted)
-
tags/2.4.0/include/common.php (copied) (copied from codeart-units-converter/trunk/include/common.php)
-
tags/2.4.0/include/converter (copied) (copied from codeart-units-converter/trunk/include/converter)
-
tags/2.4.0/include/converter/area/area.php (copied) (copied from codeart-units-converter/trunk/include/converter/area/area.php)
-
tags/2.4.0/include/converter/convert.php (copied) (copied from codeart-units-converter/trunk/include/converter/convert.php)
-
tags/2.4.0/include/converter/speed/speed.php (copied) (copied from codeart-units-converter/trunk/include/converter/speed/speed.php)
-
tags/2.4.0/include/converter/weight/weight.php (copied) (copied from codeart-units-converter/trunk/include/converter/weight/weight.php)
-
tags/2.4.0/include/deactivate.php (deleted)
-
tags/2.4.0/include/install (copied) (copied from codeart-units-converter/trunk/include/install)
-
tags/2.4.0/include/shortcodes.php (copied) (copied from codeart-units-converter/trunk/include/shortcodes.php)
-
tags/2.4.0/include/units-array (deleted)
-
tags/2.4.0/include/updates/list-updates.php (copied) (copied from codeart-units-converter/trunk/include/updates/list-updates.php)
-
tags/2.4.0/include/updates/update-2.0.0.php (copied) (copied from codeart-units-converter/trunk/include/updates/update-2.0.0.php)
-
tags/2.4.0/include/updates/update-2.2.0.php (copied) (copied from codeart-units-converter/trunk/include/updates/update-2.2.0.php)
-
tags/2.4.0/include/updates/update-2.3.0.php (copied) (copied from codeart-units-converter/trunk/include/updates/update-2.3.0.php)
-
tags/2.4.0/readme.txt (copied) (copied from codeart-units-converter/trunk/readme.txt) (1 diff)
-
tags/2.4.0/templates/admin/about.htm (modified) (16 diffs)
-
tags/2.4.0/templates/user/units/list/container.htm (copied) (copied from codeart-units-converter/trunk/templates/user/units/list/container.htm)
-
tags/2.4.0/templates/user/units/list/item.htm (copied) (copied from codeart-units-converter/trunk/templates/user/units/list/item.htm)
-
tags/2.4.0/units (deleted)
-
trunk/codeart-units-converter.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates/admin/about.htm (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codeart-units-converter/tags/2.4.0/codeart-units-converter.php
r3274766 r3274842 10 10 * Text Domain: codeart-units-converter 11 11 * Domain Path: /i18n/languages/ 12 * Version: 2. 3.012 * Version: 2.4.0 13 13 * Tested up to: 6.8.0 14 14 */ … … 19 19 } 20 20 21 $codeart_units_converter_version = '2. 3.0';21 $codeart_units_converter_version = '2.4.0'; 22 22 23 23 /** -
codeart-units-converter/tags/2.4.0/readme.txt
r3274766 r3274842 6 6 Requires PHP: 7.0 7 7 Tested up to: 6.8.0 8 Stable tag: 2. 3.08 Stable tag: 2.4.0 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
codeart-units-converter/tags/2.4.0/templates/admin/about.htm
r3271766 r3274842 6 6 --card-background: #ffffff; 7 7 --text-color: #1f2937; 8 --text-muted: #6b7280; 8 --text-muted: #4b5563; 9 /* Darkened for better contrast */ 9 10 --border-color: #e5e7eb; 10 11 --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 11 12 --transition: all 0.3s ease; 13 --spacing-sm: 8px; 14 --spacing-md: 16px; 15 --spacing-lg: 24px; 16 --spacing-xl: 32px; 17 --radius: 10px; 18 /* Standardized border radius */ 19 } 20 /* Dark mode support */ 21 22 @media (prefers-color-scheme: dark) { 23 :root { 24 --background-color: #1f2937; 25 --card-background: #374151; 26 --text-color: #f8fafc; 27 --text-muted: #d1d5db; 28 --border-color: #4b5563; 29 } 30 .codeart-table tr:hover { 31 background: #4b5563; 32 } 12 33 } 13 34 14 35 .codeart-dashboard { 15 36 background: var(--background-color); 16 padding: 40px;37 padding: var(--spacing-xl); 17 38 max-width: 1280px; 18 39 margin: 20px auto; … … 22 43 23 44 .codeart-dashboard h1 { 24 font-size: 2.0rem; 45 font-size: 2.25rem; 46 /* Increased for better hierarchy */ 25 47 font-weight: 700; 26 48 color: #ffffff; 27 background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); 28 padding: 12px; 29 border-radius: 12px; 49 background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(30, 58, 138, 0.9)); 50 /* Softer gradient */ 51 padding: var(--spacing-md) var(--spacing-lg); 52 border-radius: var(--radius); 30 53 text-align: center; 31 margin-bottom: 32px;54 margin-bottom: var(--spacing-xl); 32 55 box-shadow: var(--shadow); 33 56 transition: var(--transition); 57 letter-spacing: 0.02em; 34 58 } 35 59 … … 38 62 font-weight: 600; 39 63 color: var(--text-color); 40 margin: 40px 0 16px;64 margin: var(--spacing-xl) 0 var(--spacing-md); 41 65 position: relative; 66 display: flex; 67 justify-content: space-between; 68 align-items: center; 42 69 } 43 70 … … 55 82 font-size: 1rem; 56 83 color: var(--text-muted); 57 margin-bottom: 24px;58 } 59 60 .codeart-dashboard b{84 margin-bottom: var(--spacing-lg); 85 } 86 87 .codeart-dashboard strong { 61 88 color: var(--text-color); 62 89 font-weight: 600; 63 90 } 91 /* Search Bar */ 92 93 .search-bar { 94 width: 100%; 95 padding: var(--spacing-md); 96 border: 1px solid var(--border-color); 97 border-radius: var(--radius); 98 font-size: 1rem; 99 margin-bottom: var(--spacing-lg); 100 } 64 101 /* Card Layout */ 65 102 66 103 .codeart-section { 67 104 background: var(--card-background); 68 padding: 24px;69 border-radius: 12px;105 padding: var(--spacing-lg); 106 border-radius: var(--radius); 70 107 box-shadow: var(--shadow); 71 margin-bottom: 32px;108 margin-bottom: var(--spacing-xl); 72 109 transition: var(--transition); 73 110 } … … 77 114 box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); 78 115 } 116 117 .section-content[hidden] { 118 display: none; 119 } 120 121 .toggle-btn { 122 background: none; 123 border: none; 124 color: var(--primary-color); 125 cursor: pointer; 126 font-size: 0.9rem; 127 padding: var(--spacing-sm); 128 } 129 130 .toggle-btn:hover { 131 text-decoration: underline; 132 } 79 133 /* Table Styling */ 80 134 … … 82 136 width: 100%; 83 137 border-collapse: collapse; 84 margin-top: 16px;138 margin-top: var(--spacing-md); 85 139 background: var(--card-background); 86 border-radius: 8px;140 border-radius: var(--radius); 87 141 overflow: hidden; 88 142 } … … 90 144 .codeart-table th, 91 145 .codeart-table td { 92 padding: 16px;146 padding: var(--spacing-md); 93 147 text-align: left; 94 148 font-size: 0.95rem; … … 99 153 background: var(--background-color); 100 154 font-weight: 600; 101 color: var(--text-color);102 155 border-bottom: 2px solid var(--border-color); 103 156 } … … 113 166 114 167 .codeart-table tr:hover { 115 background: #eff6ff; 168 background: #dbeafe; 169 /* More distinct hover */ 170 border-left: 3px solid var(--primary-color); 116 171 } 117 172 … … 120 175 color: var(--text-muted); 121 176 font-style: normal; 177 } 178 179 .copyable { 180 cursor: pointer; 181 background: #f1f5f9; 182 padding: 4px 8px; 183 border-radius: 4px; 184 display: inline-block; 185 } 186 187 .copy-btn { 188 background: var(--primary-color); 189 color: #fff; 190 border: none; 191 padding: 6px 12px; 192 border-radius: 6px; 193 cursor: pointer; 194 font-size: 0.85rem; 195 margin-left: var(--spacing-sm); 196 } 197 198 .copy-btn:hover { 199 background: var(--secondary-color); 122 200 } 123 201 /* Buttons and Links */ … … 128 206 background: var(--primary-color); 129 207 color: #ffffff; 130 padding: 1 2px 24px;131 border-radius: 8px;208 padding: 14px 28px; 209 border-radius: var(--radius); 132 210 text-decoration: none; 133 211 font-weight: 500; 134 font-size: 1 rem;212 font-size: 1.1rem; 135 213 transition: var(--transition); 136 margin-top: 16px;214 margin-top: var(--spacing-md); 137 215 } 138 216 … … 143 221 } 144 222 223 .codeart-dashboard .action-link:focus { 224 outline: 2px solid var(--primary-color); 225 outline-offset: 2px; 226 } 227 228 .codeart-dashboard .action-link:disabled { 229 background: var(--text-muted); 230 cursor: not-allowed; 231 transform: none; 232 box-shadow: none; 233 } 234 145 235 .codeart-dashboard .action-link svg { 146 margin-left: 8px;236 margin-left: var(--spacing-sm); 147 237 width: 16px; 148 238 height: 16px; … … 152 242 @media screen and (max-width: 768px) { 153 243 .codeart-dashboard { 154 padding: 24px;244 padding: var(--spacing-lg); 155 245 } 156 246 .codeart-dashboard h1 { 157 font-size: 1.75rem;158 padding: 16px;247 font-size: 2rem; 248 padding: var(--spacing-md); 159 249 } 160 250 .codeart-dashboard h2 { … … 164 254 .codeart-table td { 165 255 font-size: 0.85rem; 166 padding: 12px;256 padding: var(--spacing-sm); 167 257 } 168 258 .codeart-section { 169 padding: 16px; 259 padding: var(--spacing-md); 260 } 261 .codeart-dashboard .action-link { 262 padding: 16px 32px; 263 min-height: 48px; 170 264 } 171 265 } … … 174 268 .codeart-table { 175 269 display: block; 176 overflow-x: auto; 270 } 271 .codeart-table thead { 272 display: none; 273 } 274 .codeart-table tr { 275 display: block; 276 margin-bottom: var(--spacing-lg); 277 border: 1px solid var(--border-color); 278 border-radius: var(--radius); 279 padding: var(--spacing-md); 280 } 281 .codeart-table td { 282 display: block; 283 text-align: left; 284 padding: var(--spacing-sm) 0; 285 border: none; 286 } 287 .codeart-table td::before { 288 content: attr(data-label); 289 font-weight: 600; 290 color: var(--text-color); 291 display: block; 292 margin-bottom: var(--spacing-sm); 177 293 } 178 294 .codeart-dashboard .action-link { 179 295 width: 100%; 180 296 justify-content: center; 297 padding: 16px; 181 298 } 182 299 } … … 186 303 <h1>CodeArt Units Converter – Dashboard</h1> 187 304 305 <input type="text" class="search-bar" placeholder="Search converters or calculators..." /> 306 188 307 <div class="codeart-section"> 189 <p>Welcome to <strong>CodeArt Units Converter</strong>! Easily integrate powerful unit converters and calculators into your WordPress site using simple shortcodes.</p> 308 <div class="section-content"> 309 <p>Welcome to <strong>CodeArt Units Converter</strong>! Easily integrate powerful unit converters and calculators into your WordPress site using simple shortcodes.</p> 310 </div> 190 311 </div> 191 312 192 313 <div class="codeart-section"> 193 <h2>Converters</h2> 194 <p>Add these shortcodes to any page or post to display unit converters:</p> 195 <table class="codeart-table" role="grid"> 196 <thead> 197 <tr> 198 <th scope="col">Converter</th> 199 <th scope="col">Shortcode</th> 200 <th scope="col">Description</th> 201 </tr> 202 </thead> 203 <tbody> 204 <tr> 205 <td>Weight</td> 206 <td><code>[codeart_units_converter_weight]</code></td> 207 <td class="description">Converts between units like kilograms, pounds, ounces, and grams.</td> 208 </tr> 209 <tr> 210 <td>Speed</td> 211 <td><code>[codeart_units_converter_speed]</code></td> 212 <td class="description">Converts between meters per second, kilometers per hour, miles per hour, and knots.</td> 213 </tr> 214 <tr> 215 <td>Area</td> 216 <td><code>[codeart_units_converter_area]</code></td> 217 <td class="description">Converts between square meters, square feet, acres, and square kilometers.</td> 218 </tr> 219 </tbody> 220 </table> 314 <h2>Converters <button class="toggle-btn" aria-expanded="true">Hide</button></h2> 315 <div class="section-content"> 316 <p>Add these shortcodes to any page or post to display unit converters:</p> 317 <table class="codeart-table" role="grid"> 318 <thead> 319 <tr> 320 <th scope="col">Converter</th> 321 <th scope="col">Shortcode</th> 322 <th scope="col">Description</th> 323 </tr> 324 </thead> 325 <tbody> 326 <tr> 327 <td data-label="Converter">Weight</td> 328 <td data-label="Shortcode"> 329 <strong>Table</strong><br> 330 <code class="copyable">[codeart_units_converter_converters type='weight' style='table']</code> 331 <button class="copy-btn">Copy</button><br> 332 <strong>List</strong><br> 333 <code class="copyable">[codeart_units_converter_converters type='weight' style='list']</code> 334 <button class="copy-btn">Copy</button> 335 </td> 336 <td data-label="Description" class="description">Converts between units like kilograms, pounds, ounces, and grams.</td> 337 </tr> 338 <tr> 339 <td data-label="Converter">Speed</td> 340 <td data-label="Shortcode"> 341 <strong>Table</strong><br> 342 <code class="copyable">[codeart_units_converter_converters type='speed' style='table']</code> 343 <button class="copy-btn">Copy</button><br> 344 <strong>List</strong><br> 345 <code class="copyable">[codeart_units_converter_converters type='speed' style='list']</code> 346 <button class="copy-btn">Copy</button> 347 </td> 348 <td data-label="Description" class="description">Converts between meters per second, kilometers per hour, miles per hour, and knots.</td> 349 </tr> 350 <tr> 351 <td data-label="Converter">Area</td> 352 <td data-label="Shortcode"> 353 <strong>Table</strong><br> 354 <code class="copyable">[codeart_units_converter_converters type='area' style='table']</code> 355 <button class="copy-btn">Copy</button><br> 356 <strong>List</strong><br> 357 <code class="copyable">[codeart_units_converter_converters type='area' style='list']</code> 358 <button class="copy-btn">Copy</button> 359 </td> 360 <td data-label="Description" class="description">Converts between square meters, square feet, acres, and square kilometers.</td> 361 </tr> 362 </tbody> 363 </table> 364 </div> 221 365 </div> 222 366 223 367 <div class="codeart-section"> 224 <h2>Calculators</h2> 225 <p>Embed these calculators for quick arithmetic or advanced computations:</p> 226 <table class="codeart-table" role="grid"> 227 <thead> 228 <tr> 229 <th scope="col">Calculator</th> 230 <th scope="col">Shortcode</th> 231 <th scope="col">Description</th> 232 </tr> 233 </thead> 234 <tbody> 235 <tr> 236 <td>Basic Calculator</td> 237 <td><code>[codeart_units_converter_basic_calculator]</code></td> 238 <td class="description">A user-friendly calculator for addition, subtraction, multiplication, and division.</td> 239 </tr> 240 <tr> 241 <td>Scientific Calculator</td> 242 <td><code>[codeart_units_converter_scientific_calculator]</code></td> 243 <td class="description">Supports trigonometric functions, logarithms, exponentiation, and more.</td> 244 </tr> 245 </tbody> 246 </table> 368 <h2>Calculators <button class="toggle-btn" aria-expanded="true">Hide</button></h2> 369 <div class="section-content"> 370 <p>Embed these calculators for quick arithmetic or advanced computations:</p> 371 <table class="codeart-table" role="grid"> 372 <thead> 373 <tr> 374 <th scope="col">Calculator</th> 375 <th scope="col">Shortcode</th> 376 <th scope="col">Description</th> 377 </tr> 378 </thead> 379 <tbody> 380 <tr> 381 <td data-label="Calculator">Basic Calculator</td> 382 <td data-label="Shortcode"> 383 <code class="copyable">[codeart_units_converter_basic_calculator]</code> 384 <button class="copy-btn">Copy</button> 385 </td> 386 <td data-label="Description" class="description">A user-friendly calculator for addition, subtraction, multiplication, and division.</td> 387 </tr> 388 <tr> 389 <td data-label="Calculator">Scientific Calculator</td> 390 <td data-label="Shortcode"> 391 <code class="copyable">[codeart_units_converter_scientific_calculator]</code> 392 <button class="copy-btn">Copy</button> 393 </td> 394 <td data-label="Description" class="description">Supports trigonometric functions, logarithms, exponentiation, and more.</td> 395 </tr> 396 </tbody> 397 </table> 398 </div> 247 399 </div> 248 400 249 <a href="#" class="action-link" >401 <a href="#" class="action-link" aria-label="Open Shortcodes Manager for CodeArt Units Converter"> 250 402 Shortcodes Manager 251 <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" >403 <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" title="Arrow icon"> 252 404 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path> 253 405 </svg> 254 406 </a> 255 256 407 </div> 408 409 <script> 410 // Copy to Clipboard 411 document.querySelectorAll('.copy-btn').forEach(btn => { 412 btn.addEventListener('click', () => { 413 const code = btn.previousElementSibling.textContent; 414 navigator.clipboard.writeText(code); 415 btn.textContent = 'Copied!'; 416 setTimeout(() => btn.textContent = 'Copy', 2000); 417 }); 418 }); 419 420 // Collapsible Sections 421 document.querySelectorAll('.toggle-btn').forEach(btn => { 422 btn.addEventListener('click', () => { 423 const content = btn.closest('.codeart-section').querySelector('.section-content'); 424 content.toggleAttribute('hidden'); 425 const isExpanded = !content.hasAttribute('hidden'); 426 btn.setAttribute('aria-expanded', isExpanded); 427 btn.textContent = isExpanded ? 'Hide' : 'Show'; 428 }); 429 }); 430 431 // Search Functionality 432 document.querySelector('.search-bar').addEventListener('input', (e) => { 433 const term = e.target.value.toLowerCase(); 434 document.querySelectorAll('.codeart-section').forEach(section => { 435 const text = section.textContent.toLowerCase(); 436 section.style.display = text.includes(term) ? 'block' : 'none'; 437 }); 438 }); 439 </script> -
codeart-units-converter/trunk/codeart-units-converter.php
r3274766 r3274842 10 10 * Text Domain: codeart-units-converter 11 11 * Domain Path: /i18n/languages/ 12 * Version: 2. 3.012 * Version: 2.4.0 13 13 * Tested up to: 6.8.0 14 14 */ … … 19 19 } 20 20 21 $codeart_units_converter_version = '2. 3.0';21 $codeart_units_converter_version = '2.4.0'; 22 22 23 23 /** -
codeart-units-converter/trunk/readme.txt
r3274766 r3274842 6 6 Requires PHP: 7.0 7 7 Tested up to: 6.8.0 8 Stable tag: 2. 3.08 Stable tag: 2.4.0 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
codeart-units-converter/trunk/templates/admin/about.htm
r3271766 r3274842 6 6 --card-background: #ffffff; 7 7 --text-color: #1f2937; 8 --text-muted: #6b7280; 8 --text-muted: #4b5563; 9 /* Darkened for better contrast */ 9 10 --border-color: #e5e7eb; 10 11 --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 11 12 --transition: all 0.3s ease; 13 --spacing-sm: 8px; 14 --spacing-md: 16px; 15 --spacing-lg: 24px; 16 --spacing-xl: 32px; 17 --radius: 10px; 18 /* Standardized border radius */ 19 } 20 /* Dark mode support */ 21 22 @media (prefers-color-scheme: dark) { 23 :root { 24 --background-color: #1f2937; 25 --card-background: #374151; 26 --text-color: #f8fafc; 27 --text-muted: #d1d5db; 28 --border-color: #4b5563; 29 } 30 .codeart-table tr:hover { 31 background: #4b5563; 32 } 12 33 } 13 34 14 35 .codeart-dashboard { 15 36 background: var(--background-color); 16 padding: 40px;37 padding: var(--spacing-xl); 17 38 max-width: 1280px; 18 39 margin: 20px auto; … … 22 43 23 44 .codeart-dashboard h1 { 24 font-size: 2.0rem; 45 font-size: 2.25rem; 46 /* Increased for better hierarchy */ 25 47 font-weight: 700; 26 48 color: #ffffff; 27 background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); 28 padding: 12px; 29 border-radius: 12px; 49 background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(30, 58, 138, 0.9)); 50 /* Softer gradient */ 51 padding: var(--spacing-md) var(--spacing-lg); 52 border-radius: var(--radius); 30 53 text-align: center; 31 margin-bottom: 32px;54 margin-bottom: var(--spacing-xl); 32 55 box-shadow: var(--shadow); 33 56 transition: var(--transition); 57 letter-spacing: 0.02em; 34 58 } 35 59 … … 38 62 font-weight: 600; 39 63 color: var(--text-color); 40 margin: 40px 0 16px;64 margin: var(--spacing-xl) 0 var(--spacing-md); 41 65 position: relative; 66 display: flex; 67 justify-content: space-between; 68 align-items: center; 42 69 } 43 70 … … 55 82 font-size: 1rem; 56 83 color: var(--text-muted); 57 margin-bottom: 24px;58 } 59 60 .codeart-dashboard b{84 margin-bottom: var(--spacing-lg); 85 } 86 87 .codeart-dashboard strong { 61 88 color: var(--text-color); 62 89 font-weight: 600; 63 90 } 91 /* Search Bar */ 92 93 .search-bar { 94 width: 100%; 95 padding: var(--spacing-md); 96 border: 1px solid var(--border-color); 97 border-radius: var(--radius); 98 font-size: 1rem; 99 margin-bottom: var(--spacing-lg); 100 } 64 101 /* Card Layout */ 65 102 66 103 .codeart-section { 67 104 background: var(--card-background); 68 padding: 24px;69 border-radius: 12px;105 padding: var(--spacing-lg); 106 border-radius: var(--radius); 70 107 box-shadow: var(--shadow); 71 margin-bottom: 32px;108 margin-bottom: var(--spacing-xl); 72 109 transition: var(--transition); 73 110 } … … 77 114 box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); 78 115 } 116 117 .section-content[hidden] { 118 display: none; 119 } 120 121 .toggle-btn { 122 background: none; 123 border: none; 124 color: var(--primary-color); 125 cursor: pointer; 126 font-size: 0.9rem; 127 padding: var(--spacing-sm); 128 } 129 130 .toggle-btn:hover { 131 text-decoration: underline; 132 } 79 133 /* Table Styling */ 80 134 … … 82 136 width: 100%; 83 137 border-collapse: collapse; 84 margin-top: 16px;138 margin-top: var(--spacing-md); 85 139 background: var(--card-background); 86 border-radius: 8px;140 border-radius: var(--radius); 87 141 overflow: hidden; 88 142 } … … 90 144 .codeart-table th, 91 145 .codeart-table td { 92 padding: 16px;146 padding: var(--spacing-md); 93 147 text-align: left; 94 148 font-size: 0.95rem; … … 99 153 background: var(--background-color); 100 154 font-weight: 600; 101 color: var(--text-color);102 155 border-bottom: 2px solid var(--border-color); 103 156 } … … 113 166 114 167 .codeart-table tr:hover { 115 background: #eff6ff; 168 background: #dbeafe; 169 /* More distinct hover */ 170 border-left: 3px solid var(--primary-color); 116 171 } 117 172 … … 120 175 color: var(--text-muted); 121 176 font-style: normal; 177 } 178 179 .copyable { 180 cursor: pointer; 181 background: #f1f5f9; 182 padding: 4px 8px; 183 border-radius: 4px; 184 display: inline-block; 185 } 186 187 .copy-btn { 188 background: var(--primary-color); 189 color: #fff; 190 border: none; 191 padding: 6px 12px; 192 border-radius: 6px; 193 cursor: pointer; 194 font-size: 0.85rem; 195 margin-left: var(--spacing-sm); 196 } 197 198 .copy-btn:hover { 199 background: var(--secondary-color); 122 200 } 123 201 /* Buttons and Links */ … … 128 206 background: var(--primary-color); 129 207 color: #ffffff; 130 padding: 1 2px 24px;131 border-radius: 8px;208 padding: 14px 28px; 209 border-radius: var(--radius); 132 210 text-decoration: none; 133 211 font-weight: 500; 134 font-size: 1 rem;212 font-size: 1.1rem; 135 213 transition: var(--transition); 136 margin-top: 16px;214 margin-top: var(--spacing-md); 137 215 } 138 216 … … 143 221 } 144 222 223 .codeart-dashboard .action-link:focus { 224 outline: 2px solid var(--primary-color); 225 outline-offset: 2px; 226 } 227 228 .codeart-dashboard .action-link:disabled { 229 background: var(--text-muted); 230 cursor: not-allowed; 231 transform: none; 232 box-shadow: none; 233 } 234 145 235 .codeart-dashboard .action-link svg { 146 margin-left: 8px;236 margin-left: var(--spacing-sm); 147 237 width: 16px; 148 238 height: 16px; … … 152 242 @media screen and (max-width: 768px) { 153 243 .codeart-dashboard { 154 padding: 24px;244 padding: var(--spacing-lg); 155 245 } 156 246 .codeart-dashboard h1 { 157 font-size: 1.75rem;158 padding: 16px;247 font-size: 2rem; 248 padding: var(--spacing-md); 159 249 } 160 250 .codeart-dashboard h2 { … … 164 254 .codeart-table td { 165 255 font-size: 0.85rem; 166 padding: 12px;256 padding: var(--spacing-sm); 167 257 } 168 258 .codeart-section { 169 padding: 16px; 259 padding: var(--spacing-md); 260 } 261 .codeart-dashboard .action-link { 262 padding: 16px 32px; 263 min-height: 48px; 170 264 } 171 265 } … … 174 268 .codeart-table { 175 269 display: block; 176 overflow-x: auto; 270 } 271 .codeart-table thead { 272 display: none; 273 } 274 .codeart-table tr { 275 display: block; 276 margin-bottom: var(--spacing-lg); 277 border: 1px solid var(--border-color); 278 border-radius: var(--radius); 279 padding: var(--spacing-md); 280 } 281 .codeart-table td { 282 display: block; 283 text-align: left; 284 padding: var(--spacing-sm) 0; 285 border: none; 286 } 287 .codeart-table td::before { 288 content: attr(data-label); 289 font-weight: 600; 290 color: var(--text-color); 291 display: block; 292 margin-bottom: var(--spacing-sm); 177 293 } 178 294 .codeart-dashboard .action-link { 179 295 width: 100%; 180 296 justify-content: center; 297 padding: 16px; 181 298 } 182 299 } … … 186 303 <h1>CodeArt Units Converter – Dashboard</h1> 187 304 305 <input type="text" class="search-bar" placeholder="Search converters or calculators..." /> 306 188 307 <div class="codeart-section"> 189 <p>Welcome to <strong>CodeArt Units Converter</strong>! Easily integrate powerful unit converters and calculators into your WordPress site using simple shortcodes.</p> 308 <div class="section-content"> 309 <p>Welcome to <strong>CodeArt Units Converter</strong>! Easily integrate powerful unit converters and calculators into your WordPress site using simple shortcodes.</p> 310 </div> 190 311 </div> 191 312 192 313 <div class="codeart-section"> 193 <h2>Converters</h2> 194 <p>Add these shortcodes to any page or post to display unit converters:</p> 195 <table class="codeart-table" role="grid"> 196 <thead> 197 <tr> 198 <th scope="col">Converter</th> 199 <th scope="col">Shortcode</th> 200 <th scope="col">Description</th> 201 </tr> 202 </thead> 203 <tbody> 204 <tr> 205 <td>Weight</td> 206 <td><code>[codeart_units_converter_weight]</code></td> 207 <td class="description">Converts between units like kilograms, pounds, ounces, and grams.</td> 208 </tr> 209 <tr> 210 <td>Speed</td> 211 <td><code>[codeart_units_converter_speed]</code></td> 212 <td class="description">Converts between meters per second, kilometers per hour, miles per hour, and knots.</td> 213 </tr> 214 <tr> 215 <td>Area</td> 216 <td><code>[codeart_units_converter_area]</code></td> 217 <td class="description">Converts between square meters, square feet, acres, and square kilometers.</td> 218 </tr> 219 </tbody> 220 </table> 314 <h2>Converters <button class="toggle-btn" aria-expanded="true">Hide</button></h2> 315 <div class="section-content"> 316 <p>Add these shortcodes to any page or post to display unit converters:</p> 317 <table class="codeart-table" role="grid"> 318 <thead> 319 <tr> 320 <th scope="col">Converter</th> 321 <th scope="col">Shortcode</th> 322 <th scope="col">Description</th> 323 </tr> 324 </thead> 325 <tbody> 326 <tr> 327 <td data-label="Converter">Weight</td> 328 <td data-label="Shortcode"> 329 <strong>Table</strong><br> 330 <code class="copyable">[codeart_units_converter_converters type='weight' style='table']</code> 331 <button class="copy-btn">Copy</button><br> 332 <strong>List</strong><br> 333 <code class="copyable">[codeart_units_converter_converters type='weight' style='list']</code> 334 <button class="copy-btn">Copy</button> 335 </td> 336 <td data-label="Description" class="description">Converts between units like kilograms, pounds, ounces, and grams.</td> 337 </tr> 338 <tr> 339 <td data-label="Converter">Speed</td> 340 <td data-label="Shortcode"> 341 <strong>Table</strong><br> 342 <code class="copyable">[codeart_units_converter_converters type='speed' style='table']</code> 343 <button class="copy-btn">Copy</button><br> 344 <strong>List</strong><br> 345 <code class="copyable">[codeart_units_converter_converters type='speed' style='list']</code> 346 <button class="copy-btn">Copy</button> 347 </td> 348 <td data-label="Description" class="description">Converts between meters per second, kilometers per hour, miles per hour, and knots.</td> 349 </tr> 350 <tr> 351 <td data-label="Converter">Area</td> 352 <td data-label="Shortcode"> 353 <strong>Table</strong><br> 354 <code class="copyable">[codeart_units_converter_converters type='area' style='table']</code> 355 <button class="copy-btn">Copy</button><br> 356 <strong>List</strong><br> 357 <code class="copyable">[codeart_units_converter_converters type='area' style='list']</code> 358 <button class="copy-btn">Copy</button> 359 </td> 360 <td data-label="Description" class="description">Converts between square meters, square feet, acres, and square kilometers.</td> 361 </tr> 362 </tbody> 363 </table> 364 </div> 221 365 </div> 222 366 223 367 <div class="codeart-section"> 224 <h2>Calculators</h2> 225 <p>Embed these calculators for quick arithmetic or advanced computations:</p> 226 <table class="codeart-table" role="grid"> 227 <thead> 228 <tr> 229 <th scope="col">Calculator</th> 230 <th scope="col">Shortcode</th> 231 <th scope="col">Description</th> 232 </tr> 233 </thead> 234 <tbody> 235 <tr> 236 <td>Basic Calculator</td> 237 <td><code>[codeart_units_converter_basic_calculator]</code></td> 238 <td class="description">A user-friendly calculator for addition, subtraction, multiplication, and division.</td> 239 </tr> 240 <tr> 241 <td>Scientific Calculator</td> 242 <td><code>[codeart_units_converter_scientific_calculator]</code></td> 243 <td class="description">Supports trigonometric functions, logarithms, exponentiation, and more.</td> 244 </tr> 245 </tbody> 246 </table> 368 <h2>Calculators <button class="toggle-btn" aria-expanded="true">Hide</button></h2> 369 <div class="section-content"> 370 <p>Embed these calculators for quick arithmetic or advanced computations:</p> 371 <table class="codeart-table" role="grid"> 372 <thead> 373 <tr> 374 <th scope="col">Calculator</th> 375 <th scope="col">Shortcode</th> 376 <th scope="col">Description</th> 377 </tr> 378 </thead> 379 <tbody> 380 <tr> 381 <td data-label="Calculator">Basic Calculator</td> 382 <td data-label="Shortcode"> 383 <code class="copyable">[codeart_units_converter_basic_calculator]</code> 384 <button class="copy-btn">Copy</button> 385 </td> 386 <td data-label="Description" class="description">A user-friendly calculator for addition, subtraction, multiplication, and division.</td> 387 </tr> 388 <tr> 389 <td data-label="Calculator">Scientific Calculator</td> 390 <td data-label="Shortcode"> 391 <code class="copyable">[codeart_units_converter_scientific_calculator]</code> 392 <button class="copy-btn">Copy</button> 393 </td> 394 <td data-label="Description" class="description">Supports trigonometric functions, logarithms, exponentiation, and more.</td> 395 </tr> 396 </tbody> 397 </table> 398 </div> 247 399 </div> 248 400 249 <a href="#" class="action-link" >401 <a href="#" class="action-link" aria-label="Open Shortcodes Manager for CodeArt Units Converter"> 250 402 Shortcodes Manager 251 <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" >403 <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" title="Arrow icon"> 252 404 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path> 253 405 </svg> 254 406 </a> 255 256 407 </div> 408 409 <script> 410 // Copy to Clipboard 411 document.querySelectorAll('.copy-btn').forEach(btn => { 412 btn.addEventListener('click', () => { 413 const code = btn.previousElementSibling.textContent; 414 navigator.clipboard.writeText(code); 415 btn.textContent = 'Copied!'; 416 setTimeout(() => btn.textContent = 'Copy', 2000); 417 }); 418 }); 419 420 // Collapsible Sections 421 document.querySelectorAll('.toggle-btn').forEach(btn => { 422 btn.addEventListener('click', () => { 423 const content = btn.closest('.codeart-section').querySelector('.section-content'); 424 content.toggleAttribute('hidden'); 425 const isExpanded = !content.hasAttribute('hidden'); 426 btn.setAttribute('aria-expanded', isExpanded); 427 btn.textContent = isExpanded ? 'Hide' : 'Show'; 428 }); 429 }); 430 431 // Search Functionality 432 document.querySelector('.search-bar').addEventListener('input', (e) => { 433 const term = e.target.value.toLowerCase(); 434 document.querySelectorAll('.codeart-section').forEach(section => { 435 const text = section.textContent.toLowerCase(); 436 section.style.display = text.includes(term) ? 'block' : 'none'; 437 }); 438 }); 439 </script>
Note: See TracChangeset
for help on using the changeset viewer.