diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5093bbe2..dd5b5e19 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,7 +21,6 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - if: ${{ github.ref == 'refs/heads/main' }} uses: docker/login-action@v3 with: registry: ghcr.io @@ -44,7 +43,7 @@ jobs: - name: Build Docker image (and push on main) uses: docker/build-push-action@v6 with: - push: ${{ github.ref == 'refs/heads/main' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/src/components/ContentPane/Collapsible/Collapsible.module.scss b/src/components/ContentPane/Collapsible/Collapsible.module.scss index 3b560c06..c273c144 100644 --- a/src/components/ContentPane/Collapsible/Collapsible.module.scss +++ b/src/components/ContentPane/Collapsible/Collapsible.module.scss @@ -10,17 +10,25 @@ background-color: transparent; overflow: hidden; padding-bottom: 0.5rem; + max-height: 10rem; } -.open { +input:checked + .content { max-height: unset; } -.closed { - max-height: 20rem; +input:checked ~ .button { + .open { + display: none; + } + .close { + display: block; + } } .button { + display: flex; + flex-direction: column; padding: 0; align-items: center; width: 100%; @@ -29,4 +37,11 @@ cursor: pointer; border: none; border-top: 2px solid var(--content-border-color); + + .open { + display: block; + } + .close { + display: none; + } } diff --git a/src/components/ContentPane/Collapsible/Collapsible.tsx b/src/components/ContentPane/Collapsible/Collapsible.tsx index c5e4bd93..e5f2e36d 100644 --- a/src/components/ContentPane/Collapsible/Collapsible.tsx +++ b/src/components/ContentPane/Collapsible/Collapsible.tsx @@ -1,21 +1,21 @@ -'use client'; - import styles from './Collapsible.module.scss'; import { MdOutlineExpandMore, MdOutlineExpandLess } from 'react-icons/md'; -import { useState } from 'react'; -const Collapsible = ({ children }: { children: React.ReactNode }) => { - const [open, setOpen] = useState(false); +const Collapsible = ({ + children, + id +}: { + children: React.ReactNode; + id: string; +}) => { return (