Skip to content

Commit

Permalink
Tune UI for 11" Display
Browse files Browse the repository at this point in the history
  • Loading branch information
hackenbergstefan committed Jan 20, 2025
1 parent 4995c68 commit cd55d02
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
17 changes: 8 additions & 9 deletions coffeebuddy/static/coffeebuddy.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ label {
}

.table {
--bs-table-striped-bg: var(--color-accent-4);
--bs-table-accent-bg: var(--color-bg);
--bs-table-active-bg: var(--color-bg);
--bs-table-bg: var(--color-bg);
--bs-table-color: var(--color-fg);
--bs-table-striped-bg: var(--color-accent-4);
--bs-table-accent-bg: var(--color-bg);
--bs-table-active-bg: var(--color-bg);
--bs-table-bg: var(--color-bg);
--bs-table-color: var(--color-fg);
}

.table-active {
--bs-table-color-state: var(--color-bg);
--bs-table-bg-state: var(--color-accent-2);
font-weight: bold;
--bs-table-color-state: var(--color-bg);
--bs-table-bg-state: var(--color-accent-2);
font-weight: bold;
}

.table>:not(caption)>*>* {
Expand Down Expand Up @@ -275,7 +275,6 @@ button {

#main-content {
display: flex;
overflow-y: scroll;
flex-grow: 1;
margin-right: 100px;
}
Expand Down
1 change: 1 addition & 0 deletions coffeebuddy/ui/base/templates/selectuser.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
scrollbar-width: none;
}

.item {
Expand Down
4 changes: 2 additions & 2 deletions coffeebuddy/ui/coffee/templates/brew.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}

.setting-name {
font-size: 12px;
font-size: 16px;
}

.setting-slider {
Expand Down Expand Up @@ -102,7 +102,7 @@ <h2>Brew {{ variant.name }}?</h2>
</div>
<div class="coffee-icon icon-{{ variant.icon }} flex-grow-2"></div>
</div>
<form method="post" class="d-flex flex-row justify-content-around">
<form method="post" class="d-flex flex-row justify-content-around mt-auto mb-3">
<button type="button"
name="yes"
class="btn-big fas fa-check"
Expand Down
3 changes: 2 additions & 1 deletion coffeebuddy/ui/coffee/templates/coffee.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
flex-wrap: wrap;
gap: 50px 50px;
overflow-y: auto;
scrollbar-width: none;
}

.coffee-icon-container {
Expand All @@ -31,7 +32,7 @@

.coffee-icon-text {
margin-top: auto;
font-size: 15px;
font-size: 18px;
text-transform: uppercase;
text-align: center;
line-height: 0.9;
Expand Down
12 changes: 8 additions & 4 deletions coffeebuddy/ui/coffee/templates/editcoffee.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
.coffee-icon {
position: absolute;
top: calc(50% - 150px);
right: 50px;
right: 10px;
width: 300px;
height: 300px;
background-repeat: no-repeat;
background-size: contain;
background-position: center;
filter: drop-shadow(10px 10px 10px black);
}

.settings-container {
display: flex;
width: calc(100% - 300px);
flex-direction: column;
justify-content: space-evenly;
justify-content: space-between;
margin-bottom: 20px;
}

.settings-name {
Expand All @@ -40,12 +42,13 @@
/* beautify ignore:end */

function sliderDrag() {
let clientX = event.type == "click" ? event.clientX:event.touches[0].clientX;
let slider = $(this);
let min = parseFloat(slider.attr('aria-valuemin'));
let max = parseFloat(slider.attr('aria-valuemax'));
let step = parseFloat(slider.attr('aria-valuestep'));
let width = slider.width();
let x = (event.touches[0].clientX - slider.offset().left) / width;
let x = (clientX - slider.offset().left) / width;
let percent = Math.min(1.0, Math.max(0.0, x));
let value = min + (Math.round((max - min) * percent / step) * step);
let valuePercent = (value - min) / (max - min);
Expand All @@ -60,6 +63,7 @@

$(() => {
$('.settings-slider').on("touchmove", sliderDrag);
$('.settings-slider').on("click", sliderDrag);
});
</script>
<script>
Expand Down Expand Up @@ -119,7 +123,7 @@ <h1>{{ title_text }}</h1>
{% block main_content %}
<div class="coffee-icon icon-{{ variant.icon }}"></div>
<form id="variant-settings" class="settings-container">
<div class="form-group row">
<div class="form-group">
<div class="col">
<label>Name</label>
<input class="form-control"
Expand Down

0 comments on commit cd55d02

Please sign in to comment.