Skip to content

Commit 86bd013

Browse files
committed
update
1 parent d7f66e3 commit 86bd013

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

src/components/OrbitHero.astro

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,10 @@ const { data } = Astro.props.entry;
461461
<o-arc class="grow-1x control-format" style="--o-color: var(--o-gray-light); --o-hover-color: var(--o-gray);" onclick="handleClick('format')"></o-arc>
462462
<o-arc class="grow-1x control-color" style="--o-color: var(--o-gray-light); --o-hover-color: var(--o-gray);" onclick="handleClick('color')"></o-arc>
463463
</div>
464-
<div class="orbit-4 shrink-10">
465-
<o-arc class="shrink-60 active-size" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
466-
<o-arc class="shrink-60 active-format" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
467-
<o-arc class="shrink-60 active-color" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
464+
<div class="orbit-4 ">
465+
<o-arc class="shrink-60 active-size inner-orbit" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
466+
<o-arc class="shrink-60 active-format inner-orbit" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
467+
<o-arc class="shrink-60 active-color inner-orbit" style="--o-color: var(--o-gray-darker); --o-hover-color: var(--o-gray);"></o-arc>
468468
</div>
469469
<div class="orbit-3 from-60">
470470
<div class="satellite " style="border-color: transparent; color: var(--o-gray-darker); pointer-events: none;">
@@ -1194,32 +1194,28 @@ function onScroll() {
11941194
function handleClick(button, subcontrol = false) {
11951195

11961196
if (!subcontrol) {
1197+
11971198
let otherButtons = document.querySelectorAll('[class*=option-]')
11981199
let otherButtons1 = document.querySelectorAll('[class*=suboption-]')
1199-
let otherActive = document.querySelectorAll('[class*=active-]')
1200+
let otherActive = document.querySelectorAll('[class*=active]')
12001201
let otherActive1 = document.querySelectorAll('[class*=subactive-]')
1202+
12011203
let group = [...otherButtons, ...otherButtons1, ...otherActive, ...otherActive1]
12021204
group.forEach(b => {
12031205
b.style.display = 'none'
12041206
b.style.opacity = 0
12051207
})
1206-
12071208
let control = document.querySelector(`.option-${button}`)
12081209
let active = document.querySelector(`.active-${button}`)
1210+
12091211

1210-
if (control.classList.contains('active')) {
1211-
control.style.display = 'none'
1212-
control.style.opacity = 0;
1213-
control.classList.remove('active')
1214-
active.style.display = 'none'
1215-
active.style.opacity = 0;
1216-
} else {
1212+
12171213
control.style.display = 'flex'
12181214
control.style.opacity = 1;
1219-
control.classList.add('active')
1215+
// control.classList.add('active')
12201216
active.style.display = 'flex'
12211217
active.style.opacity = 1;
1222-
}
1218+
12231219
} else {
12241220
let otherButtons1 = document.querySelectorAll('[class*=suboption-]')
12251221
let otherActive1 = document.querySelectorAll('[class*=subactive-]')

0 commit comments

Comments
 (0)