diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3b41cb5..378b02a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,10 +3,11 @@ name: Publish Release on: workflow_dispatch: push: - tags: - - v** branches: - - debug_docker_image + - 'main' + - 'debug_docker_image' + tags: + - 'v*' env: REGISTRY_IMAGE: daya0576/beaverhabits @@ -96,6 +97,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + version: v0.20.0 - name: Docker meta id: meta @@ -104,9 +107,8 @@ jobs: images: | ${{ env.REGISTRY_IMAGE }} tags: | - type=ref,event=branch + type=raw,value=latest,enable={{is_default_branch}} type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} type=sha - name: Create manifest list and push diff --git a/beaverhabits/frontend/habit_page.py b/beaverhabits/frontend/habit_page.py index 31bb904..9637643 100644 --- a/beaverhabits/frontend/habit_page.py +++ b/beaverhabits/frontend/habit_page.py @@ -31,11 +31,11 @@ def card_title(title: str, target: str): @contextmanager -def card(link: str | None = None, padding: float = 3): +def card(link: str | None = None, padding: float = 3, width: int = 350): with ui.card().classes("gap-0 no-shadow items-center") as card: card.classes(f"p-{padding}") card.classes("w-full") - card.style("max-width: 350px") + card.style(f"width: {width}px") if link: card.classes("cursor-pointer") card.on("click", lambda: redirect(link)) @@ -44,7 +44,7 @@ def card(link: str | None = None, padding: float = 3): @ui.refreshable def habit_page(today: datetime.date, habit: Habit): - with ui.column().classes("gap-y-3"): + with ui.column().classes("gap-y-3 grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3"): habit_calendar = CalendarHeatmap.build(today, WEEKS_TO_DISPLAY, calendar.MONDAY) target = get_habit_heatmap_path(habit)