mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-13 19:13:42 +02:00
Removed offset script
It kinda looks like it; but the main content is actually not offset from the center.
This commit is contained in:
parent
88414d897b
commit
04ccab7927
1 changed files with 0 additions and 12 deletions
|
@ -14,17 +14,5 @@
|
|||
<p>victor westerlund</p>
|
||||
<p><a href="https://github.com/VictorWesterlund">github</a></p>
|
||||
</main>
|
||||
<script>
|
||||
// Compensate for native elements (like the brower navbar)
|
||||
function updateOffset() {
|
||||
const offset = (window.outerHeight - window.innerHeight) / 2;
|
||||
if(offset > -1) {
|
||||
const main = document.getElementsByTagName("main")[0];
|
||||
main.style.setProperty("transform",`translateY(-${offset}px)`);
|
||||
}
|
||||
}
|
||||
window.addEventListener("resize",() => updateOffset());
|
||||
updateOffset();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue