Skip to content

Commit

Permalink
Update jumpClick and Options Padding
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr committed Oct 26, 2024
1 parent 785b0a6 commit 1ae20f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</head>
<body class="h-100">

<div class="d-flex align-items-center justify-content-center pt-3 px-1 px-sm-3 h-100 w-100">
<div class="d-flex align-items-center justify-content-center p-1 p-sm-3 h-100 w-100">
<div class="m-auto pb-4 w-100">
<div id="options-wrapper" class="glass-outline blur rounded rounded-4 p-3 m-auto w-100">
<div id="options-wrapper" class="glass-outline blur rounded rounded-3 p-2 p-sm-3 m-auto w-100">

<div class="d-flex flex-row justify-content-center mb-2">
<div>
Expand Down
16 changes: 8 additions & 8 deletions src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ function jumpClick(event) {
const hash = event.currentTarget.hash
console.debug('hash:', hash)
// $(hash).show('fast')
$(hash).show('fast', function () {
$('html, body').animate(
{
scrollTop: $(hash).offset().top - 50,
},
'fast'
)
hideShowSection(hash.substring(1), true)
const jq = $(hash)
jq.show('fast', () => {
const top = jq.offset().top - 30
console.debug('top:', top)
$('html, body').animate({ scrollTop: top }, 'fast')
})
// document.querySelector(
// `[data-section="${hash.substring(1)}"]`
// ).textContent = 'hide'
hideShowSection(hash.substring(1), true)
// hover.style.outline = '#00c800 solid 2px'
jq.css('#00c800 solid 2px')
}

function hideShowAll(event) {
Expand Down

0 comments on commit 1ae20f5

Please sign in to comment.