Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ MAILER_DSN=smtp://mailer:1025

STRIPE_URL="https://api.stripe.com"
STRIPE_API_KEY=

BOT_SERVER=http://bot:5000
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ supervisord.pid
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

###> python bot service ###
/python/**/__pycache__/
###< python bot service ###
1 change: 1 addition & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@use 'components/ui/black_card';
@use 'components/ui/button';
@use 'components/ui/colors_header';
@use 'components/ui/field';
@use 'components/ui/floating_background';
@use 'components/ui/form';

Expand Down
126 changes: 126 additions & 0 deletions assets/styles/components/ui/_field.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// Shared look for the <twig:ui:Toggle|NumberField|SelectField> components.
.field {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
font-size: 0.95rem;
color: var(--text-gray);
cursor: pointer;

&__label {
display: flex;
align-items: center;
gap: 0.5rem;
}

svg {
width: 1.1rem;
height: 1.1rem;
color: var(--text-gray-accent);
flex: none;
}
}

.switch {
appearance: none;
position: relative;
width: 2.6rem;
height: 1.5rem;
flex: none;
border-radius: 999px;
background: rgb(0 0 0 / 0.5);
border: 1px solid rgb(255 255 255 / 0.15);
cursor: pointer;
transition: background-color 0.2s, border-color 0.2s;

&::after {
content: '';
position: absolute;
top: 50%;
left: 0.15rem;
width: 1.1rem;
height: 1.1rem;
border-radius: 50%;
background: var(--text-gray);
transform: translateY(-50%);
transition: transform 0.2s, background-color 0.2s;
}

&:checked {
background: var(--bg-green-accent);
border-color: var(--text-green-light);

&::after {
background: #fff;
transform: translate(1.05rem, -50%);
}
}

&:focus-visible {
outline: 2px solid var(--text-green);
outline-offset: 2px;
}
}

.number-input {
width: 4.5rem;
color: var(--text-primary);
padding: 0.4rem 0.6rem;
border: 1px solid rgb(255 255 255 / 0.1);
border-radius: 0.5rem;
background-color: rgb(0 0 0 / 0.5);
font-size: 1rem;
text-align: center;
transition: border-color 0.2s;

&:hover {
border-color: rgb(255 255 255 / 0.25);
}

&:focus {
outline: 2px solid var(--text-green);
outline-offset: 1px;
}
}

.select {
position: relative;
display: inline-flex;
align-items: center;

select {
appearance: none;
color: var(--text-primary);
padding: 0.4rem 2rem 0.4rem 0.75rem;
border: 1px solid rgb(255 255 255 / 0.1);
border-radius: 0.5rem;
background-color: rgb(0 0 0 / 0.5);
font-size: 0.95rem;
cursor: pointer;
transition: border-color 0.2s;

&:hover {
border-color: rgb(255 255 255 / 0.25);
}

&:focus {
outline: 2px solid var(--text-green);
outline-offset: 1px;
}

option {
background: #111;
color: var(--text-primary);
}
}

// arrow sits on top of the native select, clicks pass through
svg {
position: absolute;
right: 0.6rem;
width: 1rem;
height: 1rem;
pointer-events: none;
}
}
99 changes: 54 additions & 45 deletions assets/styles/pages/home/_waiting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,51 +62,6 @@
gap: 1rem;
}

&__field {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
font-size: 0.95rem;
color: var(--text-gray);

span {
display: flex;
align-items: center;
gap: 0.5rem;
}

svg {
width: 1.1rem;
height: 1.1rem;
color: var(--text-gray-accent);
flex: none;
}

input[type='checkbox'] {
width: 1.25rem;
height: 1.25rem;
accent-color: var(--text-green);
cursor: pointer;
}

input[type='number'] {
width: 4rem;
color: var(--text-gray);
padding: 0.4rem 0.6rem;
border: 1px solid rgb(255 255 255 / 0.1);
border-radius: 0.5rem;
background-color: rgb(0 0 0 / 0.5);
font-size: 1rem;
text-align: center;

&:focus {
outline: 2px solid var(--text-green);
outline-offset: 1px;
}
}
}

&__list {
list-style: none;
padding: 0;
Expand Down Expand Up @@ -137,6 +92,60 @@
}
}

// segmented control: [-] (bot) n [+] - matches .button--medium's metrics so it
// lines up with its neighbours in .links-row
.bot-stepper {
display: flex;
align-items: stretch;
border-radius: 0.5rem;
overflow: hidden;
background: #dc2626;
color: #fff;

&__step {
display: flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1rem;
border: none;
background: transparent;
color: inherit;
cursor: pointer;
transition: background-color 0.3s;

svg {
width: 1.25rem;
height: 1.25rem;
}

&:hover:not(:disabled) {
background: var(--card-red);
}

&:disabled {
opacity: 0.4;
cursor: not-allowed;
}
}

&__count {
display: flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
min-width: 4.5rem;
padding: 0.75rem 0.5rem;
font-size: 1rem;
font-variant-numeric: tabular-nums;
background: rgba(0, 0, 0, 0.15);

svg {
width: 1.5rem;
height: 1.5rem;
}
}
}

.spinner {
width: 3em;
height: 3em;
Expand Down
10 changes: 10 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ services:
depends_on:
- db

bot:
build:
context: ./python
image: ghcr.io/fan2shrek/kard-bot:${VERSION:-latest}
working_dir: /app
volumes:
- ./python:/app
ports:
- "5001:5000"

volumes:
db_data:
mercure_data:
Expand Down
Loading
Loading