mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 03:56:19 +02:00
feat: improve mobile header and layout responsiveness
- Add sticky positioning to mobile header - Implement back navigation for mobile header - Adjust layout to use min-height instead of fixed height - Remove global scroll-smooth class for more flexible scrolling - Update dependencies to latest versions
This commit is contained in:
parent
4aec3ae6cf
commit
7498f93ef9
6 changed files with 99 additions and 67 deletions
|
@ -7,14 +7,28 @@ const currentPath = Astro.url.pathname
|
|||
const { getLocalizedPath } = getPagePath(currentPath)
|
||||
---
|
||||
|
||||
<header class="mt-4.7 text-8.6 c-secondary font-bold font-title lg:hidden">
|
||||
<header class="sticky top-8 z-9 mt-4.7 text-8.6 c-secondary font-bold font-title lg:hidden">
|
||||
<div
|
||||
class="box-content inline-block pr-2"
|
||||
transition:name="site-title"
|
||||
data-disable-transition-on-theme
|
||||
>
|
||||
<a href={getLocalizedPath('/')}>
|
||||
<a
|
||||
href={getLocalizedPath('/')}
|
||||
onclick="return _handleBack(event)"
|
||||
>
|
||||
{title}
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<script is:inline>
|
||||
function _handleBack(e) {
|
||||
if (window.history.length > 2) {
|
||||
e.preventDefault()
|
||||
window.history.back()
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue