Skip to content

Commit 3761a5f

Browse files
committed
fix(ui): Resolves Issue #617 by stripping rogue local CSS overrides in project.js and mapping the input and button to the standardized .number-input and .btn-primary utility classes.
1 parent 02131ee commit 3761a5f

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

web-app/js/projects.js

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,15 +1503,15 @@ function initCollatz() {
15031503
generateSequence();
15041504
}
15051505

1506-
function getArmstrongHTML() {
1506+
function getArmstrongHTML() {
15071507
return `
15081508
<div class="project-content">
15091509
<h2>💎 Armstrong Number Checker</h2>
15101510
<p class="project-desc">Check if a number equals the sum of its digits raised to the power of the number of digits</p>
15111511
<div class="armstrong-container">
15121512
<div class="input-section">
1513-
<input type="number" id="armstrongNumber" placeholder="Enter a number" min="0">
1514-
<button class="btn-check" id="checkArmstrong">💎 Check</button>
1513+
<input type="number" class="number-input" id="armstrongNumber" placeholder="Enter a number" min="0">
1514+
<button class="btn-primary" id="checkArmstrong">💎 Check</button>
15151515
</div>
15161516
15171517
<div class="result-display" id="armstrongResult"></div>
@@ -1641,10 +1641,52 @@ function getArmstrongHTML() {
16411641
border-color: var(--primary-color);
16421642
transform: translateY(-2px);
16431643
}
1644+
1645+
/* --- NEW STANDARDIZED INPUT STYLES --- */
1646+
.input-section {
1647+
display: flex;
1648+
justify-content: center;
1649+
align-items: center;
1650+
gap: 1rem;
1651+
margin-top: 1rem;
1652+
}
1653+
1654+
.number-input {
1655+
width: 60%;
1656+
padding: 0.8rem 1.2rem;
1657+
border-radius: 10px;
1658+
border: 2px solid var(--border-color);
1659+
font-size: 1.1rem;
1660+
background-color: var(--bg-color);
1661+
color: var(--text-color);
1662+
transition: var(--transition);
1663+
}
1664+
1665+
.number-input:focus {
1666+
outline: none;
1667+
border-color: var(--primary-color);
1668+
box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
1669+
}
1670+
1671+
.btn-primary {
1672+
padding: 0.8rem 1.5rem;
1673+
border: none;
1674+
border-radius: 10px;
1675+
background: var(--primary-color);
1676+
color: white;
1677+
cursor: pointer;
1678+
font-size: 1.1rem;
1679+
font-weight: bold;
1680+
transition: var(--transition);
1681+
}
1682+
1683+
.btn-primary:hover {
1684+
transform: translateY(-2px);
1685+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
1686+
}
16441687
</style>
16451688
`;
16461689
}
1647-
16481690
function initArmstrong() {
16491691
const numberInput = document.getElementById('armstrongNumber');
16501692
const checkBtn = document.getElementById('checkArmstrong');

0 commit comments

Comments
 (0)