User:Euphoria/common.js: Difference between revisions
From Test Wiki
Content deleted Content added
fix |
fix |
||
| Line 11: | Line 11: | ||
const container = document.createElement('span'); |
const container = document.createElement('span'); |
||
container.style.marginLeft = ' |
container.style.marginLeft = '8px'; |
||
const actions = [ |
const actions = [ |
||
| Line 22: | Line 22: | ||
const btn = document.createElement('button'); |
const btn = document.createElement('button'); |
||
btn.textContent = actionObj.name.charAt(0).toUpperCase() + actionObj.name.slice(1); |
btn.textContent = actionObj.name.charAt(0).toUpperCase() + actionObj.name.slice(1); |
||
| ⚫ | |||
// Small, compact styling |
|||
btn.style. |
btn.style.marginRight = '3px'; |
||
| ⚫ | |||
btn.style.padding = '1px 4px'; |
|||
btn.style.border = 'none'; |
btn.style.border = 'none'; |
||
btn.style.borderRadius = '3px'; |
btn.style.borderRadius = '3px'; |
||
| Line 30: | Line 32: | ||
btn.style.color = '#fff'; |
btn.style.color = '#fff'; |
||
btn.style.cursor = 'pointer'; |
btn.style.cursor = 'pointer'; |
||
btn.style.verticalAlign = 'middle'; |
|||
btn.style.transition = '0.2s'; // smooth hover transition |
|||
// Hover effect |
|||
btn.addEventListener('mouseenter', function() { |
|||
btn.style.filter = 'brightness(1.2)'; |
|||
}); |
|||
btn.addEventListener('mouseleave', function() { |
|||
btn.style.filter = 'brightness(1)'; |
|||
}); |
|||
btn.addEventListener('click', function(e) { |
btn.addEventListener('click', function(e) { |
||