MediaWiki:Common.js: Difference between revisions
Blanked the page Tags: Blanking Manual revert |
No edit summary |
||
| Line 1: | Line 1: | ||
$(document).ready(function() { | |||
// Create the header HTML | |||
var headerHTML = ` | |||
<div id="custom-header" style="background-color:#002f6c; color:white; padding:10px 20px; display:flex; align-items:center; justify-content:space-between;"> | |||
<div style="display:flex; align-items:center;"> | |||
<a href="/index.php?title=Main_Page"><img src="/images/YourLogo.png" alt="Logo" style="height: 40px; margin-right: 15px;"></a> | |||
<span style="font-size: 20px; font-weight: bold;">Transight Telematics Wiki</span> | |||
</div> | |||
<div> | |||
<input type="text" placeholder="Search..." style="padding:5px; border-radius:4px; border:none;" | |||
onkeydown="if (event.key === 'Enter') location.href='/index.php?search=' + this.value;"> | |||
</div> | |||
<div> | |||
<a href="/index.php?title=Special:UserLogin" style="color: white; margin-left: 20px;">Login</a> | |||
<a href="/index.php?title=Special:UserLogout" style="color: white; margin-left: 20px;">Logout</a> | |||
<a href="#" style="color: white; margin-left: 20px;">EN</a> | |||
</div> | |||
</div> | |||
`; | |||
// Insert header at the top of the content | |||
$('#content').before(headerHTML); | |||
}); | |||
Revision as of 12:58, 18 June 2025
$(document).ready(function() {
// Create the header HTML
var headerHTML = `
<div id="custom-header" style="background-color:#002f6c; color:white; padding:10px 20px; display:flex; align-items:center; justify-content:space-between;">
<div style="display:flex; align-items:center;">
<a href="/index.php?title=Main_Page"><img src="/images/YourLogo.png" alt="Logo" style="height: 40px; margin-right: 15px;"></a>
<span style="font-size: 20px; font-weight: bold;">Transight Telematics Wiki</span>
</div>
<div>
<input type="text" placeholder="Search..." style="padding:5px; border-radius:4px; border:none;"
onkeydown="if (event.key === 'Enter') location.href='/index.php?search=' + this.value;">
</div>
<div>
<a href="/index.php?title=Special:UserLogin" style="color: white; margin-left: 20px;">Login</a>
<a href="/index.php?title=Special:UserLogout" style="color: white; margin-left: 20px;">Logout</a>
<a href="#" style="color: white; margin-left: 20px;">EN</a>
</div>
</div>
`;
// Insert header at the top of the content
$('#content').before(headerHTML);
});