Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixs/layout hotfixs #22

Merged
merged 4 commits into from
Jun 26, 2024
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: 1 addition & 1 deletion frontend/src/assets/styles/base/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

body {
line-height: 1.5;
line-height: 1.25;
-webkit-font-smoothing: antialiased;
}

Expand Down
5 changes: 4 additions & 1 deletion frontend/src/assets/styles/components/_SharePopup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
h1 {
font-size: 25px;
text-align: center;
margin-bottom: 0.5rem;
padding: 1rem 1rem 0;
}

&__logo {
width: 25rem;
max-width: 100%;
padding: 0 1rem;
}

&__list {
margin-top: 0.5rem;
padding: 1rem;
gap: 0.75rem;
display: flex;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/assets/styles/pages/_Welcome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
height: 3.25rem;
font-size: 1.25rem;
width: 100%;
margin-top: 1rem !important;

&:hover {
opacity: 0.9;
Expand Down
47 changes: 28 additions & 19 deletions frontend/src/assets/styles/partials/_Result.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
display: flex;
height: 3.375rem;

&__img {
object-fit: contain;
background-color: var(--mui-palette-white-main);
width: 3.375rem;
height: 3.375rem;
&__img-container {
border-top-left-radius: 0.675rem;
border-bottom-left-radius: 0.675rem;
aspect-ratio: 1 / 1;
height: 100%;
overflow: hidden;
background-color: var(--mui-palette-white-main);
}

&__img {
width: 100%;
height: 100%;
object-fit: contain;
}

&__progress {
Expand All @@ -21,18 +27,19 @@
}
}

height: 3.375rem;
height: 100%;
border-radius: 0.675rem;
overflow: hidden;
width: 100%;
flex: 1;
position: relative;
}

&__bar {
transition: width 0.3s ease-in-out;
position: absolute;
display: block;
height: 3.375rem;
height: 100%;
padding: 0;
margin: 0;
animation: progress-bar 0.3s;
Expand All @@ -48,25 +55,25 @@
}

&__name {
left: 1rem;
color: var(--mui-palette-white-main);
position: absolute;
display: flex;
flex-direction: column;
height: 3.375rem;
width: calc(100% - 4rem);
height: 100%;
padding-left: 1rem;
justify-content: center;
text-align: left;

h4 {
margin: 0;
font-size: 1rem;
white-space: pre;
}

h5 {
margin: 0;
font-weight: normal;
font-size: 1rem;
white-space: pre;
}
}

Expand All @@ -88,10 +95,6 @@
}

&__score {
color: var(--mui-palette-white-main);
position: absolute;
right: 1rem;
line-height: 3.375rem;
font-weight: lighter;
font-size: 1.25rem;
}
Expand All @@ -101,14 +104,20 @@
&--multiple {
.Result {
&__score {
color: var(--mui-palette-white-main);
position: absolute;
text-align: right;
right: 1rem;
line-height: 0.8rem;
font-size: 0.7rem;
padding-top: 0.6rem;
}
}
}

&__score {
color: var(--mui-palette-white-main);
position: absolute;
right: 1rem;
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
}
}
12 changes: 7 additions & 5 deletions frontend/src/components/ResultListe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export default function ResultListe({ id, approval }) {
document.querySelector(".ListVotesModal .content").scrollTo(0, 0);
}}
>
<img
className="Result__img"
src={`/lists/${id}.svg`}
alt={data.lists[id].label}
/>
<div className="Result__img-container">
<img
className="Result__img"
src={`/lists/${id}.svg`}
alt={data.lists[id].label}
/>
</div>
<div className="Result__progress">
<div
className="Result__bar"
Expand Down
12 changes: 7 additions & 5 deletions frontend/src/components/ResultsDeputes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ export default function ResultsDeputes({ results }) {
key={id}
target="_blank"
>
<img
className="Result__img"
src={`/deputes/${id.slice(2)}.jpg`}
alt={data.deputes[id]?.l}
/>
<div className="Result__img-container">
<img
className="Result__img"
src={`/deputes/${id.slice(2)}.jpg`}
alt={data.deputes[id]?.l}
/>
</div>
<div className="Result__progress">
<div
className="Result__bar"
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/SharePopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ export default function SharePopup() {
key={id}
target="_blank"
>
<img src={`/lists/${id}.svg`} alt={data.lists[id].label} />
<div className="Result__img-container">
<img
className="Result__img"
src={`/lists/${id}.svg`}
alt={data.lists[id].label}
/>
</div>
<div className="Result__progress">
<div
className="Result__bar"
Expand Down
Loading